antioch-0.4.0
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
Antioch::HercourtEssenRate< CoeffType > Class Template Reference

Hercourt-Essen rate equation. More...

#include <hercourtessen_rate.h>

Inheritance diagram for Antioch::HercourtEssenRate< CoeffType >:
Antioch::KineticsType< CoeffType >

Public Member Functions

 HercourtEssenRate (const CoeffType Cf=0., const CoeffType eta=0., const CoeffType Tref=1.)
 
 ~HercourtEssenRate ()
 
void set_Cf (const CoeffType Cf)
 
void set_eta (const CoeffType eta)
 
void set_Tref (const CoeffType Tref)
 
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 eta () const
 
CoeffType Tref () const
 
template<typename StateType >
 rate (const StateType &T) const ANTIOCH_AUTOFUNC(StateType
 
_Cfant_pow (T, _eta))) 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
 
_Cfant_exp (_eta *T.temp_cache().lnT)) 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)/T *(_eta)) 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)/T.T()*(_eta)) 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 Member Functions

void compute_cf ()
 

Private Attributes

CoeffType _raw_Cf
 
CoeffType _Cf
 
CoeffType _eta
 
CoeffType _Tref
 

Detailed Description

template<typename CoeffType = double>
class Antioch::HercourtEssenRate< CoeffType >

Hercourt-Essen rate equation.

Hercourt-Essen is a kinetics model of the form:

\[ \alpha(T) = A \left(\frac{T}{\mathrm{T_\text{ref}}}\right)^\beta \]

Thus

\[ \frac{\partial \alpha(T)}{\partial T} = \alpha(T) \frac{\beta}{T} \]

Internally, we use the reduced pre-exponential factor $a = \frac{A}{\mathrm{T_\text{ref}}^{\beta}}$

Definition at line 57 of file hercourtessen_rate.h.

Constructor & Destructor Documentation

template<typename CoeffType >
Antioch::HercourtEssenRate< CoeffType >::HercourtEssenRate ( const CoeffType  Cf = 0.,
const CoeffType  eta = 0.,
const CoeffType  Tref = 1. 
)
template<typename CoeffType >
Antioch::HercourtEssenRate< CoeffType >::~HercourtEssenRate ( )

Definition at line 173 of file hercourtessen_rate.h.

174  {
175  return;
176  }

Member Function Documentation

template<typename CoeffType = double>
_Cf* Antioch::HercourtEssenRate< CoeffType >::ant_exp ( _eta *T.temp_cache().  lnT)
Returns
the rate evaluated at T.
template<typename CoeffType = double>
_Cf* Antioch::HercourtEssenRate< CoeffType >::ant_pow ( ,
_eta   
) const
Returns
the rate evaluated at T.
the derivative with respect to temperature evaluated at T.

Referenced by Antioch::HercourtEssenRate< CoeffType >::compute_cf().

template<typename CoeffType >
CoeffType Antioch::HercourtEssenRate< CoeffType >::Cf ( ) const
inline
template<typename CoeffType >
void Antioch::HercourtEssenRate< CoeffType >::compute_cf ( )
inlineprivate

Definition at line 319 of file hercourtessen_rate.h.

References Antioch::HercourtEssenRate< CoeffType >::ant_pow().

Referenced by Antioch::HercourtEssenRate< CoeffType >::HercourtEssenRate(), Antioch::HercourtEssenRate< CoeffType >::set_Cf(), Antioch::HercourtEssenRate< CoeffType >::set_eta(), and Antioch::HercourtEssenRate< CoeffType >::set_Tref().

