36 #ifndef chemkinReader_H 37 #define chemkinReader_H 51 #include <FlexLexer.h> 93 thirdBodyReactionType,
94 unimolecularFallOffReactionType,
95 chemicallyActivatedBimolecularReactionType,
98 LandauTellerReactionType,
99 reverseLandauTellerReactionType,
101 powerSeriesReactionRateType,
102 radiationActivatedReactionType,
103 speciesTempReactionType,
104 energyLossReactionType,
105 plasmaMomentumTransfer,
106 collisionCrossSection,
107 nonEquilibriumReversibleReactionType,
108 duplicateReactionType,
119 nonEquilibriumReversible,
123 static const char* reactionTypeNames[4];
125 enum reactionRateType
130 chemicallyActivatedBimolecular,
134 unknownReactionRateType
137 static const char* reactionRateTypeNames[8];
139 enum fallOffFunctionType
144 unknownFallOffFunctionType
147 static const char* fallOffFunctionNames[4];
150 void initReactionKeywordTable();
190 scalar imbalanceTol_;
198 inline scalar stringToScalar(
const string&
s)
200 string& str =
const_cast<string&
>(
s);
204 return atof(str.c_str());
207 inline scalar stringToScalar(
const char* cstr)
209 return stringToScalar(
string(cstr));
212 inline void correctElementName(
word& elementName)
214 if (elementName.size() == 2)
216 elementName[1] = tolower(elementName[1]);
218 else if (elementName[0] ==
'E')
224 scalar molecularWeight
229 void finishElements(
labelList& currentAtoms);
234 const char* reationRateName,
238 template<
class ReactionRateType>
241 const reactionType rType,
244 const ReactionRateType& rr
247 template<
template<
class,
class>
class PressureDependencyType>
248 void addPressureDependentReaction
250 const reactionType rType,
251 const fallOffFunctionType fofType,
258 const scalar Afactor0,
259 const scalar AfactorInf,
268 const reactionType rType,
269 const reactionRateType rrType,
270 const fallOffFunctionType fofType,
306 const bool newFormat =
false 323 return elementNames_;
329 return elementIndices_;
335 return isotopeAtomicWts_;
341 return speciesTable_;
347 return speciesComposition_;
359 return speciesThermo_;
string & replaceAll(const string &oldStr, const string &newStr, size_type start=0)
Replace all occurrences of sub-string oldStr with newStr.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
TypeName("chemkinReader")
Runtime type information.
A class for handling file names.
A list of keyword definitions, which are a keyword followed by any number of values (e...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static const fileName null
An empty fileName.
Type definitions for reactions.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
const ReactionList< gasHThermoPhysics > & reactions() const
List of the reactions.
A HashTable specialization for hashing pointers.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const HashTable< phase > & speciePhase() const
Specie phase.
const HashTable< scalar > & isotopeAtomicWts() const
Isotope molecular weights.
A class for handling words, derived from string.
virtual ~chemkinReader()
Destructor.
const wordList & elementNames() const
List of elements.
const HashPtrTable< gasHThermoPhysics > & speciesThermo() const
Table of the thermodynamic data given in the CHEMKIN file.
const HashTable< label > & elementIndices() const
Element indices.
List of templated reactions.
A wordList with hashed indices for faster lookup by name.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
const speciesCompositionTable & specieComposition() const
Table of species composition.
Abstract class for reading chemistry.
const speciesTable & species() const
Table of species.