38 namespace functionObjects
44 wallHeatTransferCoeff,
60 writeCommented(
file(),
"Time");
61 writeTabbed(
file(),
"patch");
62 writeTabbed(
file(),
"min");
63 writeTabbed(
file(),
"max");
64 writeTabbed(
file(),
"average");
104 if (!foundObject<basicThermo>(physicalProperties::typeName))
120 if (patchSet_.empty())
124 if (isA<wallPolyPatch>(pbm[
patchi]))
126 patchSet_.insert(patchi);
130 Info<<
" processing all wall patches" << nl <<
endl;
134 Info<<
" processing wall patches: " <<
nl;
139 if (isA<wallPolyPatch>(pbm[patchi]))
141 filteredPatchSet.
insert(patchi);
147 <<
"Requested wall heat-transferCoeff on non-wall boundary" 154 patchSet_ = filteredPatchSet;
157 coeffModel_->read(dict);
160 resetLocalObjectName(typeName);
169 lookupObject<momentumTransportModel>
171 momentumTransportModel::typeName
175 thtc = coeffModel_->htcByRhoCp(mmtm, patchSet_);
177 if (!foundObject<basicThermo>(physicalProperties::typeName))
179 thtc.
ref() *= rho_*Cp_;
184 lookupObject<basicThermo>(physicalProperties::typeName);
186 thtc.ref() *= thermo.
rho()*thermo.
Cp();
189 store(
"wallHeatTransferCoeff", thtc);
207 mesh_.magSf().boundaryField();
216 const scalar minHtcp =
gMin(hfp);
217 const scalar maxHtcp =
gMax(hfp);
218 const scalar averageHtcp =
219 gSum(magSf[patchi]*hfp)/
gSum(magSf[patchi]);
224 << mesh_.time().userTimeValue()
228 <<
tab << averageHtcp
232 Log <<
" min/max/average(" << pp.
name() <<
") = " 233 << minHtcp <<
", " << maxHtcp <<
", " << averageHtcp <<
endl;
const fvPatchList & patches
virtual bool write()
Write function.
Calculates the natural logarithm of the specified scalar field.
#define forAll(list, i)
Loop across all elements in list.
virtual bool write()
Write function.
const dimensionSet dimArea
const word & name() const
Return name.
fluidReactionThermo & thermo
Base-class for fluid and solid thermodynamic properties.
virtual tmp< volScalarField > rho() const =0
Density [kg/m^3].
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
virtual bool write()
Write the wall heat transfer coefficient.
Type gMin(const FieldField< Field, Type > &f)
virtual bool read(const dictionary &)
Read the wallHeatTransferCoeffs data.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
T & ref() const
Return non-const reference or generate a fatal error.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
addToRunTimeSelectionTable(functionObject, Qdot, dictionary)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
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.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void writeFileHeader(const label i)
File header information.
static autoPtr< wallHeatTransferCoeffModel > New(const word &name, const fvMesh &mesh, const dictionary &)
Return a reference to the selected subset.
Macros for easy insertion into run-time selection tables.
virtual const volScalarField & Cp() const =0
Heat capacity at constant pressure [J/kg/K].
const dimensionSet dimTime
virtual bool read(const dictionary &)
Read optional controls.
bool read(const char *, int32_t &)
const fileName & name() const
Return the dictionary name.
Type gSum(const FieldField< Field, Type > &f)
void writeHeader(std::ostream &, const bool isBinary, const std::string &title)
Write header.
A class for handling words, derived from string.
const dimensionSet dimDensity
Type gMax(const FieldField< Field, Type > &f)
word name(const complex &)
Return a string representation of a complex.
defineTypeNameAndDebug(Qdot, 0)
wallHeatTransferCoeff(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, mesh and dict.
Abstract base class for turbulence models (RAS, LES and laminar).
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.
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.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
virtual bool execute()
Calculate the wall heat transfer coefficient.
#define Log
Report write to Foam::Info if the local log switch is true.
virtual const word & name() const
Return name.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
List< wordRe > wordReList
A List of wordRe (word or regular expression)
A class for managing temporary objects.
virtual ~wallHeatTransferCoeff()
Destructor.
const dimensionSet dimTemperature
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...