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]);
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]);
Macros for easy insertion into run-time selection tables.
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 fluidMulticomponentThermo &thermo)
Construct from thermo.
virtual ~EulerImplicit()
Destructor.
SubField< scalar > subField
Declare type of subField.
An abstract base class for solving chemistry.
Base-class for multi-component fluid thermodynamic properties.
const dimensionedScalar c
Speed of light in a vacuum.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
fluidMulticomponentThermo & thermo