35 namespace functionObjects
41 wallHeatTransferCoeff,
56 writeHeader(file(),
"Wall heat transfer coefficient");
57 writeCommented(file(),
"Time");
58 writeTabbed(file(),
"patch");
59 writeTabbed(file(),
"min");
60 writeTabbed(file(),
"max");
61 writeTabbed(file(),
"integral");
80 mesh_.time().timeName(),
93 volScalarField::Boundary& wallHeatTransferCoeffBf =
94 twallHeatTransferCoeff.
ref().boundaryFieldRef();
101 if (!wallHeatTransferCoeffBf[
patchi].coupled())
103 wallHeatTransferCoeffBf[
patchi] =
108 return twallHeatTransferCoeff;
114 Foam::functionObjects::wallHeatTransferCoeff::wallHeatTransferCoeff
128 resetLocalObjectName(typeName);
155 if (patchSet_.empty())
159 if (isA<wallPolyPatch>(pbm[
patchi]))
161 patchSet_.insert(patchi);
165 Info<<
" processing all wall patches" << nl <<
endl;
169 Info<<
" processing wall patches: " <<
nl;
174 if (isA<wallPolyPatch>(pbm[patchi]))
176 filteredPatchSet.
insert(patchi);
182 <<
"Requested wall heat-transferCoeff on non-wall boundary " 189 patchSet_ = filteredPatchSet;
192 dict.
lookup(
"rho") >> rho_;
194 dict.
lookup(
"Prl") >> Prl_;
195 dict.
lookup(
"Prt") >> Prt_;
207 foundObject<incompressible::turbulenceModel>
214 lookupObject<incompressible::turbulenceModel>
222 calcHeatTransferCoeff(turbModel.
nu(), turbModel.
nut())
228 <<
"Unable to find incompressible turbulence model in the " 249 const surfaceScalarField::Boundary& magSf =
250 mesh_.magSf().boundaryField();
259 const scalar minHtcp =
gMin(hfp);
260 const scalar maxHtcp =
gMax(hfp);
261 const scalar integralHtcp =
gSum(magSf[patchi]*hfp);
266 << mesh_.time().value()
270 <<
tab << integralHtcp
274 Log <<
" min/max/integ(" << pp.
name() <<
") = " 275 << minHtcp <<
", " << maxHtcp <<
", " << integralHtcp <<
endl;
virtual bool write()
Write function.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool write()
Write the wall heat transfer coefficient.
Type gMin(const FieldField< Field, Type > &f)
virtual bool read(const dictionary &)
Read the wallHeatTransferCoeff data.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
Calculates and write the estimated incompressible flow heat transfer coefficient at wall patches as t...
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
tmp< volScalarField > calcHeatTransferCoeff(const volScalarField &nu, const volScalarField &nut)
Calculate the heat transfer coefficient.
static bool master(const label communicator=0)
Am I the master process.
bool insert(const Key &key)
Insert a new entry.
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool usePatchGroups=true) const
Return the set of patch IDs corresponding to the given names.
const ObjectType & lookupObject(const word &fieldName) const
Lookup object from the objectRegistry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void writeFileHeader(const label i)
File header information.
const word & name() const
Return name.
Macros for easy insertion into run-time selection tables.
Templated abstract base class for single-phase incompressible turbulence models.
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
Type gSum(const FieldField< Field, Type > &f)
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from string.
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
fileName::Type type(const fileName &, const bool followLink=true)
Return the file type: DIRECTORY or FILE.
dimensionedScalar pow3(const dimensionedScalar &ds)
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
FunctionObject base class for managing a list of objects on behalf of the inheriting function object...
virtual bool read(const dictionary &)
Read the list of objects to be written.
virtual bool execute()
Calculate the wall heat transfer coefficient.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
#define Log
Report write to Foam::Info if the local log switch is true.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
List< wordRe > wordReList
A List of wordRe (word or regular expression)
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
virtual tmp< volScalarField > nut() const =0
Return the turbulence viscosity.
A class for managing temporary objects.
virtual ~wallHeatTransferCoeff()
Destructor.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
addToRunTimeSelectionTable(functionObject, add, dictionary)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
virtual tmp< volScalarField > nu() const
Return the laminar viscosity.