Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
Reaction< ReactionThermo > Class Template Reference

Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermodynamics already handled. More...

Inheritance diagram for Reaction< ReactionThermo >:
Inheritance graph
[legend]
Collaboration diagram for Reaction< ReactionThermo >:
Collaboration graph
[legend]

Classes

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...
 
wordname ()
 
const wordname () const
 
const List< specieCoeffs > & lhs () const
 
const List< specieCoeffs > & rhs () const
 
virtual const List< specieCoeffs > & grhs () const
 
virtual const List< specieCoeffs > & glhs () const
 
const speciesTablespecies () const
 
virtual const speciesTablegasSpecies () 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...
 

Friends

Ostreamoperator (Ostream &, const Reaction< ReactionThermo > &)
 

Detailed Description

template<class ReactionThermo>
class Foam::Reaction< ReactionThermo >

Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermodynamics already handled.

Source files

Definition at line 53 of file Reaction.H.

Constructor & Destructor Documentation

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.

Referenced by Reaction< ReactionThermo >::iNew::operator()(), Reaction< ReactionThermo >::Reaction(), Reaction< ReactionThermo >::reactionStrRight(), and Reaction< ReactionThermo >::setLRhs().

Here is the caller graph for this function:

Reaction ( const Reaction< ReactionThermo > &  r,
const speciesTable species 
)

Construct as copy given new speciesTable.

Definition at line 164 of file Reaction.C.

References Reaction< ReactionThermo >::specieCoeffs::specieCoeffs().

Here is the call graph for this function:

Reaction ( const speciesTable species,
const HashPtrTable< ReactionThermo > &  thermoDatabase,
Istream is 
)

Construct from Istream.

Definition at line 317 of file Reaction.C.

References Reaction< ReactionThermo >::Reaction().

Here is the call graph for this function:

Reaction ( const speciesTable species,
const HashPtrTable< ReactionThermo > &  thermoDatabase,
const dictionary dict 
)

Construct from dictionary.

Definition at line 334 of file Reaction.C.

References dictionary::lookup(), and Reaction< ReactionThermo >::New().

Here is the call graph for this function:

virtual ~Reaction ( )
inlinevirtual

Member Function Documentation

void reactionStrLeft ( OStringStream reaction) const
protected

Return string representation of the left of the reaction.

Definition at line 38 of file Reaction.C.

References Foam::mag(), and Reaction< ReactionThermo >::reactionStrRight().

Here is the call graph for this function:

void reactionStrRight ( OStringStream reaction) const
protected

Return string representation of the right of the reaction.

Definition at line 63 of file Reaction.C.

References forAll, Foam::mag(), Reaction< ReactionThermo >::Reaction(), and OStringStream::str().

Referenced by Reaction< ReactionThermo >::reactionStrLeft().

Here is the call graph for this function:

Here is the caller graph for this function:

TypeName ( "Reaction< ReactionThermo >"  )

Runtime type information.

declareRunTimeSelectionTable ( autoPtr  ,
Reaction< ReactionThermo >  ,
Istream  ,
(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, Istream &is)  ,
(species, thermoDatabase, is)   
)
declareRunTimeSelectionTable ( autoPtr  ,
Reaction< ReactionThermo >  ,
dictionary  ,
(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict ,
(species, thermoDatabase, dict  
)
virtual autoPtr<Reaction<ReactionThermo> > clone ( ) const
inlinevirtual

Construct and return a clone.

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 254 of file Reaction.H.

virtual autoPtr<Reaction<ReactionThermo> > clone ( const speciesTable species) const
inlinevirtual

Construct and return a clone with new speciesTable.

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 264 of file Reaction.H.

References Reaction< ReactionThermo >::New(), and Reaction< ReactionThermo >::species().

Here is the call graph for this function:

Foam::autoPtr< Foam::Reaction< ReactionThermo > > New ( const speciesTable species,
const HashPtrTable< ReactionThermo > &  thermoDatabase,
Istream is 
)
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< ReactionThermo >::clone(), Reaction< ReactionThermo >::iNew::operator()(), and Reaction< ReactionThermo >::Reaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::autoPtr< Foam::Reaction< ReactionThermo > > New ( const speciesTable species,
const HashPtrTable< ReactionThermo > &  thermoDatabase,
const dictionary dict 
)
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.

Here is the call graph for this function:

word & name ( )
inline

Definition at line 36 of file ReactionI.H.

Referenced by ReactionList< ThermoType >::write(), and Reaction< ReactionThermo >::~Reaction().

Here is the caller graph for this function:

const word & name ( ) const
inline

Definition at line 43 of file ReactionI.H.

const List< typename Reaction< ReactionThermo >::specieCoeffs > & lhs ( ) const
inline
const List< typename Reaction< ReactionThermo >::specieCoeffs > & rhs ( ) const
inline
const Foam::List< typename Foam::Reaction< ReactionThermo >::specieCoeffs > & grhs ( ) const
virtual

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 506 of file Reaction.C.

References NotImplemented.

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::omega(), and Reaction< ReactionThermo >::~Reaction().

Here is the caller graph for this function:

const Foam::List< typename Foam::Reaction< ReactionThermo >::specieCoeffs > & glhs ( ) const
virtual

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 497 of file Reaction.C.

References NotImplemented.

Referenced by Reaction< ReactionThermo >::~Reaction().

Here is the caller graph for this function:

const Foam::speciesTable & species ( ) const
const Foam::speciesTable & gasSpecies ( ) const
virtual

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 488 of file Reaction.C.

References NotImplemented.

Referenced by Reaction< ReactionThermo >::~Reaction().

Here is the caller graph for this function:

void setLRhs ( Istream is,
const speciesTable species,
List< specieCoeffs > &  lhs,
List< specieCoeffs > &  rhs 
)
Foam::scalar kf ( const scalar  p,
const scalar  T,
const scalarField c 
) const
virtual
Foam::scalar kr ( const scalar  kfwd,
const scalar  p,
const scalar  T,
const scalarField c 
) const
virtual

Reverse rate constant from the given forward rate constant.

Definition at line 457 of file Reaction.C.

Referenced by chemistryModel< CompType, ThermoType >::jacobian(), Reaction< ReactionThermo >::kf(), chemistryModel< CompType, ThermoType >::omega(), and Reaction< ReactionThermo >::~Reaction().

Here is the caller graph for this function:

Foam::scalar kr ( const scalar  p,
const scalar  T,
const scalarField c 
) const
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.

void write ( Ostream os) const
virtual

Write.

Reimplemented in solidReaction< ReactionThermo >.

Definition at line 435 of file Reaction.C.

References Reaction< ReactionThermo >::kf(), Foam::nl, reaction(), and Ostream::writeKeyword().

Referenced by ReactionList< ThermoType >::write(), and Reaction< ReactionThermo >::~Reaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

Ostream& operator ( Ostream ,
const Reaction< ReactionThermo > &   
)
friend

Member Data Documentation

Foam::label nUnNamedReactions = 0
static

Number of un-named reactions.

Definition at line 84 of file Reaction.H.


The documentation for this class was generated from the following files: