Cantera 2.6.0

Public Member Functions | Protected Attributes | List of all members
ArrheniusBase Class Reference

Base class for Arrhenius-type Parameterizations. More...

`#include <Arrhenius.h>`

Inheritance diagram for ArrheniusBase:
[legend]
Collaboration diagram for ArrheniusBase:
[legend]

## Public Member Functions
| ArrheniusBase ()
| Default constructor. More...
| ArrheniusBase (double A, double b, double Ea)
| Constructor. More...
| ArrheniusBase (const AnyValue &rate, const UnitSystem &units, const UnitStack &rate_units)
| Constructor based on AnyValue content. More...
| ArrheniusBase (const AnyMap &node, const UnitStack &rate_units={})
void | setRateParameters (const AnyValue &rate, const UnitSystem &units, const UnitStack &rate_units)
| Perform object setup based on AnyValue node information. More...
void | getRateParameters (AnyMap &node) const
| Return parameters. More...
virtual void | setParameters (const AnyMap &node, const UnitStack &rate_units) override
| Set parameters. More...
virtual void | getParameters (AnyMap &node) const override
| Get parameters. More...
virtual void | check (const std::string &equation, const AnyMap &node) override
| Check rate expression. More...
virtual void | validate (const std::string &equation, const Kinetics &kin) override
| Validate the reaction rate expression. More...
virtual double | preExponentialFactor () const
| Return the pre-exponential factor A (in m, kmol, s to powers depending on the reaction order) More...
virtual double | temperatureExponent () const
| Return the temperature exponent b More...
virtual double | activationEnergy () const
| Return the activation energy Ea [J/kmol] The value corresponds to the constant specified by input parameters;. More...
const Units & | rateUnits () const
double | order () const
| Return reaction order associated with the reaction rate. More...
void | setRateUnits (const UnitStack &rate_units)
| Set units of the reaction rate expression. More...
bool | allowNegativePreExponentialFactor () const
| Get flag indicating whether negative A values are permitted. More...
void | setAllowNegativePreExponentialFactor (bool value)
| Set flag indicating whether negative A values are permitted. More...
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. More...
virtual const std::string | type () const =0
| String identifying reaction rate specialization. More...
virtual void | setParameters (const AnyMap &node, const UnitStack &units)
| Set parameters. More...
AnyMap | parameters () const
| Return the parameters such that an identical Reaction could be reconstructed using the newReaction() function. More...
virtual void | check (const std::string &equation, const AnyMap &node)
| Check basic syntax and settings of reaction rate expression. More...
virtual void | validate (const std::string &equation, const Kinetics &kin)
| Validate the reaction rate expression. More...
virtual void | validate (const std::string &equation)
| Validate the reaction rate expression (legacy call) More...
size_t | rateIndex () const
| Reaction rate index within kinetics evaluator. More...
void | setRateIndex (size_t idx)
| Set reaction rate index within kinetics evaluator. More...
virtual void | setContext (const Reaction &rxn, const Kinetics &kin)
| Set context of reaction rate evaluation. More...
double | eval (double T)
| Evaluate reaction rate based on temperature. More...
double | eval (double T, double extra)
| Evaluate reaction rate based on temperature and an extra parameter. More...
double | eval (double T, const std::vector< double > &extra)
| Evaluate reaction rate based on temperature and an extra vector parameter. More...

## Protected Attributes
bool | m_negativeA_ok
| Flag indicating whether negative A values are permitted. More...
double | m_A
| Pre-exponential factor. More...
double | m_b
| Temperature exponent. More...
double | m_Ea_R
| Activation energy (in temperature units) More...
double | m_E4_R
| Optional 4th energy parameter (in temperature units) More...
double | m_logA
| Logarithm of pre-exponential factor. More...
double | m_order
| Reaction order. More...
std::string | m_A_str = "A"
| The string for temperature exponent. More...
std::string | m_b_str = "b"
| The string for temperature exponent. More...
std::string | m_Ea_str = "Ea"
| The string for activation energy. More...
std::string | m_E4_str = ""
| The string for an optional 4th parameter. More...
Units | m_rate_units
| Reaction rate units. More...
Protected Attributes inherited from ReactionRate
AnyMap | m_input
| Input data used for specific models. More...
size_t | m_rate_index
| Index of reaction rate within kinetics evaluator. More...

