Go to the documentation of this file.
81 const int nCmpt = cmptNames.size();
88 outputTbl.
resize(thermoNames.size()+1);
93 outputTbl[rowi] = cmptNames;
94 if (!outputTbl[rowi].empty())
102 if (!outputTbl[rowi].empty())
122 const dictionary& thermoTypeDict,
126 if (thermoTypeDict.found(
"properties"))
130 cmptHeaderPtr = &(componentHeader4);
135 thermoTypeDict.get<word>(
"type") +
'<'
136 + thermoTypeDict.get<word>(
"mixture") +
'<'
137 + thermoTypeDict.get<word>(
"properties") +
','
138 + thermoTypeDict.get<word>(
"energy") +
">>"
145 cmptHeaderPtr = &(componentHeader7);
150 thermoTypeDict.get<word>(
"type") +
'<'
151 + thermoTypeDict.get<word>(
"mixture") +
'<'
152 + thermoTypeDict.get<word>(
"transport") +
'<'
153 + thermoTypeDict.get<word>(
"thermo") +
'<'
154 + thermoTypeDict.get<word>(
"equationOfState") +
'<'
155 + thermoTypeDict.get<word>(
"specie") +
">>,"
156 + thermoTypeDict.get<word>(
"energy") +
">>>"
166 const volScalarField::Boundary& tbf = this->T_.boundaryField();
172 if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
175 dynamic_cast<const fixedJumpFvPatchScalarField&
>
180 hbt[patchi] = pf.interfaceFieldType();
182 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
185 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
>
190 hbt[patchi] = pf.interfaceFieldType();
200 const volScalarField::Boundary& tbf = this->T_.boundaryField();
206 if (isA<fixedValueFvPatchScalarField>(tbf[patchi]))
208 hbt[patchi] = fixedEnergyFvPatchScalarField::typeName;
212 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
213 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
216 hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
218 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
220 hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
222 else if (isA<fixedJumpFvPatchScalarField>(tbf[patchi]))
224 hbt[patchi] = energyJumpFvPatchScalarField::typeName;
226 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
228 hbt[patchi] = energyJumpAMIFvPatchScalarField::typeName;
241 const word& fieldName,
277 const word& phaseName
284 phasePropertyName(
dictName, phaseName),
292 phaseName_(phaseName),
296 dpdt_(getOrDefault<
bool>(
"dpdt", true)),
298 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
299 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
305 phasePropertyName(
"thermo:alpha"),
323 const word& phaseName
330 phasePropertyName(
dictName, phaseName),
339 phaseName_(phaseName),
343 dpdt_(getOrDefault<
bool>(
"dpdt", true)),
345 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
346 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
352 phasePropertyName(
"thermo:alpha"),
369 const word& phaseName,
370 const word& dictionaryName
385 phaseName_(phaseName),
389 dpdt_(getOrDefault<
bool>(
"dpdt", true)),
391 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
392 T_(lookupOrConstruct(
mesh,
"T", TOwner_)),
398 phasePropertyName(
"thermo:alpha"),
412 Pout<<
"Constructed shared thermo : mesh:" << mesh.
name()
413 <<
" phase:" << phaseName
414 <<
" dictionary:" << dictionaryName
415 <<
" T:" <<
T_.name()
417 <<
" alphaName:" <<
alpha_.name()
428 const word& phaseName
431 return New<basicThermo>(
mesh, phaseName);
457 HashTable<const basicThermo*>
thermos =
465 &(
thermo->he().internalField())
483 if (!(
he().
name() == phasePropertyName(a)))
486 <<
"Supported energy type is " << phasePropertyName(a)
487 <<
", thermodynamics package provides " <<
he().name()
502 he().
name() == phasePropertyName(a)
503 ||
he().
name() == phasePropertyName(
b)
508 <<
"Supported energy types: " << phasePropertyName(a)
509 <<
" and " << phasePropertyName(
b)
510 <<
", thermodynamics package provides " <<
he().name()
526 he().
name() == phasePropertyName(a)
527 ||
he().
name() == phasePropertyName(
b)
528 ||
he().
name() == phasePropertyName(
c)
533 <<
"Supported energy types: " << phasePropertyName(a)
534 <<
", " << phasePropertyName(
b)
535 <<
" and " << phasePropertyName(
c)
536 <<
", thermodynamics package provides " <<
he().name()
553 he().
name() == phasePropertyName(a)
554 ||
he().
name() == phasePropertyName(
b)
555 ||
he().
name() == phasePropertyName(
c)
556 ||
he().
name() == phasePropertyName(d)
561 <<
"Supported energy types: " << phasePropertyName(a)
562 <<
", " << phasePropertyName(
b)
563 <<
", " << phasePropertyName(
c)
564 <<
" and " << phasePropertyName(d)
565 <<
", thermodynamics package provides " <<
he().name()
573 const std::string& thermoName,
574 const int nExpectedCmpts
581 const auto parsed = stringOps::splitAny<std::string>(thermoName,
" ,<>");
582 const int nParsed(parsed.size());
586 if (!nExpectedCmpts || nParsed == nExpectedCmpts)
590 auto iter = cmpts.begin();
591 for (
const auto& sub : parsed)
593 *iter = word(sub.str());
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
void resize(const label len)
const DimensionedField< Type, volMesh > & internalField() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
wordList heBoundaryTypes()
A class for handling words, derived from Foam::string.
void resize(const label len)
static constexpr const zero Zero
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
static const word dictName
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
psiReactionThermo & thermo
const word dictName("faMeshDefinition")
virtual const volScalarField & T() const
static word timeName(const scalar t, const int precision=precision_)
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)
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
List< word > wordList
A List of words.
HashTable< const Type * > lookupClass(const bool strict=false) const
wordList heBoundaryBaseTypes()
const dimensionedScalar b
Generic templated field type.
virtual word thermoName() const =0
static Ostream & printThermoNames(Ostream &os, const wordList &cmptNames, const wordList &thermoNames)
Ostream & printTable(const UList< wordList > &tbl, List< std::string::size_type > &columnWidths, Ostream &os, bool headerSeparator=true)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const Type & lookupObject(const word &name, const bool recursive=false) const
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)
OBJstream os(runTime.globalPath()/outputName)
Generic dimensioned Type class.
Mesh data needed to do the Finite Volume discretisation.
void validate(const string &app, const word &) const
errorManipArg< error, int > exit(error &err, const int errNo=1)
A HashTable similar to std::unordered_map.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual const volScalarField & alpha() const
#define FatalErrorInFunction
const Type * findObject(const word &name, const bool recursive=false) const
forAllConstIters(mixture.phases(), phase)
const objectRegistry & db() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const dimensionedScalar c
word name(const expressions::valueTypeCode typeCode)
virtual volScalarField & p()
const Time & time() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const word & constant() const
Generic GeometricField class.
constant condensation/saturation model.
defineTypeNameAndDebug(combustionModel, 0)
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const Boundary & boundaryField() const
const word & name() const
PtrList< solidThermo > thermos(solidRegions.size())
basicThermo(const basicThermo &)=delete