Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
solidChemistryModel< CompType, SolidThermo > Class Template Referenceabstract

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

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

Public Member Functions

 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...
 
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...
 
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 ()
 Destructor. 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< bool > reactingCells_
 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 59 of file solidChemistryModel.H.

Constructor & Destructor Documentation

◆ solidChemistryModel()

solidChemistryModel ( const fvMesh mesh,
const word phaseName 
)

Construct from mesh and phase name.

Definition at line 34 of file solidChemistryModel.C.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, forAll, mesh, Foam::name(), fvMesh::time(), Time::timeName(), and solidChemistryModel< CompType, SolidThermo >::~solidChemistryModel().

Here is the call graph for this function:

◆ ~solidChemistryModel()

~solidChemistryModel ( )
virtual

Destructor.

Definition at line 89 of file solidChemistryModel.C.

References solidChemistryModel< CompType, SolidThermo >::solve().

Referenced by solidChemistryModel< CompType, SolidThermo >::solidChemistryModel().

Here is the call graph for this function:
Here is the caller graph for this function:

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 32 of file solidChemistryModelI.H.

Referenced by solidChemistryModel< CompType, SolidThermo >::nReaction().

Here is the caller graph for this function:

◆ setCellReacting()

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

Set reacting status of cell, celli.

Definition at line 157 of file solidChemistryModel.C.

Referenced by solidChemistryModel< CompType, SolidThermo >::Qdot().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "solidChemistryModel< CompType, SolidThermo >"  )

Runtime type information.

◆ reactions()

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

The reactions.

Definition at line 39 of file solidChemistryModelI.H.

References solidChemistryModel< CompType, SolidThermo >::nReaction().

Here is the call graph for this function:

◆ nReaction()

Foam::label nReaction ( ) const
inline

The number of reactions.

Definition at line 48 of file solidChemistryModelI.H.

References solidChemistryModel< CompType, SolidThermo >::RRs().

Referenced by solidChemistryModel< CompType, SolidThermo >::reactions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 charateristic 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 charateristic 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 57 of file solidChemistryModelI.H.

◆ RRs() [3/3]

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

Return total solid source term.

Definition at line 67 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:

◆ 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 >.

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

Here is the caller graph for this function:

◆ 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 97 of file solidChemistryModel.C.

References NotImplemented.

◆ tc()

Foam::tmp< Foam::volScalarField > tc ( ) const
virtual

Return the chemical time scale.

Definition at line 108 of file solidChemistryModel.C.

References NotImplemented.

◆ Qdot()

Foam::tmp< Foam::volScalarField > Qdot ( ) const
virtual

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

Definition at line 117 of file solidChemistryModel.C.

References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, Qdot, tmp< T >::ref(), and solidChemistryModel< CompType, SolidThermo >::setCellReacting().

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_

PtrList<volScalarField>& Ys_
protected

Reference to solid mass fractions.

Definition at line 76 of file solidChemistryModel.H.

◆ reactions_

const PtrList<Reaction<SolidThermo> >& reactions_
protected

Reactions.

Definition at line 79 of file solidChemistryModel.H.

◆ solidThermo_

const PtrList<SolidThermo>& solidThermo_
protected

Thermodynamic data of solids.

Definition at line 82 of file solidChemistryModel.H.

◆ nSolids_

label nSolids_
protected

Number of solid components.

Definition at line 85 of file solidChemistryModel.H.

◆ nReaction_

label nReaction_
protected

Number of solid reactions.

Definition at line 88 of file solidChemistryModel.H.

◆ RRs_

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

Definition at line 91 of file solidChemistryModel.H.

◆ reactingCells_

List<bool> reactingCells_
protected

List of active reacting cells.

Definition at line 94 of file solidChemistryModel.H.


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