## Additional Inherited Members
virtual void | getParameters (AnyMap &node) const
| Get parameters. More...

## Detailed Description

Base class for Arrhenius-type Parameterizations.

This base class provides a minimally functional interface that allows for parameter access from derived classes as well as classes that use Arrhenius-type expressions internally, for example FalloffRate and PlogRate.

Definition at line 51 of file Arrhenius.h.

## Constructor & Destructor Documentation

## ◆ ArrheniusBase() [1/4]

ArrheniusBase | ( |  | ) |

Default constructor.

Definition at line 12 of file Arrhenius.cpp.

## ◆ ArrheniusBase() [2/4]

ArrheniusBase | ( | double | A,
|  | double | b,
|  | double | Ea
| ) |  |

Constructor.

Parameters

  A | Pre-exponential factor. The unit system is (kmol, m, s); actual units depend on the reaction order and the dimensionality (surface or bulk).
  b | Temperature exponent (non-dimensional)
  Ea | Activation energy in energy units [J/kmol]

Definition at line 24 of file Arrhenius.cpp.

## ◆ ArrheniusBase() [3/4]

ArrheniusBase | ( | const AnyValue & | rate,
|  | const UnitSystem & | units,
|  | const UnitStack & | rate_units
| ) |  |
| inline

Constructor based on AnyValue content.

Definition at line 67 of file Arrhenius.h.

References ArrheniusBase::setRateParameters().

## ◆ ArrheniusBase() [4/4]

ArrheniusBase | ( | const AnyMap & | node,
|  | const UnitStack & | rate_units = `{}`
| ) |  |
| inline explicit

Definition at line 73 of file Arrhenius.h.

## Member Function Documentation

## ◆ setRateParameters()

void setRateParameters | ( | const AnyValue & | rate,
|  | const UnitSystem & | units,
|  | const UnitStack & | rate_units
| ) |  |

Perform object setup based on AnyValue node information.

Parameters

  rate | AnyValue containing rate information
  units | Unit system
  rate_units | Unit definitions specific to rate information

Definition at line 38 of file Arrhenius.cpp.

References AnyValue::empty(), AnyValue::is(), ArrheniusBase::m_A, ArrheniusBase::m_b, ArrheniusBase::m_E4_R, ArrheniusBase::m_Ea_R, ArrheniusBase::m_logA, ArrheniusBase::m_order, ArrheniusBase::m_rate_units, and ArrheniusBase::setRateUnits().

Referenced by ArrheniusBase::ArrheniusBase(), and ArrheniusBase::setParameters().

## ◆ getRateParameters()

void getRateParameters | ( | AnyMap & | node | ) | const

Return parameters.

Definition at line 91 of file Arrhenius.cpp.

References Units::factor(), ArrheniusBase::m_A, ArrheniusBase::m_A_str, ArrheniusBase::m_b, ArrheniusBase::m_b_str, ArrheniusBase::m_E4_R, ArrheniusBase::m_E4_str, ArrheniusBase::m_Ea_R, ArrheniusBase::m_Ea_str, ArrheniusBase::m_rate_units, and AnyMap::setFlowStyle().

Referenced by ArrheniusBase::getParameters().

## ◆ 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.

Definition at line 113 of file Arrhenius.cpp.

References AnyMap::getBool(), AnyMap::hasKey(), ArrheniusBase::m_negativeA_ok, ReactionRate::setParameters(), ArrheniusBase::setRateParameters(), and AnyMap::units().

## ◆ getParameters()

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.

Definition at line 124 of file Arrhenius.cpp.

References AnyMap::empty(), ArrheniusBase::getRateParameters(), ArrheniusBase::m_negativeA_ok, and ReactionRate::type().

## ◆ check()

void check | ( | const std::string & | equation,
|  | const AnyMap & | node
| ) |  |
| override virtual

Check rate expression.

Reimplemented from ReactionRate.

Definition at line 139 of file Arrhenius.cpp.

References ArrheniusBase::m_A, and ArrheniusBase::m_negativeA_ok.

