26 void update(
double T)
override;
28 void update(
double T,
double M)
override;
41 void resize(
size_t nSpecies,
size_t nReactions,
size_t nPhases)
override {
42 conc_3b.resize(nReactions, NAN);
97 void init(
const vector<double>& c);
133 virtual double F(
double pr,
const double* work)
const {
138 double evalF(
double T,
double conc3b) {
140 double logT = std::log(T);
141 double recipT = 1. / T;
154 "To be removed after Cantera 3.0; unused.");
158 const string type()
const override {
160 return "chemically-activated";
180 "To be removed after Cantera 3.0; superseded by getFalloffCoeffs.");
191 double thirdBodyConcentration;
192 if (shared_data.
ready) {
195 thirdBodyConcentration = shared_data.
conc_3b[0];
202 pr =
F(pr,
m_work.data()) / (1.0 + pr);
207 pr *=
F(pr,
m_work.data()) / (1.0 + pr);
211 void check(
const string& equation)
override;
279 const vector<double>& c);
282 return make_unique<MultiRate<LindemannRate, FalloffData>>();
342 TroeRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
343 const vector<double>& c);
346 return make_unique<MultiRate<TroeRate, FalloffData>>();
364 void updateTemp(
double T,
double* work)
const override;
366 double F(
double pr,
const double* work)
const override;
447 SriRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector<double>& c)
456 return make_unique<MultiRate<SriRate, FalloffData>>();
475 void updateTemp(
double T,
double* work)
const override;
477 double F(
double pr,
const double* work)
const override;
552 TsangRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector<double>& c)
561 return make_unique<MultiRate<TsangRate, FalloffData>>();
579 void updateTemp(
double T,
double* work)
const override;
581 double F(
double pr,
const double* work)
const override;
Header for reaction rates that involve Arrhenius-type kinetics.
A map of string keys to values whose type can vary at runtime.
Arrhenius reaction rate type depends only on temperature.
double evalRate(double logT, double recipT) const
Evaluate reaction rate.
Base class for falloff rate calculators.
ArrheniusRate & highRate()
Get reaction rate in the high-pressure limit.
double evalFromStruct(const FalloffData &shared_data)
Evaluate reaction rate.
void setAllowNegativePreExponentialFactor(bool value)
Set flag indicating whether negative A values are permitted.
virtual size_t nParameters() const
Returns the number of parameters used by this parameterization.
virtual double F(double pr, const double *work) const
The falloff function.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
double m_rc_low
Evaluated reaction rate in the low-pressure limit.
void setHighRate(const ArrheniusRate &high)
Set reaction rate in the high-pressure limit.
vector< double > m_work
Work vector.
virtual void setFalloffCoeffs(const vector< double > &c)
Set coefficients of the falloff parameterization.
virtual void getParameters(double *params) const
Get the values of the parameters for this object.
ArrheniusRate m_highRate
The reaction rate in the high-pressure limit.
void validate(const string &equation, const Kinetics &kin) override
Validate the reaction rate expression.
virtual size_t workSize() const
The size of the work array required.
double evalF(double T, double conc3b)
Evaluate falloff function at current conditions.
bool chemicallyActivated() const
Get flag indicating whether reaction is chemically activated.
ArrheniusRate & lowRate()
Get reaction rate in the low-pressure limit.
ArrheniusRate m_lowRate
The reaction rate in the low-pressure limit.
bool m_chemicallyActivated
Flag labeling reaction as chemically activated.
virtual void updateTemp(double T, double *work) const
Update the temperature-dependent portions of the falloff function, if any, and store them in the 'wor...
bool allowNegativePreExponentialFactor() const
Get flag indicating whether negative A values are permitted.
bool m_negativeA_ok
Flag indicating whether negative A values are permitted.
double m_rc_high
Evaluated reaction rate in the high-pressure limit.
void check(const string &equation) override
Check basic syntax and settings of reaction rate expression.
void init(const vector< double > &c)
Initialize.
virtual void getFalloffCoeffs(vector< double > &c) const
Retrieve coefficients of the falloff parameterization.
const string type() const override
String identifying reaction rate specialization.
void setLowRate(const ArrheniusRate &low)
Set reaction rate in the low-pressure limit.
void setChemicallyActivated(bool activated)
Set flag indicating whether reaction is chemically activated.
Public interface for kinetics managers.
The Lindemann falloff parameterization.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
const string subType() const override
String identifying sub-type of reaction rate specialization.
Abstract base class for reaction rate definitions; this base class is used by user-facing APIs to acc...
size_t m_rate_index
Index of reaction rate within kinetics evaluator.
The SRI falloff function.
double F(double pr, const double *work) const override
The falloff function.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
const string subType() const override
String identifying sub-type of reaction rate specialization.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
size_t workSize() const override
The size of the work array required.
double m_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
void getParameters(double *params) const override
Sets params to contain, in order,.
double m_a
parameter a in the 5-parameter SRI falloff function. Dimensionless.
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
double m_c
parameter c in the 5-parameter SRI falloff function. [K]
double m_b
parameter b in the 5-parameter SRI falloff function. [K]
double m_e
parameter d in the 5-parameter SRI falloff function. Dimensionless.
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Base class for a phase with thermodynamic properties.
The 3- or 4-parameter Troe falloff parameterization.
double F(double pr, const double *work) const override
The falloff function.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
const string subType() const override
String identifying sub-type of reaction rate specialization.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
double m_t2
parameter T_2 in the 4-parameter Troe falloff function. [K]
size_t workSize() const override
The size of the work array required.
void getParameters(double *params) const override
Sets params to contain, in order,.
double m_rt1
parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
double m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
double m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
The 1- or 2-parameter Tsang falloff parameterization.
double F(double pr, const double *work) const override
The falloff function.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
const string subType() const override
String identifying sub-type of reaction rate specialization.
void setParameters(const AnyMap &node, const UnitStack &rate_units) override
Set parameters.
void setFalloffCoeffs(const vector< double > &c) override
Set coefficients used by parameterization.
void updateTemp(double T, double *work) const override
Update the temperature parameters in the representation.
size_t workSize() const override
The size of the work array required.
void getParameters(double *params) const override
Sets params to contain, in order,.
double m_a
parameter a in the Tsang F_cent formulation. Dimensionless
void getFalloffCoeffs(vector< double > &c) const override
Retrieve coefficients of the falloff parameterization.
double m_b
parameter b in the Tsang F_cent formulation. [K^-1]
size_t nParameters() const override
Returns the number of parameters used by this parameterization.
Namespace for the Cantera kernel.
const double SmallNumber
smallest number to compare to zero.
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Data container holding shared data specific to Falloff rates.
int m_state_mf_number
integer that is incremented when composition changes
vector< double > m_conc_3b_buf
buffered third-body concentrations
void perturbThirdBodies(double deltaM)
Perturb third-body concentration vector of data container.
bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
bool ready
boolean indicating whether vectors are accessible
vector< double > conc_3b
vector of effective third-body concentrations
double molar_density
used to determine if updates are needed
void restore() override
Restore data container after a perturbation.
void invalidateCache() override
Force shared data and reaction rates to be updated next time.
bool m_perturbed
boolean indicating whether 3-rd body values are perturbed
Data container holding shared data used for ReactionRate calculation.
double recipT
inverse of temperature
virtual void update(double T)
Update data container based on temperature T
double temperature
temperature
double logT
logarithm of temperature
virtual void invalidateCache()
Force shared data and reaction rates to be updated next time.
Unit aggregation utility.