41 word modelType(sootModels::noSoot::typeName);
42 if (dict.
found(sootModel::typeName))
44 dict.
lookup(sootModel::typeName) >> modelType;
45 Info<<
"Selecting soot model " << modelType <<
endl;
47 const wordList cmpts(basicThermo::splitThermoName(modelType, 3));
48 if (cmpts.
size() == 3)
53 <<
"Template parameters are no longer required when selecting a " 54 << sootModel::typeName <<
". This information is now " 55 <<
"obtained directly from the thermodynamics. Actually selecting " 56 <<
"combustion model " << modelType <<
"." <<
endl;
60 word thermoType(word::null);
70 const word thermoModelType = modelType +
'<' + thermoType +
'>';
73 dictionaryConstructorTable::iterator cstrIter =
74 dictionaryConstructorTablePtr_->find(modelType);
75 dictionaryConstructorTable::iterator thermoCstrIter =
76 dictionaryConstructorTablePtr_->find(thermoModelType);
79 if (thermoCstrIter != dictionaryConstructorTablePtr_->end())
83 else if (cstrIter != dictionaryConstructorTablePtr_->end())
90 <<
"Unknown " << sootModel::typeName <<
" type " 91 << modelType <<
nl <<
nl;
93 const wordList names(dictionaryConstructorTablePtr_->sortedToc());
96 thisCmpts.
append(word::null);
97 thisCmpts.append(basicThermo::splitThermoName(thermoType, 5));
102 wordList cmpts(basicThermo::splitThermoName(names[i], 1));
103 if (cmpts.
size() != 1)
105 cmpts = basicThermo::splitThermoName(names[i], 6);
109 for (
label i = 1; i < cmpts.
size() && isValid; ++ i)
111 isValid = isValid && cmpts[i] == thisCmpts[i];
116 validNames.
append(cmpts[0]);
121 <<
"Valid " << sootModel::typeName <<
" types for this " 122 <<
"thermodynamic model are:" <<
endl << validNames <<
endl;
126 validCmpts[0][0] = sootModel::typeName;
127 validCmpts[0][1] =
"transport";
128 validCmpts[0][2] =
"thermo";
129 validCmpts[0][3] =
"equationOfState";
130 validCmpts[0][4] =
"specie";
131 validCmpts[0][5] =
"energy";
134 const wordList cmpts1(basicThermo::splitThermoName(names[i], 1));
135 const wordList cmpts6(basicThermo::splitThermoName(names[i], 6));
136 if (cmpts1.
size() == 1)
139 validCmpts.
last()[0] = cmpts1[0];
141 if (cmpts6.
size() == 6)
143 validCmpts.
append(cmpts6);
148 <<
"All " << sootModel::typeName
149 <<
"/thermoPhysics combinations are:" << endl <<
endl;
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Abstract base-class for fluid and solid thermodynamic properties.
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.
virtual word thermoName() const =0
Return the name of the thermo physics.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool foundObject(const word &name) const
Is the named Type found?
rhoReactionThermo & thermo
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
A class for handling words, derived from string.
void append(const T &)
Append an element at the end of the list.
const word dictName("particleTrackDict")
void printTable(const List< wordList > &, List< string::size_type > &, Ostream &)
List< word > wordList
A List of words.
static autoPtr< sootModel > New(const dictionary &dict, const fvMesh &mesh)
Selector.
#define WarningInFunction
Report a warning using Foam::Warning.
Mesh data needed to do the Finite Volume discretisation.
T & last()
Return the last element of the list.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.