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_;
135 TDACChemistryModel(
const TDACChemistryModel&);
138 void operator=(
const TDACChemistryModel&);
143 template<
class DeltaTType>
144 scalar solve(
const DeltaTType& deltaT);
156 TDACChemistryModel(ReactionThermo&
thermo);
172 inline autoPtr<OFstream>
logFile(
const word&
name)
const;
174 inline PtrList<volScalarField>&
Y();
189 const Reaction<ThermoType>& r,
207 virtual scalar solve(
const scalar deltaT);
264 inline List<List<specieElement>>&
specieComp();
267 autoPtr<chemistryReductionMethod<ReactionThermo, ThermoType>>&
272 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()
ReactionThermo & thermo()
Return access to the thermo package.
void setTabulationResultsRetrieve(const label celli)
autoPtr< chemistryReductionMethod< ReactionThermo, ThermoType > > & mechRed()
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
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.
virtual void jacobian(const scalar t, const scalarField &c, scalarField &dcdt, scalarSquareMatrix &J) const
Calculate the Jacobian of the system.
label timeSteps() const
Return the number of chemistry evaluations (used by ISAT)
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)
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)
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.
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