40 #ifndef Foam_Reaction_H 41 #define Foam_Reaction_H 56 template<
class ThermoType>
59 template<
class ReactionThermo>
62 template<
class ReactionThermo>
63 inline Ostream& operator<<(Ostream&, const Reaction<ReactionThermo>&);
70 template<
class ReactionThermo>
73 public ReactionThermo::thermoType
104 bool failUnknownSpecie =
true 109 return index == sc.index;
114 return index != sc.index;
153 label getNewReactionID();
164 static void reactionStr
209 bool initReactionThermo =
true 228 bool initReactionThermo =
true,
229 bool failUnknownSpecie =
true 239 virtual autoPtr<Reaction<ReactionThermo>>
clone 244 return autoPtr<Reaction<ReactionThermo>>
::New(*
this,
species);
251 static autoPtr<Reaction<ReactionThermo>>
New 254 const ReactionTable<ReactionThermo>& thermoDatabase,
255 const dictionary&
dict 283 virtual const List<specieCoeffs>&
grhs()
const;
284 virtual const List<specieCoeffs>&
glhs()
const;
294 List<specieCoeffs>&
lhs,
295 List<specieCoeffs>&
rhs,
296 bool failUnknownSpecie =
true 336 friend Ostream& operator<< <ReactionThermo>
virtual scalar kr(const scalar kfwd, const scalar p, const scalar T, const scalarField &c) const
Reverse rate constant from the given forward rate constant.
virtual scalar kf(const scalar p, const scalar T, const scalarField &c) const
Forward rate constant.
virtual const List< specieCoeffs > & grhs() const
Access to gas components of the reaction.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
virtual void write(Ostream &os) const
Write.
static autoPtr< Reaction< ReactionThermo > > New(const speciesTable &species, const ReactionTable< ReactionThermo > &thermoDatabase, const dictionary &dict)
Return a pointer to new patchField created on freestore from dict.
bool operator==(const specieCoeffs &sc) const noexcept
const speciesTable & species() const noexcept
Access to specie list.
TypeName("Reaction")
Runtime type information.
virtual autoPtr< Reaction< ReactionThermo > > clone() const
Construct and return a clone.
hashedWordList speciesTable
A table of species as a hashedWordList.
Hold specie index and its coefficients in the reaction rate expression.
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
void reactionStrLeft(OStringStream &reaction) const
Add string representation of the left of the reaction.
bool operator!=(const specieCoeffs &sc) const noexcept
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual ~Reaction()=default
Destructor.
Reaction(const speciesTable &species, const List< specieCoeffs > &lhs, const List< specieCoeffs > &rhs, const ReactionTable< ReactionThermo > &thermoDatabase, bool initReactionThermo=true)
Construct from components.
const word & name() const noexcept
Name of reaction.
virtual const List< specieCoeffs > & glhs() const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
declareRunTimeSelectionTable(autoPtr, Reaction, dictionary,(const speciesTable &species, const ReactionTable< ReactionThermo > &thermoDatabase, const dictionary &dict),(species, thermoDatabase, dict))
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
virtual const speciesTable & gasSpecies() const
Access to gas specie list.
void reactionStrRight(OStringStream &reaction) const
Add string representation of the right of the reaction.
void setLRhs(Istream &, const speciesTable &, List< specieCoeffs > &lhs, List< specieCoeffs > &rhs, bool failUnknownSpecie=true)
Construct the left- and right-hand-side reaction coefficients.
CombustionModel< rhoReactionThermo > & reaction
Basic run-time type information using word as the type's name. Used to enhance the standard RTTI to c...
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
const dimensionedScalar c
Speed of light in a vacuum.
const List< specieCoeffs > & rhs() const noexcept
Specie info for the right-hand-side of the reaction.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Macros to ease declaration of run-time selection tables.
const List< specieCoeffs > & lhs() const noexcept
Specie info for the left-hand-side of the reaction.
static label nUnNamedReactions
Number of un-named reactions.
Output to string buffer, using a OSstream. Always UNCOMPRESSED.
friend Ostream & operator<<(Ostream &os, const specieCoeffs &sc)