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(),
293 phaseName_(phaseName),
297 dpdt_(getOrDefault<bool>(
"dpdt", true)),
299 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
300 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
306 phasePropertyName(
"thermo:alpha"),
324 const word& phaseName
331 phasePropertyName(
dictName, phaseName),
332 mesh.time().constant(),
340 phaseName_(phaseName),
344 dpdt_(getOrDefault<bool>(
"dpdt", true)),
346 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
347 T_(lookupOrConstruct(
mesh, phasePropertyName(
"T"), TOwner_)),
353 phasePropertyName(
"thermo:alpha"),
370 const word& phaseName,
371 const word& dictionaryName
379 mesh.time().constant(),
386 phaseName_(phaseName),
390 dpdt_(getOrDefault<bool>(
"dpdt", true)),
392 p_(lookupOrConstruct(
mesh,
"p", pOwner_)),
393 T_(lookupOrConstruct(
mesh,
"T", TOwner_)),
399 phasePropertyName(
"thermo:alpha"),
413 Pout<<
"Constructed shared thermo : mesh:" << mesh.
name()
414 <<
" phase:" << phaseName
415 <<
" dictionary:" << dictionaryName
429 const word& phaseName
432 return New<basicThermo>(
mesh, phaseName);
442 db().checkOut(p_.name());
447 db().checkOut(T_.name());
471 == &(pf.internalField())
489 if (!(
he().
name() == phasePropertyName(a)))
492 <<
"Supported energy type is " << phasePropertyName(a)
493 <<
", thermodynamics package provides " <<
he().
name()
508 he().
name() == phasePropertyName(a)
509 ||
he().
name() == phasePropertyName(
b)
514 <<
"Supported energy types: " << phasePropertyName(a)
515 <<
" and " << phasePropertyName(
b)
516 <<
", thermodynamics package provides " <<
he().
name()
532 he().
name() == phasePropertyName(a)
533 ||
he().
name() == phasePropertyName(
b)
534 ||
he().
name() == phasePropertyName(
c)
539 <<
"Supported energy types: " << phasePropertyName(a)
540 <<
", " << phasePropertyName(
b)
541 <<
" and " << phasePropertyName(
c)
542 <<
", thermodynamics package provides " <<
he().
name()
559 he().
name() == phasePropertyName(a)
560 ||
he().
name() == phasePropertyName(
b)
561 ||
he().
name() == phasePropertyName(
c)
562 ||
he().
name() == phasePropertyName(d)
567 <<
"Supported energy types: " << phasePropertyName(a)
568 <<
", " << phasePropertyName(
b)
569 <<
", " << phasePropertyName(
c)
570 <<
" and " << phasePropertyName(d)
571 <<
", thermodynamics package provides " <<
he().
name()
579 const std::string& thermoName,
580 const int nExpectedCmpts
587 const auto parsed = stringOps::splitAny<std::string>(thermoName,
" ,<>");
588 const int nParsed(parsed.size());
592 if (!nExpectedCmpts || nParsed == nExpectedCmpts)
596 auto iter = cmpts.begin();
597 for (
const auto& sub : parsed)
599 *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)