OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

ODEChemistryModel< CompType, ThermoType > Class Template Reference

Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equation system and evaluation of chemical source terms. More...

Inheritance diagram for ODEChemistryModel< CompType, ThermoType >:
Collaboration diagram for ODEChemistryModel< CompType, ThermoType >:

List of all members.


Public Member Functions

 TypeName ("ODEChemistryModel")
 Runtime type information.
 ODEChemistryModel (const fvMesh &mesh, const word &compTypeName, const word &thermoTypeName)
 Construct from components.
virtual ~ODEChemistryModel ()
 Destructor.
const PtrList< Reaction
< ThermoType > > & 
reactions () const
 The reactions.
const PtrList< ThermoType > & specieThermo () const
 Thermodynamic data of the species.
label nSpecie () const
 The number of species.
label nReaction () const
 The number of reactions.
const chemistrySolver
< CompType, ThermoType > & 
solver () const
 Return the chemisty solver.
virtual scalarField omega (const scalarField &c, const scalar T, const scalar p) const
 dc/dt = omega, rate of change in concentration, for each species
virtual scalar omega (const Reaction< ThermoType > &r, const scalarField &c, const scalar T, const scalar p, scalar &pf, scalar &cf, label &lRef, scalar &pr, scalar &cr, label &rRef) const
 Return the reaction rate for reaction r and the reference.
virtual void calculate ()
 Calculates the reaction rates.
tmp< volScalarField > RR (const label i) const
 Return const access to the chemical source terms.
virtual scalar solve (const scalar t0, const scalar deltaT)
 Solve the reaction system for the given start time and time.
virtual tmp< volScalarField > tc () const
 Return the chemical time scale.
virtual tmp< volScalarField > dQ () const
 Return the heat release.
virtual label nEqns () const
 Number of ODE's to solve.
