35 inline Foam::scalar Foam::fluxLimitedLangmuirHinshelwoodReactionRate::Av
61 additionalAdsorbableSpecieNames_
65 "additionalAdsorbableSpecies",
72 limited_(dict.
found(
"s")),
76 ? dict.
lookup(
"Av")[0].isNumber()
81 limited_ && AvUniform_
82 ? dict.
lookup<scalar>(
"Av")
87 limited_ && !AvUniform_
93 limited_ && !AvUniform_
108 nReactants_ = lhs.size();
110 ra_.setSize(nReactants_ + additionalAdsorbableSpecieNames_.size());
111 nu_.setSize(nReactants_);
112 exp_.setSize(nReactants_);
116 ra_[i] = lhs[i].index;
117 nu_[i] = lhs[i].stoichCoeff;
118 exp_[i] = lhs[i].exponent;
121 forAll(additionalAdsorbableSpecieNames_, i)
123 ra_[nReactants_ + i] = st[additionalAdsorbableSpecieNames_[i]];
132 1 + nReactants_ + additionalAdsorbableSpecieNames_.size(),
143 1 + nReactants_ + additionalAdsorbableSpecieNames_.size(),
148 if (!dict.
found(
"m"))
160 const scalar nCoeffs =
161 1 + nReactants_ + additionalAdsorbableSpecieNames_.
size();
163 if (A_.size() != nCoeffs)
166 <<
"Number of A coefficients != " << nCoeffs
170 if (Ta_.size() != nCoeffs)
173 <<
"Number of Ta coefficients != " << nCoeffs
177 if (beta_.size() != nCoeffs)
180 <<
"Number of beta coefficients != " << nCoeffs
184 if (m_.size() != nCoeffs)
187 <<
"Number of m coefficients != " << nCoeffs
191 if (s_.size() != nReactants_)
194 <<
"Number of s coefficients != " 198 if (W_.size() != nReactants_)
201 <<
"Number of W coefficients != " 210 Foam::fluxLimitedLangmuirHinshelwoodReactionRate::operator()
221 const label ip1 = i + 1;
224 A_[ip1]*
pow(T, beta_[ip1])*
exp(-Ta_[ip1]/T)
225 *
pow(c[ra_[i]], m_[ip1]);
230 const scalar TaByT0 = Ta_[0]/
T;
231 const scalar k0 = A_[0]*
pow(T, beta_[0])*
exp(-TaByT0);
233 scalar r = k0/
pow(a_ + sumkc, m_[0]);
240 rc *=
pow(c[ra_[i]], exp_[i]);
243 const scalar Av = this->Av(li);
252 (Av*s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]))
271 scalar sumBetaKc = 0;
274 const label ip1 = i + 1;
277 A_[ip1]*
pow(T, beta_[ip1])*
exp(-Ta_[ip1]/T)
278 *
pow(c[ra_[i]], m_[ip1]);
281 sumBetaKc += (beta_[ip1] + Ta_[ip1]/
T)*kc;
284 const scalar TaByT0 = Ta_[0]/
T;
285 const scalar k0 = A_[0]*
pow(T, beta_[0])*
exp(-TaByT0);
288 ((beta_[0] + TaByT0)*k0 - m_[0]*k0*sumBetaKc/(a_ + sumkc))
289 /(
pow(a_ + sumkc, m_[0])*
T);
296 rc *=
pow(c[ra_[i]], exp_[i]);
299 scalar r = k0/
pow(a_ + sumkc, m_[0]);
305 const scalar Av = this->Av(li);
310 (Av*s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]));
322 (Av*s_[l]*c[ra_[l]]/(nu_[l]*rc))
335 return NullObjectRef<List<Tuple2<label, scalar>>>();
370 "additionalAdsorbableSpecies",
371 additionalAdsorbableSpecieNames_
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
virtual Ostream & write(const char)=0
Write character.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
scalar ddT(const scalar p, const scalar T, const scalarField &c, const label li) const
void size(const label)
Override size to be inconsistent with allocated storage.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Thermodynamic scalar constants.
const dimensionedScalar & c
Speed of light in a vacuum.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
void write(Ostream &os) const
Write to stream.
fluxLimitedLangmuirHinshelwoodReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
dimensionedScalar exp(const dimensionedScalar &ds)
List< scalar > scalarList
A List of scalars.
static const word null
An empty word.
const List< Tuple2< label, scalar > > & beta() const
Third-body efficiencies (beta = 1-alpha)
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces including the optional flux limi...
void dcidc(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &dcidc) const
Species concentration derivative of the pressure dependent term.
const scalar twoPi(2 *pi)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar dcidT(const scalar p, const scalar T, const scalarField &c, const label li) const
Temperature derivative of the pressure dependent term.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
static const GeometricField< scalar, fvPatchField, volMesh > & null()
Return a null geometric field.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
static void setLRhs(Istream &, const speciesTable &, List< specieCoeffs > &lhs, List< specieCoeffs > &rhs)
Construct the left- and right-hand-side reaction coefficients.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
A wordList with hashed indices for faster lookup by name.
Input from memory buffer stream.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const scalar RR
Universal gas constant (default in [J/kmol/K])
Registry of regIOobjects.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.