Referenced by FalloffRate::setHighRate(), and FalloffRate::setLowRate().

## ◆ validate()

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

Validate the reaction rate expression.

Reimplemented from ReactionRate.

Definition at line 154 of file Arrhenius.cpp.

References ArrheniusBase::m_A, and ArrheniusBase::m_b.

## ◆ preExponentialFactor()

virtual double preExponentialFactor | ( |  | ) | const
| inline virtual

Return the pre-exponential factor A (in m, kmol, s to powers depending on the reaction order)

Class specializations may provide alternate definitions that describe an effective pre-exponential factor that depends on the thermodynamic state.

Definition at line 108 of file Arrhenius.h.

References ArrheniusBase::m_A.

Referenced by InterfaceKinetics::buildSurfaceArrhenius(), Arrhenius2::getParameters(), FalloffRate::setHighRate(), FalloffRate::setLowRate(), ElementaryReaction2::validate(), and FalloffReaction2::validate().

## ◆ temperatureExponent()

virtual double temperatureExponent | ( |  | ) | const
| inline virtual

Return the temperature exponent b

Class specializations may provide alternate definitions that describe an effective temperature exponent that depends on the thermodynamic state.

Definition at line 117 of file Arrhenius.h.

References ArrheniusBase::m_b.

Referenced by InterfaceKinetics::buildSurfaceArrhenius().

## ◆ activationEnergy()

virtual double activationEnergy | ( |  | ) | const
| inline virtual

Return the activation energy Ea [J/kmol] The value corresponds to the constant specified by input parameters;.

Class specializations may provide alternate definitions that describe an effective activation energy that depends on the thermodynamic state.

Reimplemented in BlowersMaselRate.

Definition at line 127 of file Arrhenius.h.

References Cantera::GasConstant, and ArrheniusBase::m_Ea_R.

## ◆ rateUnits()

const Units & rateUnits | ( |  | ) | const
| inline

Definition at line 132 of file Arrhenius.h.

## ◆ order()

double order | ( |  | ) | const
| inline

Return reaction order associated with the reaction rate.

Definition at line 137 of file Arrhenius.h.

References ArrheniusBase::m_order.

## ◆ setRateUnits()

void setRateUnits | ( | const UnitStack & | rate_units | ) |
| inline

Set units of the reaction rate expression.

Definition at line 142 of file Arrhenius.h.

References Units::dimension(), ArrheniusBase::m_order, ArrheniusBase::m_rate_units, UnitStack::product(), UnitStack::size(), and UnitStack::standardUnits().

Referenced by ArrheniusBase::setRateParameters().

## ◆ allowNegativePreExponentialFactor()

bool allowNegativePreExponentialFactor | ( |  | ) | const
| inline

Get flag indicating whether negative A values are permitted.

Definition at line 153 of file Arrhenius.h.

References ArrheniusBase::m_negativeA_ok.

## ◆ setAllowNegativePreExponentialFactor()

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

Set flag indicating whether negative A values are permitted.

Definition at line 158 of file Arrhenius.h.

References ArrheniusBase::m_negativeA_ok.

Referenced by FalloffRate::setHighRate(), and FalloffRate::setLowRate().

## Member Data Documentation

## ◆ m_negativeA_ok

bool m_negativeA_ok
| protected

Flag indicating whether negative A values are permitted.

Definition at line 163 of file Arrhenius.h.

Referenced by ArrheniusBase::allowNegativePreExponentialFactor(), ArrheniusBase::check(), ArrheniusBase::getParameters(), ArrheniusBase::setAllowNegativePreExponentialFactor(), and ArrheniusBase::setParameters().

## ◆ m_A

double m_A
| protected

Pre-exponential factor.

Definition at line 164 of file Arrhenius.h.

Referenced by Arrhenius2::Arrhenius2(), ArrheniusBase::check(), ArrheniusRate::evalFromStruct(), BlowersMaselRate::evalFromStruct(), TwoTempPlasmaRate::evalFromStruct(), ArrheniusRate::evalRate(), BlowersMaselRate::evalRate(), Arrhenius2::getParameters(), ArrheniusBase::getRateParameters(), ArrheniusBase::preExponentialFactor(), ArrheniusBase::setRateParameters(), Arrhenius2::updateRC(), and ArrheniusBase::validate().

