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... | |
label | nSpecie () const |
The number of species. More... | |
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 tmp< scalarField > | omega (const scalarField &c, const scalar T, const scalar p) 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 DimensionedField< scalar, volMesh > & | RR (const label i) const |
Return const access to the chemical source terms for specie, i. More... | |
virtual DimensionedField< scalar, volMesh > & | RR (const label i) |
Return non const access to chemical source terms [kg/m3/s]. More... | |
virtual tmp< DimensionedField< scalar, volMesh > > | 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 > | Sh () const |
Return source for enthalpy equation [kg/m/s3]. More... | |
virtual tmp< volScalarField > | dQ () const |
Return the heat release, i.e. enthalpy/sec [kg/m2/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 |
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< DimensionedField< scalar, volMesh > > & | 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< DimensionedField< scalar, volMesh > > | RR_ |
List of reaction rate per specie [kg/m3/s]. More... | |
Private Member Functions | |
chemistryModel (const chemistryModel &) | |
Disallow copy constructor. More... | |
void | operator= (const chemistryModel &) |
Disallow default bitwise assignment. More... | |
template<class DeltaTType > | |
scalar | solve (const DeltaTType &deltaT) |
Solve the reaction system for the given time step. 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 59 of file chemistryModel.H.
|
protected |
Definition at line 80 of file chemistryModel.H.
|
private |
Disallow copy constructor.
chemistryModel | ( | const fvMesh & | mesh, |
const word & | phaseName | ||
) |
Construct from mesh.
Definition at line 34 of file chemistryModel.C.
References Foam::dimMass, Foam::dimTime, Foam::dimVolume, Foam::endl(), forAll, Foam::Info, mesh, and Foam::name().
|
virtual |
Destructor.
Definition at line 87 of file chemistryModel.C.
|
private |
Disallow default bitwise assignment.
|
private |
Solve the reaction system for the given time step.
of given type and return the characteristic time
|
inlineprotected |
Write access to chemical source terms.
(e.g. for multi-chemistry model)
Definition at line 33 of file chemistryModelI.H.
TypeName | ( | "chemistryModel< CompType, ThermoType >" | ) |
Runtime type information.
|
inline |
The reactions.
Definition at line 41 of file chemistryModelI.H.
|
inline |
Thermodynamic data of the species.
Definition at line 49 of file chemistryModelI.H.
|
inline |
The number of species.
Definition at line 57 of file chemistryModelI.H.
|
inline |
The number of reactions.
Definition at line 65 of file chemistryModelI.H.
|
inline |
Temperature below which the reaction rates are assumed 0.
Definition at line 73 of file chemistryModelI.H.
|
inline |
Temperature below which the reaction rates are assumed 0.
|
virtual |
dc/dt = omega, rate of change in concentration, for each species
Definition at line 96 of file chemistryModel.C.
References Foam::constant::universal::c, forAll, p, R, s(), scalarField(), and T.
|
virtual |
Return the reaction rate for reaction r and the reference.
species and charateristic times
Definition at line 160 of file chemistryModel.C.
References Foam::constant::universal::c, Foam::constant::physicoChemical::c2, Foam::exp(), Foam::max(), p, Foam::pow(), R, s(), and T.
|
virtual |
Return the reaction rate for iReaction and the reference.
species and charateristic times
Definition at line 138 of file chemistryModel.C.
References Foam::constant::universal::c, p, R, T, and w().
|
virtual |
Calculates the reaction rates.
Definition at line 714 of file chemistryModel.C.
References Foam::constant::universal::c, forAll, mesh, p, Foam::constant::mathematical::pi(), rho, T, thermo, and timeName.
|
inline |
Return const access to the chemical source terms for specie, i.
Definition at line 90 of file chemistryModelI.H.
|
virtual |
Return non const access to chemical source terms [kg/m3/s].
Definition at line 100 of file chemistryModelI.H.
|
virtual |
Return reaction rate of the speciei in reactionI.
Definition at line 634 of file chemistryModel.C.
References Foam::constant::universal::c, Foam::dimMass, Foam::dimTime, Foam::dimVolume, forAll, mesh, p, Foam::constant::mathematical::pi(), rho, Foam::constant::thermodynamic::RR, T, thermo, timeName, and w().
|
virtual |
Solve the reaction system for the given time step.
and return the characteristic time
Definition at line 846 of file chemistryModel.C.
References Foam::min(), and solve().
|
virtual |
Solve the reaction system for the given time step.
and return the characteristic time
Definition at line 861 of file chemistryModel.C.
|
virtual |
Return the chemical time scale.
Definition at line 464 of file chemistryModel.C.
References Foam::constant::universal::c, Foam::dimTime, forAll, mesh, p, Foam::constant::mathematical::pi(), R, rho, s(), T, thermo, and timeName.
|
virtual |
Return source for enthalpy equation [kg/m/s3].
Definition at line 550 of file chemistryModel.C.
References Foam::dimEnergy, Foam::dimTime, Foam::dimVolume, forAll, and Sh.
|
virtual |
Return the heat release, i.e. enthalpy/sec [kg/m2/s3].
Definition at line 592 of file chemistryModel.C.
References Foam::dimEnergy, Foam::dimTime, dQ, and Sh.
|
virtual |
|
virtual |
Calculate the derivatives in dydx.
Implements ODESystem.
Definition at line 278 of file chemistryModel.C.
References Foam::constant::universal::c, cp, p, rho, and T.
|
virtual |
Calculate the Jacobian of the system.
Need by the stiff-system solvers
Implements ODESystem.
Definition at line 323 of file chemistryModel.C.
References Foam::constant::universal::c, Foam::constant::physicoChemical::c2, delta, forAll, Foam::max(), nSpecie, p, Foam::pow(), R, and T.
|
virtual |
Definition at line 871 of file chemistryModel.C.
References NotImplemented.
Foam::scalar solve | ( | const DeltaTType & | deltaT | ) |
Definition at line 764 of file chemistryModel.C.
References Foam::constant::universal::c, correct(), forAll, mesh, Foam::min(), p, Foam::constant::mathematical::pi(), rho, solve(), T, thermo, and timeName.
|
protected |
Reference to the field of specie mass fractions.
Definition at line 85 of file chemistryModel.H.
Reactions.
Definition at line 88 of file chemistryModel.H.
|
protected |
Thermodynamic data of the species.
Definition at line 91 of file chemistryModel.H.
|
protected |
Number of species.
Definition at line 94 of file chemistryModel.H.
|
protected |
Number of reactions.
Definition at line 97 of file chemistryModel.H.
|
protected |
Temperature below which the reaction rates are assumed 0.
Definition at line 100 of file chemistryModel.H.
|
protected |
List of reaction rate per specie [kg/m3/s].
Definition at line 103 of file chemistryModel.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.