Reaction< ReactionThermo > Class Template Referenceabstract

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

Inheritance diagram for Reaction< ReactionThermo >:
Collaboration diagram for Reaction< ReactionThermo >:

Public Member Functions

 TypeName ("Reaction")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, Reaction, dictionary,(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict),(species, thermoDatabase, dict))
 
 declareRunTimeSelectionTable (autoPtr, Reaction, objectRegistry,(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const objectRegistry &ob, const dictionary &dict),(species, thermoDatabase, ob, 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, const dictionary &dict)
 Construct from dictionary. More...
 
virtual autoPtr< Reaction< ReactionThermo > > clone () const =0
 Construct and return a clone. More...
 
virtual autoPtr< Reaction< ReactionThermo > > clone (const speciesTable &species) const =0
 Construct and return a clone with new speciesTable. More...
 
virtual ~Reaction ()
 Destructor. More...
 
const wordname () const
 Return the name of the reaction. More...
 
scalar Tlow () const
 Return the lower temperature limit for the reaction. More...
 
scalar Thigh () const
 Return the upper temperature limit for the reaction. More...
 
const List< specieCoeffs > & lhs () const
 Return the components of the left hand side. More...
 
const List< specieCoeffs > & rhs () const
 Return the components of the right hand side. More...
 
const speciesTablespecies () const
 Return the specie list. More...
 
void ddot (const scalar p, const scalar T, const scalarField &c, const label li, scalarField &d) const
 Forward reaction rate. More...
 
void fdot (const scalar p, const scalar T, const scalarField &c, const label li, scalarField &f) const
 Backward reaction rate. More...
 
void omega (const scalar p, const scalar T, const scalarField &c, const label li, scalarField &dcdt) const
 Net reaction rate for individual species. More...
 
scalar omega (const scalar p, const scalar T, const scalarField &c, const label li, scalar &pf, scalar &cf, label &lRef, scalar &pr, scalar &cr, label &rRef) const
 Net reaction rate. More...
 
virtual scalar kf (const scalar p, const scalar T, const scalarField &c, const label li) const =0
 Forward rate constant. More...
 
virtual scalar kr (const scalar kfwd, const scalar p, const scalar T, const scalarField &c, const label li) const =0
 Reverse rate constant from the given forward rate constant. More...
 
virtual scalar kr (const scalar p, const scalar T, const scalarField &c, const label li) const =0
 Reverse rate constant. More...
 
void dwdc (const scalar p, const scalar T, const scalarField &c, const label li, scalarSquareMatrix &J, scalarField &dcdt, scalar &omegaI, scalar &kfwd, scalar &kbwd, const bool reduced, const List< label > &c2s) const
 Derivative of the net reaction rate for each species involved. More...
 
void dwdT (const scalar p, const scalar T, const scalarField &c, const label li, const scalar omegaI, const scalar kfwd, const scalar kbwd, scalarSquareMatrix &J, const bool reduced, const List< label > &c2s, const label indexT) const
 Derivative of the net reaction rate for each species involved. More...
 
virtual scalar dkfdT (const scalar p, const scalar T, const scalarField &c, const label li) const =0
 Temperature derivative of forward rate. More...
 
virtual scalar dkrdT (const scalar p, const scalar T, const scalarField &c, const label li, const scalar dkfdT, const scalar kr) const =0
 Temperature derivative of reverse rate. More...
 
virtual const List< Tuple2< label, scalar > > & beta () const =0
 Third-body efficiencies (beta = 1-alpha) More...
 
virtual void dcidc (const scalar p, const scalar T, const scalarField &c, const label li, scalarField &dcidc) const =0
 Species concentration derivative of the pressure dependent term. More...
 
virtual scalar dcidT (const scalar p, const scalar T, const scalarField &c, const label li) const =0
 Temperature derivative of the pressure dependent term. More...
 
virtual void write (Ostream &) const
 Write. More...
 
void operator= (const Reaction< ReactionThermo > &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< Reaction< ReactionThermo > > New (const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const dictionary &dict)
 Return a pointer to new patchField created on freestore. More...
 
static autoPtr< Reaction< ReactionThermo > > New (const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const objectRegistry &ob, const dictionary &dict)
 Return a pointer to new patchField created on freestore. More...
 
static autoPtr< Reaction< ReactionThermo > > New (const speciesTable &species, const PtrList< ReactionThermo > &speciesThermo, const dictionary &dict)
 Return a pointer to new patchField created on freestore from dict. More...
 

Static Public Attributes

static label nUnNamedReactions
 Number of un-named reactions. More...
 
static scalar TlowDefault
 Default temperature limits of applicability of reaction rates. More...
 
static scalar ThighDefault
 

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 56 of file Reaction.H.

Constructor & Destructor Documentation

◆ Reaction() [1/3]

Reaction ( const speciesTable species,
const List< specieCoeffs > &  lhs,
const List< specieCoeffs > &  rhs,
const HashPtrTable< ReactionThermo > &  thermoDatabase 
)

Construct from components.

Definition at line 93 of file Reaction.C.

Referenced by Reaction< ThermoType >::Reaction().

Here is the caller graph for this function:

◆ Reaction() [2/3]

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

Construct as copy given new speciesTable.

Definition at line 114 of file Reaction.C.

◆ Reaction() [3/3]

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

Construct from dictionary.

Definition at line 131 of file Reaction.C.

◆ ~Reaction()

virtual ~Reaction ( )
inlinevirtual

Destructor.

Definition at line 213 of file Reaction.H.

Member Function Documentation

◆ TypeName()

TypeName ( "Reaction< ReactionThermo >"  )

Runtime type information.

◆ declareRunTimeSelectionTable() [1/2]

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

◆ declareRunTimeSelectionTable() [2/2]

declareRunTimeSelectionTable ( autoPtr  ,
Reaction< ReactionThermo >  ,
objectRegistry  ,
(const speciesTable &species, const HashPtrTable< ReactionThermo > &thermoDatabase, const objectRegistry &ob, const dictionary &dict ,
(species, thermoDatabase, ob, dict  
)

◆ clone() [1/2]

◆ clone() [2/2]

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

◆ New() [1/3]

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 dictionary

Definition at line 159 of file Reaction.C.

Referenced by Reaction< ThermoType >::New(), and Reaction< ThermoType >::Reaction().

Here is the caller graph for this function:

◆ New() [2/3]

Foam::autoPtr< Foam::Reaction< ReactionThermo > > New ( const speciesTable species,
const HashPtrTable< ReactionThermo > &  thermoDatabase,
const objectRegistry ob,
const dictionary dict 
)
static

Return a pointer to new patchField created on freestore.

from objectRegistry and dictionary

Definition at line 202 of file Reaction.C.

◆ New() [3/3]

Foam::autoPtr< Foam::Reaction< ReactionThermo > > New ( const speciesTable species,
const PtrList< ReactionThermo > &  speciesThermo,
const dictionary dict 
)
static

Return a pointer to new patchField created on freestore from dict.

This is used to construct a single reaction given a speciesThermo list from which a temporary thermoDatabase is created.

Definition at line 271 of file Reaction.C.

◆ name()

const word & name ( ) const
inline

Return the name of the reaction.

Definition at line 36 of file ReactionI.H.

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

Here is the caller graph for this function:

◆ Tlow()

scalar Tlow ( ) const
inline

Return the lower temperature limit for the reaction.

Definition at line 43 of file ReactionI.H.

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

Here is the caller graph for this function:

◆ Thigh()

scalar Thigh ( ) const
inline

Return the upper temperature limit for the reaction.

Definition at line 50 of file ReactionI.H.

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

Here is the caller graph for this function:

◆ lhs()

◆ rhs()

◆ species()

◆ ddot()

void ddot ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
scalarField d 
) const

Forward reaction rate.

Definition at line 308 of file Reaction.C.

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

Here is the caller graph for this function:

◆ fdot()

void fdot ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
scalarField f 
) const

Backward reaction rate.

Definition at line 321 of file Reaction.C.

Referenced by Reaction< ThermoType >::ddot(), and Reaction< ThermoType >::~Reaction().

Here is the caller graph for this function:

◆ omega() [1/2]

◆ omega() [2/2]

Foam::scalar omega ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
scalar &  pf,
scalar &  cf,
label lRef,
scalar &  pr,
scalar &  cr,
label rRef 
) const

Net reaction rate.

Definition at line 367 of file Reaction.C.

◆ kf()

virtual scalar kf ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li 
) const
pure virtual