## ◆ m_b

double m_b
| protected

Temperature exponent.

Definition at line 165 of file Arrhenius.h.

Referenced by Arrhenius2::Arrhenius2(), ArrheniusRate::ddTScaledFromStruct(), BlowersMaselRate::ddTScaledFromStruct(), ArrheniusRate::evalFromStruct(), BlowersMaselRate::evalFromStruct(), TwoTempPlasmaRate::evalFromStruct(), ArrheniusRate::evalLog(), ArrheniusRate::evalRate(), BlowersMaselRate::evalRate(), Arrhenius2::getParameters(), ArrheniusBase::getRateParameters(), ArrheniusBase::setRateParameters(), ArrheniusBase::temperatureExponent(), Arrhenius2::updateLog(), Arrhenius2::updateRC(), and ArrheniusBase::validate().

## ◆ m_Ea_R

double m_Ea_R
| protected

Activation energy (in temperature units)

Definition at line 166 of file Arrhenius.h.

Referenced by ArrheniusBase::activationEnergy(), Arrhenius2::activationEnergy_R(), ArrheniusRate::ddTScaledFromStruct(), TwoTempPlasmaRate::ddTScaledFromStruct(), BlowersMaselRate::effectiveActivationEnergy_R(), ArrheniusRate::evalFromStruct(), TwoTempPlasmaRate::evalFromStruct(), ArrheniusRate::evalLog(), ArrheniusRate::evalRate(), Arrhenius2::getParameters(), ArrheniusBase::getRateParameters(), ArrheniusBase::setRateParameters(), Arrhenius2::updateLog(), and Arrhenius2::updateRC().

## ◆ m_E4_R

double m_E4_R
| protected

Optional 4th energy parameter (in temperature units)

Definition at line 167 of file Arrhenius.h.

Referenced by TwoTempPlasmaRate::activationElectronEnergy(), BlowersMaselRate::bondEnergy(), TwoTempPlasmaRate::ddTScaledFromStruct(), BlowersMaselRate::effectiveActivationEnergy_R(), TwoTempPlasmaRate::evalFromStruct(), ArrheniusBase::getRateParameters(), and ArrheniusBase::setRateParameters().

## ◆ m_logA

double m_logA
| protected

Logarithm of pre-exponential factor.

Definition at line 168 of file Arrhenius.h.

Referenced by Arrhenius2::Arrhenius2(), ArrheniusRate::evalLog(), ArrheniusBase::setRateParameters(), and Arrhenius2::updateLog().

## ◆ m_order

double m_order
| protected

Reaction order.

Definition at line 169 of file Arrhenius.h.

Referenced by ArrheniusBase::order(), ArrheniusBase::setRateParameters(), and ArrheniusBase::setRateUnits().

## ◆ m_A_str

std::string m_A_str = "A"
| protected

The string for temperature exponent.

Definition at line 170 of file Arrhenius.h.

Referenced by ArrheniusRate::ArrheniusBase(), and ArrheniusBase::getRateParameters().

## ◆ m_b_str

std::string m_b_str = "b"
| protected

The string for temperature exponent.

Definition at line 171 of file Arrhenius.h.

Referenced by ArrheniusBase::getRateParameters().

## ◆ m_Ea_str

std::string m_Ea_str = "Ea"
| protected

The string for activation energy.

Definition at line 172 of file Arrhenius.h.

Referenced by BlowersMaselRate::BlowersMaselRate(), and ArrheniusBase::getRateParameters().

## ◆ m_E4_str

std::string m_E4_str = ""
| protected

The string for an optional 4th parameter.

Definition at line 173 of file Arrhenius.h.

Referenced by BlowersMaselRate::BlowersMaselRate(), and ArrheniusBase::getRateParameters().

## ◆ m_rate_units

Units m_rate_units
| protected

Reaction rate units.

Definition at line 174 of file Arrhenius.h.

Referenced by ArrheniusBase::getRateParameters(), ArrheniusBase::setRateParameters(), and ArrheniusBase::setRateUnits().

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

- Arrhenius.h
- Arrhenius.cpp