Cantera 2.6.0
|
Base class for Arrhenius-type Parameterizations. More...
#include <Arrhenius.h>
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... | |
AnyMap | parameters () const |
Return the parameters such that an identical Reaction could be reconstructed using the newReaction() function. 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 |
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.
ArrheniusBase | ( | ) |
Default constructor.
Definition at line 12 of file Arrhenius.cpp.
ArrheniusBase | ( | double | A, |
double | b, | ||
double | Ea | ||
) |
Constructor.
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.
|
inline |
Constructor based on AnyValue content.
Definition at line 67 of file Arrhenius.h.
References ArrheniusBase::setRateParameters().
|
inlineexplicit |
Definition at line 73 of file Arrhenius.h.
void setRateParameters | ( | const AnyValue & | rate, |
const UnitSystem & | units, | ||
const UnitStack & | rate_units | ||
) |
Perform object setup based on AnyValue node information.
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().
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().
Set 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().
|
overridevirtual |
Get 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().
|
overridevirtual |
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().
|
overridevirtual |
Validate the reaction rate expression.
Reimplemented from ReactionRate.
Definition at line 154 of file Arrhenius.cpp.
References ArrheniusBase::m_A, and ArrheniusBase::m_b.
|
inlinevirtual |
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().
|
inlinevirtual |
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().
|
inlinevirtual |
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.
|
inline |
Definition at line 132 of file Arrhenius.h.
|
inline |
Return reaction order associated with the reaction rate.
Definition at line 137 of file Arrhenius.h.
References ArrheniusBase::m_order.
|
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().
|
inline |
Get flag indicating whether negative A values are permitted.
Definition at line 153 of file Arrhenius.h.
References ArrheniusBase::m_negativeA_ok.
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
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().
|
protected |
Reaction order.
Definition at line 169 of file Arrhenius.h.
Referenced by ArrheniusBase::order(), ArrheniusBase::setRateParameters(), and ArrheniusBase::setRateUnits().
|
protected |
The string for temperature exponent.
Definition at line 170 of file Arrhenius.h.
Referenced by ArrheniusRate::ArrheniusBase(), and ArrheniusBase::getRateParameters().
|
protected |
The string for temperature exponent.
Definition at line 171 of file Arrhenius.h.
Referenced by ArrheniusBase::getRateParameters().
|
protected |
The string for activation energy.
Definition at line 172 of file Arrhenius.h.
Referenced by BlowersMaselRate::BlowersMaselRate(), and ArrheniusBase::getRateParameters().
|
protected |
The string for an optional 4th parameter.
Definition at line 173 of file Arrhenius.h.
Referenced by BlowersMaselRate::BlowersMaselRate(), and ArrheniusBase::getRateParameters().
|
protected |
Reaction rate units.
Definition at line 174 of file Arrhenius.h.
Referenced by ArrheniusBase::getRateParameters(), ArrheniusBase::setRateParameters(), and ArrheniusBase::setRateUnits().