Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermodynamics already handled. More...
Data Structures | |
class | iNew |
Class used for the read-construction of PtrLists of reaction. More... | |
struct | specieCoeffs |
Class to hold the specie index and its coefficients in the. More... | |
Public Member Functions | |
TypeName ("Reaction") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, Reaction, Istream,(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, Istream &is),(species, thermoDatabase, is)) | |
declareRunTimeSelectionTable (autoPtr, Reaction, dictionary,(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict),(species, thermoDatabase, dict)) | |
Reaction (const speciesTable &species, const List< specieCoeffs > &lhs, const List< specieCoeffs > &rhs, const HashPtrTable< ReactionThermo > &thermoDatabase) | |
Construct from components. More... | |
Reaction (const Reaction< ReactionThermo > &, const speciesTable &species) | |
Construct as copy given new speciesTable. More... | |
Reaction (const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, Istream &is) | |
Construct from Istream. More... | |
Reaction (const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict) | |
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 () |
Destructor. More... | |
word & | name () |
const word & | name () const |
const List< specieCoeffs > & | lhs () const |
const List< specieCoeffs > & | rhs () const |
virtual const List< specieCoeffs > & | grhs () const |
virtual const List< specieCoeffs > & | glhs () const |
const speciesTable & | species () const |
virtual const speciesTable & | gasSpecies () 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 &) const |
Write. More... | |
Static Public Member Functions | |
static autoPtr< Reaction< ReactionThermo > > | New (const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, Istream &is) |
Return a pointer to new patchField created on freestore from input. More... | |
static autoPtr< Reaction< ReactionThermo > > | New (const speciesTable &species, const HashPtrTable< 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... | |
Private Member Functions | |
string | reactionStr (OStringStream &reaction) const |
Return string representation of reaction. More... | |
void | setThermo (const HashPtrTable< ReactionThermo > &thermoDatabase) |
Construct reaction thermo. More... | |
void | operator= (const Reaction< ReactionThermo > &) |
Disallow default bitwise assignment. More... | |
label | getNewReactionID () |
Return new reaction ID for un-named reactions. More... | |
Private Attributes | |
const word | name_ |
Name of reaction. More... | |
const speciesTable & | species_ |
List of specie names present in reaction system. More... | |
List< specieCoeffs > | lhs_ |
Specie info for the left-hand-side of the reaction. More... | |
List< specieCoeffs > | rhs_ |
Specie info for the right-hand-side 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 53 of file Reaction.H.
Reaction | ( | const speciesTable & | species, |
const List< specieCoeffs > & | lhs, | ||
const List< specieCoeffs > & | rhs, | ||
const HashPtrTable< ReactionThermo > & | thermoDatabase | ||
) |
Construct from components.
Definition at line 145 of file Reaction.C.
Reaction | ( | const Reaction< ReactionThermo > & | , |
const speciesTable & | species | ||
) |
Construct as copy given new speciesTable.
Reaction | ( | const speciesTable & | species, |
const HashPtrTable< ReactionThermo > & | thermoDatabase, | ||
Istream & | is | ||
) |
Construct from Istream.
Definition at line 317 of file Reaction.C.
Reaction | ( | const speciesTable & | species, |
const HashPtrTable< ReactionThermo > & | thermoDatabase, | ||
const dictionary & | dict | ||
) |
Construct from dictionary.
Definition at line 334 of file Reaction.C.
References dict, and dictionary::lookup().
|
inlinevirtual |
Destructor.
Definition at line 295 of file Reaction.H.
|
protected |
Return string representation of the left of the reaction.
Definition at line 38 of file Reaction.C.
References Foam::mag(), and reaction().
|
protected |
Return string representation of the right of the reaction.
Definition at line 63 of file Reaction.C.
References Foam::mag(), and reaction().
|
private |
Return string representation of reaction.
Definition at line 97 of file Reaction.C.
References reaction().
Referenced by Foam::operator<<().
|
private |
|
private |
Return new reaction ID for un-named reactions.
Definition at line 89 of file Reaction.C.
TypeName | ( | "Reaction" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
Reaction | , | ||
Istream | , | ||
(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, Istream &is) | , | ||
(species, thermoDatabase, is) | |||
) |
declareRunTimeSelectionTable | ( | autoPtr | , |
Reaction | , | ||
dictionary | , | ||
(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict) | , | ||
(species, thermoDatabase, dict) | |||
) |
Construct and return a clone.
Definition at line 254 of file Reaction.H.
|
inlinevirtual |
Construct and return a clone with new speciesTable.
Definition at line 264 of file Reaction.H.
References Reaction::species().
|
static |
Return a pointer to new patchField created on freestore from input.
Definition at line 360 of file Reaction.C.
References IOstream::eof(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, and Foam::nl.
Referenced by Reaction::iNew::operator()().
|
static |
Return a pointer to new patchField created on freestore from dict.
Definition at line 404 of file Reaction.C.
References dict, Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::lookup(), and Foam::nl.
|
inline |
Definition at line 36 of file ReactionI.H.
Referenced by ReactionList< Foam::sutherlandTransport >::write().
|
inline |
Definition at line 43 of file ReactionI.H.
|
inline |
Definition at line 51 of file ReactionI.H.
|
inline |
Definition at line 59 of file ReactionI.H.
|
virtual |
Definition at line 506 of file Reaction.C.
References NotImplemented.
|
virtual |
Definition at line 497 of file Reaction.C.
References NotImplemented.
const Foam::speciesTable & species | ( | ) | const |
Definition at line 481 of file Reaction.C.
Referenced by Reaction::clone().
|
virtual |
Definition at line 488 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 234 of file Reaction.C.
References token::ADD, DynamicList::append(), token::ASSIGN, DynamicList::clear(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstream::good(), token::isPunctuation(), Istream::putBack(), DynamicList::remove(), and DynamicList::shrink().
|
virtual |
Forward rate constant.
Definition at line 445 of file Reaction.C.
|
virtual |
Reverse rate constant from the given forward rate constant.
Definition at line 457 of file Reaction.C.
|
virtual |
Reverse rate constant.
Note this evaluates the forward rate constant and divides by the equilibrium constant
Definition at line 470 of file Reaction.C.
|
virtual |
Write.
Definition at line 435 of file Reaction.C.
References token::END_STATEMENT, Foam::nl, reaction(), and Ostream::writeKeyword().
Referenced by ReactionList< Foam::sutherlandTransport >::write().
|
static |
Number of un-named reactions.
Definition at line 84 of file Reaction.H.
|
private |
Name of reaction.
Definition at line 131 of file Reaction.H.
|
private |
List of specie names present in reaction system.
Definition at line 134 of file Reaction.H.
|
private |
Specie info for the left-hand-side of the reaction.
Definition at line 137 of file Reaction.H.
|
private |
Specie info for the right-hand-side of the reaction.
Definition at line 140 of file Reaction.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.