34template<
class ChemistryModel>
37 typename ChemistryModel::reactionThermo&
thermo
44 thermo.phasePropertyName(
"chemistryProperties"),
45 thermo.db().time().constant(),
58 <<
"Template parameter based chemistry solver selection is no "
59 <<
"longer supported. Please create a chemistryType dictionary"
60 <<
"instead." <<
endl <<
endl <<
"For example, the entry:" <<
endl
61 <<
" chemistrySolver ode<StandardChemistryModel<"
62 <<
"rhoChemistryModel,sutherlandspecie<janaf<perfectGas>,"
63 <<
"sensibleInternalEnergy>>" <<
endl <<
endl <<
"becomes:" <<
endl
64 <<
" chemistryType" <<
endl <<
" {" <<
endl
65 <<
" solver ode;" <<
endl <<
" method standard;"
76 {{
"chemistrySolver", -1712}}
82 chemistryTypeDict.getOrDefault<
word>
85 chemistryTypeDict.getOrDefault<
bool>(
"TDAC",
false)
94 chemistryTypeDictNew.
add(
"solver", solverName);
95 chemistryTypeDictNew.
add(
"method", methodName);
97 Info<<
"Selecting chemistry solver " << chemistryTypeDictNew <<
endl;
100 const word chemSolverCompThermoName
102 solverName +
'<' + methodName +
'<'
103 + ChemistryModel::reactionThermo::typeName +
','
104 +
thermo.thermoName() +
">>"
108 const auto& cnstrTable = *(ChemistryModel::thermoConstructorTablePtr_);
110 auto* ctorPtr = cnstrTable.lookup(chemSolverCompThermoName,
nullptr);
116 constexpr const int nCmpt = 8;
118 DynamicList<word> thisCmpts(6);
119 thisCmpts.append(ChemistryModel::reactionThermo::typeName);
125 DynamicList<wordList> validNames;
159 validCmpts.append(std::move(cmpts));
164 <<
"Unknown " << typeName_() <<
" type " << solverName <<
nl <<
nl;
166 if (validNames.size() > 1)
169 <<
"All " << validNames[0][0] <<
'/' << validNames[0][1]
170 <<
" combinations for this thermodynamic model:"
177 if (validCmpts.size() > 1)
180 <<
"All " << validCmpts[0][0] <<
'/' << validCmpts[0][1] <<
'/'
181 << validCmpts[0][2] <<
"/thermoPhysics combinations:"
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_REGISTER
Do not request registration (bool: false).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A non-owning sub-view of a List (allocated or unallocated storage).
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< ChemistryModel > New(typename ChemistryModel::reactionThermo &thermo)
Generic New for each of the related chemistry model.
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
Split thermo package name into a list of components names.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int > > compat, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T using any compatibility names if needed. FatalIOError if not found,...
const dictionary * subDictPtr(const word &keyword) const
Deprecated(2018-10).
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< word > wordList
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & printTable(const UList< wordList > &tbl, List< std::string::size_type > &columnWidths, Ostream &os, bool headerSeparator=true)
Print a List of wordList as a table.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).
psiReactionThermo & thermo