44 { KMethodType::mtFluidThermo,
"fluidThermo" },
45 { KMethodType::mtSolidThermo,
"solidThermo" },
46 { KMethodType::mtDirectionalSolidThermo,
"directionalSolidThermo" },
47 { KMethodType::mtLookup,
"lookup" },
48 { KMethodType::mtFunction,
"function" }
57 const word& calculationType,
58 const word& kappaName,
59 const word& alphaAniName,
64 method_(KMethodTypeNames_[calculationType]),
65 kappaName_(kappaName),
66 alphaAniName_(alphaAniName),
78 method_(KMethodTypeNames_.get(
"kappaMethod",
dict)),
79 kappaName_(
dict.getOrDefault<
word>(
"kappa",
word::null)),
80 alphaAniName_(
dict.getOrDefault<
word>(
"alphaAni",
word::null)),
90 <<
"Did not find entry 'alphaAni'"
91 " required for 'kappaMethod' "
104 <<
"Did not find entry 'kappa'"
105 " required for 'kappaMethod' "
107 <<
" Please set 'kappa' to the name of a volScalarField"
108 " or volSymmTensorField"
145 method_(base.method_),
146 kappaName_(base.kappaName_),
147 alphaAniName_(base.alphaAniName_),
148 alphaName_(base.alphaName_),
149 kappaFunction1_(base.kappaFunction1_.clone(patch_.patch())),
150 alphaFunction1_(base.alphaFunction1_.clone(patch_.patch()))
161 method_(base.method_),
162 kappaName_(base.kappaName_),
163 alphaAniName_(base.alphaAniName_),
164 alphaName_(base.alphaName_),
165 kappaFunction1_(base.kappaFunction1_.clone(patch_.patch())),
166 alphaFunction1_(base.alphaFunction1_.clone(patch_.patch()))
179 kappaFunction1_().autoMap(mapper);
183 alphaFunction1_().autoMap(mapper);
194 const auto* tcb = isA<temperatureCoupledBase>(ptf);
200 kappaFunction1_().rmap(tcb->kappaFunction1_(), addr);
204 alphaFunction1_().rmap(tcb->alphaFunction1_(), addr);
216 const label patchi = patch_.index();
233 return ptr->kappaEff(patchi);
243 return ptr->
kappa(patchi);
253 return ptr->
kappa(patchi);
271 <<
"Using kappaMethod " << KMethodTypeNames_[method_]
272 <<
", but thermo package not available\n"
283 return thermo.kappa(patchi);
287 case mtDirectionalSolidThermo:
304 return n & kappa &
n;
326 return n & KWall &
n;
331 <<
"Did not find field " << kappaName_
332 <<
" on mesh " <<
mesh.
name() <<
" patch " << patch_.name()
334 <<
" Please set 'kappa' to the name of a volScalarField"
335 <<
" or volSymmTensorField."
341 case KMethodType::mtFunction:
343 const auto& tm = patch_.patch().boundaryMesh().mesh().time();
344 return kappaFunction1_->value(tm.timeOutputValue());
351 <<
"Unimplemented method " << KMethodTypeNames_[method_] <<
nl
352 <<
"Please set 'kappaMethod' to one of "
354 <<
"and 'kappa' to the name of the volScalar"
355 <<
" or volSymmTensor field (if kappaMethod=lookup)"
372 const label patchi = patch_.index();
389 return ptr->alphaEff(patchi);
399 return ptr->
alpha(patchi);
409 return ptr->
alpha(patchi);
419 return ptr->
alpha(patchi);
424 <<
"Using kappaMethod " << KMethodTypeNames_[method_]
425 <<
", but thermo package not available\n"
436 return thermo.alpha(patchi);
440 case mtDirectionalSolidThermo:
450 return n & alphaAni &
n;
473 return n & alphaWall &
n;
478 <<
"Did not find field " << alphaName_
479 <<
" on mesh " <<
mesh.
name() <<
" patch " << patch_.name()
481 <<
"Please set 'kappaMethod' to one of "
483 <<
"and 'alpha' to the name of the volScalar"
484 <<
" or volSymmTensor field (if kappaMethod=lookup)"
491 case KMethodType::mtFunction:
493 const auto& tm = patch_.patch().boundaryMesh().mesh().time();
494 return alphaFunction1_->value(tm.timeOutputValue());
501 <<
"Unimplemented method " << KMethodTypeNames_[method_] <<
nl
502 <<
"Please set 'kappaMethod' to one of "
504 <<
"and 'alpha' to the name of the volScalar"
505 <<
" or volSymmTensor field (if kappaMethod=lookup)"
518 os.
writeEntry(
"kappaMethod", KMethodTypeNames_[method_]);
519 if (!kappaName_.empty())
523 if (!alphaAniName_.empty())
527 if (!alphaName_.empty())
533 kappaFunction1_->writeData(
os);
537 alphaFunction1_->writeData(
os);
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Abstract base-class for fluid and solid thermodynamic properties.
virtual tmp< volScalarField > kappa() const =0
Thermal diffusivity for temperature of mixture [J/m/s/K].
static const word dictName
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Fundamental fluid thermodynamic properties.
virtual bool write()
Write the output fields.
Mesh data needed to do the Finite Volume discretisation.
const word & name() const
Return reference to name.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static const word phasePropertiesName
Default name of the phase properties dictionary.
virtual tmp< volScalarField > kappaEff(const volScalarField &kappat) const
Effective thermal diffusivity for temperature.
bool foundObject(const word &name, const bool recursive=false) const
Is the named Type found?
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const Type & lookupObject(const word &name, const bool recursive=false) const
const polyMesh & mesh() const noexcept
Return the mesh reference.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Fundamental solid thermodynamic properties.
Common functions used in temperature coupled boundaries.
autoPtr< PatchFunction1< scalar > > alphaFunction1_
Function1 for alpha.
virtual void autoMap(const fvPatchFieldMapper &)=0
Map (and resize as needed) from self given a mapping object.
KMethodType
Type of supplied Kappa.
@ mtDirectionalSolidThermo
virtual void rmap(const fvPatchField< scalar > &, const labelList &)=0
Reverse map the given fvPatchField onto this fvPatchField.
static const Enum< KMethodType > KMethodTypeNames_
const KMethodType method_
How to get K.
autoPtr< PatchFunction1< scalar > > kappaFunction1_
Function1 for kappa.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
Abstract base class for turbulence models (RAS, LES and laminar).
static const word propertiesName
Default name of the turbulence properties dictionary.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)