31template<
class CombustionModel>
36 const word& combustionProperties
41 thermo.phasePropertyName(combustionProperties),
42 thermo.db().time().constant(),
49 word combModelName(
"none");
52 IOdictionary(combIO).readEntry(
"combustionModel", combModelName);
56 Info<<
"Combustion model not active: "
57 <<
thermo.phasePropertyName(combustionProperties)
58 <<
" not found" <<
endl;
61 Info<<
"Selecting combustion model " << combModelName <<
endl;
65 if (cmpts2.
size() == 2 || cmpts3.
size() == 3)
67 combModelName = cmpts2.
size() ? cmpts2[0] : cmpts3[0];
70 <<
"Template parameters are no longer required when selecting a "
71 << combustionModel::typeName <<
". This information is now "
72 <<
"obtained directly from the thermodynamics. Actually selecting "
73 <<
"combustion model " << combModelName <<
"." <<
endl;
77 const word compCombModelName
79 combModelName +
'<' + CombustionModel::reactionThermo::typeName +
'>'
82 const word thermoCombModelName
84 combModelName +
'<' + CombustionModel::reactionThermo::typeName +
','
85 +
thermo.thermoName() +
'>'
89 const auto& cnstrTable = *(CombustionModel::dictionaryConstructorTablePtr_);
91 auto ctorIter = cnstrTable.cfind(thermoCombModelName);
95 ctorIter = cnstrTable.cfind(compCombModelName);
118 combustionModel::typeName,
130 combustionModel::typeName,
144 if (cmpts.
size() == 2)
146 validCmpts2.
append(std::move(cmpts));
148 else if (cmpts.
size() == 7)
154 validCmpts7.
append(std::move(cmpts));
160 combustionModel::typeName,
165 if (validCmpts2.
size() > 1)
168 <<
"All " << validCmpts2[0][0] <<
'/' << validCmpts2[0][1]
169 <<
" combinations are:" <<
nl <<
nl;
174 if (validCmpts7.
size() > 1)
177 <<
"All " << validCmpts7[0][0] <<
'/' << validCmpts7[0][1]
178 <<
"/thermoPhysics combinations are:" <<
nl <<
nl;
189 ctorIter.val()(combModelName,
thermo,
turb, combustionProperties)
compressible::turbulenceModel & turb
ReactionThermo reactionThermo
Thermo type.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
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,...
bool typeHeaderOk(const bool checkType=true, const bool search=true, const bool verbose=true)
Read header (respects is_globalIOobject trait) and check its info. A void type suppresses trait and t...
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static wordList splitThermoName(const std::string &thermoName, const int nExpectedCmpts)
Split thermo package name into a list of components names.
static autoPtr< CombustionModel > New(typename CombustionModel::reactionThermo &thermo, const compressibleTurbulenceModel &turb, const word &combustionProperties)
Generic New for each of the related chemistry model.
Abstract base class for turbulence models (RAS, LES and laminar).
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.
static const word null
An empty word.
#define FatalErrorInLookup(lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
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).