virtual void derivatives (const scalar t, const scalarField &c, scalarField &dcdt) const
virtual void jacobian (const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const

Protected Member Functions

PtrList< scalarField > & RR ()
 Write access to chemical source terms.

Protected Attributes

PtrList< volScalarField > & Y_
 Reference to the field of specie mass fractions.
const PtrList< Reaction
< ThermoType > > & 
reactions_
 Reactions.
const PtrList< ThermoType > & specieThermo_
 Thermodynamic data of the species.
label nSpecie_
 Number of species.
label nReaction_
 Number of reactions.
autoPtr< chemistrySolver
< CompType, ThermoType > > 
solver_
 Chemistry solver.
PtrList< scalarField > RR_
 Chemical source term.

Detailed Description

template<class CompType, class ThermoType>
class Foam::ODEChemistryModel< CompType, ThermoType >

Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equation system and evaluation of chemical source terms.

Source files

Definition at line 54 of file ODEChemistryModel.H.


Constructor & Destructor Documentation

ODEChemistryModel ( const fvMesh &  mesh,
const word &  compTypeName,
const word &  thermoTypeName 
) [inline]

Construct from components.

Definition at line 26 of file ODEChemistryModel.C.

References forAll, primitiveMesh::nCells(), ODEChemistryModel< CompType, ThermoType >::RR_, and PtrList< T >::set().

Here is the call graph for this function:

~ODEChemistryModel (  )  [inline, virtual]

Destructor.

Definition at line 81 of file ODEChemistryModel.C.


Member Function Documentation

Foam::PtrList< Foam::scalarField > & RR (  )  [inline, protected]

Write access to chemical source terms.

(e.g. for multi-chemistry model)

Definition at line 24 of file ODEChemistryModelI.H.

TypeName ( "ODEChemistryModel< CompType, ThermoType >"   ) 

Runtime type information.

const Foam::PtrList< Foam::Reaction< ThermoType > > & reactions (  )  const [inline]

The reactions.

Definition at line 32 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::RR_.

const Foam::PtrList< ThermoType > & specieThermo (  )  const [inline]

Thermodynamic data of the species.

Definition at line 40 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::reactions_.

Foam::label nSpecie (  )  const [inline]

The number of species.

Definition at line 48 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::specieThermo_.

Referenced by ODEChemistryModel< CompType, ThermoType >::tc().

Here is the caller graph for this function:

Foam::label nReaction (  )  const [inline]

The number of reactions.

Definition at line 56 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::nSpecie_.

const Foam::chemistrySolver< CompType, ThermoType > & solver (  )  const [inline]

Return the chemisty solver.

Definition at line 64 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::nReaction_.

Foam::scalarField omega ( const scalarField &  c,
const scalar  T,
const scalar  p 
) const [inline, virtual]

dc/dt = omega, rate of change in concentration, for each species

Definition at line 89 of file ODEChemistryModel.C.

Foam::scalar omega ( const Reaction< ThermoType > &  r,
const scalarField &  c,
const scalar  T,
const scalar  p,
scalar &  pf,
scalar &  cf,
label &  lRef,
scalar &  pr,
scalar &  cr,
label &  rRef 
) const [inline, virtual]

Return the reaction rate for reaction r and the reference.

species and charateristic times

Definition at line 130 of file ODEChemistryModel.C.

void calculate (  )  [inline, virtual]

Calculates the reaction rates.

Definition at line 584 of file ODEChemistryModel.C.

Foam::tmp< Foam::volScalarField > RR ( const label  i  )  const [inline]

Return const access to the chemical source terms.

Definition at line 73 of file ODEChemistryModelI.H.

References ODEChemistryModel< CompType, ThermoType >::solver_.

Foam::scalar solve ( const scalar  t0,
const scalar  deltaT 
) [inline, virtual]

Solve the reaction system for the given start time and time.

step and return the characteristic time

Definition at line 640 of file ODEChemistryModel.C.

Foam::tmp< Foam::volScalarField > tc (  )  const [inline, virtual]

Return the chemical time scale.

Definition at line 441 of file ODEChemistryModel.C.

References ODEChemistryModel< CompType, ThermoType >::nSpecie().

Here is the call graph for this function:

Foam::tmp< Foam::volScalarField > dQ (  )  const [inline, virtual]

Return the heat release.

Definition at line 527 of file ODEChemistryModel.C.

Foam::label nEqns (  )  const [inline, virtual]

Number of ODE's to solve.

Implements ODE.

Definition at line 576 of file ODEChemistryModel.C.

void derivatives ( const scalar  t,
const scalarField &  c,
scalarField &  dcdt 
) const [inline, virtual]

Implements ODE.

Definition at line 248 of file ODEChemistryModel.C.

void jacobian ( const scalar  t,
const scalarField &  c,
scalarField &  dcdt,
scalarSquareMatrix &  dfdc 
) const [inline, virtual]

Implements ODE.

Definition at line 299 of file ODEChemistryModel.C.


Member Data Documentation

PtrList<volScalarField>& Y_ [protected]

Reference to the field of specie mass fractions.

Definition at line 70 of file ODEChemistryModel.H.

const PtrList<Reaction<ThermoType> >& reactions_ [protected]

Reactions.

Definition at line 73 of file ODEChemistryModel.H.

Referenced by ODEChemistryModel< CompType, ThermoType >::specieThermo().

const PtrList<ThermoType>& specieThermo_ [protected]

Thermodynamic data of the species.

Definition at line 76 of file ODEChemistryModel.H.

Referenced by ODEChemistryModel< CompType, ThermoType >::nSpecie().

label nSpecie_ [protected]

Number of species.

Definition at line 79 of file ODEChemistryModel.H.

Referenced by ODEChemistryModel< CompType, ThermoType >::nReaction().

label nReaction_ [protected]

Number of reactions.

Definition at line 82 of file ODEChemistryModel.H.

Referenced by ODEChemistryModel< CompType, ThermoType >::solver().

autoPtr<chemistrySolver<CompType, ThermoType> > solver_ [protected]

Chemistry solver.

Definition at line 85 of file ODEChemistryModel.H.

Referenced by ODEChemistryModel< CompType, ThermoType >::RR().


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd