32#include "surfaceInterpolate.H"
43namespace functionObjects
78 for (
const label patchi : patchSet_)
80 wallHeatFluxBf[patchi] = alphaBf[patchi]*heBf[patchi].snGrad();
84 const auto* qrPtr = cfindObject<volScalarField>(qrName_);
90 for (
const label patchi : patchSet_)
92 wallHeatFluxBf[patchi] -= radHeatFluxBf[patchi];
129 mesh_.objectRegistry::store(wallHeatFluxPtr);
152 dict.readIfPresent(
"qr", qrName_);
156 if (patchSet_.empty())
160 if (isA<wallPolyPatch>(pbm[patchi]))
162 patchSet_.insert(patchi);
166 Info<<
" processing all wall patches" <<
nl <<
endl;
170 Info<<
" processing wall patches: " <<
nl;
172 for (
const label patchi : patchSet_)
174 if (isA<wallPolyPatch>(pbm[patchi]))
176 filteredPatchSet.
insert(patchi);
182 <<
"Requested wall heat-flux on non-wall boundary "
183 <<
"type patch: " << pbm[patchi].
name() <<
endl;
189 patchSet_ = filteredPatchSet;
198 auto&
wallHeatFlux = lookupObjectRef<volScalarField>(scopedName(typeName));
202 foundObject<compressible::turbulenceModel>
209 lookupObject<compressible::turbulenceModel>
217 turbModel.transport().he(),
242 foundObject<multiphaseInterSystem>
246 const auto&
thermo = lookupObject<multiphaseInterSystem>
256 <<
"Unable to find compressible turbulence model in the "
264 for (
const label patchi : patchSet_)
270 const scalar minHfp =
gMin(hfp);
271 const scalar maxHfp =
gMax(hfp);
272 const scalar integralHfp =
gSum(magSf[patchi]*hfp);
276 writeCurrentTime(file());
286 Log <<
" min/max/integ(" << pp.
name() <<
") = "
287 << minHfp <<
", " << maxHfp <<
", " << integralHfp <<
endl;
289 this->setResult(
"min(" + pp.
name() +
")", minHfp);
290 this->setResult(
"max(" + pp.
name() +
")", maxHfp);
291 this->setResult(
"int(" + pp.
name() +
")", integralHfp);
302 lookupObject<volScalarField>(scopedName(typeName));
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
virtual bool read()
Re-read model coefficients if they have changed.
The TAB Method for Numerical Calculation of Spray Droplet Breakup.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual tmp< volScalarField > alphaEff() const
Return the effective turbulent thermal diffusivity for enthalpy.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
static const word dictName
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Fundamental fluid thermodynamic properties.
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
word scopedName(const word &name) const
Return a scoped (prefixed) name.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
Computes the wall-heat flux at selected wall patches.
virtual bool read(const dictionary &dict)
Read the wallHeatFlux data.
virtual void writeFileHeader(Ostream &os) const
File header information.
virtual bool execute()
Calculate the wall heat-flux.
virtual bool write()
Write the wall heat-flux.
void calcHeatFlux(const volScalarField &alpha, const volScalarField &he, volScalarField &wallHeatFlux)
Calculate the heat-flux.
Base class for writing single files from the function objects.
virtual void writeTabbed(Ostream &os, const string &str) const
Write a tabbed string to stream.
virtual void writeHeader(Ostream &os, const string &str) const
Write a commented header to stream.
virtual OFstream & file()
Return access to the file (if only 1)
virtual void writeCommented(Ostream &os, const string &str) const
Write a commented string to stream.
const Time & time() const
Return the top-level database.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual const word & name() const
Return name.
static const word phasePropertiesName
Default name of the phase properties dictionary.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Fundamental solid thermodynamic properties.
splitCell * master() const
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
static const word propertiesName
Default name of the turbulence properties dictionary.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Calculate the snGrad of the given volField.
#define WarningInFunction
Report a warning using Foam::Warning.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar pow3(const dimensionedScalar &ds)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
messageStream Info
Information stream (stdout output on master, null elsewhere)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
Type gMin(const FieldField< Field, Type > &f)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gMax(const FieldField< Field, Type > &f)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.