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())
69 {
"type", thermoTypeDict.
lookup(
"type")},
71 {
"transport", thermoTypeDict.
lookup(
"transport")},
72 {
"thermo", thermoTypeDict.
lookup(
"thermo")},
75 thermoTypeDict.
lookup(
"equationOfState")
77 {
"specie", thermoTypeDict.
lookup(
"specie")},
78 {
"energy", thermoTypeDict.
lookup(
"energy")}
81 cstrIter = tablePtr->find(thermoTypeName);
83 if (cstrIter == tablePtr->end())
86 <<
"Compilation and linkage of "
87 << Thermo::typeName <<
" type " <<
nl
88 <<
"thermoType" << thermoTypeDict <<
nl <<
nl
89 <<
"failed." <<
nl <<
nl
90 <<
"Valid " << Thermo::typeName <<
" types are:"
98 <<
"Unknown " << Thermo::typeName <<
" type " <<
nl
99 <<
"thermoType" << thermoTypeDict <<
nl <<
nl
100 <<
"Valid " << Thermo::typeName <<
" types are:"
104 if (cstrIter == tablePtr->end())
107 wordList validThermoTypeNames(tablePtr->sortedToc());
114 forAll(validThermoTypeNameCmpts[0], i)
116 validThermoTypeNameCmpts[0][i] = cmptNames[i];
122 forAll(validThermoTypeNames, i)
126 Thermo::splitThermoName(validThermoTypeNames[i], nCmpt)
131 validThermoTypeNameCmpts.
append(names);
146 template<
class Thermo,
class Table>
153 if (thermoDict.
isDict(
"thermoType"))
157 Info<<
"Selecting thermodynamics package " << thermoTypeDict <<
endl;
159 if (thermoTypeDict.
found(
"properties"))
162 const char* cmptNames[nCmpt] =
171 const word thermoTypeName
175 +
word(thermoTypeDict.
lookup(
"properties")) +
','
176 +
word(thermoTypeDict.
lookup(
"energy")) +
">>"
179 return lookupCstrIter<Thermo, Table>
191 const char* cmptNames[nCmpt] =
203 const word thermoTypeName
207 +
word(thermoTypeDict.
lookup(
"transport")) +
'<'
209 +
word(thermoTypeDict.
lookup(
"equationOfState")) +
'<'
210 +
word(thermoTypeDict.
lookup(
"specie")) +
">>,"
211 +
word(thermoTypeDict.
lookup(
"energy")) +
">>>"
214 return lookupCstrIter<Thermo, Table>
226 const word thermoTypeName(thermoDict.
lookup(
"thermoType"));
228 Info<<
"Selecting thermodynamics package " << thermoTypeName <<
endl;
230 typename Table::iterator cstrIter = tablePtr->find(thermoTypeName);
232 if (cstrIter == tablePtr->end())
235 <<
"Unknown " << Thermo::typeName <<
" type "
236 << thermoTypeName <<
nl <<
nl
237 <<
"Valid " << Thermo::typeName <<
" types are:" <<
nl
238 << tablePtr->sortedToc() <<
nl
247 template<
class FieldType>
253 const word&
name = physicalProperties::typeName;
255 if (
f.db().template foundObject<basicThermo>(
name))
257 return f.db().template lookupObject<basicThermo>(
name);
262 f.db().template lookupClass<basicThermo>();
267 iter != thermos.
end();
271 if (&(iter()->
he().internalField()) == &(
f.internalField()))
278 return f.db().template lookupObject<basicThermo>(
name);
285 template<
class Thermo>
289 const word& phaseName
297 typename Thermo::fvMeshConstructorTable::iterator cstrIter =
298 lookupCstrIter<Thermo, typename Thermo::fvMeshConstructorTable>
301 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.
An STL-conforming iterator.
An STL-conforming hash table.
iterator begin()
Iterator set to the beginning of the HashTable.
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...
Base-class for fluid and solid thermodynamic properties.
static const basicThermo & lookupThermo(const FieldType &f)
Lookup the thermo associated with the given field.
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)
Find the physicalProperties dictionary and return the IOobject.
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.
word name(const bool)
Return a word representation of a bool.
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
fluidMulticomponentThermo & thermo
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable