Loading...
Searching...
No Matches
solidChemistryModel< CompType, SolidThermo > Class Template Referenceabstract

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

#include <solidChemistryModel.H>

Inheritance diagram for solidChemistryModel< CompType, SolidThermo >:
Collaboration diagram for solidChemistryModel< CompType, SolidThermo >:

Public Member Functions

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

Protected Member Functions

PtrList< volScalarField::Internal > & RRs ()
 Write access to source terms for solids.
void setCellReacting (const label celli, const bool active)
 Set reacting status of cell, celli.

Protected Attributes

PtrList< volScalarField > & Ys_
 Reference to solid mass fractions.
const PtrList< Reaction< SolidThermo > > & reactions_
 Reactions.
const PtrList< SolidThermo > & solidThermo_
 Thermodynamic data of solids.
label nSolids_
 Number of solid components.
label nReaction_
 Number of solid reactions.
PtrList< volScalarField::InternalRRs_
 List of reaction rate per solid [kg/m3/s].
List< bool > reactingCells_
 List of active reacting cells.

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()

template<class CompType, class SolidThermo>
solidChemistryModel ( typename CompType::reactionThermo & thermo)

◆ ~solidChemistryModel()

template<class CompType, class SolidThermo>
~solidChemistryModel ( )
virtual

Destructor.

Definition at line 82 of file solidChemistryModel.C.

Member Function Documentation

◆ RRs() [1/3]

template<class CompType, class SolidThermo>
Foam::PtrList< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > & RRs ( )
inlineprotected

Write access to source terms for solids.

Definition at line 28 of file solidChemistryModelI.H.

References RRs_.

Referenced by RRs(), and RRsHs().

Here is the caller graph for this function:

◆ setCellReacting()

template<class CompType, class SolidThermo>
void setCellReacting ( const label celli,
const bool active )
protected

Set reacting status of cell, celli.

Definition at line 139 of file solidChemistryModel.C.

References reactingCells_.

◆ TypeName()

template<class CompType, class SolidThermo>
TypeName ( "solidChemistryModel< CompType, SolidThermo >" )

Runtime type information.

◆ reactions()

template<class CompType, class SolidThermo>
const Foam::PtrList< Foam::Reaction< SolidThermo > > & reactions ( ) const
inline

The reactions.

Definition at line 36 of file solidChemistryModelI.H.

References reactions_.

◆ nReaction()

template<class CompType, class SolidThermo>
Foam::label nReaction ( ) const
inline

The number of reactions.

Definition at line 44 of file solidChemistryModelI.H.

References nReaction_.

◆ omega() [1/2]

◆ omega() [2/2]

template<class CompType, class SolidThermo>
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

◆ omegaI()

template<class CompType, class SolidThermo>
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

◆ calculate()

◆ RRs() [2/3]

template<class CompType, class SolidThermo>
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 53 of file solidChemistryModelI.H.

References RRs_.

◆ RRs() [3/3]

template<class CompType, class SolidThermo>
Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > RRs ( ) const
inline

Return total solid source term.

Definition at line 64 of file solidChemistryModelI.H.

References Foam::dimMass, Foam::dimTime, Foam::dimVolume, mesh, DimensionedField< Type, GeoMesh >::New(), IOobjectOption::NO_REGISTER, nSolids_, RRs(), RRs_, and Foam::Zero.

Here is the call graph for this function:

◆ RRsHs()

template<class CompType, class SolidThermo>
Foam::tmp< Foam::DimensionedField< Foam::scalar, Foam::volMesh > > RRsHs ( ) const
inline

Return net solid sensible enthalpy.

Definition at line 88 of file solidChemistryModelI.H.

References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, mesh, DimensionedField< Type, GeoMesh >::New(), IOobjectOption::NO_REGISTER, nSolids_, basicThermo::p(), p, RRs(), RRs_, solidThermo_, basicThermo::T(), Foam::T(), and Foam::Zero.

Here is the call graph for this function:

◆ solve() [1/3]

◆ solve() [2/3]

template<class CompType, class SolidThermo>
Foam::scalar solve ( const scalarField & deltaT)
virtual

Solve the reaction system for the given time step.

and return the characteristic time

Definition at line 90 of file solidChemistryModel.C.

References NotImplemented.

◆ tc()

template<class CompType, class SolidThermo>
Foam::tmp< Foam::volScalarField > tc ( ) const
virtual

Return the chemical time scale.

Definition at line 102 of file solidChemistryModel.C.

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

Here is the call graph for this function:

◆ Qdot()

template<class CompType, class SolidThermo>
Foam::tmp< Foam::volScalarField > Qdot ( ) const
virtual

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

Definition at line 111 of file solidChemistryModel.C.

References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, GeometricField< scalar, fvPatchField, volMesh >::New(), IOobjectOption::NO_REGISTER, Qdot(), RRs_, solidThermo_, Ys_, and Foam::Zero.

Referenced by Qdot().

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

◆ nEqns()

◆ derivatives()

◆ jacobian()

◆ solve() [3/3]

Member Data Documentation

◆ Ys_

◆ reactions_

◆ solidThermo_

template<class CompType, class SolidThermo>
const PtrList<SolidThermo>& solidThermo_
protected

◆ nSolids_

◆ nReaction_

template<class CompType, class SolidThermo>
label nReaction_
protected

Number of solid reactions.

Definition at line 102 of file solidChemistryModel.H.

Referenced by nReaction(), and solidChemistryModel().

◆ RRs_

◆ reactingCells_

template<class CompType, class SolidThermo>
List<bool> reactingCells_
protected

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