| Cantera 3.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
FalloffRate Class Reference
Chemical Kinetics » Reactions and Reaction Rates » Falloff Parameterizations

Base class for falloff rate calculators. More...

`#include <Falloff.h>`

Inheritance diagram for FalloffRate:
[legend]

## Detailed Description

Base class for falloff rate calculators.

Each instance of a subclass of FalloffRate calculates the falloff reaction rate based on specific implementations of the falloff function.

The falloff function \( F(P_r, T) \) is implemented by FalloffRate specializations, and is defined so that the rate coefficient is

\[ k = k_\infty \frac{P_r}{1 + P_r} F(P_r,T) \]

Here \( P_r \) is the reduced pressure, defined by

\[ P_r = \frac{k_0 [M]}{k_\infty}. \]

Definition at line 82 of file Falloff.h.

## Public Member Functions
| FalloffRate (const AnyMap &node, const UnitStack &rate_units={})
void | init (const vector< double > &c)
| Initialize.
virtual void | setFalloffCoeffs (const vector< double > &c)
| Set coefficients of the falloff parameterization.
virtual void | getFalloffCoeffs (vector< double > &c) const
| Retrieve coefficients of the falloff parameterization.
virtual void | updateTemp (double T, double *work) const
| Update the temperature-dependent portions of the falloff function, if any, and store them in the 'work' array.
virtual double | F (double pr, const double *work) const
| The falloff function.
double | evalF (double T, double conc3b)
| Evaluate falloff function at current conditions.
virtual size_t | workSize () const
| The size of the work array required.
const string | type () const override
| String identifying reaction rate specialization.
virtual size_t | nParameters () const
| Returns the number of parameters used by this parameterization.
void | setParameters (const AnyMap &node, const UnitStack &rate_units) override
| Set parameters.
virtual void | getParameters (double *params) const
| Get the values of the parameters for this object.
void | getParameters (AnyMap &node) const override
| Get parameters.
double | evalFromStruct (const FalloffData &shared_data)
| Evaluate reaction rate.
void | check (const string &equation) override
| Check basic syntax and settings of reaction rate expression.
void | validate (const string &equation, const Kinetics &kin) override
| Validate the reaction rate expression.
bool | allowNegativePreExponentialFactor () const
| Get flag indicating whether negative A values are permitted.
void | setAllowNegativePreExponentialFactor (bool value)
| Set flag indicating whether negative A values are permitted.
bool | chemicallyActivated () const
| Get flag indicating whether reaction is chemically activated.
void | setChemicallyActivated (bool activated)
| Set flag indicating whether reaction is chemically activated.
ArrheniusRate & | lowRate ()
| Get reaction rate in the low-pressure limit.
void | setLowRate (const ArrheniusRate &low)
| Set reaction rate in the low-pressure limit.
ArrheniusRate & | highRate ()
| Get reaction rate in the high-pressure limit.
void | setHighRate (const ArrheniusRate &high)
| Set reaction rate in the high-pressure limit.
Public Member Functions inherited from ReactionRate
| ReactionRate (const ReactionRate &other)
ReactionRate & | operator= (const ReactionRate &other)
virtual unique_ptr< MultiRateBase > | newMultiRate () const
| Create a rate evaluator for reactions of a particular derived type.
virtual const string | subType () const
| String identifying sub-type of reaction rate specialization.
AnyMap | parameters () const
| Return the parameters such that an identical Reaction could be reconstructed using the newReaction() function.
const Units & | conversionUnits () const
| Get the units for converting the leading term in the reaction rate expression.
virtual void | setRateUnits (const UnitStack &rate_units)
| Set the units of the reaction rate expression.
void | check (const string &equation, const AnyMap &node)
| Check basic syntax and settings of reaction rate expression.
virtual void | validate (const string &equation)
| Validate the reaction rate expression (legacy call)
size_t | rateIndex () const
| Reaction rate index within kinetics evaluator.
void | setRateIndex (size_t idx)
| Set reaction rate index within kinetics evaluator.
virtual void | setContext (const Reaction &rxn, const Kinetics &kin)
| Set context of reaction rate evaluation.
double | eval (double T)
| Evaluate reaction rate based on temperature.
double | eval (double T, double extra)
| Evaluate reaction rate based on temperature and an extra parameter.
double | eval (double T, const vector< double > &extra)
| Evaluate reaction rate based on temperature and an extra vector parameter.
bool | valid () const
| Get flag indicating whether reaction rate is set up correctly.
bool | compositionDependent ()
| Boolean indicating whether rate has compositional dependence.
void | setCompositionDependence (bool comp_dep)
| Set rate compositional dependence.

