31 template<
class CombustionModel>
36 const word& combustionProperties
41 thermo.phasePropertyName(combustionProperties),
42 thermo.db().time().constant(),
49 word combModelName(
"none");
56 Info<<
"Combustion model not active: "
57 <<
thermo.phasePropertyName(combustionProperties)
58 <<
" not found" <<
endl;
61 Info<<
"Selecting combustion model " << combModelName <<
endl;
63 const wordList cmpts2(basicThermo::splitThermoName(combModelName, 2));
64 const wordList cmpts3(basicThermo::splitThermoName(combModelName, 3));
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;
76 typedef typename CombustionModel::dictionaryConstructorTable cstrTableType;
77 cstrTableType* cstrTable = CombustionModel::dictionaryConstructorTablePtr_;
79 const word compCombModelName
81 combModelName +
'<' + CombustionModel::reactionThermo::typeName +
'>'
84 const word thermoCombModelName
86 combModelName +
'<' + CombustionModel::reactionThermo::typeName +
','
87 +
thermo.thermoName() +
'>'
90 auto compCstrIter = cstrTable->cfind(compCombModelName);
92 auto thermoCstrIter = cstrTable->cfind(thermoCombModelName);
94 if (!compCstrIter.found() && !thermoCstrIter.found())
97 thisCmpts.
append(word::null);
98 thisCmpts.
append(CombustionModel::reactionThermo::typeName);
99 thisCmpts.
append(basicThermo::splitThermoName(
thermo.thermoName(), 5));
110 combustionModel::typeName,
122 combustionModel::typeName,
132 for (
const word& validName : cstrTable->sortedToc())
134 wordList cmpts(basicThermo::splitThermoName(validName, 2));
136 if (cmpts.size() == 2)
138 validCmpts2.
append(cmpts);
142 cmpts = basicThermo::splitThermoName(validName, 7);
143 if (cmpts.size() == 7)
145 validCmpts7.
append(cmpts);
150 for (label i = 1; i < cmpts.size() && isValid; ++i)
152 isValid = isValid && cmpts[i] == thisCmpts[i];
157 validNames.
append(cmpts[0]);
164 combustionModel::typeName,
168 <<
"All " << validCmpts2[0][0] <<
'/' << validCmpts2[0][1]
169 <<
" combinations are:" <<
nl <<
nl;
175 <<
"All " << validCmpts7[0][0] <<
'/' << validCmpts7[0][1]
176 <<
"/thermoPhysics combinations are:" <<
nl <<
nl;
184 thermoCstrIter.found()
185 ? thermoCstrIter()(combModelName,
thermo,
turb, combustionProperties)
186 : compCstrIter()(combModelName,
thermo,
turb, combustionProperties)