30 template<
class Thermo,
class Table>
36 const char* cmptNames[],
37 const word& thermoTypeName
41 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
44 if (cstrIter == tablePtr->end())
47 <<
"Unknown " << Thermo::typeName <<
" type " <<
nl 48 <<
"thermoType" << thermoTypeDict <<
nl <<
nl 49 <<
"Valid " << Thermo::typeName <<
" types are:" 62 validThermoTypeNames.size() + 1
65 validThermoTypeNameCmpts[0].
setSize(nCmpt);
66 forAll(validThermoTypeNameCmpts[0], j)
68 validThermoTypeNameCmpts[0][j] = cmptNames[j];
74 forAll(validThermoTypeNames, i)
78 Thermo::splitThermoName(validThermoTypeNames[i], nCmpt)
83 validThermoTypeNameCmpts[j++] = names;
86 validThermoTypeNameCmpts.
setSize(j);
99 template<
class Thermo,
class Table>
106 if (thermoDict.
isDict(
"thermoType"))
110 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
112 if (thermoTypeDict.
found(
"properties"))
115 const char* cmptNames[nCmpt] =
124 const word thermoTypeName
127 +
word(thermoTypeDict.
lookup(
"mixture")) +
'<' 128 +
word(thermoTypeDict.
lookup(
"properties")) +
',' 129 +
word(thermoTypeDict.
lookup(
"energy")) +
">>" 132 return lookupThermo<Thermo, Table>
144 const char* cmptNames[nCmpt] =
156 const word thermoTypeName
159 +
word(thermoTypeDict.
lookup(
"mixture")) +
'<' 160 +
word(thermoTypeDict.
lookup(
"transport")) +
'<' 162 +
word(thermoTypeDict.
lookup(
"equationOfState")) +
'<' 163 +
word(thermoTypeDict.
lookup(
"specie")) +
">>," 164 +
word(thermoTypeDict.
lookup(
"energy")) +
">>>" 167 return lookupThermo<Thermo, Table>
179 const word thermoTypeName(thermoDict.
lookup(
"thermoType"));
181 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
183 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
185 if (cstrIter == tablePtr->end())
188 <<
"Unknown " << Thermo::typeName <<
" type " 189 << thermoTypeName <<
nl <<
nl 190 <<
"Valid " << Thermo::typeName <<
" types are:" <<
nl 191 << tablePtr->sortedToc() <<
nl 200 template<
class Thermo>
204 const word& phaseName
211 phasePropertyName(
dictName, phaseName),
214 IOobject::MUST_READ_IF_MODIFIED,
220 typename Thermo::fvMeshConstructorTable::iterator cstrIter =
221 lookupThermo<Thermo, typename Thermo::fvMeshConstructorTable>
224 Thermo::fvMeshConstructorTablePtr_
231 template<
class Thermo>
236 const word& phaseName
239 typename Thermo::dictionaryConstructorTable::iterator cstrIter =
240 lookupThermo<Thermo, typename Thermo::dictionaryConstructorTable>
243 Thermo::dictionaryConstructorTablePtr_
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
A class for handling words, derived from string.
const word & constant() const
Return constant name.
const word dictName("particleTrackDict")
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
static Table::iterator lookupThermo(const dictionary &thermoTypeDict, Table *tablePtr, const int nCmpt, const char *cmptNames[], const word &thermoTypeName)
Generic lookup for thermodynamics package thermoTypeName.
void setSize(const label)
Reset size of List.
Mesh data needed to do the Finite Volume discretisation.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.