43#ifndef solidChemistryModel_H
44#define solidChemistryModel_H
63template<
class CompType,
class Sol
idThermo>
64class solidChemistryModel
72 solidChemistryModel(
const solidChemistryModel&) =
delete;
75 void operator=(
const solidChemistryModel&) =
delete;
120 solidChemistryModel(
typename CompType::reactionThermo&
thermo);
142 const bool updateC0 =
false
198 virtual scalar
solve(
const scalar deltaT) = 0;
214 virtual label
nEqns()
const = 0;
DimensionedField< scalar, volMesh > Internal
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
ODESystem()
Construct null.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
Mesh data needed to do the Finite Volume discretisation.
const PtrList< Reaction< SolidThermo > > & reactions() const
The reactions.
virtual tmp< volScalarField > tc() const
Return the chemical time scale.
virtual void calculate()=0
Calculates the reaction rates.
virtual ~solidChemistryModel()
Destructor.
solidChemistryModel(typename CompType::reactionThermo &thermo)
Construct from thermo.
PtrList< volScalarField > & Ys_
const PtrList< Reaction< Foam::hConstSolidThermoPhysics > > & reactions_
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.
TypeName("solidChemistryModel")
Runtime type information.
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
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.
label nReaction() const
The number of reactions.
virtual void solve(scalarField &c, scalar &T, scalar &p, scalar &deltaT, scalar &subDeltaT) const =0
PtrList< volScalarField::Internal > RRs_
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 jacobian(const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const =0
Calculate the Jacobian of the system.
virtual scalar solve(const scalarField &deltaT)
Solve the reaction system for the given time step.
tmp< volScalarField::Internal > RRs() const
Return total solid source term.
const PtrList< Foam::hConstSolidThermoPhysics > & solidThermo_
virtual label nEqns() const =0
Number of ODE's to solve.
List< bool > reactingCells_
virtual void derivatives(const scalar t, const scalarField &c, scalarField &dcdt) const =0
Calculate the derivatives in dydx.
const volScalarField::Internal & RRs(const label i) const
Return const access to the chemical source terms for solids.
PtrList< volScalarField::Internal > & RRs()
Write access to source terms for solids.
virtual tmp< volScalarField > Qdot() const
Return the heat release rate [kg/m/s3].
void setCellReacting(const label celli, const bool active)
Set reacting status of cell, celli.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
SquareMatrix< scalar > scalarSquareMatrix
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.