Go to the documentation of this file.
62 if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
64 const fixedJumpFvPatchScalarField& pf =
65 dynamic_cast<const fixedJumpFvPatchScalarField&
>(tbf[patchi]);
67 hbt[patchi] = pf.interfaceFieldType();
69 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
71 const fixedJumpAMIFvPatchScalarField& pf =
72 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
>
77 hbt[patchi] = pf.interfaceFieldType();
87 const volScalarField::Boundary& tbf = this->T_.boundaryField();
93 if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
95 hbt[patchi] = fixedEnergyFvPatchScalarField::typeName;
99 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
100 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
103 hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
105 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
107 hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
109 else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
111 hbt[patchi] = energyJumpFvPatchScalarField::typeName;
113 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
115 hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
163 const word& phaseName
170 phasePropertyName(
dictName, phaseName),
178 phaseName_(phaseName),
180 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
182 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
183 TOwner_(getOrDefault<Switch>(
"updateT", TOwner_)),
189 phasePropertyName(
"thermo:alpha"),
199 dpdt_(getOrDefault<Switch>(
"dpdt",
true))
207 const word& phaseName
214 phasePropertyName(
dictName, phaseName),
223 phaseName_(phaseName),
225 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
227 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
228 TOwner_(getOrDefault<Switch>(
"updateT", TOwner_)),
234 phasePropertyName(
"thermo:alpha"),
244 dpdt_(getOrDefault<Switch>(
"dpdt",
true))
251 const word& phaseName,
252 const word& dictionaryName
267 phaseName_(phaseName),
269 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
271 T_(lookupOrConstruct(
mesh,
"T", TOwner_)),
272 TOwner_(getOrDefault<Switch>(
"updateT", TOwner_)),
278 phasePropertyName(
"thermo:alpha"),
288 dpdt_(getOrDefault<Switch>(
"dpdt",
true))
292 Pout<<
"Constructed shared thermo : mesh:" <<
mesh.
name()
293 <<
" phase:" << phaseName
294 <<
" dictionary:" << dictionaryName
295 <<
" T:" << T_.name()
296 <<
" updateT:" << TOwner_
297 <<
" alphaName:" << alpha_.name()
308 const word& phaseName
311 return New<basicThermo>(
mesh, phaseName);
344 &(iter()->
he().internalField())
362 if (!(
he().
name() == phasePropertyName(a)))
365 <<
"Supported energy type is " << phasePropertyName(a)
366 <<
", thermodynamics package provides " <<
he().name()
381 he().
name() == phasePropertyName(a)
382 ||
he().
name() == phasePropertyName(
b)
387 <<
"Supported energy types are " << phasePropertyName(a)
388 <<
" and " << phasePropertyName(
b)
389 <<
", thermodynamics package provides " <<
he().name()
405 he().
name() == phasePropertyName(a)
406 ||
he().
name() == phasePropertyName(
b)
407 ||
he().
name() == phasePropertyName(
c)
412 <<
"Supported energy types are " << phasePropertyName(a)
413 <<
", " << phasePropertyName(
b)
414 <<
" and " << phasePropertyName(
c)
415 <<
", thermodynamics package provides " <<
he().name()
432 he().
name() == phasePropertyName(a)
433 ||
he().
name() == phasePropertyName(
b)
434 ||
he().
name() == phasePropertyName(
c)
435 ||
he().
name() == phasePropertyName(d)
440 <<
"Supported energy types are " << phasePropertyName(a)
441 <<
", " << phasePropertyName(
b)
442 <<
", " << phasePropertyName(
c)
443 <<
" and " << phasePropertyName(d)
444 <<
", thermodynamics package provides " <<
he().name()
452 const word& thermoName,
463 (endb = thermoName.find(
'<', beg)) != string::npos
464 || (endc = thermoName.find(
',', beg)) != string::npos
467 if (endb == string::npos)
471 else if ((endc = thermoName.find(
',', beg)) != string::npos)
482 cmpts[i] = thermoName.substr(beg,
end-beg);
483 cmpts[i++].replaceAll(
">",
"");
502 if (beg < thermoName.size())
504 cmpts[i] = thermoName.substr(beg, string::npos);
505 cmpts[i].replaceAll(
">",
"");
int debug
Static debugging option.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
wordList heBoundaryTypes()
Return the enthalpy/internal energy field boundary types.
static const List< T > & null()
Return a null List.
A class for handling words, derived from Foam::string.
virtual ~basicThermo()
Destructor.
virtual volScalarField & p()
Pressure [Pa].
static constexpr const zero Zero
Global zero (0)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual bool read()
Read thermophysical properties dictionary.
psiReactionThermo & thermo
static word timeName(const scalar t, const int precision=precision_)
virtual bool read()
Read object.
const word dictName("blockMeshDict")
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Dimension set for the base types.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
#define forAll(list, i)
Loop across all elements in list.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
wordList heBoundaryBaseTypes()
Return the enthalpy/internal energy field boundary base types.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
word name(const complex &c)
Return string representation of complex.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
graph_traits< Graph >::vertices_size_type size_type
static wordList splitThermoName(const word &thermoName, const int nCmpt)
Split name of thermo package into a list of the components names.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
word dictName() const
The local dictionary name (final part of scoped name)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
Mesh data needed to do the Finite Volume discretisation.
void validate(const string &app, const word &) const
Check that the thermodynamics package is consistent.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A HashTable similar to std::unordered_map.
volScalarField & T_
Temperature [K].
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
basicThermo(const basicThermo &)
Construct as copy (not implemented)
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
virtual const volScalarField & T() const
Temperature [K].
forAllConstIters(mixture.phases(), phase)
const objectRegistry & db() const
Return local objectRegistry.
static const word null
An empty word.
const dimensionedScalar c
Speed of light in a vacuum.
const Time & time() const
Return the top-level database.
const word & constant() const
Return constant name.
static Table::iterator lookupThermo(const dictionary &thermoTypeDict, Table *tablePtr, std::initializer_list< const char * > cmptNames, const word &thermoTypeName)
Generic lookup for thermodynamics package thermoTypeName.
defineTypeNameAndDebug(combustionModel, 0)
static volScalarField & lookupOrConstruct(const fvMesh &mesh, const word &, bool &isOwner)
Look up or construct field.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const
Return reference to name.
PtrList< solidThermo > thermos(solidRegions.size())