◆ kr() [1/2]

virtual scalar kr ( const scalar  kfwd,
const scalar  p,
const scalar  T,
const scalarField c,
const label  li 
) const
pure virtual

◆ kr() [2/2]

virtual scalar kr ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li 
) const
pure virtual

◆ dwdc()

void dwdc ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
scalarSquareMatrix J,
scalarField dcdt,
scalar &  omegaI,
scalar &  kfwd,
scalar &  kbwd,
const bool  reduced,
const List< label > &  c2s 
) const

Derivative of the net reaction rate for each species involved.

w.r.t. the species concentration

Definition at line 482 of file Reaction.C.

Referenced by TDACChemistryModel< CompType, ThermoType >::jacobian(), StandardChemistryModel< CompType, ThermoType >::jacobian(), Reaction< ThermoType >::omega(), and Reaction< ThermoType >::~Reaction().

Here is the caller graph for this function:

◆ dwdT()

void dwdT ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
const scalar  omegaI,
const scalar  kfwd,
const scalar  kbwd,
scalarSquareMatrix J,
const bool  reduced,
const List< label > &  c2s,
const label  indexT 
) const

Derivative of the net reaction rate for each species involved.

w.r.t. the temperature

Definition at line 646 of file Reaction.C.

Referenced by Reaction< ThermoType >::dwdc(), TDACChemistryModel< CompType, ThermoType >::jacobian(), StandardChemistryModel< CompType, ThermoType >::jacobian(), and Reaction< ThermoType >::~Reaction().

