antioch-0.4.0
|
Arrhenius rate equation. More...
#include <arrhenius_rate.h>
Public Member Functions | |
ArrheniusRate (const CoeffType Cf=0., const CoeffType Ea=0., const CoeffType rscale=Constants::R_universal< CoeffType >()) | |
~ArrheniusRate () | |
void | set_Cf (const CoeffType Cf) |
void | set_Ea (const CoeffType Ea) |
set Ea, rescale the value, unit is known More... | |
void | reset_Ea (const CoeffType Ea) |
set Ea, no rescaling, unit is K More... | |
void | set_rscale (const CoeffType rscale) |
void | set_parameter (KineticsModel::Parameters parameter, CoeffType new_value) |
set one parameter, characterized by enum More... | |
CoeffType | get_parameter (KineticsModel::Parameters parameter) const |
get one parameter, characterized by enum More... | |
template<typename VectorCoeffType > | |
void | set_parameter (KineticsModel::Parameters parameter, VectorCoeffType new_value) |
for compatibility purpose with photochemistry (particle flux reactions) More... | |
template<typename VectorCoeffType > | |
void | reset_coefs (const VectorCoeffType &coefficients) |
reset the coeffs More... | |
CoeffType | Cf () const |
CoeffType | Ea () const |
CoeffType | Ea_K () const |
CoeffType | rscale () const |
template<typename StateType > | |
rate (const StateType &T) const ANTIOCH_AUTOFUNC(StateType | |
_Cf * | ant_exp (-_Ea/T))) template< typename StateType > operator()(const StateType &T) const template< typename StateType > derivative(const StateType &T) const ANTIOCH_AUTOFUNC(StateType |
template<typename StateType , typename VectorStateType > | |
rate (const KineticsConditions< StateType, VectorStateType > &T) const ANTIOCH_AUTOFUNC(StateType | |
_Cf * | ant_exp (-_Ea/T.T())) template< typename StateType |
_Cf VectorStateType | operator() (const KineticsConditions< StateType, VectorStateType > &T) const template< typename StateType |
_Cf VectorStateType VectorStateType | derivative (const KineticsConditions< StateType, VectorStateType > &T) const ANTIOCH_AUTOFUNC(StateType |
const std::string | numeric () const |
print equation More... | |
KineticsModel::KineticsModel | type () const |
StateType | operator() (const StateType &temp) const |
StateType | derivative (const StateType &conditions) const |
CoeffType | get_parameter (KineticsModel::Parameters parameter, int l) const |
get one parameter, characterized by enum, for vectorized parameter More... | |
void | compute_rate_and_derivative (const KineticsConditions< StateType, VectorStateType > &conditions, StateType &rate, StateType &drate_dT) const |
void | compute_rate_and_derivative (const StateType &temp, StateType &rate, StateType &drate_dT) const |
void | set_index (unsigned int nr) |
void | print (std::ostream &os=std::cout) const |
Formatted print, by default to std::cout . More... | |
Public Attributes | |
_Cf(* | this )(T)*(_Ea/(T *T))) template< typename StateType > void rate_and_derivative(const StateType &T |
Simultaneously evaluate the rate and its derivative at T . More... | |
_Cf(*) StateType | rate ) |
_Cf(*) StateType StateType &drate_d | const ) |
_Cf VectorStateType VectorStateType(* | this )(T)*(_Ea/T.temp_cache().T2)) template< typename StateType |
Simultaneously evaluate the rate and its derivative at T . More... | |
_Cf VectorStateType VectorStateType(*) VectorStateType voi | rate_and_derivative )(const KineticsConditions< StateType, VectorStateType > &T, StateType &rate, StateType &drate_dT) const |
Private Attributes | |
CoeffType | _Cf |
CoeffType | _raw_Ea |
CoeffType | _Ea |
CoeffType | _rscale |
Arrhenius rate equation.
The Arrhenius kinetics model is of the form:
with the ideal gas constant. We have:
Internally, we use the reduced activation energy
Definition at line 59 of file arrhenius_rate.h.
Antioch::ArrheniusRate< CoeffType >::ArrheniusRate | ( | const CoeffType | Cf = 0. , |
const CoeffType | Ea = 0. , |
||
const CoeffType | rscale = Constants::R_universal<CoeffType>() |
||
) |
Definition at line 167 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_rscale.
Antioch::ArrheniusRate< CoeffType >::~ArrheniusRate | ( | ) |
Definition at line 178 of file arrhenius_rate.h.
_Cf* Antioch::ArrheniusRate< CoeffType >::ant_exp | ( | -_Ea/ | T | ) | const |
T
.T
. _Cf* Antioch::ArrheniusRate< CoeffType >::ant_exp | ( | -_Ea/T. | T() | ) |
T
.
|
inline |
Definition at line 301 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_Cf.
Referenced by Antioch::ArrheniusRate< CoeffType >::get_parameter(), and Antioch::ArrheniusRate< CoeffType >::set_Cf().
|
inherited |
|
inherited |
|
inherited |
_Cf VectorStateType VectorStateType Antioch::ArrheniusRate< CoeffType >::derivative | ( | const KineticsConditions< StateType, VectorStateType > & | T | ) | const |
|
inline |
Definition at line 306 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_raw_Ea.
Referenced by Antioch::ArrheniusRate< CoeffType >::get_parameter(), Antioch::ArrheniusRate< CoeffType >::reset_Ea(), and Antioch::ArrheniusRate< CoeffType >::set_Ea().
|
inline |
Definition at line 311 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_Ea.
|
inline |
get one parameter, characterized by enum
Definition at line 271 of file arrhenius_rate.h.
References Antioch::KineticsModel::A, antioch_error, Antioch::ArrheniusRate< CoeffType >::Cf(), Antioch::KineticsModel::E, Antioch::ArrheniusRate< CoeffType >::Ea(), Antioch::KineticsModel::R_SCALE, and Antioch::ArrheniusRate< CoeffType >::rscale().
|
inherited |
get one parameter, characterized by enum, for vectorized parameter
|
virtual |
print equation
Implements Antioch::KineticsType< CoeffType >.
Definition at line 184 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_Cf.
|
inherited |
_Cf VectorStateType Antioch::ArrheniusRate< CoeffType >::operator() | ( | const KineticsConditions< StateType, VectorStateType > & | T | ) | const |
T
.
|
inherited |
Formatted print, by default to std::cout
.
Antioch::ArrheniusRate< CoeffType >::rate | ( | const StateType & | T | ) | const |
T
. Antioch::ArrheniusRate< CoeffType >::rate | ( | const KineticsConditions< StateType, VectorStateType > & | T | ) | const |
T
.
|
inline |
reset the coeffs
Two ways of modifying your rate:
Definition at line 231 of file arrhenius_rate.h.
References antioch_assert_greater, antioch_assert_less, Antioch::ArrheniusRate< CoeffType >::set_Cf(), Antioch::ArrheniusRate< CoeffType >::set_Ea(), and Antioch::ArrheniusRate< CoeffType >::set_rscale().
Referenced by AntiochTesting::ArrheniusRateTest< long double >::test_reset_vector_params2(), and AntiochTesting::ArrheniusRateTest< long double >::test_reset_vector_params3().
|
inline |
set Ea, no rescaling, unit is K
Definition at line 212 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_rscale, and Antioch::ArrheniusRate< CoeffType >::Ea().
Referenced by Antioch::ArrheniusRate< CoeffType >::set_parameter().
|
inline |
Definition at line 316 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_rscale.
Referenced by Antioch::ArrheniusRate< CoeffType >::get_parameter(), and Antioch::ArrheniusRate< CoeffType >::set_rscale().
|
inline |
Definition at line 195 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::Cf().
Referenced by Antioch::ArrheniusRate< CoeffType >::reset_coefs(), Antioch::ArrheniusRate< CoeffType >::set_parameter(), and AntiochTesting::ArrheniusRateTest< long double >::test_reset_scalar_params().
|
inline |
set Ea, rescale the value, unit is known
Definition at line 203 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_rscale, and Antioch::ArrheniusRate< CoeffType >::Ea().
Referenced by Antioch::ArrheniusRate< CoeffType >::reset_coefs(), and AntiochTesting::ArrheniusRateTest< long double >::test_reset_scalar_params().
|
inherited |
|
inline |
set one parameter, characterized by enum
Definition at line 242 of file arrhenius_rate.h.
References Antioch::KineticsModel::A, antioch_error, Antioch::KineticsModel::E, Antioch::KineticsModel::R_SCALE, Antioch::ArrheniusRate< CoeffType >::reset_Ea(), Antioch::ArrheniusRate< CoeffType >::set_Cf(), and Antioch::ArrheniusRate< CoeffType >::set_rscale().
|
inline |
for compatibility purpose with photochemistry (particle flux reactions)
Definition at line 94 of file arrhenius_rate.h.
|
inline |
Definition at line 221 of file arrhenius_rate.h.
References Antioch::ArrheniusRate< CoeffType >::_rscale, and Antioch::ArrheniusRate< CoeffType >::rscale().
Referenced by Antioch::ArrheniusRate< CoeffType >::reset_coefs(), Antioch::ArrheniusRate< CoeffType >::set_parameter(), and AntiochTesting::ArrheniusRateTest< long double >::test_reset_scalar_params().
|
inherited |
|
private |
Definition at line 65 of file arrhenius_rate.h.
Referenced by Antioch::ArrheniusRate< CoeffType >::Cf(), and Antioch::ArrheniusRate< CoeffType >::numeric().
|
private |
Definition at line 67 of file arrhenius_rate.h.
Referenced by Antioch::ArrheniusRate< CoeffType >::Ea_K().
|
private |
Definition at line 66 of file arrhenius_rate.h.
Referenced by Antioch::ArrheniusRate< CoeffType >::Ea().
|
private |
Definition at line 68 of file arrhenius_rate.h.
Referenced by Antioch::ArrheniusRate< CoeffType >::ArrheniusRate(), Antioch::ArrheniusRate< CoeffType >::reset_Ea(), Antioch::ArrheniusRate< CoeffType >::rscale(), Antioch::ArrheniusRate< CoeffType >::set_Ea(), and Antioch::ArrheniusRate< CoeffType >::set_rscale().
_Cf(*) StateType StateType& drate_d Antioch::ArrheniusRate< CoeffType >::const) |
Definition at line 134 of file arrhenius_rate.h.
_Cf(*) StateType Antioch::ArrheniusRate< CoeffType >::rate) |
Definition at line 134 of file arrhenius_rate.h.
|
inline |
Definition at line 158 of file arrhenius_rate.h.
Referenced by tester().
_Cf(* Antioch::ArrheniusRate< CoeffType >::this)(T)*(_Ea/(T *T)))template< typename StateType > void rate_and_derivative(const StateType &T |
Simultaneously evaluate the rate and its derivative at T
.
Definition at line 130 of file arrhenius_rate.h.
_Cf VectorStateType VectorStateType(* Antioch::ArrheniusRate< CoeffType >::this)(T)*(_Ea/T.temp_cache().T2))template< typename StateType |
Simultaneously evaluate the rate and its derivative at T
.
Definition at line 154 of file arrhenius_rate.h.