Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pyrolysisChemistryModel< CompType, SolidThermo, GasThermo > Class Template Reference

Pyrolysis chemistry model. It includes gas phase in the solid reaction. More...

Inheritance diagram for pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >:
Inheritance graph
[legend]
Collaboration diagram for pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("pyrolysis")
 Runtime type information. More...
 
 pyrolysisChemistryModel (const fvMesh &mesh, const word &phaseName)
 Construct from mesh and phase name. More...
 
virtual ~pyrolysisChemistryModel ()
 Destructor. More...
 
const PtrList< GasThermo > & gasThermo () const
 Thermodynamic data of gases. More...
 
const speciesTablegasTable () const
 Gases table. More...
 
label nSpecie () const
 The number of solids. More...
 
label nGases () const
 The number of solids. More...
 
virtual scalarField omega (const scalarField &c, const scalar T, const scalar p, const bool updateC0=false) const
 dc/dt = omega, rate of change in concentration, for each species More...
 
virtual scalar omega (const Reaction< SolidThermo > &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. More...
 
virtual scalar omegaI (label iReaction, 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 iReaction. More...
 
virtual void calculate ()
 Calculates the reaction rates. More...
 
const DimensionedField< scalar, volMesh > & RRg (const label i) const
 Return const access to the chemical source terms for gases. More...
 
tmp< DimensionedField< scalar, volMesh > > RRg () const
 Return total gas source term. More...
 
virtual tmp< volScalarFieldgasHs (const volScalarField &p, const volScalarField &T, const label i) const
 Return sensible enthalpy for gas i [J/Kg]. More...
 
virtual scalar solve (const scalar deltaT)
 Solve the reaction system for the given time step. More...
 
virtual label nEqns () const
 Number of ODE's to solve. More...
 
virtual void derivatives (const scalar t, const scalarField &c, scalarField &dcdt) const
 Calculate the derivatives in dydx. More...
 
virtual void jacobian (const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const
 Calculate the Jacobian of the system. More...
 
virtual void solve (scalarField &c, scalar &T, scalar &p, scalar &deltaT, scalar &subDeltaT) const
 
- Public Member Functions inherited from solidChemistryModel< CompType, SolidThermo >
 TypeName ("solidChemistryModel")
 Runtime type information. More...
 
 solidChemistryModel (const fvMesh &mesh, const word &phaseName)
 Construct from mesh and phase name. More...
 
virtual ~solidChemistryModel ()
 Destructor. More...
 
const PtrList< Reaction< SolidThermo > > & reactions () const
 The reactions. More...
 
label nReaction () const
 The number of reactions. More...
 
const DimensionedField< scalar, volMesh > & RRs (const label i) const
 Return const access to the chemical source terms for solids. More...
 
tmp< DimensionedField< scalar, volMesh > > RRs () const
 Return total solid source term. More...
 
virtual scalar solve (const scalarField &deltaT)
 Solve the reaction system for the given time step. More...
 
virtual tmp< volScalarFieldtc () const
 Return the chemical time scale. More...
 
virtual tmp< volScalarFieldSh () const
 Return source for enthalpy equation [kg/m/s3]. More...
 
virtual tmp< volScalarFielddQ () const
 Return the heat release, i.e. enthalpy/sec [m2/s3]. More...
 
- Public Member Functions inherited from ODESystem
 ODESystem ()
 Construct null. More...
 
virtual ~ODESystem ()
 Destructor. More...
 

Protected Member Functions

PtrList< DimensionedField< scalar, volMesh > > & RRg ()
 Write access to source terms for gases. More...
 
- Protected Member Functions inherited from solidChemistryModel< CompType, SolidThermo >
PtrList< DimensionedField< scalar, volMesh > > & RRs ()
 Write access to source terms for solids. More...
 
void setCellReacting (const label cellI, const bool active)
 Set reacting status of cell, cellI. More...
 

Protected Attributes

speciesTable pyrolisisGases_
 List of gas species present in reaction system. More...
 
PtrList< GasThermo > gasThermo_
 Thermodynamic data of gases. More...
 
label nGases_
 Number of gas species. More...
 
label nSpecie_
 Number of components being solved by ODE. More...
 
PtrList< DimensionedField< scalar, volMesh > > RRg_
 List of reaction rate per gas [kg/m3/s]. More...
 
- Protected Attributes inherited from solidChemistryModel< CompType, SolidThermo >
PtrList< volScalarField > & Ys_
 Reference to solid mass fractions. More...
 
const PtrList< Reaction< SolidThermo > > & reactions_
 Reactions. More...
 
const PtrList< SolidThermo > & solidThermo_
 Thermodynamic data of solids. More...
 
label nSolids_
 Number of solid components. More...
 
label nReaction_
 Number of solid reactions. More...
 
PtrList< DimensionedField< scalar, volMesh > > RRs_
 List of reaction rate per solid [kg/m3/s]. More...
 
List< bool > reactingCells_
 List of active reacting cells. More...
 

Detailed Description

template<class CompType, class SolidThermo, class GasThermo>
class Foam::pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >

Pyrolysis chemistry model. It includes gas phase in the solid reaction.

Source files

Definition at line 56 of file pyrolysisChemistryModel.H.

Constructor & Destructor Documentation

pyrolysisChemistryModel ( const fvMesh mesh,
const word phaseName 
)

Destructor.

Definition at line 172 of file pyrolysisChemistryModel.C.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::omega().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::pyrolysisChemistryModel().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

Foam::PtrList< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > & RRg ( )
inlineprotected

Write access to source terms for gases.

Definition at line 33 of file pyrolysisChemistryModelI.H.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::gasThermo().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::nSpecie(), and pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::RRg().

Here is the call graph for this function:

Here is the caller graph for this function:

TypeName ( "pyrolysis"  )

Runtime type information.

const Foam::PtrList< GasThermo > & gasThermo ( ) const
inline

Thermodynamic data of gases.

Definition at line 42 of file pyrolysisChemistryModelI.H.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::gasTable().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::RRg().

Here is the call graph for this function:

Here is the caller graph for this function:

const Foam::speciesTable & gasTable ( ) const
inline

Gases table.

Definition at line 51 of file pyrolysisChemistryModelI.H.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::nSpecie().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::gasThermo().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::label nSpecie ( ) const
inline

The number of solids.

Definition at line 60 of file pyrolysisChemistryModelI.H.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::RRg().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::gasTable().

Here is the call graph for this function:

Here is the caller graph for this function:

label nGases ( ) const
inline

The number of solids.

Foam::scalarField omega ( const scalarField c,
const scalar  T,
const scalar  p,
const bool  updateC0 = false 
) const
virtual

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

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 181 of file pyrolysisChemistryModel.C.

References forAll, g, Reaction< ReactionThermo >::grhs(), Reaction< ReactionThermo >::lhs(), R, Reaction< ReactionThermo >::rhs(), and s().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::~pyrolysisChemistryModel().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Return the reaction rate for reaction r.

NOTE: Currently does not calculate reference specie and characteristic times (pf, cf,l Ref, etc.)

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 237 of file pyrolysisChemistryModel.C.

References Foam::constant::physicoChemical::c1, Foam::exp(), Reaction< ReactionThermo >::kf(), Reaction< ReactionThermo >::lhs(), Foam::max(), pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::omegaI(), Foam::pow(), and s().

Here is the call graph for this function:

Foam::scalar omegaI ( label  iReaction,
const scalarField c,
const scalar  T,
const scalar  p,
scalar &  pf,
scalar &  cf,
label lRef,
scalar &  pr,
scalar &  cr,
label rRef 
) const
virtual

Return the reaction rate for iReaction.

NOTE: Currently does not calculate reference specie and characteristic times (pf, cf,l Ref, etc.)

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 280 of file pyrolysisChemistryModel.C.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::derivatives().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::omega().

Here is the call graph for this function:

Here is the caller graph for this function:

void calculate ( )
virtual
const Foam::DimensionedField< Foam::scalar, Foam::volMesh > & RRg ( const label  i) const
inline

Return const access to the chemical source terms for gases.

Definition at line 69 of file pyrolysisChemistryModelI.H.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::RRg().

Here is the call graph for this function:

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > RRg ( ) const
inline

Return total gas source term.

Definition at line 80 of file pyrolysisChemistryModelI.H.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, mesh, and timeName.

Foam::tmp< Foam::volScalarField > gasHs ( const volScalarField p,
const volScalarField T,
const label  i 
) const
virtual

Return sensible enthalpy for gas i [J/Kg].

Definition at line 616 of file pyrolysisChemistryModel.C.

References Foam::dimEnergy, Foam::dimMass, forAll, and pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::solve().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::solve().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::scalar solve ( const scalar  deltaT)
virtual
Foam::label nEqns ( ) const
virtual

Number of ODE's to solve.

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 441 of file pyrolysisChemistryModel.C.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::calculate().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::jacobian().

Here is the call graph for this function:

Here is the caller graph for this function:

void derivatives ( const scalar  x,
const scalarField y,
scalarField dydx 
) const
virtual

Calculate the derivatives in dydx.

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 303 of file pyrolysisChemistryModel.C.

References pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::jacobian(), Foam::mag(), and Foam::min().

Referenced by pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::omegaI().

Here is the call graph for this function:

Here is the caller graph for this function:

void jacobian ( const scalar  x,
const scalarField y,
scalarField dfdx,
scalarSquareMatrix dfdy 
) const
virtual
void solve ( scalarField c,
scalar &  T,
scalar &  p,
scalar &  deltaT,
scalar &  subDeltaT 
) const
virtual

Member Data Documentation

speciesTable pyrolisisGases_
protected

List of gas species present in reaction system.

Definition at line 69 of file pyrolysisChemistryModel.H.

PtrList<GasThermo> gasThermo_
protected

Thermodynamic data of gases.

Definition at line 72 of file pyrolysisChemistryModel.H.

label nGases_
protected

Number of gas species.

Definition at line 75 of file pyrolysisChemistryModel.H.

label nSpecie_
protected

Number of components being solved by ODE.

Definition at line 78 of file pyrolysisChemistryModel.H.

PtrList<DimensionedField<scalar, volMesh> > RRg_
protected

List of reaction rate per gas [kg/m3/s].

Definition at line 81 of file pyrolysisChemistryModel.H.


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