Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermodynamics already handled. More...
Classes | |
struct | specieCoeffs |
Public Member Functions | |
TypeName ("Reaction") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, Reaction, dictionary,(const speciesTable &species, const ReactionTable< ReactionThermo > &thermoDatabase, const dictionary &dict),(species, thermoDatabase, dict)) | |
Reaction (const speciesTable &species, const List< specieCoeffs > &lhs, const List< specieCoeffs > &rhs, const ReactionTable< ReactionThermo > &thermoDatabase, bool initReactionThermo=true) | |
Construct from components. More... | |
Reaction (const Reaction< ReactionThermo > &, const speciesTable &species) | |
Construct as copy given new speciesTable. More... | |
Reaction (const speciesTable &species, const ReactionTable< ReactionThermo > &thermoDatabase, const dictionary &dict, bool initReactionThermo=true) | |
Construct from dictionary. More... | |
virtual autoPtr< Reaction< ReactionThermo > > | clone () const |
Construct and return a clone. More... | |
virtual autoPtr< Reaction< ReactionThermo > > | clone (const speciesTable &species) const |
Construct and return a clone with new speciesTable. More... | |
virtual | ~Reaction ()=default |
Destructor. More... | |
const word & | name () const noexcept |
Name of reaction. More... | |
const speciesTable & | species () const noexcept |
Access to specie list. More... | |
const List< specieCoeffs > & | lhs () const noexcept |
Specie info for the left-hand-side of the reaction. More... | |
const List< specieCoeffs > & | rhs () const noexcept |
Specie info for the right-hand-side of the reaction. More... | |
virtual const speciesTable & | gasSpecies () const |
Access to gas specie list. More... | |
virtual const List< specieCoeffs > & | grhs () const |
Access to gas components of the reaction. More... | |
virtual const List< specieCoeffs > & | glhs () const |
void | setLRhs (Istream &, const speciesTable &, List< specieCoeffs > &lhs, List< specieCoeffs > &rhs) |
Construct the left- and right-hand-side reaction coefficients. More... | |
virtual scalar | kf (const scalar p, const scalar T, const scalarField &c) const |
Forward rate constant. More... | |
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. More... | |
virtual scalar | kr (const scalar p, const scalar T, const scalarField &c) const |
Reverse rate constant. More... | |
virtual void | write (Ostream &os) const |
Write. More... | |
Static Public Member Functions | |
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. More... | |
Static Public Attributes | |
static label | nUnNamedReactions = 0 |
Number of un-named reactions. More... | |
Protected Member Functions | |
void | reactionStrLeft (OStringStream &reaction) const |
Return string representation of the left of the reaction. More... | |
void | reactionStrRight (OStringStream &reaction) const |
Return string representation of the right of the reaction. More... | |
Friends | |
Ostream & | operator (Ostream &, const Reaction< ReactionThermo > &) |
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermodynamics already handled.
Definition at line 59 of file Reaction.H.
Reaction | ( | const speciesTable & | species, |
const List< specieCoeffs > & | lhs, | ||
const List< specieCoeffs > & | rhs, | ||
const ReactionTable< ReactionThermo > & | thermoDatabase, | ||
bool | initReactionThermo = true |
||
) |
Construct from components.
Definition at line 158 of file Reaction.C.
Reaction | ( | const Reaction< ReactionThermo > & | r, |
const speciesTable & | species | ||
) |
Construct as copy given new speciesTable.
Definition at line 181 of file Reaction.C.
Reaction | ( | const speciesTable & | species, |
const ReactionTable< ReactionThermo > & | thermoDatabase, | ||
const dictionary & | dict, | ||
bool | initReactionThermo = true |
||
) |
Construct from dictionary.
NOTE: initReactionThermo is used by solidReaction where there is no need of setting a lhs - rhs thermo type for each reaction. This is needed for mechanism with reversible reactions
Definition at line 323 of file Reaction.C.
References dict.
|
virtualdefault |
Destructor.
|
protected |
Return string representation of the left of the reaction.
Definition at line 42 of file Reaction.C.
References Foam::mag(), and reaction.
|
protected |
Return string representation of the right of the reaction.
Definition at line 67 of file Reaction.C.
References Foam::mag(), and reaction.
TypeName | ( | "Reaction< ReactionThermo >" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
Reaction< ReactionThermo > | , | ||
dictionary | , | ||
(const speciesTable &species, const ReactionTable< ReactionThermo > &thermoDatabase, const dictionary &dict) | , | ||
(species, thermoDatabase, dict) | |||
) |
Construct and return a clone.
Definition at line 218 of file Reaction.H.
References Reaction< ReactionThermo >::New().
|
inlinevirtual |
Construct and return a clone with new speciesTable.
Definition at line 225 of file Reaction.H.
References Reaction< ReactionThermo >::New(), and Reaction< ReactionThermo >::species().
|
static |
Return a pointer to new patchField created on freestore from dict.
Definition at line 354 of file Reaction.C.
References dict, Foam::exit(), Foam::FatalIOError, and FatalIOErrorInLookup.
Referenced by Reaction< ReactionThermo >::clone().
|
inlinenoexcept |
Name of reaction.
Definition at line 253 of file Reaction.H.
Referenced by ReactionList< Foam::sutherlandTransport >::write().
|
inlinenoexcept |
Access to specie list.
Definition at line 256 of file Reaction.H.
Referenced by Reaction< ReactionThermo >::clone().
|
inlinenoexcept |
Specie info for the left-hand-side of the reaction.
Definition at line 259 of file Reaction.H.
|
inlinenoexcept |
Specie info for the right-hand-side of the reaction.
Definition at line 262 of file Reaction.H.
|
virtual |
|
virtual |
Access to gas components of the reaction.
Definition at line 448 of file Reaction.C.
References NotImplemented.
|
virtual |
Definition at line 439 of file Reaction.C.
References NotImplemented.
void setLRhs | ( | Istream & | is, |
const speciesTable & | species, | ||
List< specieCoeffs > & | lhs, | ||
List< specieCoeffs > & | rhs | ||
) |
Construct the left- and right-hand-side reaction coefficients.
Definition at line 240 of file Reaction.C.
References DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::good(), token::isPunctuation(), Istream::putBack(), DynamicList< T, SizeMin >::remove(), and DynamicList< T, SizeMin >::shrink().
|
virtual |
Forward rate constant.
Definition at line 394 of file Reaction.C.
|
virtual |
Reverse rate constant from the given forward rate constant.
Definition at line 406 of file Reaction.C.
|
virtual |
Reverse rate constant.
Note this evaluates the forward rate constant and divides by the equilibrium constant
Definition at line 419 of file Reaction.C.
|
virtual |
Write.
Definition at line 385 of file Reaction.C.
References os(), and reaction.
Referenced by ReactionList< Foam::sutherlandTransport >::write().
|
static |
Number of un-named reactions.
Definition at line 79 of file Reaction.H.