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 >:
[legend]
Collaboration diagram for pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >:
[legend]

Public Member Functions

 TypeName ("pyrolysis")
 Runtime type information. More...
 
 pyrolysisChemistryModel (typename CompType::reactionThermo &thermo)
 Construct from thermo. 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 volScalarField::InternalRRg (const label i) const
 Return const access to the chemical source terms for gases. More...
 
tmp< volScalarField::InternalRRg () 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 (typename CompType::reactionThermo &thermo)
 Construct from thermo. More...
 
virtual ~solidChemistryModel ()
 Destructor. More...
 
const PtrList< Reaction< SolidThermo > > & reactions () const
 The reactions. More...
 
label nReaction () const
 The number of reactions. More...
 
virtual scalarField omega (const scalarField &c, const scalar T, const scalar p, const bool updateC0=false) const =0
 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 =0
 Return the reaction rate for reaction r and the reference. 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 =0
 Return the reaction rate for iReaction and the reference. More...
 
virtual void calculate ()=0
 Calculates the reaction rates. More...
 
const volScalarField::InternalRRs (const label i) const
 Return const access to the chemical source terms for solids. More...
 
tmp< volScalarField::InternalRRs () const
 Return total solid source term. More...
 
tmp< DimensionedField< scalar, volMesh > > RRsHs () const
 Return net solid sensible enthalpy. More...
 
virtual scalar solve (const scalar deltaT)=0
 Solve the reaction system for the given time step. 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< volScalarFieldQdot () const
 Return the heat release rate [kg/m/s3]. More...
 
virtual label nEqns () const =0
 Number of ODE's to solve. More...
 
virtual void derivatives (const scalar t, const scalarField &c, scalarField &dcdt) const =0
 Calculate the derivatives in dydx. More...
 
