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);
123 virtual double F(
double pr,
const double* work)
const {
128 double evalF(
double T,
double conc3b) {
130 double logT = std::log(T);
131 double recipT = 1. / T;
138 const string type()
const override {
140 return "chemically-activated";
161 double thirdBodyConcentration;
162 if (shared_data.
ready) {
165 thirdBodyConcentration = shared_data.
conc_3b[0];
172 pr =
F(pr,
m_work.data()) / (1.0 + pr);
177 pr *=
F(pr,
m_work.data()) / (1.0 + pr);
181 void check(
const string& equation)
override;
249 const vector<double>& c);
252 return make_unique<MultiRate<LindemannRate, FalloffData>>();
312 TroeRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
313 const vector<double>& c);
316 return make_unique<MultiRate<TroeRate, FalloffData>>();
334 void updateTemp(
double T,
double* work)
const override;
336 double F(
double pr,
const double* work)
const override;
407 SriRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector<double>& c)
416 return make_unique<MultiRate<SriRate, FalloffData>>();
435 void updateTemp(
double T,
double* work)
const override;
437 double F(
double pr,
const double* work)
const override;
501 TsangRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector<double>& c)
510 return make_unique<MultiRate<TsangRate, FalloffData>>();
528 void updateTemp(
double T,
double* work)
const override;
530 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.
double evalFromStruct(const FalloffData &shared_data)
Evaluate reaction rate.
ArrheniusRate & highRate()
Get reaction rate in the high-pressure limit.
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.
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.
double evalF(double T, double conc3b)
Evaluate falloff function at current conditions.
bool chemicallyActivated() const
Get flag indicating whether reaction is chemically activated.
ArrheniusRate m_lowRate
The reaction rate in the low-pressure limit.
bool m_chemicallyActivated
Flag labeling reaction as chemically activated.
void getParameters(AnyMap &node) const override
Get parameters.
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...
ArrheniusRate & lowRate()
Get reaction rate in the low-pressure limit.
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.
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.
const string subType() const override
String identifying sub-type of reaction rate specialization.
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
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.
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_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
void getParameters(AnyMap &node) const override
Get parameters.
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]
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
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.
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]
void getParameters(AnyMap &node) const override
Get parameters.
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]
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
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.
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.
void getParameters(AnyMap &node) const override
Get parameters.
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]
unique_ptr< MultiRateBase > newMultiRate() const override
Create a rate evaluator for reactions of a particular derived type.
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.
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.
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
virtual void update(double T)
Update data container based on temperature T
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.