64 #ifndef TDACChemistryModel_H 65 #define TDACChemistryModel_H 81 template<
class ReactionThermo,
class ThermoType>
82 class TDACChemistryModel
84 public StandardChemistryModel<ReactionThermo, ThermoType>
88 bool variableTimeStep_;
96 Field<bool> reactionsDisabled_;
97 List<List<specieElement>> specieComp_;
98 Field<label> completeToSimplifiedIndex_;
99 DynamicList<label> simplifiedToCompleteIndex_;
100 autoPtr<chemistryReductionMethod<ReactionThermo, ThermoType>>
104 autoPtr<chemistryTabulationMethod<ReactionThermo, ThermoType>>
108 autoPtr<OFstream> cpuReduceFile_;
111 autoPtr<OFstream> nActiveSpeciesFile_;
114 autoPtr<OFstream> cpuAddFile_;
117 autoPtr<OFstream> cpuGrowFile_;
120 autoPtr<OFstream> cpuRetrieveFile_;
123 autoPtr<OFstream> cpuSolveFile_;
137 template<
class DeltaTType>
138 scalar solve(
const DeltaTType& deltaT);
169 inline autoPtr<OFstream>
logFile(
const word&
name)
const;
171 inline const PtrList<volScalarField>&
Y();
187 const Reaction<ThermoType>& r,
206 virtual scalar solve(
const scalar deltaT);
266 inline List<List<specieElement>>&
specieComp();
269 autoPtr<chemistryReductionMethod<ReactionThermo, ThermoType>>&
274 return tabulationResults_;
Extends StandardChemistryModel by adding the TDAC method.
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)
autoPtr< chemistryReductionMethod< ReactionThermo, ThermoType > > & mechRed()
Field< label > & completeToSimplifiedIndex()
scalarField & simplifiedC()
const PtrList< volScalarField > & Y()
virtual ~TDACChemistryModel()
Destructor.
scalarField & completeC()
const dimensionedScalar & c
Speed of light in a vacuum.
TypeName("TDAC")
Runtime type information.
DynamicList< label > & simplifiedToCompleteIndex()
Field< bool > & reactionsDisabled()
GeometricField< scalar, fvPatchField, volMesh > volScalarField
void setNsDAC(const label newNsDAC)
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 ReactionThermo &thermo)
Construct from thermo.
const word & name() const
Name function is needed to disambiguate those inherited.
void setTabulationResultsAdd(const label celli)
List< List< specieElement > > & specieComp()
void setNSpecie(const label newNs)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
bool variableTimeStep() const
Return true if the time-step is variable and/or non-uniform.
bool active(const label i) const
const ReactionThermo & thermo() const
Return const access to the thermo package.
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.
A class for managing temporary objects.
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.
tmp< volScalarField > tabulationResults() const
SquareMatrix< scalar > scalarSquareMatrix
void operator=(const TDACChemistryModel &)=delete
Disallow default bitwise assignment.