## Protected Attributes
ArrheniusRate | m_lowRate
| The reaction rate in the low-pressure limit.
ArrheniusRate | m_highRate
| The reaction rate in the high-pressure limit.
bool | m_chemicallyActivated = false
| Flag labeling reaction as chemically activated.
bool | m_negativeA_ok = false
| Flag indicating whether negative A values are permitted.
double | m_rc_low = NAN
| Evaluated reaction rate in the low-pressure limit.
double | m_rc_high = NAN
| Evaluated reaction rate in the high-pressure limit.
vector< double > | m_work
| Work vector.
Protected Attributes inherited from ReactionRate
AnyMap | m_input
| Input data used for specific models.
size_t | m_rate_index = npos
| Index of reaction rate within kinetics evaluator.
bool | m_valid = false
| Flag indicating whether reaction rate is set up correctly.
bool | m_composition_dependent_rate = false
| Flag indicating composition dependent rate.
Units | m_conversion_units {0.}
| Units of the leading term in the reaction rate expression.

## Additional Inherited Members

## Constructor & Destructor Documentation

## ◆ FalloffRate()

FalloffRate | ( | const AnyMap & | node,
|  | const UnitStack & | rate_units = `{}`
| ) |  |

Definition at line 81 of file Falloff.cpp.

## Member Function Documentation

## ◆ init()

void init | ( | const vector< double > & | c | ) |

Initialize.

Must be called before any other method is invoked.

Parameters

  c | Vector of coefficients of the parameterization. The number and meaning of these coefficients is subclass-dependent.

Deprecated:
  To be removed after Cantera 3.0; superseded by setFalloffCoeffs()

Definition at line 87 of file Falloff.cpp.

## ◆ setFalloffCoeffs()

void setFalloffCoeffs | ( | const vector< double > & | c | ) |
| virtual

Set coefficients of the falloff parameterization.

Parameters

  c | Vector of coefficients of the parameterization. The number and meaning of these coefficients is subclass-dependent.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 120 of file Falloff.cpp.

## ◆ getFalloffCoeffs()

void getFalloffCoeffs | ( | vector< double > & | c | ) | const
| virtual

Retrieve coefficients of the falloff parameterization.

Parameters

  c | Vector of coefficients of the parameterization. The number and meaning of these coefficients is subclass-dependent.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 130 of file Falloff.cpp.

## ◆ updateTemp()

virtual void updateTemp | ( | double | T,
|  | double * | work
| ) |  | const
| inline virtual

Update the temperature-dependent portions of the falloff function, if any, and store them in the 'work' array.

If not overloaded, the default behavior is to do nothing.

Parameters

  T | Temperature [K].
  work | storage space for intermediate results.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 122 of file Falloff.h.

## ◆ F()

virtual double F | ( | double | pr,
|  | const double * | work
| ) |  | const
| inline virtual

The falloff function.

Parameters

  pr | reduced pressure (dimensionless).
  work | array of size workSize() containing cached temperature-dependent intermediate results from a prior call to updateTemp.

Returns
  the value of the falloff function \( F \) defined above

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 133 of file Falloff.h.

## ◆ evalF()

double evalF | ( | double | T,
|  | double | conc3b
| ) |  |
| inline

Evaluate falloff function at current conditions.

Definition at line 138 of file Falloff.h.

## ◆ workSize()

virtual size_t workSize | ( |  | ) | const
| inline virtual

The size of the work array required.

Deprecated:
  To be removed after Cantera 3.0; unused.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 152 of file Falloff.h.

## ◆ type()

const string type | ( |  | ) | const
| inline override virtual

String identifying reaction rate specialization.

Implements ReactionRate.

Definition at line 158 of file Falloff.h.

## ◆ nParameters()

virtual size_t nParameters | ( |  | ) | const
| inline virtual

Returns the number of parameters used by this parameterization.

The values of these parameters can be obtained from getParameters().

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 167 of file Falloff.h.

## ◆ setParameters()

void setParameters | ( | const AnyMap & | node,
|  | const UnitStack & | units
| ) |  |
| override virtual

Set parameters.

Parameters

  node | AnyMap object containing reaction rate specification
  units | unit definitions specific to rate information

