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();
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 : patchIDs_)
201 const scalar magU =
mag(URef_);
205 for (
const label patchi : patchIDs_)
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_);
#define R(A, B, C, D, E, F, K, M)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
compressible::turbulenceModel & turb
A field of fields is a PtrList of fields with reference counting.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
label size() const noexcept
The number of entries in the list.
static const word dictName
The dictionary name ("thermophysicalProperties").
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Fundamental fluid thermodynamic properties.
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
const fvPatch & patch() const noexcept
Return the patch.
tmp< vectorField > nf() const
Return face unit normals, like the fvMesh::unitSf() method Same as unitSf().
A base class for heat transfer coefficient models.
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
const fvMesh & mesh_
Const reference to the mesh.
heatTransferCoeffModel(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
tmp< FieldField< Field, scalar > > q() const
Return boundary fields of heat-flux field.
const word & TName() const noexcept
Return const reference to name of temperature field.
labelList patchIDs_
List of (wall) patches to process (selected by name).
Heat transfer coefficient calculation based on Reynolds Analogy, which is used to relate turbulent mo...
scalar CpRef_
Reference specific heat capacity.
scalar rhoRef_
Reference fluid density.
word UName_
Name of velocity field.
virtual tmp< volSymmTensorField > devReff() const
Return the effective stress tensor including the laminar stress.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
virtual tmp< scalarField > Cp(const label patchi) const
Return heat capacity at constant pressure [J/kg/K].
ReynoldsAnalogy(const dictionary &dict, const fvMesh &mesh, const word &TName)
Construct from components.
vector URef_
Reference velocity.
word rhoName_
Name of fluid density field.
virtual tmp< scalarField > rho(const label patchi) const
Return fluid density field [kg/m^3].
word CpName_
Name of specific heat capacity field.
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.
bool foundObject(const word &name, const bool recursive=false) const
Contains the named Type?
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...
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
Base-class for all transport models used by the incompressible turbulence models.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const volScalarField & Cp
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
A namespace for various heat transfer coefficient model implementations.
IncompressibleTurbulenceModel< transportModel > turbulenceModel
const dimensionSet dimViscosity
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
bool read(const char *buf, int32_t &val)
Same as readInt32.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
SymmTensor< Cmpt > devTwoSymm(const SymmTensor< Cmpt > &st)
Return the deviatoric part of twice the symmetric part of a SymmTensor.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
fvPatchField< vector > fvPatchVectorField
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define forAll(list, i)
Loop across all elements in list.