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 UnitsrateUnits () 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)
 
ReactionRateoperator= (const ReactionRate &other)
 
virtual unique_ptr< MultiRateBasenewMultiRate () 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

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]

Default constructor.

Definition at line 12 of file Arrhenius.cpp.

◆ ArrheniusBase() [2/4]

ArrheniusBase ( double  A,
double  b,
double  Ea 
)

Constructor.

Parameters
APre-exponential factor. The unit system is (kmol, m, s); actual units depend on the reaction order and the dimensionality (surface or bulk).
bTemperature exponent (non-dimensional)
EaActivation 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 = {} 
)
inlineexplicit

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
rateAnyValue containing rate information
unitsUnit system
rate_unitsUnit 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

◆ setParameters()

void setParameters ( const AnyMap node,
const UnitStack units 
)
overridevirtual

Set parameters.

Parameters
nodeAnyMap object containing reaction rate specification
unitsunit 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
overridevirtual

Get parameters.

Parameters
nodeAnyMap 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 
)
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().

◆ validate()

void validate ( const std::string &  equation,
const Kinetics kin 
)
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.

◆ preExponentialFactor()

virtual double preExponentialFactor ( ) const
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().

◆ temperatureExponent()

virtual double temperatureExponent ( ) const
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().

◆ activationEnergy()

virtual double activationEnergy ( ) const
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.

◆ 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

◆ 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

◆ m_A

double m_A
protected

◆ m_b

double m_b
protected

◆ m_Ea_R

double m_Ea_R
protected

◆ m_E4_R

double m_E4_R
protected

◆ 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

◆ 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

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