81 const int nCmpt = cmptNames.
size();
93 outputTbl[rowi] = cmptNames;
94 if (!outputTbl[rowi].empty())
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") +
">>>"
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]))
212 isA<zeroGradientFvPatchScalarField>(tbf[patchi])
213 || isA<fixedGradientFvPatchScalarField>(tbf[patchi])
218 else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
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),
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
428 const word& phaseName
431 return New<basicThermo>(
mesh, phaseName);
441 db().checkOut(p_.name());
446 db().checkOut(T_.name());
473 &(
thermo->he().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());
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void resize(const label len)
wordList types() const
Return a list of the patch types.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
A HashTable similar to std::unordered_map.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
void resize(const label len)
Adjust allocated size of list.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
static word timeName(const scalar t, const int precision=precision_)
iterator begin() noexcept
Return an iterator to begin traversing the UList.
void size(const label n)
Older name for setAddressableSize.
label size() const noexcept
The number of elements in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Abstract base-class for fluid and solid thermodynamic properties.
virtual word thermoName() const =0
Return the name of the thermo physics.
static Ostream & printThermoNames(Ostream &os, const wordList &cmptNames, const wordList &thermoNames)
Print (filtered) table of thermo names, splits on " ,<>".
static const basicThermo & lookupThermo(const fvPatchScalarField &pf)
virtual const volScalarField & T() const
Temperature [K].
wordList heBoundaryTypes()
virtual volScalarField & p()
Pressure [Pa].
wordList heBoundaryBaseTypes()
static const word dictName
bool TOwner_
Temperature created and stored by this instance.
volScalarField & T_
Temperature [K].
virtual ~basicThermo()
Destructor.
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
Split thermo package name into a list of components names.
virtual const volScalarField & alpha() const
Thermal diffusivity for enthalpy of mixture [kg/m/s].
virtual bool read()
Read thermophysical properties dictionary.
volScalarField alpha_
Laminar thermal diffusivity [kg/m/s].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const word & name() const
Return reference to name.
const objectRegistry & db() const
Return local objectRegistry.
const DimensionedField< Type, volMesh > & internalField() const
Return dimensioned internal field reference.
virtual void validate()
Validate the turbulence fields after construction.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
const Type * findObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
const Type & lookupObject(const word &name, const bool recursive=false) const
constant condensation/saturation model.
virtual bool read()
Read object.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
PtrList< solidThermo > thermos(solidRegions.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
const word dictName("faMeshDefinition")
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIters(container, iter)
Iterate across all elements of the container object with const access.
static const char *const typeName
The type name used in ensight case files.