virtual void jacobian (const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const =0
 Calculate the Jacobian of the system. More...
 
virtual void solve (scalarField &c, scalar &T, scalar &p, scalar &deltaT, scalar &subDeltaT) const =0
 
- Public Member Functions inherited from ODESystem
 ODESystem ()
 Construct null. More...
 
virtual ~ODESystem ()=default
 Destructor. More...
 
virtual label nEqns () const =0
 Return the number of equations in the system. More...
 
virtual void derivatives (const scalar x, const scalarField &y, scalarField &dydx) const =0
 Calculate the derivatives in dydx. More...
 
virtual void jacobian (const scalar x, const scalarField &y, scalarField &dfdx, scalarSquareMatrix &dfdy) const =0
 Calculate the Jacobian of the system. More...
 

Protected Member Functions

PtrList< volScalarField::Internal > & RRg ()
 Write access to source terms for gases. More...
 
void operator= (const pyrolysisChemistryModel &)=delete
 No copy assignment. More...
 
- Protected Member Functions inherited from solidChemistryModel< CompType, SolidThermo >
PtrList< volScalarField::Internal > & 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< volScalarField::InternalRRg_
 List of reaction rate per gas [kg/m3/s]. More...
 
PtrList< volScalarFieldYs0_
 List of accumulative solid concentrations. 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< volScalarField::InternalRRs_
 List of reaction rate per solid [kg/m3/s]. More...
 
List< boolreactingCells_
 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 58 of file pyrolysisChemistryModel.H.

Constructor & Destructor Documentation

◆ pyrolysisChemistryModel()

◆ ~pyrolysisChemistryModel()

Destructor.

Definition at line 173 of file pyrolysisChemistryModel.C.

Member Function Documentation

◆ RRg() [1/3]

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

Write access to source terms for gases.

Definition at line 35 of file pyrolysisChemistryModelI.H.

◆ operator=()

void operator= ( const pyrolysisChemistryModel< CompType, SolidThermo, GasThermo > &  )
protecteddelete

No copy assignment.

◆ TypeName()

TypeName ( "pyrolysis"  )

Runtime type information.

◆ gasThermo()

const Foam::PtrList< GasThermo > & gasThermo
inline

Thermodynamic data of gases.

Definition at line 43 of file pyrolysisChemistryModelI.H.

◆ gasTable()

const Foam::speciesTable & gasTable
inline

Gases table.

Definition at line 52 of file pyrolysisChemistryModelI.H.

◆ nSpecie()

Foam::label nSpecie
inline

The number of solids.

Definition at line 61 of file pyrolysisChemistryModelI.H.

◆ nGases()

label nGases ( ) const
inline

The number of solids.

◆ omega() [1/2]

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 182 of file pyrolysisChemistryModel.C.

References forAll, g, om, p, R, s(), T, and Foam::Zero.

Here is the call graph for this function:

◆ omega() [2/2]

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 238 of file pyrolysisChemistryModel.C.

References Foam::exp(), Foam::max(), p, Foam::pow(), R, s(), T, and Foam::Zero.

Here is the call graph for this function:

◆ omegaI()

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 p, R, and T.

◆ calculate()

void calculate
virtual

Calculates the reaction rates.

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 451 of file pyrolysisChemistryModel.C.

References delta, forAll, mesh, IOobject::NO_READ, IOobject::NO_WRITE, basicThermo::p(), rho, basicThermo::T(), timeName, fvMesh::V(), and Foam::Zero.

Here is the call graph for this function:

◆ RRg() [2/3]

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 70 of file pyrolysisChemistryModelI.H.

◆ RRg() [3/3]

Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > RRg
inline

Return total gas source term.

Definition at line 81 of file pyrolysisChemistryModelI.H.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, mesh, tmp< T >::ref(), and timeName.

Here is the call graph for this function:

◆ gasHs()

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 617 of file pyrolysisChemistryModel.C.

References Foam::dimEnergy, Foam::dimMass, forAll, IOobject::NO_READ, IOobject::NO_WRITE, p, tmp< T >::ref(), T, and Foam::Zero.

Here is the call graph for this function:

◆ solve() [1/2]

Foam::scalar solve ( const scalar  deltaT)
virtual

Solve the reaction system for the given time step.

and return the characteristic time

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 519 of file pyrolysisChemistryModel.C.

References delta, forAll, mesh, Foam::min(), IOobject::NO_READ, IOobject::NO_WRITE, p, basicThermo::p(), rho, solve(), T, basicThermo::T(), timeName, and Foam::Zero.

Here is the call graph for this function:

◆ nEqns()

Foam::label nEqns
virtual

Number of ODE's to solve.

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 443 of file pyrolysisChemistryModel.C.

◆ derivatives()

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 Foam::mag(), Foam::min(), p, and T.

Here is the call graph for this function:

◆ jacobian()

void jacobian ( const scalar  x,
const scalarField y,
scalarField dfdx,
scalarSquareMatrix dfdy 
) const
virtual

Calculate the Jacobian of the system.

Need by the stiff-system solvers

Implements solidChemistryModel< CompType, SolidThermo >.

Definition at line 345 of file pyrolysisChemistryModel.C.

References delta, Foam::endl(), Foam::exp(), forAll, Foam::Info, Foam::max(), p, Foam::pow(), R, T, and Foam::Zero.

Here is the call graph for this function:

◆ solve() [2/2]

void solve ( scalarField c,
scalar &  T,
scalar &  p,
scalar &  deltaT,
scalar &  subDeltaT 
) const
virtual

Member Data Documentation

◆ pyrolisisGases_

speciesTable pyrolisisGases_
protected

List of gas species present in reaction system.

Definition at line 67 of file pyrolysisChemistryModel.H.

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

◆ gasThermo_

PtrList<GasThermo> gasThermo_
protected

Thermodynamic data of gases.

Definition at line 70 of file pyrolysisChemistryModel.H.

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

◆ nGases_

label nGases_
protected

◆ nSpecie_

label nSpecie_
protected

Number of components being solved by ODE.

Definition at line 76 of file pyrolysisChemistryModel.H.

◆ RRg_

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

Definition at line 79 of file pyrolysisChemistryModel.H.

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

◆ Ys0_

PtrList<volScalarField> Ys0_
mutableprotected

List of accumulative solid concentrations.

Definition at line 82 of file pyrolysisChemistryModel.H.

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


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