36 #ifndef chemkinReader_H 37 #define chemkinReader_H 57 #include <FlexLexer.h> 108 static int yyBufSize;
117 thirdBodyReactionType,
118 unimolecularFallOffReactionType,
119 chemicallyActivatedBimolecularReactionType,
122 LandauTellerReactionType,
123 reverseLandauTellerReactionType,
125 powerSeriesReactionRateType,
126 radiationActivatedReactionType,
127 speciesTempReactionType,
128 energyLossReactionType,
129 plasmaMomentumTransfer,
130 collisionCrossSection,
131 nonEquilibriumReversibleReactionType,
132 duplicateReactionType,
143 nonEquilibriumReversible,
147 static const char* reactionTypeNames[4];
149 enum reactionRateType
154 chemicallyActivatedBimolecular,
158 unknownReactionRateType
161 static const char* reactionRateTypeNames[8];
163 enum fallOffFunctionType
168 unknownFallOffFunctionType
171 static const char* fallOffFunctionNames[4];
174 void initReactionKeywordTable();
202 speciesCompositionTable speciesComposition_;
214 scalar imbalanceTol_;
222 inline scalar stringToScalar(
const string&
s)
224 string& str =
const_cast<string&
>(
s);
228 return atof(str.c_str());
231 inline scalar stringToScalar(
const char* cstr)
233 return stringToScalar(
string(cstr));
236 inline void correctElementName(
word& elementName)
238 if (elementName.size() == 2)
240 elementName[1] = tolower(elementName[1]);
242 else if (elementName[0] ==
'E')
248 scalar molecularWeight
253 void finishElements(
labelList& currentAtoms);
258 const char* reactionRateName,
262 template<
class ReactionRateType>
265 const reactionType rType,
268 const ReactionRateType& rr
271 template<
template<
class,
class>
class PressureDependencyType>
272 void addPressureDependentReaction
274 const reactionType rType,
275 const fallOffFunctionType fofType,
282 const scalar Afactor0,
283 const scalar AfactorInf,
292 const reactionType rType,
293 const reactionRateType rrType,
294 const fallOffFunctionType fofType,
326 const bool newFormat =
false 343 return elementNames_;
349 return elementIndices_;
355 return isotopeAtomicWts_;
361 return speciesTable_;
367 return speciesComposition_;
379 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.
A class for handling file names.
const HashPtrTable< thermoPhysics > & speciesThermo() const
Table of the thermodynamic data given in the CHEMKIN file.
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.
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/any.
const ReactionList< thermoPhysics > & 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.
HashTable< List< specieElement > > speciesCompositionTable
An STL-conforming hash table.
sutherlandTransport< species::thermo< janafThermo< perfectGas< specie > >, sensibleEnthalpy > > thermoPhysics
Perfect gas equation of state.
const HashTable< label > & elementIndices() const
Element indices.
Thermodynamics mapping class to expose the sensible enthalpy functions.
List of templated reactions.
A wordList with hashed indices for faster lookup by name.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
JANAF tables based thermodynamics package templated into the equation of state.
const scalar RR
Universal gas constant (default in [J/kmol/K])
const speciesCompositionTable & specieComposition() const
Table of species composition.
Transport package using Sutherland's formula.
const speciesTable & species() const
Table of species.