8 #include "cantera/kinetics/Falloff.h"
17 "Incorrect number of parameters. 0 required. Received " +
24 if (c.size() != 3 && c.size() != 4) {
26 "Incorrect number of parameters. 3 or 4 required. Received " +
49 Fcent += exp(-
m_t2 / T);
54 double Troe::F(
double pr,
const double* work)
const
56 double lpr,f1,lgf, cc, nn;
58 cc = -0.4 - 0.67 * (*work);
59 nn = 0.75 - 1.27 * (*work);
60 f1 = (lpr + cc)/ (nn - 0.14 * (lpr + cc));
61 lgf = (*work) / (1.0 + f1 * f1);
62 return pow(10.0, lgf);
67 params[1] = 1.0/
m_rt3;
68 params[2] = 1.0/
m_rt1;
74 if (c.size() != 3 && c.size() != 5) {
76 "Incorrect number of parameters. 3 or 5 required. Received " +
82 "m_c parameter is less than zero: " +
fp2str(c[2]));
91 "m_d parameter is less than zero: " +
fp2str(c[3]));
103 *work =
m_a * exp(-
m_b / T);
105 *work += exp(- T/
m_c);
107 work[1] =
m_d * pow(T,
m_e);
110 double SRI::F(
double pr,
const double* work)
const
113 double xx = 1.0/(1.0 + lpr*lpr);
114 return pow(*work, xx) * work[1];
virtual void updateTemp(doublereal T, doublereal *work) const
Update the temperature parameters in the representation.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
virtual void init(const vector_fp &c)
Initialization of the object.
virtual void getParameters(double *params) const
Sets params to contain, in order, .
doublereal m_c
parameter c in the 5-parameter SRI falloff function. [K]
virtual doublereal F(doublereal pr, const doublereal *work) const
The falloff function.
doublereal m_rt1
parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
virtual void init(const vector_fp &c)
Initialization of the object.
virtual void getParameters(double *params) const
Sets params to contain, in order, .
doublereal m_t2
parameter T_2 in the 4-parameter Troe falloff function. [K]
virtual void updateTemp(doublereal T, doublereal *work) const
Update the temperature parameters in the representation.
doublereal m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
virtual void init(const vector_fp &c)
Initialize.
doublereal m_e
parameter d in the 5-parameter SRI falloff function. Dimensionless.
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
doublereal m_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
Base class for exceptions thrown by Cantera classes.
doublereal m_b
parameter b in the 5-parameter SRI falloff function. [K]
const doublereal SmallNumber
smallest number to compare to zero.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
doublereal m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
Contains declarations for string manipulation functions within Cantera.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
virtual doublereal F(doublereal pr, const doublereal *work) const
The falloff function.
doublereal m_a
parameter a in the 5-parameter SRI falloff function. Dimensionless.