Commit 64477972 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

functionObjects::wallHeatFlux: Added support for solid regions

Patch contributed by Stephan Goeke
parent a1a6f254
......@@ -14,6 +14,7 @@ EXE_INC = \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
......@@ -31,6 +32,7 @@ LIB_LIBS = \
-lsampling \
-lsurfMesh \
-lfluidThermophysicalModels \
-lsolidThermo \
-lincompressibleTransportModels \
-lturbulenceModels \
-lcompressibleTransportModels \
......
......@@ -24,6 +24,8 @@ License
\*---------------------------------------------------------------------------*/
#include "wallHeatFlux.H"
#include "turbulentFluidThermoModel.H"
#include "solidThermo.H"
#include "surfaceInterpolate.H"
#include "fvcSnGrad.H"
#include "wallPolyPatch.H"
......@@ -196,10 +198,7 @@ bool Foam::functionObjects::wallHeatFlux::read(const dictionary& dict)
bool Foam::functionObjects::wallHeatFlux::execute()
{
volScalarField& wallHeatFlux = const_cast<volScalarField&>
(
lookupObject<volScalarField>(type())
);
volScalarField& wallHeatFlux = lookupObjectRef<volScalarField>(type());
if
(
......@@ -234,6 +233,13 @@ bool Foam::functionObjects::wallHeatFlux::execute()
wallHeatFlux
);
}
else if (foundObject<solidThermo>(solidThermo::dictName))
{
const solidThermo& thermo =
lookupObject<solidThermo>(solidThermo::dictName);
calcHeatFlux(thermo.alpha(), thermo.he(), wallHeatFlux);
}
else
{
FatalErrorInFunction
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2017 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
......@@ -42,6 +42,7 @@ Usage
type wallHeatFlux;
libs ("libfieldFunctionObjects.so");
...
region fluid;
patches (".*Wall");
}
\endverbatim
......@@ -52,6 +53,7 @@ Usage
type | type name: wallHeatFlux | yes |
patches | list of patches to process | no | all wall patches
qr | name of radiative heat flux field | no | qr
region | region to be evaluated | no | default region
\endtable
See also
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment