64 #ifndef TDACChemistryModel_H 65 #define TDACChemistryModel_H 81 template<
class ThermoType>
82 class TDACChemistryModel
84 public standardChemistryModel<ThermoType>
94 Field<bool> reactionsDisabled_;
95 Field<label> completeToSimplifiedIndex_;
96 DynamicList<label> simplifiedToCompleteIndex_;
97 autoPtr<chemistryReductionMethod<ThermoType>> mechRed_;
100 autoPtr<chemistryTabulationMethod<ThermoType>> tabulation_;
103 autoPtr<OFstream> cpuReduceFile_;
106 autoPtr<OFstream> nActiveSpeciesFile_;
109 autoPtr<OFstream> cpuAddFile_;
112 autoPtr<OFstream> cpuGrowFile_;
115 autoPtr<OFstream> cpuRetrieveFile_;
118 autoPtr<OFstream> cpuSolveFile_;
132 template<
class DeltaTType>
133 scalar solve(
const DeltaTType& deltaT);
161 inline autoPtr<OFstream>
logFile(
const word&
name)
const;
164 inline const PtrList<volScalarField>&
Y();
182 virtual scalar solve(
const scalar deltaT);
242 inline autoPtr<chemistryReductionMethod<ThermoType>>&
mechRed();
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void setTabulationResultsGrow(const label celli)
void setTabulationResultsRetrieve(const label celli)
Field< label > & completeToSimplifiedIndex()
scalarField & simplifiedC()
const PtrList< volScalarField > & Y()
Return a reference to the list of mass fraction fields.
virtual ~TDACChemistryModel()
Destructor.
scalarField & completeC()
const dimensionedScalar c
Speed of light in a vacuum.
TypeName("TDAC")
Runtime type information.
autoPtr< chemistryReductionMethod< ThermoType > > & mechRed()
DynamicList< label > & simplifiedToCompleteIndex()
Field< bool > & reactionsDisabled()
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void setNsDAC(const label newNsDAC)
tmp< volScalarField > tabulationResults() const
const fileName & name() const
Return the dictionary name.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT)
virtual void omega(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &dcdt) const
dc/dt = omega, rate of change in concentration, for each species
TDACChemistryModel(const fluidReactionThermo &thermo)
Construct from thermo.
void setTabulationResultsAdd(const label celli)
void setNSpecie(const label newNs)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
const fluidReactionThermo & thermo() const
Return const access to the thermo.
bool active(const label i) const
virtual void derivatives(const scalar t, const scalarField &c, const label li, scalarField &dcdt) const
Calculate the derivatives in dydx.
void resetTabulationResults()
autoPtr< OFstream > logFile(const word &name) const
Create and return a TDAC log file of the given name.
void setActive(const label i)
virtual void jacobian(const scalar t, const scalarField &c, const label li, scalarField &dcdt, scalarSquareMatrix &J) const
Calculate the Jacobian of the system.
SquareMatrix< scalar > scalarSquareMatrix
void operator=(const TDACChemistryModel &)=delete
Disallow default bitwise assignment.