Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equation system and evaluation of chemical source terms. More...
Public Member Functions | |
TypeName ("chemistryModel") | |
Runtime type information. More... | |
chemistryModel (const fvMesh &mesh, const word &phaseName) | |
Construct from mesh. More... | |
virtual | ~chemistryModel () |
Destructor. More... | |
const PtrList< Reaction< ThermoType > > & | reactions () const |
The reactions. More... | |
const PtrList< ThermoType > & | specieThermo () const |
Thermodynamic data of the species. More... | |
virtual label | nSpecie () const |
The number of species. More... | |
virtual label | nReaction () const |
The number of reactions. More... | |
scalar | Treact () const |
Temperature below which the reaction rates are assumed 0. More... | |
scalar & | Treact () |
Temperature below which the reaction rates are assumed 0. More... | |
virtual void | omega (const scalarField &c, const scalar T, const scalar p, scalarField &dcdt) const |
dc/dt = omega, rate of change in concentration, for each species More... | |
virtual scalar | omega (const Reaction< ThermoType > &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 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 |
Return the reaction rate for iReaction and the reference. More... | |
virtual void | calculate () |
Calculates the reaction rates. More... | |
const volScalarField::Internal & | RR (const label i) const |
Return const access to the chemical source terms for specie, i. More... | |
virtual volScalarField::Internal & | RR (const label i) |
Return non const access to chemical source terms [kg/m3/s]. More... | |
virtual tmp< volScalarField::Internal > | calculateRR (const label reactionI, const label speciei) const |
Return reaction rate of the speciei in reactionI. More... | |
virtual scalar | solve (const scalar deltaT) |
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< volScalarField > | tc () const |
Return the chemical time scale. More... | |
virtual tmp< volScalarField > | Qdot () const |
Return the heat release rate [kg/m/s3]. 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 =0 |
template<class DeltaTType > | |
Foam::scalar | solve (const DeltaTType &deltaT) |
![]() | |
ODESystem () | |
Construct null. More... | |
virtual | ~ODESystem () |
Destructor. More... | |
Protected Types | |
typedef ThermoType | thermoType |
Protected Member Functions | |
PtrList< volScalarField::Internal > & | RR () |
Write access to chemical source terms. More... | |
Protected Attributes | |
PtrList< volScalarField > & | Y_ |
Reference to the field of specie mass fractions. More... | |
const PtrList< Reaction< ThermoType > > & | reactions_ |
Reactions. More... | |
const PtrList< ThermoType > & | specieThermo_ |
Thermodynamic data of the species. More... | |
label | nSpecie_ |
Number of species. More... | |
label | nReaction_ |
Number of reactions. More... | |
scalar | Treact_ |
Temperature below which the reaction rates are assumed 0. More... | |
PtrList< volScalarField::Internal > | RR_ |
List of reaction rate per specie [kg/m3/s]. More... | |
scalarField | c_ |
Temporary concentration field. More... | |
scalarField | dcdt_ |
Temporary rate-of-change of concentration field. More... | |
Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equation system and evaluation of chemical source terms.
Definition at line 58 of file chemistryModel.H.
|
protected |
Definition at line 79 of file chemistryModel.H.
chemistryModel | ( | const fvMesh & | mesh, |
const word & | phaseName | ||
) |
Construct from mesh.
Definition at line 35 of file chemistryModel.C.
References Foam::dimMass, Foam::dimTime, Foam::dimVolume, Foam::endl(), forAll, Foam::Info, mesh, Foam::name(), fvMesh::time(), and Time::timeName().
|
virtual |
Destructor.
Definition at line 90 of file chemistryModel.C.
References chemistryModel< CompType, ThermoType >::omega().
|
inlineprotected |
Write access to chemical source terms.
(e.g. for multi-chemistry model)
Definition at line 41 of file chemistryModelI.H.
Referenced by chemistryModel< CompType, ThermoType >::RR(), and chemistryModel< CompType, ThermoType >::Treact().
TypeName | ( | "chemistryModel< CompType, ThermoType >" | ) |
Runtime type information.
|
inline |
The reactions.
Definition at line 49 of file chemistryModelI.H.
|
inline |
Thermodynamic data of the species.
Definition at line 57 of file chemistryModelI.H.
|
inlinevirtual |
The number of species.
Definition at line 65 of file chemistryModelI.H.
Referenced by DAC< CompType, ThermoType >::DAC(), DRG< CompType, ThermoType >::DRG(), DRGEP< CompType, ThermoType >::DRGEP(), and PFA< CompType, ThermoType >::PFA().
|
inlinevirtual |
The number of reactions.
Definition at line 73 of file chemistryModelI.H.
|
inline |
Temperature below which the reaction rates are assumed 0.
Definition at line 81 of file chemistryModelI.H.
|
inline |
Temperature below which the reaction rates are assumed 0.
Definition at line 89 of file chemistryModelI.H.
References chemistryModel< CompType, ThermoType >::RR().
|
virtual |
dc/dt = omega, rate of change in concentration, for each species
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 98 of file chemistryModel.C.
References forAll, Reaction< ReactionThermo >::lhs(), chemistryModel< CompType, ThermoType >::omegaI(), R, Reaction< ReactionThermo >::rhs(), s(), and Foam::Zero.
Referenced by chemistryModel< CompType, ThermoType >::omegaI(), and chemistryModel< CompType, ThermoType >::~chemistryModel().
|
virtual |
Return the reaction rate for reaction r and the reference.
species and charateristic times
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 159 of file chemistryModel.C.
References chemistryModel< CompType, ThermoType >::derivatives(), Foam::exp(), Reaction< ReactionThermo >::kf(), Reaction< ReactionThermo >::kr(), Reaction< ReactionThermo >::lhs(), Foam::max(), Foam::pow(), Reaction< ReactionThermo >::rhs(), and s().
|
virtual |
Return the reaction rate for iReaction and the reference.
species and charateristic times
Definition at line 138 of file chemistryModel.C.
References chemistryModel< CompType, ThermoType >::omega(), and R.
Referenced by chemistryModel< CompType, ThermoType >::omega().
|
virtual |
Calculates the reaction rates.
Definition at line 645 of file chemistryModel.C.
References forAll, Foam::constant::mathematical::pi(), rho, thermo, and trho.
|
inline |
Return const access to the chemical source terms for specie, i.
Definition at line 98 of file chemistryModelI.H.
References chemistryModel< CompType, ThermoType >::RR().
|
virtual |
Return non const access to chemical source terms [kg/m3/s].
Definition at line 108 of file chemistryModelI.H.
|
virtual |
Return reaction rate of the speciei in reactionI.
Definition at line 578 of file chemistryModel.C.
References Foam::dimMass, Foam::dimTime, Foam::dimVolume, forAll, mesh, Foam::constant::mathematical::pi(), tmp< T >::ref(), rho, Foam::constant::thermodynamic::RR, thermo, timeName, and trho.
Referenced by chemistryModel< CompType, ThermoType >::Qdot().
|
virtual |
Solve the reaction system for the given time step.
and return the characteristic time
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 753 of file chemistryModel.C.
References Foam::min(), and solve().
|
virtual |
Solve the reaction system for the given time step.
and return the characteristic time
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 768 of file chemistryModel.C.
|
virtual |
Return the chemical time scale.
Definition at line 463 of file chemistryModel.C.
References Foam::dimTime, forAll, mesh, Foam::constant::mathematical::pi(), tmp< T >::ref(), rho, Reaction< ReactionThermo >::rhs(), s(), thermo, timeName, and trho.
|
virtual |
Return the heat release rate [kg/m/s3].
Definition at line 537 of file chemistryModel.C.
References chemistryModel< CompType, ThermoType >::calculateRR(), Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, Qdot, and tmp< T >::ref().
|
inlinevirtual |
|
virtual |
Calculate the derivatives in dydx.
Implements ODESystem.
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 271 of file chemistryModel.C.
References cp, chemistryModel< CompType, ThermoType >::jacobian(), Foam::max(), and rho.
Referenced by chemistryModel< CompType, ThermoType >::omega().
|
virtual |
Calculate the Jacobian of the system.
Need by the stiff-system solvers
Implements ODESystem.
Reimplemented in TDACChemistryModel< CompType, ThermoType >.
Definition at line 321 of file chemistryModel.C.
References delta, forAll, Reaction< ReactionThermo >::kf(), Reaction< ReactionThermo >::kr(), Reaction< ReactionThermo >::lhs(), Foam::max(), Foam::pow(), Reaction< ReactionThermo >::rhs(), and Foam::Zero.
Referenced by chemistryModel< CompType, ThermoType >::derivatives().
|
pure virtual |
Implemented in TDACChemistryModel< CompType, ThermoType >.
Foam::scalar solve | ( | const DeltaTType & | deltaT | ) |
Definition at line 683 of file chemistryModel.C.
References correct, forAll, Foam::min(), Foam::constant::mathematical::pi(), rho, solve(), thermo, and trho.
|
protected |
Reference to the field of specie mass fractions.
Definition at line 84 of file chemistryModel.H.
Reactions.
Definition at line 87 of file chemistryModel.H.
|
protected |
Thermodynamic data of the species.
Definition at line 90 of file chemistryModel.H.
|
protected |
Number of species.
Definition at line 93 of file chemistryModel.H.
|
protected |
Number of reactions.
Definition at line 96 of file chemistryModel.H.
|
protected |
Temperature below which the reaction rates are assumed 0.
Definition at line 99 of file chemistryModel.H.
|
protected |
List of reaction rate per specie [kg/m3/s].
Definition at line 102 of file chemistryModel.H.
|
mutableprotected |
Temporary concentration field.
Definition at line 105 of file chemistryModel.H.
|
mutableprotected |
Temporary rate-of-change of concentration field.
Definition at line 108 of file chemistryModel.H.