36 virtual void update(
double T)
override;
38 virtual void update(
double T,
double M)
override;
49 virtual void restore()
override;
51 virtual void resize(
size_t nSpecies,
size_t nReactions,
size_t nPhases)
override {
52 conc_3b.resize(nReactions, NAN);
147 virtual double F(
double pr,
const double* work)
const {
152 double evalF(
double T,
double conc3b) {
154 double logT = std::log(T);
155 double recipT = 1. / T;
170 virtual const std::string
type()
const {
197 double thirdBodyConcentration;
198 if (shared_data.
ready) {
201 thirdBodyConcentration = shared_data.
conc_3b[0];
208 pr =
F(pr,
m_work.data()) / (1.0 + pr);
213 pr *=
F(pr,
m_work.data()) / (1.0 + pr);
217 void check(
const std::string& equation,
const AnyMap& node);
296 return unique_ptr<MultiRateBase>(
300 virtual const std::string
type()
const {
348 TroeRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector_fp& c)
375 virtual void updateTemp(
double T,
double* work)
const;
377 virtual double F(
double pr,
const double* work)
const;
383 virtual const std::string
type()
const {
450 SriRate(
const ArrheniusRate& low,
const ArrheniusRate& high,
const vector_fp& c)
478 virtual void updateTemp(
double T,
double* work)
const;
480 virtual double F(
double pr,
const double* work)
const;
486 virtual const std::string
type()
const {
587 virtual void updateTemp(
double T,
double* work)
const;
589 virtual double F(
double pr,
const double* work)
const;
595 virtual const std::string
type()
const {
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.
virtual void setFalloffCoeffs(const vector_fp &c)
Set coefficients of the falloff parameterization.
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.
virtual double evalFromStruct(const FalloffData &shared_data)
Evaluate reaction rate.
virtual const std::string type() const
String identifying reaction rate specialization.
double m_rc_low
Evaluated reaction rate in the low-pressure limit.
virtual void getFalloffCoeffs(vector_fp &c) const
Retrieve coefficients of the falloff parameterization.
void setHighRate(const ArrheniusRate &high)
Set reaction rate in the high-pressure limit.
virtual void setParameters(const AnyMap &node, const UnitStack &rate_units)
Set parameters.
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.
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.
void check(const std::string &equation, const AnyMap &node)
Check basic syntax and settings of reaction rate expression.
void init(const vector_fp &c)
Initialize.
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...
vector_fp m_work
Work vector.
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 setLowRate(const ArrheniusRate &low)
Set reaction rate in the low-pressure limit.
void setChemicallyActivated(bool activated)
Set flag indicating whether reaction is chemically activated.
virtual void validate(const std::string &equation, const Kinetics &kin)
Validate the reaction rate expression.
Public interface for kinetics managers.
The Lindemann falloff parameterization.
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
virtual const std::string type() const
String identifying reaction rate specialization.
A class template handling ReactionRate specializations.
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.
virtual void setFalloffCoeffs(const vector_fp &c)
Set coefficients used by parameterization.
virtual size_t nParameters() const
Returns the number of parameters used by this parameterization.
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
virtual const std::string type() const
String identifying reaction rate specialization.
virtual void getFalloffCoeffs(vector_fp &c) const
Retrieve coefficients of the falloff parameterization.
virtual void setParameters(const AnyMap &node, const UnitStack &rate_units)
Set parameters.
virtual size_t workSize() const
The size of the work array required.
double m_d
parameter d in the 5-parameter SRI falloff function. Dimensionless.
virtual void getParameters(double *params) const
Sets params to contain, in order,.
virtual void updateTemp(double T, double *work) const
Update the temperature parameters in the representation.
double m_a
parameter a in the 5-parameter SRI falloff function. Dimensionless.
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.
virtual double F(double pr, const double *work) const
The falloff function.
Base class for a phase with thermodynamic properties.
The 3- or 4-parameter Troe falloff parameterization.
virtual void setFalloffCoeffs(const vector_fp &c)
Set coefficients used by parameterization.
virtual size_t nParameters() const
Returns the number of parameters used by this parameterization.
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
virtual const std::string type() const
String identifying reaction rate specialization.
virtual void getFalloffCoeffs(vector_fp &c) const
Retrieve coefficients of the falloff parameterization.
virtual void setParameters(const AnyMap &node, const UnitStack &rate_units)
Set parameters.
double m_t2
parameter T_2 in the 4-parameter Troe falloff function. [K]
virtual size_t workSize() const
The size of the work array required.
virtual void getParameters(double *params) const
Sets params to contain, in order,.
double m_rt1
parameter 1/T_1 in the 4-parameter Troe falloff function. [K^-1]
virtual void updateTemp(double T, double *work) const
Update the temperature parameters in the representation.
double m_a
parameter a in the 4-parameter Troe falloff function. Dimensionless
double m_rt3
parameter 1/T_3 in the 4-parameter Troe falloff function. [K^-1]
virtual double F(double pr, const double *work) const
The falloff function.
The 1- or 2-parameter Tsang falloff parameterization.
virtual void setFalloffCoeffs(const vector_fp &c)
Set coefficients used by parameterization.
virtual size_t nParameters() const
Returns the number of parameters used by this parameterization.
unique_ptr< MultiRateBase > newMultiRate() const
Create a rate evaluator for reactions of a particular derived type.
virtual const std::string type() const
String identifying reaction rate specialization.
virtual void getFalloffCoeffs(vector_fp &c) const
Retrieve coefficients of the falloff parameterization.
virtual void setParameters(const AnyMap &node, const UnitStack &rate_units)
Set parameters.
virtual size_t workSize() const
The size of the work array required.
virtual void getParameters(double *params) const
Sets params to contain, in order,.
virtual void updateTemp(double T, double *work) const
Update the temperature parameters in the representation.
double m_a
parameter a in the Tsang F_cent formulation. Dimensionless
double m_b
parameter b in the Tsang F_cent formulation. [K^-1]
virtual double F(double pr, const double *work) const
The falloff function.
Namespace for the Cantera kernel.
const double 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.
Data container holding shared data specific to Falloff rates.
int m_state_mf_number
integer that is incremented when composition changes
virtual void resize(size_t nSpecies, size_t nReactions, size_t nPhases) override
Update number of species, reactions and phases.
void perturbThirdBodies(double deltaM)
Perturb third-body concentration vector of data container.
virtual bool update(const ThermoPhase &phase, const Kinetics &kin) override
Update data container based on thermodynamic phase state.
vector_fp conc_3b
vector of effective third-body concentrations
bool ready
boolean indicating whether vectors are accessible
double molar_density
used to determine if updates are needed
virtual void invalidateCache() override
Force shared data and reaction rates to be updated next time.
virtual void restore() override
Restore data container after a perturbation.
vector_fp m_conc_3b_buf
buffered third-body concentrations
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.