37 reactantNames_(
dict.lookup(
"reactants")),
38 a_(
dict.lookupOrDefault<scalar>(
"a", 1)),
40 Ta_(
dict.lookup(
"Ta")),
60 r_[i] = st[reactantNames_[i]];
75 inline Foam::scalar Foam::LangmuirHinshelwoodReactionRate::operator()
83 const scalar c1m =
pow(
c[r_[0]], m_[1]);
84 const scalar c2m =
pow(
c[r_[1]], m_[2]);
86 const scalar k0 = A_[0]*
pow(
T, beta_[0])*
exp(-Ta_[0]/
T);
87 const scalar k1 = A_[1]*
pow(
T, beta_[1])*
exp(-Ta_[1]/
T);
88 const scalar k2 = A_[2]*
pow(
T, beta_[2])*
exp(-Ta_[2]/
T);
90 const scalar
b = a_ + k1*c1m + k2*c2m;
92 return k0/
pow(
b, m_[0]);
104 const scalar c1m =
pow(
c[r_[0]], m_[1]);
105 const scalar c2m =
pow(
c[r_[1]], m_[2]);
107 const scalar k0 = A_[0]*
pow(
T, beta_[0])*
exp(-Ta_[0]/
T);
108 const scalar k1 = A_[1]*
pow(
T, beta_[1])*
exp(-Ta_[1]/
T);
109 const scalar k2 = A_[2]*
pow(
T, beta_[2])*
exp(-Ta_[2]/
T);
111 const scalar dk0dT = k0/
T*(beta_[0] + Ta_[0]/
T);
112 const scalar dk1dT = k1/
T*(beta_[1] + Ta_[1]/
T);
113 const scalar dk2dT = k2/
T*(beta_[2] + Ta_[2]/
T);
115 const scalar
b = a_ + k1*c1m + k2*c2m;
116 const scalar dbdT = dk1dT*c1m + dk2dT*c2m;
118 return (dk0dT - k0*m_[0]*dbdT/
b)/
pow(
b, m_[0]);
137 const scalar c1m =
pow(
c[r_[0]], m_[1]);
138 const scalar c2m =
pow(
c[r_[1]], m_[2]);
140 const scalar dc1mdc1 = m_[1]*c1m/
c[r_[0]];
141 const scalar dc2mdc2 = m_[2]*c2m/
c[r_[1]];
143 const scalar k0 = A_[0]*
pow(
T, beta_[0])*
exp(-Ta_[0]/
T);
144 const scalar k1 = A_[1]*
pow(
T, beta_[1])*
exp(-Ta_[1]/
T);
145 const scalar k2 = A_[2]*
pow(
T, beta_[2])*
exp(-Ta_[2]/
T);
147 const scalar
b = a_ + k1*c1m + k2*c2m;
148 const scalar dbdc1 = k1*dc1mdc1;
149 const scalar dbdc2 = k2*dc2mdc2;
151 const scalar
k = k0/
pow(
b, m_[0]);
152 const scalar dkdb = -
k*m_[0]/
b;
155 ddc[r_[0]] = dkdb*dbdc1;
156 ddc[r_[1]] = dkdb*dbdc2;
#define forAll(list, i)
Loop across all elements in list.
A 1D vector of objects of type <T> with a fixed size <Size>.
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces.
LangmuirHinshelwoodReactionRate(const speciesTable &species, const dimensionSet &dims, const dictionary &dict)
Construct from dictionary.
void preEvaluate() const
Pre-evaluation hook.
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.
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....
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T, if not found return the given default.
Dimension set for the base types.
A wordList with hashed indices for faster lookup by name.
const dimensionedScalar c
Speed of light in a vacuum.
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)