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 != " 220 Foam::fluxLimitedLangmuirHinshelwoodReactionRate::operator()
231 const label ip1 = i + 1;
234 A_[ip1]*
pow(T, beta_[ip1])*
exp(-Ta_[ip1]/T)
235 *
pow(c[ra_[i]], m_[ip1]);
240 const scalar TaByT0 = Ta_[0]/
T;
241 const scalar k0 = A_[0]*
pow(T, beta_[0])*
exp(-TaByT0);
243 scalar r = k0/
pow(a_ + sumkc, m_[0]);
250 rc *=
pow(c[ra_[i]], exp_[i]);
253 const scalar Av = this->Av(li);
262 (Av*s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]))
281 scalar sumBetaKc = 0;
284 const label ip1 = i + 1;
287 A_[ip1]*
pow(T, beta_[ip1])*
exp(-Ta_[ip1]/T)
288 *
pow(c[ra_[i]], m_[ip1]);
291 sumBetaKc += (beta_[ip1] + Ta_[ip1]/
T)*kc;
294 const scalar TaByT0 = Ta_[0]/
T;
295 const scalar k0 = A_[0]*
pow(T, beta_[0])*
exp(-TaByT0);
298 ((beta_[0] + TaByT0)*k0 - m_[0]*k0*sumBetaKc/(a_ + sumkc))
299 /(
pow(a_ + sumkc, m_[0])*
T);
306 rc *=
pow(c[ra_[i]], exp_[i]);
309 scalar r = k0/
pow(a_ + sumkc, m_[0]);
315 const scalar Av = this->Av(li);
320 (Av*s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]));
332 (Av*s_[l]*c[ra_[l]]/(nu_[l]*rc))
345 return NullObjectRef<List<Tuple2<label, scalar>>>();
380 "additionalAdsorbableSpecies",
381 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.
void postEvaluate() const
Post-evaluation hook.
void preEvaluate() const
Pre-evaluation hook.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
const dimensionedScalar c
Speed of light in a vacuum.
void write(Ostream &os) const
Write to stream.
fluxLimitedLangmuirHinshelwoodReactionRate(const speciesTable &species, const objectRegistry &ob, const dictionary &dict)
Construct from dictionary.
const dimensionedScalar RR
Universal gas constant: default SI units: [J/kmol/K].
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...
Registry of regIOobjects.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.