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")) +
">";
103 (ChemistryModel::typeName +
"::New(const mesh&)").c_str(),
105 ) <<
"thermoType is in the old format and must be upgraded" 111 word(chemistryTypeDict.lookup(
"chemistrySolver")) +
'<' 112 +
word(chemistryTypeDict.lookup(
"chemistryThermo")) +
',' 113 + thermoTypeName +
">";
115 typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
116 ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
118 if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
120 FatalErrorIn(ChemistryModel::typeName +
"::New(const mesh&)")
121 <<
"Unknown " << ChemistryModel::typeName <<
" type " <<
nl 122 <<
"chemistryType" << chemistryTypeDict <<
nl <<
nl 123 <<
"Valid " << ChemistryModel ::typeName <<
" types are:" 129 ChemistryModel::fvMeshConstructorTablePtr_->sortedToc()
136 validChemistryTypeNames.
size() + 1
139 validChemistryTypeNameCmpts[0].
setSize(nCmpt);
140 forAll(validChemistryTypeNameCmpts[0], j)
142 validChemistryTypeNameCmpts[0][j] = cmptNames[j];
146 forAll(validChemistryTypeNames, i)
148 validChemistryTypeNameCmpts[i+1] = basicThermo::splitThermoName
150 validChemistryTypeNames[i],
169 Info<<
"Selecting chemistry type " << chemistryTypeName <<
endl;
171 typename ChemistryModel::fvMeshConstructorTable::iterator cstrIter =
172 ChemistryModel::fvMeshConstructorTablePtr_->find(chemistryTypeName);
174 if (cstrIter == ChemistryModel::fvMeshConstructorTablePtr_->end())
176 FatalErrorIn(ChemistryModel::typeName +
"::New(const mesh&)")
177 <<
"Unknown " << ChemistryModel::typeName <<
" type " 178 << chemistryTypeName <<
nl <<
nl 179 <<
"Valid ChemistryModel types are:" <<
nl 180 << ChemistryModel::fvMeshConstructorTablePtr_->sortedToc() <<
nl
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from string.
void size(const label)
Override size to be inconsistent with allocated storage.
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...
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
const word & constant() const
Return constant name.
const word dictName("particleTrackDict")
const Time & time() const
Return the top-level database.
void setSize(const label)
Reset size of List.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< Thermo > New(const fvMesh &mesh, const word &phaseName)
Generic New for each of the related chemistry model.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
bool isDict(const word &) const
Check if entry is a sub-dictionary.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
#define FatalIOErrorIn(functionName, ios)
Report an error message using Foam::FatalIOError.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...