Go to the documentation of this file.
43 { KMethodType::mtFluidThermo,
"fluidThermo" },
44 { KMethodType::mtSolidThermo,
"solidThermo" },
45 { KMethodType::mtDirectionalSolidThermo,
"directionalSolidThermo" },
46 { KMethodType::mtLookup,
"lookup" },
47 { KMethodType::mtFunction,
"function" }
56 const word& calculationType,
57 const word& kappaName,
58 const word& alphaAniName,
63 method_(KMethodTypeNames_[calculationType]),
64 kappaName_(kappaName),
65 alphaAniName_(alphaAniName),
77 method_(KMethodTypeNames_.
get(
"kappaMethod",
dict)),
78 kappaName_(
dict.getOrDefault<
word>(
"kappa",
word::null)),
79 alphaAniName_(
dict.getOrDefault<
word>(
"alphaAni",
word::null)),
86 if (!
dict.found(
"alphaAni"))
89 <<
"Did not find entry 'alphaAni'"
90 " required for 'kappaMethod' "
100 if (!
dict.found(
"kappa"))
103 <<
"Did not find entry 'kappa'"
104 " required for 'kappaMethod' "
106 <<
" Please set 'kappa' to the name of a volScalarField"
107 " or volSymmTensorField"
140 const temperatureCoupledBase& base
144 method_(base.method_),
145 kappaName_(base.kappaName_),
146 alphaAniName_(base.alphaAniName_),
147 alphaName_(base.alphaName_),
148 kappaFunction1_(base.kappaFunction1_.clone(patch_.
patch())),
149 alphaFunction1_(base.alphaFunction1_.clone(patch_.
patch()))
160 method_(base.method_),
161 kappaName_(base.kappaName_),
162 alphaAniName_(base.alphaAniName_),
163 alphaName_(base.alphaName_),
164 kappaFunction1_(base.kappaFunction1_.clone(patch_.
patch())),
165 alphaFunction1_(base.alphaFunction1_.clone(patch_.
patch()))
178 kappaFunction1_().autoMap(mapper);
182 alphaFunction1_().autoMap(mapper);
189 const fvPatchField<scalar>& ptf,
193 const auto* tcb = isA<temperatureCoupledBase>(ptf);
199 kappaFunction1_().rmap(tcb->kappaFunction1_(), addr);
203 alphaFunction1_().rmap(tcb->alphaFunction1_(), addr);
215 const label patchi = patch_.index();
232 return ptr->kappaEff(patchi);
242 return ptr->kappa(patchi);
252 return ptr->kappa(patchi);
262 return ptr->kappa(patchi);
267 <<
"Using kappaMethod " << KMethodTypeNames_[method_]
268 <<
", but thermo package not available\n"
276 const solidThermo&
thermo =
279 return thermo.kappa(patchi);
283 case mtDirectionalSolidThermo:
285 const solidThermo&
thermo =
322 return n & KWall &
n;
327 <<
"Did not find field " << kappaName_
328 <<
" on mesh " <<
mesh.
name() <<
" patch " << patch_.name()
330 <<
" Please set 'kappa' to the name of a volScalarField"
331 <<
" or volSymmTensorField."
337 case KMethodType::mtFunction:
339 const auto& tm = patch_.patch().boundaryMesh().mesh().time();
340 return kappaFunction1_->value(tm.timeOutputValue());
347 <<
"Unimplemented method " << KMethodTypeNames_[method_] <<
nl
348 <<
"Please set 'kappaMethod' to one of "
350 <<
"and 'kappa' to the name of the volScalar"
351 <<
" or volSymmTensor field (if kappaMethod=lookup)"
368 const label patchi = patch_.index();
385 return ptr->alphaEff(patchi);
395 return ptr->alpha(patchi);
405 return ptr->alpha(patchi);
415 return ptr->alpha(patchi);
420 <<
"Using kappaMethod " << KMethodTypeNames_[method_]
421 <<
", but thermo package not available\n"
429 const solidThermo&
thermo =
432 return thermo.alpha(patchi);
436 case mtDirectionalSolidThermo:
446 return n & alphaAni &
n;
469 return n & alphaWall &
n;
474 <<
"Did not find field " << alphaName_
475 <<
" on mesh " <<
mesh.
name() <<
" patch " << patch_.name()
477 <<
"Please set 'kappaMethod' to one of "
479 <<
"and 'alpha' to the name of the volScalar"
480 <<
" or volSymmTensor field (if kappaMethod=lookup)"
487 case KMethodType::mtFunction:
489 const auto& tm = patch_.patch().boundaryMesh().mesh().time();
490 return alphaFunction1_->value(tm.timeOutputValue());
497 <<
"Unimplemented method " << KMethodTypeNames_[method_] <<
nl
498 <<
"Please set 'kappaMethod' to one of "
500 <<
"and 'alpha' to the name of the volScalar"
501 <<
" or volSymmTensor field (if kappaMethod=lookup)"
514 os.
writeEntry(
"kappaMethod", KMethodTypeNames_[method_]);
515 if (!kappaName_.empty())
519 if (!alphaAniName_.empty())
523 if (!alphaName_.empty())
529 kappaFunction1_->writeData(
os);
533 alphaFunction1_->writeData(
os);
List< label > labelList
A List of labels.
@ mtDirectionalSolidThermo
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
A class for handling words, derived from Foam::string.
A class for managing temporary objects.
static const word dictName
autoPtr< PatchFunction1< scalar > > kappaFunction1_
const word dictName("faMeshDefinition")
static const word propertiesName
Fundamental fluid thermodynamic properties.
Common functions used in temperature coupled boundaries.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
Abstract base-class for fluid and solid thermodynamic properties.
static const Enum< KMethodType > KMethodTypeNames_
const polyBoundaryMesh & boundaryMesh() const
autoPtr< PatchFunction1< scalar > > alphaFunction1_
const dimensionedScalar kappa
virtual void autoMap(const fvPatchFieldMapper &)=0
bool foundObject(const word &name, const bool recursive=false) const
Field< symmTensor > symmTensorField
Specialisation of Field<T> for symmTensor.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Fundamental solid thermodynamic properties.
const polyMesh & mesh() const noexcept
const KMethodType method_
Generic templated field type.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual tmp< scalarField > alpha(const scalarField &Tp) const
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
virtual tmp< volScalarField > kappa() const =0
Abstract base class for turbulence models (RAS, LES and laminar).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Mesh data needed to do the Finite Volume discretisation.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
virtual void rmap(const fvPatchField< scalar > &, const labelList &)=0
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
virtual const volScalarField & alpha() const
#define FatalErrorInFunction
const Type * cfindObject(const word &name, const bool recursive=false) const
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
virtual tmp< scalarField > kappa(const scalarField &Tp) const
Ostream & writeEntry(const keyType &key, const T &value)
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
#define FatalIOErrorInFunction(ios)
Foam::fvPatchFieldMapper.
void write(Ostream &os) const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Generic GeometricField class.
temperatureCoupledBase(const fvPatch &patch, const word &calculationMethod, const word &kappaName, const word &alphaAniName, const word &alphaName)
const word & name() const