Here is the caller graph for this function:

◆ dkfdT()

virtual scalar dkfdT ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li 
) const
pure virtual

◆ dkrdT()

virtual scalar dkrdT ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
const scalar  dkfdT,
const scalar  kr 
) const
pure virtual

◆ beta()

virtual const List<Tuple2<label, scalar> >& beta ( ) const
pure virtual

Third-body efficiencies (beta = 1-alpha)

non-empty only for third-body reactions with enhanced molecularity (alpha != 1)

Implemented in NonEquilibriumReversibleReaction< ReactionThermo, ReactionRate >, IrreversibleReaction< ReactionThermo, ReactionRate >, ReversibleReaction< ReactionThermo, ReactionRate >, and ReactionProxy< ReactionThermo >.

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

Here is the caller graph for this function:

◆ dcidc()

virtual void dcidc ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li,
scalarField dcidc 
) const
pure virtual

◆ dcidT()

virtual scalar dcidT ( const scalar  p,
const scalar  T,
const scalarField c,
const label  li 
) const
pure virtual

◆ write()

◆ operator=()

void operator= ( const Reaction< ReactionThermo > &  )
delete

Disallow default bitwise assignment.

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

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator

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

Member Data Documentation

◆ nUnNamedReactions

Foam::label nUnNamedReactions
static

Number of un-named reactions.

Definition at line 78 of file Reaction.H.

◆ TlowDefault

Foam::scalar TlowDefault
static

Default temperature limits of applicability of reaction rates.

Definition at line 81 of file Reaction.H.

◆ ThighDefault

Foam::scalar ThighDefault
static

Definition at line 81 of file Reaction.H.


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