37 .replace(
"multiComponent",
"multicomponent");
41 template<
class Thermo,
class Table>
47 const char* cmptNames[],
48 const word& thermoTypeName
52 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
54 if (cstrIter == tablePtr->end())
68 {
"type", thermoTypeDict.
lookup(
"type")},
70 {
"transport", thermoTypeDict.
lookup(
"transport")},
71 {
"thermo", thermoTypeDict.
lookup(
"thermo")},
74 thermoTypeDict.
lookup(
"equationOfState")
76 {
"specie", thermoTypeDict.
lookup(
"specie")},
77 {
"energy", thermoTypeDict.
lookup(
"energy")}
80 cstrIter = tablePtr->find(thermoTypeName);
82 if (cstrIter == tablePtr->end())
85 <<
"Compilation and linkage of "
86 << Thermo::typeName <<
" type " <<
nl
87 <<
"thermoType" << thermoTypeDict <<
nl <<
nl
88 <<
"failed." <<
nl <<
nl
89 <<
"Valid " << Thermo::typeName <<
" types are:"
97 <<
"Unknown " << Thermo::typeName <<
" type " <<
nl
98 <<
"thermoType" << thermoTypeDict <<
nl <<
nl
99 <<
"Valid " << Thermo::typeName <<
" types are:"
103 if (cstrIter == tablePtr->end())
106 wordList validThermoTypeNames(tablePtr->sortedToc());
113 forAll(validThermoTypeNameCmpts[0], i)
115 validThermoTypeNameCmpts[0][i] = cmptNames[i];
121 forAll(validThermoTypeNames, i)
125 Thermo::splitThermoName(validThermoTypeNames[i], nCmpt)
130 validThermoTypeNameCmpts.
append(names);
145 template<
class Thermo,
class Table>
152 if (thermoDict.
isDict(
"thermoType"))
156 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
158 if (thermoTypeDict.
found(
"properties"))
161 const char* cmptNames[nCmpt] =
170 const word thermoTypeName
174 +
word(thermoTypeDict.
lookup(
"properties")) +
','
175 +
word(thermoTypeDict.
lookup(
"energy")) +
">>"
178 return lookupCstrIter<Thermo, Table>
190 const char* cmptNames[nCmpt] =
202 const word thermoTypeName
206 +
word(thermoTypeDict.
lookup(
"transport")) +
'<'
208 +
word(thermoTypeDict.
lookup(
"equationOfState")) +
'<'
209 +
word(thermoTypeDict.
lookup(
"specie")) +
">>,"
210 +
word(thermoTypeDict.
lookup(
"energy")) +
">>>"
213 return lookupCstrIter<Thermo, Table>
225 const word thermoTypeName(thermoDict.
lookup(
"thermoType"));
227 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
229 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
231 if (cstrIter == tablePtr->end())
234 <<
"Unknown " << Thermo::typeName <<
" type "
235 << thermoTypeName <<
nl <<
nl
236 <<
"Valid " << Thermo::typeName <<
" types are:" <<
nl
237 << tablePtr->sortedToc() <<
nl
248 template<
class Thermo>
252 const word& phaseName
260 typename Thermo::fvMeshConstructorTable::iterator cstrIter =
261 lookupCstrIter<Thermo, typename Thermo::fvMeshConstructorTable>
264 Thermo::fvMeshConstructorTablePtr_
#define forAll(list, i)
Loop across all elements in list.
Foam::word mixtureName(const Foam::dictionary &thermoTypeDict)
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void size(const label)
Override size to be inconsistent with allocated storage.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static Table::iterator lookupCstrIter(const dictionary &thermoTypeDict, Table *tablePtr, const int nCmpt, const char *cmptNames[], const word &thermoTypeName)
Get the constructor iterator for the given thermo dictionary and.
static autoPtr< Thermo > New(const fvMesh &, const word &phaseName=word::null)
Generic New for each of the related thermodynamics packages.
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
static int allowSystemOperations
Flag if system operations are allowed.
static fileName resolveTemplate(const fileName &templateName)
Resolve code-template via the codeTemplateEnvName.
Mesh data needed to do the Finite Volume discretisation.
static IOobject findModelDict(const objectRegistry &obr, const word &group, bool registerObject=false)
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
fluidMulticomponentThermo & thermo