functionObjects::wallHeatFlux: Added support for solid regions

Patch contributed by Stephan Goeke
This commit is contained in:
Henry Weller
2017-05-12 11:05:45 +01:00
committed by Andrew Heather
parent a1a6f25429
commit 644779725d
3 changed files with 15 additions and 5 deletions

View File

@ -14,6 +14,7 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \ -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \ -I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
@ -31,6 +32,7 @@ LIB_LIBS = \
-lsampling \ -lsampling \
-lsurfMesh \ -lsurfMesh \
-lfluidThermophysicalModels \ -lfluidThermophysicalModels \
-lsolidThermo \
-lincompressibleTransportModels \ -lincompressibleTransportModels \
-lturbulenceModels \ -lturbulenceModels \
-lcompressibleTransportModels \ -lcompressibleTransportModels \

View File

@ -24,6 +24,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "wallHeatFlux.H" #include "wallHeatFlux.H"
#include "turbulentFluidThermoModel.H"
#include "solidThermo.H"
#include "surfaceInterpolate.H" #include "surfaceInterpolate.H"
#include "fvcSnGrad.H" #include "fvcSnGrad.H"
#include "wallPolyPatch.H" #include "wallPolyPatch.H"
@ -196,10 +198,7 @@ bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
bool Foam::functionObjects::wallHeatFlux::execute() bool Foam::functionObjects::wallHeatFlux::execute()
{ {
volScalarField& wallHeatFlux = const_cast<volScalarField&> volScalarField& wallHeatFlux = lookupObjectRef<volScalarField>(type());
(
lookupObject<volScalarField>(type())
);
if if
( (
@ -234,6 +233,13 @@ bool Foam::functionObjects::wallHeatFlux::execute()
wallHeatFlux wallHeatFlux
); );
} }
else if (foundObject<solidThermo>(solidThermo::dictName))
{
const solidThermo& thermo =
lookupObject<solidThermo>(solidThermo::dictName);
calcHeatFlux(thermo.alpha(), thermo.he(), wallHeatFlux);
}
else else
{ {
FatalErrorInFunction FatalErrorInFunction

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation \\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,6 +42,7 @@ Usage
type wallHeatFlux; type wallHeatFlux;
libs ("libfieldFunctionObjects.so"); libs ("libfieldFunctionObjects.so");
... ...
region fluid;
patches (".*Wall"); patches (".*Wall");
} }
\endverbatim \endverbatim
@ -52,6 +53,7 @@ Usage
type | type name: wallHeatFlux | yes | type | type name: wallHeatFlux | yes |
patches | list of patches to process | no | all wall patches patches | list of patches to process | no | all wall patches
qr | name of radiative heat flux field | no | qr qr | name of radiative heat flux field | no | qr
region | region to be evaluated | no | default region
\endtable \endtable
See also See also