81 const int nCmpt = cmptNames.
size();
93 outputTbl[rowi] = cmptNames;
94 if (!outputTbl[rowi].
empty())
102 if (!outputTbl[rowi].
empty())
120Foam::word Foam::basicThermo::makeThermoName
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") +
">>>"
175 dynamic_cast<const fixedJumpFvPatchScalarField&
>
180 hbt[patchi] = pf.interfaceFieldType();
185 dynamic_cast<const fixedJumpAMIFvPatchScalarField&
>
190 hbt[patchi] = pf.interfaceFieldType();
208 hbt[patchi] = fixedEnergyFvPatchScalarField::typeName;
216 hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
220 hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
241 const word& fieldName,
278 const word& phaseName
285 phasePropertyName(
dictName, phaseName),
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),
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
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
448 db().checkOut(p_.name());
477 == &(pf.internalField())
495 if (!(
he().
name() == phasePropertyName(a)))
499 <<
", thermodynamics package provides " <<
he().
name()
514 he().
name() == phasePropertyName(a)
515 ||
he().
name() == 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)
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)
577 <<
", thermodynamics package provides " <<
he().
name()
585 const std::string& thermoName,
586 const int nExpectedCmpts
594 const int nParsed(parsed.size());
598 if (!nExpectedCmpts || nParsed == nExpectedCmpts)
600 cmpts.resize(nParsed);
602 auto iter = cmpts.begin();
603 for (
const auto& sub : parsed)
605 *iter = word(sub.str());
646 return alpha_.boundaryField()[patchi];
bool empty() const noexcept
True if the list is empty.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void resize(const label len)
Alter addressable list size, allocating new space if required while recovering old content.
static const char *const typeName
Typename for Field.
wordList types() const
Return a list of the patch types.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const word & name() const noexcept
Return the object name.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
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 word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given 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 entries 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)
bool dpdt_
Include dpdt term in the enthalpy equation?
virtual const volScalarField & T() const
Temperature [K].
wordList heBoundaryTypes()
Return the enthalpy/internal energy field boundary types by interrogating the temperature field bound...
virtual volScalarField & p()
Pressure [Pa].
static word phasePropertyName(const word &name, const word &phaseName)
The phase property name as property.phase.
wordList heBoundaryBaseTypes()
Return the enthalpy/internal energy field boundary base types by interrogating the temperature field ...
static const word dictName
The dictionary name ("thermophysicalProperties").
bool pOwner_
Pressure created and stored by this instance.
bool TOwner_
Temperature created and stored by this instance.
volScalarField & p_
Pressure [Pa].
basicThermo(const basicThermo &)=delete
No copy construct.
virtual volScalarField & he()=0
Enthalpy/Internal energy [J/kg].
const word & phaseName_
Phase-name.
volScalarField & T_
Temperature [K].
word phaseScopedName(const std::string &scope, const word &name) const
The phase property name scoped as scope:property.phase.
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
void validate(const string &app, const word &) const
Check that the thermodynamics package is consistent.
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
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
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...
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 objectRegistry & db() const
The associated objectRegistry.
const DimensionedField< Type, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
UPtrList< const Type > cobjects() const
Return unsorted list of objects with a class satisfying isA<Type> or isType<Type> (with Strict).
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...
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.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
const word dictName("faMeshDefinition")
Different types of constants.
Namespace for handling debugging switches.
Foam::SubStrings splitAny(const std::string &str, const std::string &delim, std::string::size_type pos=0)
Split string into sub-strings using any characters in delimiter.
List< word > wordList
List of word.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
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).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
fvPatchField< scalar > fvPatchScalarField
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
psiReactionThermo & thermo
#define forAll(list, i)
Loop across all elements in list.