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/
max(
pow(a_ + sumkc, m_[0]), rootVSmall);
250 rc *=
pow(c[ra_[i]], exp_[i]);
260 (s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]))
266 return this->Av(li)*r;
279 scalar sumBetaKc = 0;
282 const label ip1 = i + 1;
285 A_[ip1]*
pow(T, beta_[ip1])*
exp(-Ta_[ip1]/T)
286 *
pow(c[ra_[i]], m_[ip1]);
289 sumBetaKc += (beta_[ip1] + Ta_[ip1]/
T)*kc;
292 const scalar TaByT0 = Ta_[0]/
T;
293 const scalar k0 = A_[0]*
pow(T, beta_[0])*
exp(-TaByT0);
296 ((beta_[0] + TaByT0)*k0*(a_ + sumkc) - m_[0]*k0*sumBetaKc)
297 /(
max(
pow(a_ + sumkc, m_[0] + 1), rootVSmall)*T);
304 rc *=
pow(c[ra_[i]], exp_[i]);
307 scalar r = k0/
pow(a_ + sumkc, m_[0]);
316 (s_[i]*c[ra_[i]]/(nu_[i]*rc))*
sqrt(
RR*T/(
twoPi*W_[i]));
328 (s_[l]*c[ra_[l]]/(nu_[l]*rc))
334 return this->Av(li)*ddT;
365 "additionalAdsorbableSpecies",
366 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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
virtual Ostream & write(const char)=0
Write character.
FvWallInfoData< WallInfo, label > 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.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
Langmuir-Hinshelwood reaction rate for gaseous reactions on surfaces including the optional flux limi...
const scalar twoPi(2 *pi)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
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...
void ddc(const scalar p, const scalar T, const scalarField &c, const label li, scalarField &ddc) const
Registry of regIOobjects.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.