31 template<
class ChemistryModel>
42 IOobject::groupName(
"chemistryProperties", phaseName),
51 word chemistryTypeName;
53 if (chemistryDict.
isDict(
"chemistryType"))
57 chemistryDict.
subDict(
"chemistryType")
60 Info<<
"Selecting chemistry type " << chemistryTypeDict <<
endl;
63 const char* cmptNames[nCmpt] =
81 IOobject::MUST_READ_IF_MODIFIED,
89 if (thermoDict.
isDict(
"thermoType"))
93 word(thermoTypeDict.lookup(
"transport")) +
'<' 94 +
word(thermoTypeDict.lookup(
"thermo")) +
'<' 95 +
word(thermoTypeDict.lookup(
"equationOfState")) +
'<' 96 +
word(thermoTypeDict.lookup(
"specie")) +
">>," 97 +
word(thermoTypeDict.lookup(
"energy")) +
">";
102 <<
"thermoType is in the old format and must be upgraded" 106 Switch isTDAC(chemistryTypeDict.lookupOrDefault(
"TDAC",
false));
112 word(chemistryTypeDict.lookup(
"chemistrySolver")) +
'<' 113 +
"TDACChemistryModel<" 114 +
word(chemistryTypeDict.lookup(
"chemistryThermo")) +
',' 115 + thermoTypeName +
">>";
120 word(chemistryTypeDict.lookup(
"chemistrySolver")) +
'<' 122 +
word(chemistryTypeDict.lookup(
"chemistryThermo")) +
',' 123 + thermoTypeName +
">>";
126 typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
127 ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
129 if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
132 <<
"Unknown " << ChemistryModel::typeName <<
" type " <<
nl 133 <<
"chemistryType" << chemistryTypeDict <<
nl <<
nl 134 <<
"Valid " << ChemistryModel ::typeName <<
" types are:" 140 ChemistryModel::fvMeshConstructorTablePtr_->sortedToc()
147 validChemistryTypeNames.
size() + 1
150 validChemistryTypeNameCmpts[0].
setSize(nCmpt);
151 forAll(validChemistryTypeNameCmpts[0], j)
153 validChemistryTypeNameCmpts[0][j] = cmptNames[j];
157 forAll(validChemistryTypeNames, i)
159 validChemistryTypeNameCmpts[i+1] = basicThermo::splitThermoName
161 validChemistryTypeNames[i],
180 Info<<
"Selecting chemistry type " << chemistryTypeName <<
endl;
182 typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
183 ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
185 if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
188 <<
"Unknown " << ChemistryModel::typeName <<
" type " 189 << chemistryTypeName <<
nl <<
nl 190 <<
"Valid ChemistryModel types are:" <<
nl 191 << ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() <<
nl #define forAll(list, i)
Loop across all elements in list.
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.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
const Time & time() const
Return the top-level database.
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.
static autoPtr< Thermo > New(const fvMesh &mesh, const word &phaseName)
Generic New for each of the related chemistry model.
const word & constant() const
Return constant name.
const word dictName("particleTrackDict")
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
void setSize(const label)
Reset size of List.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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.