66#ifndef TDACChemistryModel_H
67#define TDACChemistryModel_H
83template<
class ReactionThermo,
class ThermoType>
84class TDACChemistryModel
86 public StandardChemistryModel<ReactionThermo, ThermoType>
90 bool variableTimeStep_;
137 TDACChemistryModel(
const TDACChemistryModel&) =
delete;
140 void operator=(
const TDACChemistryModel&) =
delete;
145 template<
class DeltaTType>
146 scalar
solve(
const DeltaTType& deltaT);
158 TDACChemistryModel(ReactionThermo&
thermo);
209 virtual scalar
solve(
const scalar deltaT);
254 inline void setNsDAC(
const label newNsDAC);
264 inline bool active(
const label i)
const;
282 return tabulationResults_;
psiReactionThermo & thermo()
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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...
bool active(const label i) const
const Field< label > & completeToSimplifiedIndex() const
virtual ~TDACChemistryModel()
Destructor.
void setNsDAC(const label newNsDAC)
tmp< volScalarField > tabulationResults() const
virtual scalar solve(const scalar deltaT)
Solve the reaction system for the given time step.
TypeName("TDAC")
Runtime type information.
autoPtr< chemistryReductionMethod< ReactionThermo, ThermoType > > & mechRed()
autoPtr< OFstream > logFile(const word &name) const
Create and return a TDAC log file of the given name.
void setNSpecie(const label newNs)
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
virtual void derivatives(const scalar t, const scalarField &c, scalarField &dcdt) const
Calculate the derivatives in dydx.
DynamicList< label > & simplifiedToCompleteIndex()
List< List< specieElement > > & specieComp()
scalarField & simplifiedC()
void resetTabulationResults()
virtual void solve(scalarField &c, scalar &T, scalar &p, scalar &deltaT, scalar &subDeltaT) const =0
void setTabulationResultsAdd(const label celli)
TDACChemistryModel(ReactionThermo &thermo)
Construct from thermo.
PtrList< volScalarField > & Y()
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT).
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.
Field< label > & completeToSimplifiedIndex()
bool variableTimeStep() const
Return true if the time-step is variable and/or non-uniform.
scalarField & completeC()
Field< bool > & reactionsDisabled()
virtual scalar solve(const scalarField &deltaT)
Solve the reaction system for the given time step.
void setActive(const label i)
void setTabulationResultsRetrieve(const label celli)
void jacobian(const scalar t, const scalarField &c, scalarSquareMatrix &dfdc) const
Pure jacobian function for tabulation.
virtual void jacobian(const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &dfdc) const
Calculate the Jacobian of the system.
void setTabulationResultsGrow(const label celli)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
SquareMatrix< scalar > scalarSquareMatrix
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.