36 #ifndef chemkinReader_H 37 #define chemkinReader_H 52 #include <FlexLexer.h> 112 static int yyBufSize;
121 thirdBodyReactionType,
122 unimolecularFallOffReactionType,
123 chemicallyActivatedBimolecularReactionType,
126 LandauTellerReactionType,
127 reverseLandauTellerReactionType,
129 powerSeriesReactionRateType,
130 radiationActivatedReactionType,
131 speciesTempReactionType,
132 energyLossReactionType,
133 plasmaMomentumTransfer,
134 collisionCrossSection,
135 nonEquilibriumReversibleReactionType,
136 duplicateReactionType,
147 nonEquilibriumReversible,
151 static const char* reactionTypeNames[4];
153 enum reactionRateType
158 chemicallyActivatedBimolecular,
162 unknownReactionRateType
165 static const char* reactionRateTypeNames[8];
167 enum fallOffFunctionType
172 unknownFallOffFunctionType
175 static const char* fallOffFunctionNames[4];
178 void initReactionKeywordTable();
218 scalar imbalanceTol_;
226 inline scalar stringToScalar(
const string&
s)
228 string& str =
const_cast<string&
>(
s);
232 return atof(str.c_str());
235 inline scalar stringToScalar(
const char* cstr)
237 return stringToScalar(
string(cstr));
242 if (elementName.size() == 2)
244 elementName[1] = tolower(elementName[1]);
246 else if (elementName[0] ==
'E')
252 scalar molecularWeight
257 void finishElements(
labelList& currentAtoms);
262 const char* reationRateName,
266 template<
class ReactionRateType>
269 const reactionType rType,
272 const ReactionRateType& rr
275 template<
template<
class,
class>
class PressureDependencyType>
276 void addPressureDependentReaction
278 const reactionType rType,
279 const fallOffFunctionType fofType,
286 const scalar Afactor0,
287 const scalar AfactorInf,
296 const reactionType rType,
297 const reactionRateType rrType,
298 const fallOffFunctionType fofType,
334 const bool newFormat =
false 351 return elementNames_;
357 return elementIndices_;
363 return isotopeAtomicWts_;
369 return speciesTable_;
381 return speciesThermo_;
387 return specieComposition_;
bool operator!=(const specieElement &se) const
string & replaceAll(const string &oldStr, const string &newStr, size_type start=0)
Replace all occurences 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.
bool operator==(const specieElement &se) const
A class for handling file names.
A list of keyword definitions, which are a keyword followed by any number of values (e...
const ReactionList< gasHThermoPhysics > & reactions() const
List of the reactions.
friend Ostream & operator<<(Ostream &os, const specieElement &se)
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.
A HashTable specialization for hashing pointers.
bool read(const char *, int32_t &)
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))
A class for handling words, derived from string.
virtual ~chemkinReader()
Destructor.
const speciesTable & species() const
Table of species.
const HashTable< List< specieElement > > & specieComposition() const
Table of species composition.
const HashTable< label > & elementIndices() const
Element indices.
const HashTable< phase > & speciePhase() const
Specie phase.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const HashPtrTable< gasHThermoPhysics > & speciesThermo() const
Table of the thermodynamic data given in the CHEMKIN file.
List of templated reactions.
const wordList & elementNames() const
List of elements.
const HashTable< scalar > & isotopeAtomicWts() const
Isotope molecular weights.
A wordList with hashed indices for faster lookup by name.
const scalar RR
Universal gas constant (default in [J/(kmol K)])
Abstract class for reading chemistry.