81 const int nCmpt = cmptNames.
size();
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") +
">>>" 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();
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]))
226 else if (isA<fixedJumpAMIFvPatchScalarField>(tbf[patchi]))
241 const word& fieldName,
277 const word& phaseName
284 phasePropertyName(
dictName, phaseName),
285 mesh.time().constant(),
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),
331 mesh.time().constant(),
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
378 mesh.time().constant(),
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
428 const word& phaseName
431 return New<basicThermo>(
mesh, phaseName);
441 db().checkOut(p_.name());
446 db().checkOut(T_.name());
465 HashTable<const basicThermo*>
thermos =
466 pf.db().lookupClass<basicThermo>();
474 == &(pf.internalField())
491 if (!(
he().
name() == phasePropertyName(a)))
494 <<
"Supported energy type is " << phasePropertyName(a)
495 <<
", thermodynamics package provides " <<
he().
name()
510 he().
name() == phasePropertyName(a)
511 ||
he().
name() == phasePropertyName(
b)
516 <<
"Supported energy types: " << phasePropertyName(a)
517 <<
" and " << phasePropertyName(
b)
518 <<
", thermodynamics package provides " <<
he().
name()
534 he().
name() == phasePropertyName(a)
535 ||
he().
name() == phasePropertyName(
b)
536 ||
he().
name() == phasePropertyName(
c)
541 <<
"Supported energy types: " << phasePropertyName(a)
542 <<
", " << phasePropertyName(
b)
543 <<
" and " << phasePropertyName(
c)
544 <<
", thermodynamics package provides " <<
he().
name()
561 he().
name() == phasePropertyName(a)
562 ||
he().
name() == phasePropertyName(
b)
563 ||
he().
name() == phasePropertyName(
c)
564 ||
he().
name() == phasePropertyName(d)
569 <<
"Supported energy types: " << phasePropertyName(a)
570 <<
", " << phasePropertyName(
b)
571 <<
", " << phasePropertyName(
c)
572 <<
" and " << phasePropertyName(d)
573 <<
", thermodynamics package provides " <<
he().
name()
581 const std::string& thermoName,
582 const int nExpectedCmpts
589 const auto parsed = stringOps::splitAny<std::string>(thermoName,
" ,<>");
590 const int nParsed(parsed.size());
594 if (!nExpectedCmpts || nParsed == nExpectedCmpts)
598 auto iter = cmpts.begin();
599 for (
const auto& sub : parsed)
601 *iter = word(sub.str());
word dictName() const
The local dictionary name (final part of scoped name)
virtual ~basicThermo()
Destructor.
void size(const label n)
Older name for setAddressableSize.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
Abstract base-class for fluid and solid thermodynamic properties.
errorManipArg< error, int > exit(error &err, const int errNo=1)
void resize(const label len)
Adjust allocated size of list.
virtual bool read()
Read object.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & name() const noexcept
Return the object name.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
virtual word thermoName() const =0
Return the name of the thermo physics.
void resize(const label len)
Alter addressable list size, allocating new space if required while recovering old content...
const word dictName("faMeshDefinition")
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
virtual const volScalarField & T() const
Temperature [K].
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
const Time & time() const
Return the top-level database.
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define forAll(list, i)
Loop across all elements in list.
virtual volScalarField & p()
Pressure [Pa].
GeometricField< scalar, fvPatchField, volMesh > volScalarField
psiReactionThermo & thermo
static const char *const typeName
Typename for Field.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
wordList heBoundaryBaseTypes()
Return the enthalpy/internal energy field boundary base types by interrogating the temperature field ...
basicThermo(const basicThermo &)=delete
No copy construct.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
Split thermo package name into a list of components names.
fvPatchField< scalar > fvPatchScalarField
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
A class for handling words, derived from Foam::string.
PtrList< solidThermo > thermos(solidRegions.size())
wordList heBoundaryTypes()
Return the enthalpy/internal energy field boundary types by interrogating the temperature field bound...
const objectRegistry & db() const noexcept
Return the local objectRegistry.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
static word timeName(const scalar t, const int precision=precision_)
Return time name of given scalar time formatted with the given precision.
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
int debug
Static debugging option.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry if present, and assign to T val. FatalIOError if it is found and the number of tokens i...
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
List< word > wordList
A List of words.
volScalarField alpha_
Laminar thermal diffusivity [kg/m/s].
bool TOwner_
Temperature created and stored by this instance.
const word & name() const
Return reference to name.
Mesh data needed to do the Finite Volume discretisation.
const dimensionedScalar c
Speed of light in a vacuum.
Automatically write from objectRegistry::writeObject()
virtual bool read()
Read thermophysical properties dictionary.
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void validate(const string &app, const word &) const
Check that the thermodynamics package is consistent.
Defines the attributes of an object for which implicit objectRegistry management is supported...
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
volScalarField & T_
Temperature [K].
forAllConstIters(mixture.phases(), phase)
static constexpr const zero Zero
Global zero (0)