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)),
80 alphaName_(
dict.getOrDefault<
word>(
"alpha", word::null))
84 case mtDirectionalSolidThermo:
86 if (!
dict.found(
"alphaAni"))
89 <<
"Did not find entry 'alphaAni'"
90 " required for 'kappaMethod' "
91 << KMethodTypeNames_[method_]
100 if (!
dict.found(
"kappa"))
103 <<
"Did not find entry 'kappa'"
104 " required for 'kappaMethod' "
105 << KMethodTypeNames_[method_] <<
nl
106 <<
" Please set 'kappa' to the name of a volScalarField"
107 " or volSymmTensorField"
178 kappaFunction1_().autoMap(mapper);
182 alphaFunction1_().autoMap(mapper);
193 const auto* tcb = isA<temperatureCoupledBase>(ptf);
199 kappaFunction1_().rmap(tcb->kappaFunction1_(), addr);
203 alphaFunction1_().rmap(tcb->alphaFunction1_(), addr);
214 const fvMesh&
mesh = patch_.boundaryMesh().mesh();
215 const label patchi = patch_.index();
227 turbulenceModel::propertiesName
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"
279 return thermo.kappa(patchi);
283 case mtDirectionalSolidThermo:
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)"
367 const fvMesh&
mesh = patch_.boundaryMesh().mesh();
368 const label patchi = patch_.index();
380 turbulenceModel::propertiesName
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"
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)"
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.
const word alphaAniName_
Name of the non-Isotropic alpha (default: Anialpha)
A class for managing temporary objects.
autoPtr< PatchFunction1< scalar > > kappaFunction1_
Function1 for kappa.
const word dictName("faMeshDefinition")
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_
autoPtr< PatchFunction1< scalar > > alphaFunction1_
Function1 for alpha.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
virtual void autoMap(const fvPatchFieldMapper &)=0
Map (and resize as needed) from self given a mapping object.
Fundamental solid thermodynamic properties.
const KMethodType method_
How to get K.
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
ThermalDiffusivity< CompressibleTurbulenceModel< fluidThermo > > turbulenceModel
KMethodType
Type of supplied Kappa.
const fvPatch & patch_
Underlying patch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual tmp< scalarField > alpha(const scalarField &Tp) const
Given patch temperature calculate corresponding alphaEff field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
virtual tmp< volScalarField > kappa() const =0
Thermal diffusivity for temperature of mixture [J/m/s/K].
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)
const word alphaName_
Name of thermal diffusivity.
Mesh data needed to do the Finite Volume discretisation.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
virtual void rmap(const fvPatchField< scalar > &, const labelList &)=0
Reverse map the given fvPatchField onto this fvPatchField.
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)
Global function forwards to reuseTmpDimensionedField::New.
const word kappaName_
Name of thermal conductivity field (if looked up from database)
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
Templated wrapper class to provide compressible turbulence models thermal diffusivity based thermal t...
virtual tmp< scalarField > kappa(const scalarField &Tp) const
Given patch temperature calculate corresponding K field.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Foam::fvPatchFieldMapper.
void write(Ostream &os) const
Write.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
temperatureCoupledBase(const fvPatch &patch, const word &calculationMethod, const word &kappaName, const word &alphaAniName, const word &alphaName)
Construct from patch and K name.