38 namespace heatTransferCoeffModels
43 heatTransferCoeffModel,
64 return rho.boundaryField()[patchi];
68 <<
"Unable to set rho for patch " << patchi
78 if (CpName_ ==
"CpInf")
80 const label
n = mesh_.boundary()[patchi].size();
91 return thermo.Cp(pp, Tp, patchi);
95 <<
"Unable to set Cp for patch " << patchi
108 if (mesh_.foundObject<cmpTurbModel>(cmpTurbModel::propertiesName))
111 mesh_.lookupObject<cmpTurbModel>(cmpTurbModel::propertiesName);
113 return turb.devRhoReff()/
turb.rho();
115 else if (mesh_.foundObject<icoTurbModel>(icoTurbModel::propertiesName))
118 mesh_.lookupObject<icoTurbModel>(icoTurbModel::propertiesName);
120 return turb.devReff();
131 else if (mesh_.foundObject<transportModel>(
"transportProperties"))
133 const auto& laminarT =
134 mesh_.lookupObject<transportModel>(
"transportProperties");
140 else if (mesh_.foundObject<dictionary>(
"transportProperties"))
143 mesh_.lookupObject<dictionary>(
"transportProperties");
153 <<
"No valid model for viscous stress calculation" 167 auto& Cf = tCf.ref();
177 for (
const label patchi : patchSet_)
187 Cf[patchi] = 2*ttauByRhop/
magSqr(URef_);
201 const scalar magU =
mag(URef_);
205 for (
const label patchi : patchSet_)
210 htcBf[patchi] = 0.5*trhop*tCpp*magU*CfBf[patchi];
248 dict.readIfPresent(
"U", UName_);
249 dict.readEntry(
"UInf", URef_);
251 dict.readIfPresent(
"Cp", CpName_);
252 if (CpName_ ==
"CpInf")
254 dict.readEntry(
"CpInf", CpRef_);
257 dict.readIfPresent(
"rho", rhoName_);
258 if (rhoName_ ==
"rhoInf")
260 dict.readEntry(
"rhoInf", rhoRef_);
word dictName() const
The local dictionary name (final part of scoped name)
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor including the laminar stress.
ReynoldsAnalogy(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
defineTypeNameAndDebug(faceZoneReferenceTemperature, 0)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const fvPatch & patch() const noexcept
Return the patch.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalar rhoRef_
Reference fluid density.
tmp< vectorField > nf() const
Return face normals.
const dimensionSet dimViscosity
compressible::turbulenceModel & turb
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
virtual bool read(const dictionary &dict)
Read from dictionary.
Macros for easy insertion into run-time selection tables.
virtual tmp< scalarField > Cp(const label patchi) const
Return heat capacity at constant pressure [J/kg/K].
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
A field of fields is a PtrList of fields with reference counting.
#define forAll(list, i)
Loop across all elements in list.
A base class for heat transfer coefficient models.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
psiReactionThermo & thermo
Templated abstract base class for single-phase incompressible turbulence models.
virtual tmp< scalarField > rho(const label patchi) const
Return fluid density field [kg/m^3].
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
word rhoName_
Name of fluid density field.
A class for handling words, derived from Foam::string.
Fundamental fluid thermodynamic properties.
label size() const noexcept
The number of elements in the list.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
tmp< FieldField< Field, scalar > > Cf() const
Return skin friction coefficient field [-].
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const fvMesh & mesh_
Const reference to the mesh.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
const volScalarField & Cp
#define R(A, B, C, D, E, F, K, M)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
addToRunTimeSelectionTable(heatTransferCoeffModel, faceZoneReferenceTemperature, dictionary)
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
virtual bool read(const dictionary &dict)
Read from dictionary.
A class for managing temporary objects.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
static constexpr const zero Zero
Global zero (0)