32 template<
class ChemistryModel>
39 coeffsDict_(this->subDict(
"EulerImplicitCoeffs")),
40 cTauChem_(coeffsDict_.lookup<scalar>(
"cTauChem")),
50 template<
class ChemistryModel>
57 template<
class ChemistryModel>
73 cTp_[i] =
max(0, c[i]);
76 cTp_[nSpecie + 1] =
p;
79 this->jacobian(0, cTp_, li, R_, J_);
83 const scalar cTot =
sum(c);
89 tMin =
min(tMin, -(cTp_[i] + small)/R_[i]);
96 max(cTot - cTp_[i], 1
e-5)/
max(R_[i], small)
101 subDeltaT = cTauChem_*tMin;
102 deltaT =
min(deltaT, subDeltaT);
108 E_(i, i) = 1/deltaT - J_(i, i);
109 source[i] = R_[i] + E_(i, i)*cTp_[i];
115 E_(i, j) = -J_(i, j);
116 source[i] += E_(i, j)*cTp_[j];
127 c[i] =
max(0, cTp_[i]);
An abstract base class for solving chemistry.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
fluidReactionThermo & thermo
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Base-class for multi-component fluid thermodynamic properties.
Pre-declare related SubField type.
Macros for easy insertion into run-time selection tables.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual void solve(scalar &p, scalar &T, scalarField &c, const label li, scalar &deltaT, scalar &subDeltaT) const
Update the concentrations and return the chemical time.
EulerImplicit(const fluidReactionThermo &thermo)
Construct from thermo.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
fvModels source(alpha1, mixture.thermo1().rho())
const dimensionedScalar e
Elementary charge.
virtual ~EulerImplicit()
Destructor.