30 #define FALL_OFF_FUNCTION_JACOBIAN false
34 template<
class ReactionRate,
class FallOffFunction>
38 const ReactionRate& k0,
39 const ReactionRate& kInf,
40 const FallOffFunction&
F,
47 thirdBodyEfficiencies_(tbes)
51 template<
class ReactionRate,
class FallOffFunction>
60 k0_(species, dims,
dict.subDict(
"k0")),
61 kInf_(species, dims,
dict.subDict(
"kInf")),
62 F_(
dict.subDict(
"F")),
63 thirdBodyEfficiencies_(species,
dict.subDict(
"thirdBodyEfficiencies"))
69 template<
class ReactionRate,
class FallOffFunction>
78 template<
class ReactionRate,
class FallOffFunction>
87 template<
class ReactionRate,
class FallOffFunction>
97 const scalar k0 = k0_(
p,
T,
c, li);
98 const scalar kInf = kInf_(
p,
T,
c, li);
99 const scalar
M = thirdBodyEfficiencies_.M(
c);
100 const scalar Pr = k0/kInf*
M;
101 const scalar
F = F_(
T, Pr);
103 return kInf*(Pr/(1 + Pr))*
F;
107 template<
class ReactionRate,
class FallOffFunction>
117 const scalar k0 = k0_(
p,
T,
c, li);
118 const scalar kInf = kInf_(
p,
T,
c, li);
119 const scalar
M = thirdBodyEfficiencies_.M(
c);
120 const scalar Pr = k0/kInf*
M;
121 const scalar
F = F_(
T, Pr);
123 const scalar dkInfdT = kInf_.ddT(
p,
T,
c, li);
125 #if FALL_OFF_FUNCTION_JACOBIAN
127 const scalar dk0dT = k0_.ddT(
p,
T,
c, li);
128 const scalar dPrdT = (
M*dk0dT - Pr*dkInfdT)/kInf;
129 const scalar dFdT = F_.ddT(
T, Pr,
F) + F_.ddPr(
T, Pr,
F)*dPrdT;
132 dkInfdT*(Pr/(1 + Pr))*
F
133 + kInf*dPrdT/
sqr(1 + Pr)*
F
134 + kInf*(Pr/(1 + Pr))*dFdT;
138 return dkInfdT*(Pr/(1 + Pr))*
F;
144 template<
class ReactionRate,
class FallOffFunction>
152 template<
class ReactionRate,
class FallOffFunction>
162 const scalar k0 = k0_(
p,
T,
c, li);
163 const scalar kInf = kInf_(
p,
T,
c, li);
164 const scalar
M = thirdBodyEfficiencies_.M(
c);
165 const scalar Pr = k0/kInf*
M;
166 const scalar
F = F_(
T, Pr);
168 #if FALL_OFF_FUNCTION_JACOBIAN
171 k0_.ddc(
p,
T,
c, li, dk0dc);
173 kInf_.ddc(
p,
T,
c, li, dkInfdc);
176 scalarField dPrdc((
M*dk0dc - Pr*dkInfdc + k0*dMdc)/kInf);
177 const scalar dFdPr = F_.ddPr(
T, Pr,
F);
180 dkInfdc*(Pr/(1 + Pr))*
F
181 + kInf*dPrdc/
sqr(1 + Pr)*
F
182 + kInf*(Pr/(1 + Pr))*dFdPr*dPrdc;
186 kInf_.ddc(
p,
T,
c, li, ddc);
188 ddc *= (Pr/(1 + Pr))*
F;
194 template<
class ReactionRate,
class FallOffFunction>
221 os <<
indent <<
"thirdBodyEfficiencies" <<
nl;
224 thirdBodyEfficiencies_.
write(os);
230 template<
class ReactionRate,
class FallOffFunction>
General class for handling unimolecular/recombination fall-off reactions.
void preEvaluate() const
Pre-evaluation hook.
FallOffReactionRate(const ReactionRate &k0, const ReactionRate &kInf, const FallOffFunction &F, const thirdBodyEfficiencies &tbes)
Construct from components.
void postEvaluate() const
Post-evaluation hook.
void write(Ostream &os) const
Write to stream.
void ddc(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &ddc) const
The derivative of the rate w.r.t. concentration.
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
The derivative of the rate w.r.t. temperature.
friend Ostream & operator(Ostream &, const FallOffReactionRate< ReactionRate, FallOffFunction > &)
bool hasDdc() const
Is the rate a function of concentration?
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & write(const char)=0
Write character.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Dimension set for the base types.
A wordList with hashed indices for faster lookup by name.
A class for managing temporary objects.
const dimensionedScalar F
Faraday constant: default SI units: [C/kmol].
const dimensionedScalar c
Speed of light in a vacuum.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & indent(Ostream &os)
Indent stream.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)