solidChemistryModel< CompType, SolidThermo > Class Template Referenceabstract

Extends base solid chemistry model by adding a thermo package, and ODE functions. More...

Inheritance diagram for solidChemistryModel< CompType, SolidThermo >:
[legend]
Collaboration diagram for solidChemistryModel< CompType, SolidThermo >:
[legend]

Public Member Functions

 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 > & 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

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 Foam::solidChemistryModel< CompType, SolidThermo >

Extends base solid 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 63 of file solidChemistryModel.H.

Constructor & Destructor Documentation

◆ solidChemistryModel()

solidChemistryModel ( typename CompType::reactionThermo &  thermo)

Construct from thermo.

Definition at line 34 of file solidChemistryModel.C.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, forAll, mesh, Foam::name(), IOobject::NO_READ, IOobject::NO_WRITE, solidChemistryModel< CompType, SolidThermo >::RRs_, timeName, solidChemistryModel< CompType, SolidThermo >::Ys_, and Foam::Zero.

Here is the call graph for this function:

◆ ~solidChemistryModel()

Destructor.

Definition at line 88 of file solidChemistryModel.C.

Member Function Documentation

◆ RRs() [1/3]

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

Write access to source terms for solids.

Definition at line 35 of file solidChemistryModelI.H.

◆ setCellReacting()

void setCellReacting ( const label  celli,
const bool  active 
)
protected

Set reacting status of cell, celli.

Definition at line 156 of file solidChemistryModel.C.

◆ TypeName()

TypeName ( "solidChemistryModel< CompType, SolidThermo >"  )

Runtime type information.

◆ reactions()

const Foam::PtrList< Foam::Reaction< SolidThermo > > & reactions
inline

The reactions.

Definition at line 43 of file solidChemistryModelI.H.

◆ nReaction()

Foam::label nReaction
inline

The number of reactions.

Definition at line 51 of file solidChemistryModelI.H.

◆ omega() [1/2]

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

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

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ omega() [2/2]

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
pure virtual

Return the reaction rate for reaction r and the reference.

species and characteristic times

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ omegaI()

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
pure virtual

Return the reaction rate for iReaction and the reference.

species and characteristic times

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ calculate()

virtual void calculate ( )
pure virtual

Calculates the reaction rates.

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ RRs() [2/3]

const Foam::DimensionedField< Foam::scalar, Foam::volMesh > & RRs ( const label  i) const
inline

Return const access to the chemical source terms for solids.

Definition at line 60 of file solidChemistryModelI.H.

◆ RRs() [3/3]

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

Return total solid source term.

Definition at line 71 of file solidChemistryModelI.H.

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

Here is the call graph for this function:

◆ RRsHs()

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

Return net solid sensible enthalpy.

Definition at line 104 of file solidChemistryModelI.H.

References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, mesh, p, basicThermo::p(), tmp< T >::ref(), T, basicThermo::T(), and timeName.

Here is the call graph for this function:

◆ solve() [1/3]

virtual scalar solve ( const scalar  deltaT)
pure virtual

Solve the reaction system for the given time step.

and return the characteristic time

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ solve() [2/3]

Foam::scalar solve ( const scalarField deltaT)
virtual

Solve the reaction system for the given time step.

and return the characteristic time

Definition at line 96 of file solidChemistryModel.C.

References NotImplemented.

◆ tc()

Return the chemical time scale.

Definition at line 108 of file solidChemistryModel.C.

References NotImplemented, and GeometricField< scalar, fvPatchField, volMesh >::null().

Here is the call graph for this function:

◆ Qdot()

Return the heat release rate [kg/m/s3].

Definition at line 117 of file solidChemistryModel.C.

References IOobject::AUTO_WRITE, Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, IOobject::NO_READ, Qdot, tmp< T >::ref(), and Foam::Zero.

Here is the call graph for this function:

◆ nEqns()

virtual label nEqns ( ) const
pure virtual

Number of ODE's to solve.

Implements ODESystem.

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ derivatives()

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

Calculate the derivatives in dydx.

Implements ODESystem.

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ jacobian()

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

Calculate the Jacobian of the system.

Need by the stiff-system solvers

Implements ODESystem.

Implemented in pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >.

◆ solve() [3/3]

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

Member Data Documentation

◆ Ys_

◆ reactions_

const PtrList<Reaction<SolidThermo> >& reactions_
protected

◆ solidThermo_

const PtrList<SolidThermo>& solidThermo_
protected

Thermodynamic data of solids.

Definition at line 86 of file solidChemistryModel.H.

◆ nSolids_

label nSolids_
protected

Number of solid components.

Definition at line 89 of file solidChemistryModel.H.

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

◆ nReaction_

label nReaction_
protected

Number of solid reactions.

Definition at line 92 of file solidChemistryModel.H.

◆ RRs_

◆ reactingCells_

List<bool> reactingCells_
protected

List of active reacting cells.

Definition at line 98 of file solidChemistryModel.H.


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