46 for (
int i=0; i<n_; i++)
60 co_(species.find(
"CO")),
61 c3h6_(species.find(
"C3H6")),
62 no_(species.find(
"NO"))
65 FixedList<Tuple2<scalar, scalar>, n_> coeffs(
dict.lookup(
"coeffs"));
69 A_[i] = coeffs[i].first();
70 Ta_[i] = coeffs[i].second();
77inline Foam::scalar Foam::LangmuirHinshelwoodReactionRate::operator()
84 return A_[0]*
exp(-Ta_[0]/
T)/
87 *
sqr(1 + A_[1]*
exp(-Ta_[1]/
T)*c[co_] + A_[2]*
exp(-Ta_[2]/
T)*c[c3h6_])
88 *(1 + A_[3]*
exp(-Ta_[3]/
T)*
sqr(c[co_])*
sqr(c[c3h6_]))
89 *(1 + A_[4]*
exp(-Ta_[4]/
T)*
pow(c[no_], 0.7))
100 coeffs[i].
first() = A_[i];
101 coeffs[i].second() = Ta_[i];
104 os.writeKeyword(
"coeffs") << coeffs <<
nl;
108inline Foam::Ostream& Foam::operator<<
static const Foam::dimensionedScalar A("", Foam::dimPressure, 611.21)
A 1D vector of objects of type <T> with a fixed length <N>.
T & first() noexcept
Access first element of the list, position [0] - front().
Power series reaction rate.
LangmuirHinshelwoodReactionRate(const scalar A[], const scalar Ta[], const label co, const label c3h6, const label no)
Construct from components.
void write(Ostream &os) const
Write to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
hashedWordList speciesTable
A table of species as a hashedWordList.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.