Extends base chemistry model by adding a thermo package, and ODE functions. Introduces chemistry equation system and evaluation of chemical source terms. More...
#include <chemistryModel/ODEChemistryModel.H>
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 61 of file ODEChemistryModel.H.
Public Member Functions | |
TypeName ("ODEChemistryModel") | |
Runtime type information. | |
ODEChemistryModel (const fvMesh &mesh, const word &compTypeName, const word &thermoTypeName) | |
Construct from components. | |
virtual | ~ODEChemistryModel () |
Destructor. | |
const PtrList< Reaction < ThermoType > > & | reactions () const |
The reactions. | |
const PtrList< ThermoType > & | specieThermo () const |
Thermodynamic data of the species. | |
label | nSpecie () const |
The number of species. | |
label | nReaction () const |
The number of reactions. | |
const chemistrySolver < CompType, ThermoType > & | solver () const |
Return the chemisty solver. | |
virtual scalarField | omega (const scalarField &c, const scalar T, const scalar p) const |
dc/dt = omega, rate of change in concentration, for each species | |
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. | |
virtual void | calculate () |
Calculates the reaction rates. | |
tmp< volScalarField > | RR (const label i) const |
Return const access to the chemical source terms. | |
virtual scalar | solve (const scalar t0, const scalar deltaT) |
Solve the reaction system for the given start time and time. | |
virtual tmp< volScalarField > | tc () const |
Return the chemical time scale. | |
virtual tmp< volScalarField > | Sh () const |
Return source for enthalpy equation [kg/m/s3]. | |
virtual tmp< volScalarField > | dQ () const |
Return the heat release, i.e. enthalpy/sec [m2/s3]. | |
virtual label | nEqns () const |
Number of ODE's to solve. | |
virtual void | derivatives (const scalar t, const scalarField &c, scalarField &dcdt) const |
virtual void | jacobian (const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const |
![]() | |
ODE () | |
Construct null. | |
virtual | ~ODE () |
Protected Member Functions | |
PtrList< scalarField > & | RR () |
Write access to chemical source terms. |
Protected Attributes | |
PtrList< volScalarField > & | Y_ |
Reference to the field of specie mass fractions. | |
const PtrList< Reaction < ThermoType > > & | reactions_ |
Reactions. | |
const PtrList< ThermoType > & | specieThermo_ |
Thermodynamic data of the species. | |
label | nSpecie_ |
Number of species. | |
label | nReaction_ |
Number of reactions. | |
autoPtr< chemistrySolver < CompType, ThermoType > > | solver_ |
Chemistry solver. | |
PtrList< scalarField > | RR_ |
Chemical source term [kg/m3/s]. |
ODEChemistryModel | ( | const fvMesh & | mesh, |
const word & | compTypeName, | ||
const word & | thermoTypeName | ||
) |
Construct from components.
Definition at line 34 of file ODEChemistryModel.C.
References Foam::endl(), forAll, Foam::Info, primitiveMesh::nCells(), and scalarField().
|
virtual |
Destructor.
Definition at line 89 of file ODEChemistryModel.C.
|
inlineprotected |
Write access to chemical source terms.
(e.g. for multi-chemistry model)
Definition at line 33 of file ODEChemistryModelI.H.
TypeName | ( | "ODEChemistryModel< CompType, ThermoType >" | ) |
Runtime type information.
|
inline |
The reactions.
Definition at line 41 of file ODEChemistryModelI.H.
|
inline |
Thermodynamic data of the species.
Definition at line 49 of file ODEChemistryModelI.H.
|
inline |
The number of species.
Definition at line 57 of file ODEChemistryModelI.H.
|
inline |
The number of reactions.
Definition at line 65 of file ODEChemistryModelI.H.
|
inline |
Return the chemisty solver.
Definition at line 73 of file ODEChemistryModelI.H.
|
virtual |
dc/dt = omega, rate of change in concentration, for each species
Definition at line 97 of file ODEChemistryModel.C.
References forAll, Reaction< ReactionThermo >::lhs(), R, and Reaction< ReactionThermo >::rhs().
|
virtual |
Return the reaction rate for reaction r and the reference.
species and charateristic times
Definition at line 138 of file ODEChemistryModel.C.
References Foam::exp(), Reaction< ReactionThermo >::kf(), Reaction< ReactionThermo >::kr(), Reaction< ReactionThermo >::lhs(), Foam::max(), Foam::pow(), Reaction< ReactionThermo >::rhs(), and List< T >::size().
|
virtual |
Calculates the reaction rates.
Definition at line 616 of file ODEChemistryModel.C.
References forAll, mesh, Foam::mathematicalConstant::pi(), rho, List< T >::size(), thermo, and timeName.
|
inline |
Return const access to the chemical source terms.
Definition at line 82 of file ODEChemistryModelI.H.
References Foam::dimMass, Foam::dimTime, Foam::dimVolume, mesh, name(), and timeName.
|
virtual |
Solve the reaction system for the given start time and time.
step and return the characteristic time
Definition at line 672 of file ODEChemistryModel.C.
References forAll, Foam::max(), mesh, Foam::min(), Foam::mathematicalConstant::pi(), rho, List< T >::size(), Foam::sum(), thermo, and timeName.
|
virtual |
Return the chemical time scale.
Definition at line 449 of file ODEChemistryModel.C.
References Foam::dimTime, forAll, mesh, Foam::mathematicalConstant::pi(), rho, Reaction< ReactionThermo >::rhs(), thermo, and timeName.
|
virtual |
Return source for enthalpy equation [kg/m/s3].
Definition at line 535 of file ODEChemistryModel.C.
References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, and forAll.
|
virtual |
Return the heat release, i.e. enthalpy/sec [m2/s3].
Definition at line 576 of file ODEChemistryModel.C.
References Foam::dimEnergy, GeometricField< Type, PatchField, GeoMesh >::dimensionedInternalField(), and Foam::dimTime.
|
virtual |
|
virtual |
Implements ODE.
Definition at line 256 of file ODEChemistryModel.C.
References cp, Foam::mag(), Foam::min(), rho, and Xi().
|
virtual |
Implements ODE.
Definition at line 307 of file ODEChemistryModel.C.
References forAll, Reaction< ReactionThermo >::kf(), Reaction< ReactionThermo >::kr(), Reaction< ReactionThermo >::lhs(), Foam::max(), Foam::pow(), and Reaction< ReactionThermo >::rhs().
|
protected |
Reference to the field of specie mass fractions.
Definition at line 77 of file ODEChemistryModel.H.
|
protected |
Reactions.
Definition at line 80 of file ODEChemistryModel.H.
|
protected |
Thermodynamic data of the species.
Definition at line 83 of file ODEChemistryModel.H.
|
protected |
Number of species.
Definition at line 86 of file ODEChemistryModel.H.
|
protected |
Number of reactions.
Definition at line 89 of file ODEChemistryModel.H.
|
protected |
Chemistry solver.
Definition at line 92 of file ODEChemistryModel.H.
|
protected |
Chemical source term [kg/m3/s].
Definition at line 95 of file ODEChemistryModel.H.