Reimplemented from ReactionRate.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 135 of file Falloff.cpp.

## ◆ getParameters() [1/2]

virtual void getParameters | ( | double * | params | ) | const
| inline virtual

Get the values of the parameters for this object.

params must be an array of at least nParameters() elements.

Deprecated:
  To be removed after Cantera 3.0; superseded by getFalloffCoeffs()

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 178 of file Falloff.h.

## ◆ getParameters() [2/2]

void getParameters | ( | AnyMap & | node | ) | const
| override virtual

Get parameters.

Parameters

  node | AnyMap containing rate information Store the parameters of a ReactionRate needed to reconstruct an identical object. Does not include user-defined fields available in the m_input map.

Reimplemented from ReactionRate.

Reimplemented in TroeRate, SriRate, and TsangRate.

Definition at line 168 of file Falloff.cpp.

## ◆ evalFromStruct()

double evalFromStruct | ( | const FalloffData & | shared_data | ) |
| inline

Evaluate reaction rate.

Parameters

  shared_data | data shared by all reactions of a given type

Definition at line 187 of file Falloff.h.

## ◆ check()

void check | ( | const string & | equation | ) |
| override virtual

Check basic syntax and settings of reaction rate expression.

Reimplemented from ReactionRate.

Definition at line 185 of file Falloff.cpp.

## ◆ validate()

void validate | ( | const string & | equation,
|  | const Kinetics & | kin
| ) |  |
| override virtual

Validate the reaction rate expression.

Reimplemented from ReactionRate.

Definition at line 200 of file Falloff.cpp.

## ◆ allowNegativePreExponentialFactor()

bool allowNegativePreExponentialFactor | ( |  | ) | const
| inline

Get flag indicating whether negative A values are permitted.

Definition at line 215 of file Falloff.h.

## ◆ setAllowNegativePreExponentialFactor()

void setAllowNegativePreExponentialFactor | ( | bool | value | ) |
| inline

Set flag indicating whether negative A values are permitted.

Definition at line 220 of file Falloff.h.

## ◆ chemicallyActivated()

bool chemicallyActivated | ( |  | ) | const
| inline

Get flag indicating whether reaction is chemically activated.

Definition at line 225 of file Falloff.h.

## ◆ setChemicallyActivated()

void setChemicallyActivated | ( | bool | activated | ) |
| inline

Set flag indicating whether reaction is chemically activated.

Definition at line 230 of file Falloff.h.

## ◆ lowRate()

ArrheniusRate & lowRate | ( |  | ) |
| inline

Get reaction rate in the low-pressure limit.

Definition at line 235 of file Falloff.h.

## ◆ setLowRate()

void setLowRate | ( | const ArrheniusRate & | low | ) |

Set reaction rate in the low-pressure limit.

Definition at line 94 of file Falloff.cpp.

## ◆ highRate()

ArrheniusRate & highRate | ( |  | ) |
| inline

Get reaction rate in the high-pressure limit.

Definition at line 243 of file Falloff.h.

## ◆ setHighRate()

void setHighRate | ( | const ArrheniusRate & | high | ) |

Set reaction rate in the high-pressure limit.

Definition at line 107 of file Falloff.cpp.

## Member Data Documentation

## ◆ m_lowRate

ArrheniusRate m_lowRate
| protected

The reaction rate in the low-pressure limit.

Definition at line 251 of file Falloff.h.

## ◆ m_highRate

ArrheniusRate m_highRate
| protected

The reaction rate in the high-pressure limit.

Definition at line 252 of file Falloff.h.

## ◆ m_chemicallyActivated

bool m_chemicallyActivated = false
| protected

Flag labeling reaction as chemically activated.

Definition at line 255 of file Falloff.h.

## ◆ m_negativeA_ok

bool m_negativeA_ok = false
| protected

Flag indicating whether negative A values are permitted.

Definition at line 257 of file Falloff.h.

## ◆ m_rc_low

double m_rc_low = NAN
| protected

Evaluated reaction rate in the low-pressure limit.

Definition at line 259 of file Falloff.h.

## ◆ m_rc_high

double m_rc_high = NAN
| protected

Evaluated reaction rate in the high-pressure limit.

Definition at line 260 of file Falloff.h.

## ◆ m_work

vector<double> m_work
| protected

Work vector.

Definition at line 261 of file Falloff.h.

The documentation for this class was generated from the following files:

- Falloff.h
- Falloff.cpp