64 #ifndef TDACChemistryModel_H 65 #define TDACChemistryModel_H 81 template<
class CompType,
class ThermoType>
82 class TDACChemistryModel
84 public chemistryModel<CompType, ThermoType>
88 bool variableTimeStep_;
96 Field<bool> reactionsDisabled_;
97 List<List<specieElement>> specieComp_;
98 Field<label> completeToSimplifiedIndex_;
99 DynamicList<label> simplifiedToCompleteIndex_;
100 autoPtr<chemistryReductionMethod<CompType, ThermoType>> mechRed_;
103 autoPtr<chemistryTabulationMethod<CompType, ThermoType>> tabulation_;
106 autoPtr<OFstream> cpuReduceFile_;
109 autoPtr<OFstream> nActiveSpeciesFile_;
112 autoPtr<OFstream> cpuAddFile_;
115 autoPtr<OFstream> cpuGrowFile_;
118 autoPtr<OFstream> cpuRetrieveFile_;
121 autoPtr<OFstream> cpuSolveFile_;
133 TDACChemistryModel(
const TDACChemistryModel&);
136 void operator=(
const TDACChemistryModel&);
141 template<
class DeltaTType>
142 scalar solve(
const DeltaTType& deltaT);
157 const word& phaseName
174 inline autoPtr<OFstream>
logFile(
const word&
name)
const;
176 inline PtrList<volScalarField>&
Y();
191 const Reaction<ThermoType>& r,
209 virtual scalar solve(
const scalar deltaT);
274 inline List<List<specieElement>>&
specieComp();
276 inline autoPtr<chemistryReductionMethod<CompType, ThermoType>>&
281 return tabulationResults_;
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)
PtrList< volScalarField > & Y()
void setTabulationResultsRetrieve(const label celli)
Field< label > & completeToSimplifiedIndex()
scalarField & simplifiedC()
virtual ~TDACChemistryModel()
Destructor.
scalarField & completeC()
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
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)
void setTabulationResultsAdd(const label celli)
void jacobian(const scalar t, const scalarField &c, scalarSquareMatrix &dfdc) const
Pure jacobian function for tabulation.
autoPtr< chemistryReductionMethod< CompType, ThermoType > > & mechRed()
List< List< specieElement > > & specieComp()
void setNSpecie(const label newNs)
virtual void derivatives(const scalar t, const scalarField &c, scalarField &dcdt) const
Calculate the derivatives in dydx.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
word name(const complex &)
Return a string representation of a complex.
bool variableTimeStep() const
Return true if the time-step is variable and/or non-uniform.
bool active(const label i) const
const dimensionedScalar c
Speed of light in a vacuum.
TypeName("TDACChemistryModel")
Runtime type information.
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)
tmp< volScalarField > tabulationResults() const
SquareMatrix< scalar > scalarSquareMatrix