320  {
321  _Cf = _raw_Cf * ant_pow(KineticsModel::Tref<CoeffType>()/_Tref,_eta);
322 
323  return;
324  }
_Cf * ant_pow(T, _eta))) template< typename StateType > operator()(const StateType &T) const template< typename StateType > derivative(const StateType &T) const ANTIOCH_AUTOFUNC(StateType
void Antioch::KineticsType< CoeffType, VectorCoeffType >::compute_rate_and_derivative ( const KineticsConditions< StateType, VectorStateType > &  conditions,
StateType &  rate,
StateType &  drate_dT 
) const
inherited
void Antioch::KineticsType< CoeffType, VectorCoeffType >::compute_rate_and_derivative ( const StateType &  temp,
StateType &  rate,
StateType &  drate_dT 
) const
inherited
StateType Antioch::KineticsType< CoeffType, VectorCoeffType >::derivative ( const StateType &  conditions) const
inherited
template<typename CoeffType = double>
_Cf VectorStateType VectorStateType Antioch::HercourtEssenRate< CoeffType >::derivative ( const KineticsConditions< StateType, VectorStateType > &  T) const

Referenced by test_values(), and vectester().

template<typename CoeffType >
CoeffType Antioch::HercourtEssenRate< CoeffType >::eta ( ) const
inline
template<typename CoeffType >
CoeffType Antioch::HercourtEssenRate< CoeffType >::get_parameter ( KineticsModel::Parameters  parameter) const
inline

get one parameter, characterized by enum

Definition at line 261 of file hercourtessen_rate.h.

References Antioch::KineticsModel::A, antioch_error, Antioch::KineticsModel::B, Antioch::HercourtEssenRate< CoeffType >::Cf(), Antioch::HercourtEssenRate< CoeffType >::eta(), Antioch::KineticsModel::T_REF, and Antioch::HercourtEssenRate< CoeffType >::Tref().

262  {
263  switch(parameter)
264  {
266  {
267  return this->Cf();
268  }
269  break;
271  {
272  return this->eta();
273  }
274  break;
276  {
277  return this->Tref();
278  }
279  break;
280  default:
281  {
282  antioch_error();
283  }
284  break;
285  }
286 
287  return 0;
288  }
#define antioch_error()
CoeffType Antioch::KineticsType< CoeffType, VectorCoeffType >::get_parameter ( KineticsModel::Parameters  parameter,
int  l 
) const
inherited

get one parameter, characterized by enum, for vectorized parameter

template<typename CoeffType >
const std::string Antioch::HercourtEssenRate< CoeffType >::numeric ( ) const
virtual

print equation

Implements Antioch::KineticsType< CoeffType >.

Definition at line 179 of file hercourtessen_rate.h.

References Antioch::HercourtEssenRate< CoeffType >::_eta, and Antioch::HercourtEssenRate< CoeffType >::_raw_Cf.

180  {
181  std::stringstream os;
182  os << _raw_Cf;
183  os << "*(T/" << _Tref << ")^" << _eta;
184 
185  return os.str();
186  }
StateType Antioch::KineticsType< CoeffType, VectorCoeffType >::operator() ( const StateType &  temp) const
inherited
template<typename CoeffType = double>
_Cf VectorStateType Antioch::HercourtEssenRate< CoeffType >::operator() ( const KineticsConditions< StateType, VectorStateType > &  T) const
Returns
the derivative with respect to temperature evaluated at T.
void Antioch::KineticsType< CoeffType, VectorCoeffType >::print ( std::ostream &  os = std::cout) const
inherited

Formatted print, by default to std::cout.

template<typename CoeffType = double>
template<typename StateType >
Antioch::HercourtEssenRate< CoeffType >::rate ( const StateType &  T) const
Returns
the rate evaluated at T.
template<typename CoeffType = double>
template<typename StateType , typename VectorStateType >
Antioch::HercourtEssenRate< CoeffType >::rate ( const KineticsConditions< StateType, VectorStateType > &  T) const
Returns
the rate evaluated at T.
template<typename CoeffType >
template<typename VectorCoeffType >
void Antioch::HercourtEssenRate< CoeffType >::reset_coefs ( const VectorCoeffType &  coefficients)
inline

reset the coeffs

Two ways of modifying your rate:

  • you change totally the rate, thus you require exactly three parameters, the order assumed is Cf, eta, Tref
  • you just change the value, thus Tref is not modified. You require exactly two parameters, the order assumed is Cf, eta

Definition at line 221 of file hercourtessen_rate.h.

References antioch_assert_greater, antioch_assert_less, Antioch::HercourtEssenRate< CoeffType >::set_Cf(), Antioch::HercourtEssenRate< CoeffType >::set_eta(), and Antioch::HercourtEssenRate< CoeffType >::set_Tref().

Referenced by tester().

222  {
223  antioch_assert_greater(coefficients.size(),1);
224  antioch_assert_less(coefficients.size(),4);
225  if(coefficients.size() == 3)this->set_Tref(coefficients[2]);
226  this->set_Cf(coefficients[0]);
227  this->set_eta(coefficients[1]);
228  }
#define antioch_assert_greater(expr1, expr2)
#define antioch_assert_less(expr1, expr2)
void set_Tref(const CoeffType Tref)
void set_eta(const CoeffType eta)
void set_Cf(const CoeffType Cf)
template<typename CoeffType >
void Antioch::HercourtEssenRate< CoeffType >::set_Cf ( const CoeffType  Cf)
inline
template<typename CoeffType >
void Antioch::HercourtEssenRate< CoeffType >::set_eta ( const CoeffType  eta)
inline
void Antioch::KineticsType< CoeffType, VectorCoeffType >::set_index ( unsigned int  nr)
inherited
template<typename CoeffType >
void Antioch::HercourtEssenRate< CoeffType >::set_parameter ( KineticsModel::Parameters  parameter,
CoeffType  new_value 
)
inline

set one parameter, characterized by enum

Definition at line 232 of file hercourtessen_rate.h.

References Antioch::KineticsModel::A, antioch_error, Antioch::KineticsModel::B, Antioch::HercourtEssenRate< CoeffType >::set_Cf(), Antioch::HercourtEssenRate< CoeffType >::set_eta(), Antioch::HercourtEssenRate< CoeffType >::set_Tref(), and Antioch::KineticsModel::T_REF.

233  {
234  switch(parameter)
235  {
237  {
238  this->set_Cf(new_value);
239  }
240  break;
242  {
243  this->set_eta(new_value);
244  }
245  break;
247  {
248  this->set_Tref(new_value);
249  }
250  break;
251  default:
252  {
253  antioch_error();
254  }
255  break;
256  }
257  }
#define antioch_error()
void set_Tref(const CoeffType Tref)
void set_eta(const CoeffType eta)
void set_Cf(const CoeffType Cf)
template<typename CoeffType = double>
template<typename VectorCoeffType >
void Antioch::HercourtEssenRate< CoeffType >::set_parameter ( KineticsModel::Parameters  parameter,
VectorCoeffType  new_value 
)
inline

for compatibility purpose with photochemistry (particle flux reactions)

Definition at line 86 of file hercourtessen_rate.h.

References antioch_error.

86 {antioch_error();}
#define antioch_error()
template<typename CoeffType >
void Antioch::HercourtEssenRate< CoeffType >::set_Tref ( const CoeffType  Tref)
inline
template<typename CoeffType >
CoeffType Antioch::HercourtEssenRate< CoeffType >::Tref ( ) const
inline
KineticsModel::KineticsModel Antioch::KineticsType< CoeffType, VectorCoeffType >::type ( ) const
inherited

Member Data Documentation

template<typename CoeffType = double>
CoeffType Antioch::HercourtEssenRate< CoeffType >::_Cf
private

Definition at line 63 of file hercourtessen_rate.h.

Referenced by Antioch::HercourtEssenRate< CoeffType >::Cf().

template<typename CoeffType = double>
CoeffType Antioch::HercourtEssenRate< CoeffType >::_eta
private
template<typename CoeffType = double>
CoeffType Antioch::HercourtEssenRate< CoeffType >::_raw_Cf
private
template<typename CoeffType = double>
CoeffType Antioch::HercourtEssenRate< CoeffType >::_Tref
private

Definition at line 65 of file hercourtessen_rate.h.

Referenced by Antioch::HercourtEssenRate< CoeffType >::Tref().

template<typename CoeffType = double>
_Cf(*) StateType StateType& drate_d Antioch::HercourtEssenRate< CoeffType >::const)

Definition at line 125 of file hercourtessen_rate.h.

template<typename CoeffType = double>
_Cf(*) StateType Antioch::HercourtEssenRate< CoeffType >::rate)

Definition at line 125 of file hercourtessen_rate.h.

template<typename CoeffType = double>
void Antioch::HercourtEssenRate< CoeffType >::rate_and_derivative
inline

Definition at line 149 of file hercourtessen_rate.h.

Referenced by test_values(), and vectester().

template<typename CoeffType = double>
_Cf(* Antioch::HercourtEssenRate< CoeffType >::this)(T)/T *(_eta))template< typename StateType > void rate_and_derivative(const StateType &T

Simultaneously evaluate the rate and its derivative at T.

Definition at line 121 of file hercourtessen_rate.h.

template<typename CoeffType = double>
_Cf VectorStateType VectorStateType(* Antioch::HercourtEssenRate< CoeffType >::this)(T)/T.T()*(_eta))template< typename StateType

Simultaneously evaluate the rate and its derivative at T.

Definition at line 145 of file hercourtessen_rate.h.


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

Generated on Thu Jul 7 2016 11:09:49 for antioch-0.4.0 by  doxygen 1.8.8