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())
99 for (
const word& thermoName : thermoNames)
101 outputTbl[rowi] = basicThermo::splitThermoName(thermoName, nCmpt);
102 if (!outputTbl[rowi].empty())
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"),
315 this->readIfPresent(
"updateT", TOwner_);
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"),
362 this->readIfPresent(
"updateT", TOwner_);
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"),
408 this->readIfPresent(
"updateT", TOwner_);
412 Pout<<
"Constructed shared thermo : mesh:" <<
mesh.
name()
413 <<
" phase:" << phaseName
414 <<
" dictionary:" << dictionaryName
415 <<
" T:" << T_.name()
416 <<
" updateT:" << TOwner_
417 <<
" alphaName:" << alpha_.name()
428 const word& phaseName
431 return New<basicThermo>(
mesh, phaseName);
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());
int debug
Static debugging option.
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
Return dimensioned internal field reference.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
wordList heBoundaryTypes()
A class for handling words, derived from Foam::string.
virtual ~basicThermo()
Destructor.
void resize(const label len)
Adjust allocated size of list.
virtual volScalarField & p()
Pressure [Pa].
static constexpr const zero Zero
Global zero (0)
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
Search for an entry (const access) with the given keyword.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
virtual bool read()
Read thermophysical properties dictionary.
psiReactionThermo & thermo
const word dictName("faMeshDefinition")
static word timeName(const scalar t, const int precision=precision_)
virtual bool read()
Read object.
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.
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...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
#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()
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
static Ostream & printThermoNames(Ostream &os, const wordList &cmptNames, const wordList &thermoNames)
Print (filtered) table of thermo names, splits on " ,<>".
Ostream & printTable(const UList< wordList > &tbl, List< std::string::size_type > &columnWidths, Ostream &os, bool headerSeparator=true)
Print a List of wordList as a table.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
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)
Generic New for each of the related thermodynamics packages.
OBJstream os(runTime.globalPath()/outputName)
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.
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.
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.
const dimensionedScalar c
Speed of light in a vacuum.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
const Time & time() const
Return the top-level database.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const word & constant() const
Return constant name.
defineTypeNameAndDebug(combustionModel, 0)
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
Split thermo package name into a list of components names.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const
Return reference to name.
PtrList< solidThermo > thermos(solidRegions.size())
basicThermo(const basicThermo &)=delete
No copy construct.
word dictName() const
The local dictionary name (final part of scoped name)