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,
278 const word& phaseName
285 phasePropertyName(
dictName, phaseName),
286 mesh.time().constant(),
294 phaseName_(phaseName),
298 dpdt_(getOrDefault<bool>(
"dpdt", true)),
300 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
301 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
307 phaseScopedName(
"thermo",
"alpha"),
326 const word& phaseName
333 phasePropertyName(
dictName, phaseName),
334 mesh.time().constant(),
343 phaseName_(phaseName),
347 dpdt_(getOrDefault<bool>(
"dpdt", true)),
349 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
350 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
356 phaseScopedName(
"thermo",
"alpha"),
374 const word& phaseName,
375 const word& dictionaryName
383 mesh.time().constant(),
391 phaseName_(phaseName),
395 dpdt_(getOrDefault<bool>(
"dpdt", true)),
397 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
398 T_(lookupOrConstruct(
mesh,
"T", TOwner_)),
404 phaseScopedName(
"thermo",
"alpha"),
419 Pout<<
"Constructed shared thermo : mesh:" << mesh.
name()
420 <<
" phase:" << phaseName
421 <<
" dictionary:" << dictionaryName
435 const word& phaseName
438 return New<basicThermo>(
mesh, phaseName);
448 db().checkOut(p_.name());
453 db().checkOut(T_.name());
477 == &(pf.internalField())
495 if (!(
he().
name() == phasePropertyName(a)))
498 <<
"Supported energy type is " << phasePropertyName(a)
499 <<
", thermodynamics package provides " <<
he().
name()
514 he().
name() == phasePropertyName(a)
515 ||
he().
name() == phasePropertyName(
b)
520 <<
"Supported energy types: " << phasePropertyName(a)
521 <<
" and " << phasePropertyName(
b)
522 <<
", thermodynamics package provides " <<
he().
name()
538 he().
name() == phasePropertyName(a)
539 ||
he().
name() == phasePropertyName(
b)
540 ||
he().
name() == phasePropertyName(
c)
545 <<
"Supported energy types: " << phasePropertyName(a)
546 <<
", " << phasePropertyName(
b)
547 <<
" and " << phasePropertyName(
c)
548 <<
", thermodynamics package provides " <<
he().
name()
565 he().
name() == phasePropertyName(a)
566 ||
he().
name() == phasePropertyName(
b)
567 ||
he().
name() == phasePropertyName(
c)
568 ||
he().
name() == phasePropertyName(d)
573 <<
"Supported energy types: " << phasePropertyName(a)
574 <<
", " << phasePropertyName(
b)
575 <<
", " << phasePropertyName(
c)
576 <<
" and " << phasePropertyName(d)
577 <<
", thermodynamics package provides " <<
he().
name()
585 const std::string& thermoName,
586 const int nExpectedCmpts
593 const auto parsed = stringOps::splitAny<std::string>(thermoName,
" ,<>");
594 const int nParsed(parsed.size());
598 if (!nExpectedCmpts || nParsed == nExpectedCmpts)
602 auto iter = cmpts.begin();
603 for (
const auto& sub : parsed)
605 *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].
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
Type of boundary fields.
const Time & time() const
Return the top-level database.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
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 expressions::valueTypeCode::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.
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 a time name for the given scalar time value 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)
UPtrList< const Type > cobjects() const
Return unsorted list of objects with a class satisfying isA<Type> or isType<Type> (with Strict) ...
List< word > wordList
List of word.
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...
Request registration (bool: true)
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].
static constexpr const zero Zero
Global zero (0)