antioch-0.4.0
List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
Antioch::Reaction< CoeffType, VectorCoeffType > Class Template Reference

A single reaction mechanism. More...

#include <reaction.h>

Public Member Functions

 Reaction (const unsigned int n_species, const std::string &equation, const bool &reversible=true, const ReactionType::ReactionType type=ReactionType::ELEMENTARY, const KineticsModel::KineticsModel kin=KineticsModel::KOOIJ)
 Construct a single reaction mechanism. More...
 
virtual ~Reaction ()
 
unsigned int n_species () const
 
const std::string & equation () const
 
const std::string & id () const
 
void set_id (const std::string &id)
 set the reaction id. More...
 
ReactionType::ReactionType type () const
 Type of reaction. More...
 
void set_type (const ReactionType::ReactionType type)
 Set the type of reaction. More...
 
void set_reversibility (const bool reversible)
 Set the reversibility of reaction. More...
 
KineticsModel::KineticsModel kinetics_model () const
 Model of kinetics. More...
 
void set_kinetics_model (const KineticsModel::KineticsModel kin)
 Set the model of kinetics. More...
 
bool initialized () const
 
void set_parameter_of_rate (KineticsModel::Parameters parameter, CoeffType new_value, unsigned int n_reaction=0, const std::string &unit="SI")
 reset a parameter from the rate constant More...
 
void set_parameter_of_rate (KineticsModel::Parameters parameter, CoeffType new_value, unsigned int n_reaction, int l, const std::string &unit="SI")
 reset a parameter from the rate constant, vector parameters More...
 
CoeffType get_parameter_of_rate (KineticsModel::Parameters parameter, unsigned int n_reaction=0, const std::string &unit="SI") const
 get a parameter from the rate constant More...
 
CoeffType get_parameter_of_rate (KineticsModel::Parameters parameter, unsigned int n_reaction, const std::string &unit, int l) const
 get a parameter from the rate constant, vectorized version More...
 
void set_parameter_of_chemical_process (ReactionType::Parameters parameter, CoeffType new_value, unsigned int species=std::numeric_limits< unsigned int >::max())
 reset a parameter from the chemical process More...
 
CoeffType get_parameter_of_chemical_process (ReactionType::Parameters parameter, unsigned int species=std::numeric_limits< unsigned int >::max()) const
 get a parameter from the chemical process More...
 
bool reversible () const
 
unsigned int n_reactants () const
 
unsigned int n_products () const
 
const std::string & reactant_name (const unsigned int r) const
 
const std::string & product_name (const unsigned int p) const
 
unsigned int reactant_id (const unsigned int r) const
 
unsigned int product_id (const unsigned int p) const
 
unsigned int reactant_stoichiometric_coefficient (const unsigned int r) const
 
unsigned int product_stoichiometric_coefficient (const unsigned int p) const
 
CoeffType reactant_partial_order (const unsigned int r) const
 
CoeffType product_partial_order (const unsigned int p) const
 
void add_reactant (const std::string &name, const unsigned int r_id, const unsigned int stoichiometric_coeff, const CoeffType partial_order=std::numeric_limits< CoeffType >::infinity())
 
void add_product (const std::string &name, const unsigned int p_id, const unsigned int stoichiometric_coeff, const CoeffType partial_order=std::numeric_limits< CoeffType >::infinity())
 
void clear_reactant ()
 
void clear_product ()
 
void set_efficiency (const std::string &, const unsigned int s, const CoeffType efficiency)
 
CoeffType get_efficiency (const unsigned int s) const
 
CoeffType efficiency (const unsigned int s) const
 
void initialize (unsigned int index=0)
 Computes derived quantities. More...
 
int gamma () const
 
template<typename StateType , typename VectorStateType >
StateType equilibrium_constant (const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
 
template<typename StateType , typename VectorStateType >
void equilibrium_constant_and_derivative (const StateType &T, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R, const VectorStateType &ddT_h_RT_minus_s_R, StateType &keq, StateType &dkeq_dT) const
 
template<typename StateType , typename VectorStateType >
StateType compute_forward_rate_coefficient (const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions) const
 
template<typename StateType , typename VectorStateType >
StateType compute_forward_rate_coefficient (const VectorStateType &molar_densities, const StateType &temp) const
 
template<typename StateType , typename VectorStateType >
void compute_forward_rate_coefficient_and_derivatives (const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions, StateType &kfwd, StateType &dkfwd_dT, VectorStateType &dkfwd_dX) const
 
template<typename StateType , typename VectorStateType >
void compute_forward_rate_coefficient_and_derivatives (const VectorStateType &molar_densities, const StateType &temp, StateType &kfwd, StateType &dkfwd_dT, VectorStateType &dkfwd_dX) const
 
template<typename StateType , typename VectorStateType >
StateType compute_rate_of_progress (const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
 
template<typename StateType , typename VectorStateType >
StateType compute_rate_of_progress (const VectorStateType &molar_densities, const StateType &temp, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
 
template<typename StateType , typename VectorStateType >
void compute_rate_of_progress_and_derivatives (const VectorStateType &molar_densities, const ChemicalMixture< CoeffType > &, const KineticsConditions< StateType, VectorStateType > &conditions, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R, const VectorStateType &dh_RT_minus_s_R_dT, StateType &net_reaction_rate, StateType &dnet_rate_dT, VectorStateType &dnet_rate_dX_s) const
 
template<typename StateType , typename VectorStateType >
void compute_rate_of_progress_and_derivatives (const VectorStateType &molar_densities, const ChemicalMixture< CoeffType > &chem_mixture, const StateType &temp, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R, const VectorStateType &dh_RT_minus_s_R_dT, StateType &net_reaction_rate, StateType &dnet_rate_dT, VectorStateType &dnet_rate_dX_s) const
 
const KineticsType< CoeffType,
VectorCoeffType > & 
forward_rate (unsigned int ir=0) const
 Return const reference to the forward rate object. More...
 
KineticsType< CoeffType,
VectorCoeffType > & 
forward_rate (unsigned int ir=0)
 Return writeable reference to the forward rate object. More...
 
template<typename FalloffType >
FalloffType & falloff ()
 Return writeable reference to the falloff object, test type. More...
 
void add_forward_rate (KineticsType< CoeffType, VectorCoeffType > *rate)
 Add a forward rate object. More...
 
void swap_forward_rates (unsigned int irate, unsigned int jrate)
 Swap two forward rates object. More...
 
unsigned int n_rate_constants () const
 Return the number of rate constant objects. More...
 
void print (std::ostream &os=std::cout) const
 Formatted print, by default to std::cout. More...
 

Protected Attributes

unsigned int _n_species
 
std::string _id
 
std::string _equation
 
std::vector< std::string > _reactant_names
 
std::vector< std::string > _product_names
 
std::vector< unsigned int > _reactant_ids
 
std::vector< unsigned int > _product_ids
 
std::vector< unsigned int > _reactant_stoichiometry
 
std::vector< unsigned int > _product_stoichiometry
 
std::vector< unsigned int > _species_reactant_stoichiometry
 
std::vector< unsigned int > _species_product_stoichiometry
 
std::vector< CoeffType > _species_reactant_partial_order
 
std::vector< CoeffType > _species_product_partial_order
 
std::vector< int > _species_delta_stoichiometry
 
int _gamma
 
bool _initialized
 
bool _reversible
 
ReactionType::ReactionType _type
 
KineticsModel::KineticsModel _kintype
 
std::vector< KineticsType
< CoeffType, VectorCoeffType > * > 
_forward_rate
 The forward reaction rate modified Arrhenius form. More...
 
std::vector< CoeffType > _efficiencies
 efficiencies for three body reactions More...
 

Private Member Functions

 Reaction ()
 

Friends

std::ostream & operator<< (std::ostream &os, const Reaction &rxn)
 Formatted print. More...
 

Detailed Description

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
class Antioch::Reaction< CoeffType, VectorCoeffType >

A single reaction mechanism.

A reaction is characterized by the rate constant $k(T,[M])$, which can be decomposed into a chemical process and a kinetics model:

\[ k(T,[M]) = \chi([M],\alpha(T)) \]

with $\chi$ the chemical process and $\alpha$ the kinetics model.

This virtual base is derived for the following processes:

This class encapsulates a kinetics model. The choosable kinetics models are

By default, we choose a reversible ElementaryReaction with a KooijRate kinetics model.

Definition at line 108 of file reaction.h.

Constructor & Destructor Documentation

template<typename CoeffType , typename VectorCoeffType >
Antioch::Reaction< CoeffType, VectorCoeffType >::Reaction ( const unsigned int  n_species,
const std::string &  equation,
const bool &  reversible = true,
const ReactionType::ReactionType  type = ReactionType::ELEMENTARY,
const KineticsModel::KineticsModel  kin = KineticsModel::KOOIJ 
)
inline

Construct a single reaction mechanism.

Definition at line 691 of file reaction.h.

698  _gamma(0),
699  _initialized(false),
701  _type(type),
702  _kintype(kin)
703  {
704  return;
705  }
unsigned int _n_species
Definition: reaction.h:355
const std::string & equation() const
Definition: reaction.h:410
ReactionType::ReactionType _type
Definition: reaction.h:372
unsigned int n_species() const
Definition: reaction.h:389
KineticsModel::KineticsModel _kintype
Definition: reaction.h:373
bool reversible() const
Definition: reaction.h:462
std::string _equation
Definition: reaction.h:357
ReactionType::ReactionType type() const
Type of reaction.
Definition: reaction.h:417
template<typename CoeffType , typename VectorCoeffType >
Antioch::Reaction< CoeffType, VectorCoeffType >::~Reaction ( )
inlinevirtual

Definition at line 710 of file reaction.h.

711  {
712  for(unsigned int ir = 0; ir < _forward_rate.size(); ir++)
713  {
714  delete _forward_rate[ir];
715  }
716 
717  return;
718  }
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
Antioch::Reaction< CoeffType, VectorCoeffType >::Reaction ( )
private

Member Function Documentation

template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::add_forward_rate ( KineticsType< CoeffType, VectorCoeffType > *  rate)
inline

Add a forward rate object.

Definition at line 469 of file reaction.h.

Referenced by Antioch::read_reaction_set_data(), and tester().

470  {
471  _forward_rate.push_back(rate);
472  return;
473  }
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::add_product ( const std::string &  name,
const unsigned int  p_id,
const unsigned int  stoichiometric_coeff,
const CoeffType  partial_order = std::numeric_limits<CoeffType>::infinity() 
)
inline

Definition at line 605 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::read_reaction_set_data(), and tester().

609  {
610  antioch_assert_less(p_id, this->n_species());
611  _product_names.push_back(name);
612  _product_ids.push_back(p_id);
613  _product_stoichiometry.push_back(stoichiometric_coeff);
614 
615  CoeffType order = (partial_order == std::numeric_limits<CoeffType>::infinity() )?static_cast<CoeffType>(stoichiometric_coeff):partial_order;
616  _species_product_partial_order.push_back(order);
617  return;
618  }
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
unsigned int n_species() const
Definition: reaction.h:389
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
#define antioch_assert_less(expr1, expr2)
std::vector< std::string > _product_names
Definition: reaction.h:359
std::vector< CoeffType > _species_product_partial_order
Definition: reaction.h:367
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::add_reactant ( const std::string &  name,
const unsigned int  r_id,
const unsigned int  stoichiometric_coeff,
const CoeffType  partial_order = std::numeric_limits<CoeffType>::infinity() 
)
inline

Definition at line 588 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::read_reaction_set_data(), and tester().

592  {
593  antioch_assert_less(r_id, this->n_species());
594  _reactant_names.push_back(name);
595  _reactant_ids.push_back(r_id);
596  _reactant_stoichiometry.push_back(stoichiometric_coeff);
597 
598  CoeffType order = (partial_order == std::numeric_limits<CoeffType>::infinity() )?static_cast<CoeffType>(stoichiometric_coeff):partial_order;
599  _species_reactant_partial_order.push_back(order);
600  return;
601  }
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_less(expr1, expr2)
std::vector< CoeffType > _species_reactant_partial_order
Definition: reaction.h:366
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
std::vector< std::string > _reactant_names
Definition: reaction.h:358
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::clear_product ( )
inline

Definition at line 631 of file reaction.h.

632  {
633  _product_names.clear();
634  _product_ids.clear();
635  _product_stoichiometry.clear();
636  }
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
std::vector< std::string > _product_names
Definition: reaction.h:359
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::clear_reactant ( )
inline

Definition at line 622 of file reaction.h.

623  {
624  _reactant_names.clear();
625  _reactant_ids.clear();
626  _reactant_stoichiometry.clear();
627  }
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
std::vector< std::string > _reactant_names
Definition: reaction.h:358
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
StateType Antioch::Reaction< CoeffType, VectorCoeffType >::compute_forward_rate_coefficient ( const VectorStateType &  molar_densities,
const KineticsConditions< StateType, VectorStateType > &  conditions 
) const
inline

Definition at line 866 of file reaction.h.

References antioch_error, Antioch::ReactionType::DUPLICATE, Antioch::ReactionType::ELEMENTARY, Antioch::ReactionType::LINDEMANN_FALLOFF, Antioch::ReactionType::LINDEMANN_FALLOFF_THREE_BODY, Antioch::KineticsConditions< StateType, VectorStateType >::T(), Antioch::ReactionType::THREE_BODY, Antioch::ReactionType::TROE_FALLOFF, Antioch::ReactionType::TROE_FALLOFF_THREE_BODY, and Antioch::zero_clone().

Referenced by Antioch::ReactionSet< CoeffType >::get_reactive_scheme(), and tester().

868  {
869  switch(_type)
870  {
872  {
873  return (static_cast<const ElementaryReaction<CoeffType>*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
874  }
875  break;
876 
878  {
879  return (static_cast<const DuplicateReaction<CoeffType>*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
880  }
881  break;
882 
884  {
885  return (static_cast<const ThreeBodyReaction<CoeffType>*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
886  }
887  break;
888 
890  {
891  return (static_cast<const FalloffReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
892  }
893  break;
894 
896  {
897  return (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
898  }
899  break;
900 
902  {
903  return (static_cast<const FalloffThreeBodyReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
904  }
905  break;
906 
908  {
909  return (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient(molar_densities,conditions);
910  }
911  break;
912 
913  default:
914  {
915  antioch_error();
916  }
917  } // switch(_type)
918 
919  // Dummy
920  return zero_clone(conditions.T());
921  }
ReactionType::ReactionType _type
Definition: reaction.h:372
#define antioch_error()
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
Definition: eigen_utils.h:145
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
StateType Antioch::Reaction< CoeffType, VectorCoeffType >::compute_forward_rate_coefficient ( const VectorStateType &  molar_densities,
const StateType &  temp 
) const
inline

Definition at line 927 of file reaction.h.

References antioch_deprecated.

929  {
932  (molar_densities,
933  KineticsConditions<StateType,VectorStateType>(temp));
934  }
StateType compute_forward_rate_coefficient(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions) const
Definition: reaction.h:866
#define antioch_deprecated()
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::compute_forward_rate_coefficient_and_derivatives ( const VectorStateType &  molar_densities,
const KineticsConditions< StateType, VectorStateType > &  conditions,
StateType &  kfwd,
StateType &  dkfwd_dT,
VectorStateType &  dkfwd_dX 
) const
inline

Definition at line 939 of file reaction.h.

References antioch_error, Antioch::ReactionType::DUPLICATE, Antioch::ReactionType::ELEMENTARY, Antioch::ReactionType::LINDEMANN_FALLOFF, Antioch::ReactionType::LINDEMANN_FALLOFF_THREE_BODY, Antioch::ReactionType::THREE_BODY, Antioch::ReactionType::TROE_FALLOFF, and Antioch::ReactionType::TROE_FALLOFF_THREE_BODY.

944  {
945  switch(_type)
946  {
948  {
949  (static_cast<const ElementaryReaction<CoeffType>*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
950  }
951  break;
952 
954  {
955  (static_cast<const DuplicateReaction<CoeffType>*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
956  }
957  break;
958 
960  {
961  (static_cast<const ThreeBodyReaction<CoeffType>*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
962  }
963  break;
964 
966  {
967  (static_cast<const FalloffReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
968  }
969  break;
970 
972  {
973  (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
974  }
975 
977  {
978  (static_cast<const FalloffThreeBodyReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
979  }
980  break;
981 
983  {
984  (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->compute_forward_rate_coefficient_and_derivatives(molar_densities,conditions,kfwd,dkfwd_dT,dkfwd_dX);
985  }
986  break;
987 
988  default:
989  {
990  antioch_error();
991  }
992 
993  } // switch(type)
994 
995  return;
996  }
ReactionType::ReactionType _type
Definition: reaction.h:372
#define antioch_error()
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::compute_forward_rate_coefficient_and_derivatives ( const VectorStateType &  molar_densities,
const StateType &  temp,
StateType &  kfwd,
StateType &  dkfwd_dT,
VectorStateType &  dkfwd_dX 
) const
inline

Definition at line 1003 of file reaction.h.

References antioch_deprecated.

1008  {
1011  (molar_densities,
1012  KineticsConditions<StateType,VectorStateType>(temp),
1013  kfwd, dkfwd_dT, dkfwd_dX);
1014  }
void compute_forward_rate_coefficient_and_derivatives(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions, StateType &kfwd, StateType &dkfwd_dT, VectorStateType &dkfwd_dX) const
Definition: reaction.h:939
#define antioch_deprecated()
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
StateType Antioch::Reaction< CoeffType, VectorCoeffType >::compute_rate_of_progress ( const VectorStateType &  molar_densities,
const KineticsConditions< StateType, VectorStateType > &  conditions,
const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R 
) const
inline

Definition at line 1020 of file reaction.h.

References Antioch::zero_clone().

Referenced by tester().

1024  {
1025  StateType kfwd = this->compute_forward_rate_coefficient(molar_densities,conditions);
1026  StateType kfwd_times_reactants = kfwd;
1027 
1028  // Rfwd
1029  for (unsigned int ro=0; ro < this->n_reactants(); ro++)
1030  {
1031  kfwd_times_reactants *=
1032  ant_pow( molar_densities[this->reactant_id(ro)],
1033  this->reactant_partial_order(ro));
1034  }
1035 
1036  StateType kbkwd_times_products = Antioch::zero_clone(kfwd_times_reactants);
1037  if(_reversible)
1038  {
1039 
1040  StateType Keq = this->equilibrium_constant( P0_RT, h_RT_minus_s_R );
1041  kbkwd_times_products = kfwd/Keq;
1042 
1043  // Rbkwd
1044  for (unsigned int po=0; po< this->n_products(); po++)
1045  {
1046  kbkwd_times_products *=
1047  ant_pow( molar_densities[this->product_id(po)],
1048  this->product_partial_order(po));
1049 
1050  }
1051  }
1052 
1053  return kfwd_times_reactants - kbkwd_times_products;
1054 
1055  }
StateType equilibrium_constant(const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
Definition: reaction.h:751
StateType compute_forward_rate_coefficient(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions) const
Definition: reaction.h:866
unsigned int reactant_id(const unsigned int r) const
Definition: reaction.h:534
CoeffType product_partial_order(const unsigned int p) const
Definition: reaction.h:579
unsigned int n_products() const
Definition: reaction.h:508
unsigned int product_id(const unsigned int p) const
Definition: reaction.h:543
CoeffType reactant_partial_order(const unsigned int r) const
Definition: reaction.h:570
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
Definition: eigen_utils.h:145
unsigned int n_reactants() const
Definition: reaction.h:498
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
StateType Antioch::Reaction< CoeffType, VectorCoeffType >::compute_rate_of_progress ( const VectorStateType &  molar_densities,
const StateType &  temp,
const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R 
) const
inline

Definition at line 1060 of file reaction.h.

References antioch_deprecated.

1064  {
1067  (molar_densities,
1068  KineticsConditions<StateType,VectorStateType>(temp),
1069  P0_RT, h_RT_minus_s_R);
1070  }
StateType compute_rate_of_progress(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
Definition: reaction.h:1020
#define antioch_deprecated()
template<typename CoeffType, typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::compute_rate_of_progress_and_derivatives ( const VectorStateType &  molar_densities,
const ChemicalMixture< CoeffType > &  ,
const KineticsConditions< StateType, VectorStateType > &  conditions,
const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R,
const VectorStateType &  dh_RT_minus_s_R_dT,
StateType &  net_reaction_rate,
StateType &  dnet_rate_dT,
VectorStateType &  dnet_rate_dX_s 
) const
inline
Todo:
Should we make this work arrays that get passed in so we aren't allocating/deallocating here?
Todo:
Should we make this work arrays that get passed in so we aren't allocating/deallocating here?

Definition at line 1075 of file reaction.h.

References antioch_assert_equal_to, Antioch::constant_clone(), Antioch::Constants::pi(), Antioch::set_zero(), Antioch::KineticsConditions< StateType, VectorStateType >::T(), and Antioch::zero_clone().

1084  {
1085  antioch_assert_equal_to (molar_densities.size(), this->n_species());
1086 
1087 // First the forward component, if reversible, compute and add the backward component
1088 
1089  StateType kfwd = Antioch::zero_clone(conditions.T());
1090  StateType dkfwd_dT = Antioch::zero_clone(conditions.T());
1091  VectorStateType dkfwd_dX_s = Antioch::zero_clone(molar_densities);
1092  VectorStateType dkbkwd_dX_s = Antioch::zero_clone(molar_densities);
1093 
1094  this->compute_forward_rate_coefficient_and_derivatives(molar_densities, conditions, kfwd, dkfwd_dT ,dkfwd_dX_s);
1095 
1096  // If users want to use valarrays, then the output reference sizes
1097  // had better already match the input value sizes...
1098  StateType dRfwd_dT = Antioch::zero_clone(kfwd);
1099 
1100  // We need to construct using an input StateType argument if we
1101  // want StateType==valarray to have the right sizes
1102  // valarray compatibility makes this a bit redundant, but not much
1103  // worse than the previous version
1105  VectorStateType dRfwd_dX_s(this->n_species(), kfwd);
1106 
1107  Antioch::set_zero(dRfwd_dX_s);
1108 
1109  // pre-fill the participating species partials with the rates
1110  for (unsigned int r=0; r< this->n_reactants(); r++)
1111  {
1112  dRfwd_dX_s[this->reactant_id(r)] = kfwd;
1113  }
1114 
1115  //init
1116  StateType facfwd = constant_clone(conditions.T(),1);
1117  dRfwd_dT = dkfwd_dT;
1118 
1119  // Rfwd & derivatives
1120  for (unsigned int ro=0; ro < this->n_reactants(); ro++)
1121  {
1122  const StateType val =
1123  ant_pow( molar_densities[this->reactant_id(ro)],
1124  this->reactant_partial_order(ro));
1125 
1126  const StateType dval =
1127  ( static_cast<CoeffType>(this->reactant_stoichiometric_coefficient(ro))*
1128  ant_pow( molar_densities[this->reactant_id(ro)],
1129  this->reactant_partial_order(ro) - 1)
1130  );
1131 
1132  facfwd *= val;
1133  dRfwd_dT *= val;
1134 
1135  for (unsigned int ri=0; ri<this->n_reactants(); ri++)
1136  {
1137  dRfwd_dX_s[this->reactant_id(ri)] *= (ri == ro) ? dval : val;
1138  }
1139  }
1140 
1141  for (unsigned int s = 0; s < this->n_species(); s++)
1142  {
1143  dRfwd_dX_s[s] += facfwd * dkfwd_dX_s[s];
1144  }
1145 
1146  net_reaction_rate = facfwd * kfwd;
1147 
1148  dnet_rate_dT = dRfwd_dT;
1149 
1150  for (unsigned int s = 0; s < this->n_species(); s++)
1151  {
1152  dnet_rate_dX_s[s] = dRfwd_dX_s[s];
1153  }
1154 
1155  if(_reversible)
1156  {
1157 
1158  //backward to be computed and added
1159 
1160  StateType keq = Antioch::zero_clone(conditions.T());
1161  StateType dkeq_dT = Antioch::zero_clone(conditions.T());
1162 
1163  equilibrium_constant_and_derivative( conditions.T(), P0_RT, h_RT_minus_s_R,
1164  dh_RT_minus_s_R_dT,
1165  keq, dkeq_dT );
1166 
1167  const StateType kbkwd = kfwd/keq;
1168  const StateType dkbkwd_dT = (dkfwd_dT - kbkwd*dkeq_dT)/keq;
1169  for(unsigned int s = 0; s < this->n_species(); s++)
1170  {
1171  dkbkwd_dX_s[s] = dkfwd_dX_s[s]/keq;
1172  }
1173 
1174  // If users want to use valarrays, then the output reference sizes
1175  // had better already match the input value sizes...
1176  StateType dRbkwd_dT = Antioch::zero_clone(dkbkwd_dT);
1177 
1178  // We need to construct using an input StateType argument if we
1179  // want StateType==valarray to have the right sizes
1180  // valarray compatibility makes this a bit redundant, but not much
1181  // worse than the previous version
1183  VectorStateType dRbkwd_dX_s(this->n_species(), kbkwd);
1184 
1185  Antioch::set_zero(dRbkwd_dX_s);
1186 
1187  // pre-fill the participating species partials with the rates
1188  for (unsigned int p=0; p < this->n_products(); p++)
1189  {
1190  dRbkwd_dX_s[this->product_id(p)] = kbkwd;
1191  }
1192 
1193  //init
1194  StateType facbkwd = constant_clone(conditions.T(),1);
1195  dRbkwd_dT = dkbkwd_dT;
1196 
1197  // Rbkwd & derivatives
1198  for (unsigned int po=0; po< this->n_products(); po++)
1199  {
1200  const StateType val =
1201  ant_pow( molar_densities[this->product_id(po)],
1202  this->product_partial_order(po));
1203 
1204  const StateType dval =
1205  ( static_cast<CoeffType>(this->product_stoichiometric_coefficient(po))*
1206  ant_pow( molar_densities[this->product_id(po)],
1207  this->product_partial_order(po) - 1)
1208  );
1209 
1210  facbkwd *= val;
1211  dRbkwd_dT *= val;
1212 
1213  for (unsigned int pi=0; pi<this->n_products(); pi++)
1214  {
1215  dRbkwd_dX_s[this->product_id(pi)] *= (pi == po) ? dval : val;
1216  }
1217 
1218  }
1219 
1220  for (unsigned int s = 0; s < this->n_species(); s++)
1221  {
1222  dRbkwd_dX_s[s] += facbkwd * dkbkwd_dX_s[s];
1223  }
1224 
1225  net_reaction_rate -= facbkwd * kbkwd;
1226 
1227  dnet_rate_dT -= dRbkwd_dT;
1228 
1229  for (unsigned int s = 0; s < this->n_species(); s++)
1230  {
1231  dnet_rate_dX_s[s] -= dRbkwd_dX_s[s];
1232  }
1233 
1234  } //end of if(_reversible) condition
1235 
1236  return;
1237  }
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
Definition: reaction.h:389
unsigned int product_stoichiometric_coefficient(const unsigned int p) const
Definition: reaction.h:561
void equilibrium_constant_and_derivative(const StateType &T, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R, const VectorStateType &ddT_h_RT_minus_s_R, StateType &keq, StateType &dkeq_dT) const
Definition: reaction.h:785
unsigned int reactant_id(const unsigned int r) const
Definition: reaction.h:534
CoeffType product_partial_order(const unsigned int p) const
Definition: reaction.h:579
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > constant_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex, const Scalar &value)
Definition: eigen_utils.h:181
void compute_forward_rate_coefficient_and_derivatives(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions, StateType &kfwd, StateType &dkfwd_dT, VectorStateType &dkfwd_dX) const
Definition: reaction.h:939
unsigned int n_products() const
Definition: reaction.h:508
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
Definition: eigen_utils.h:217
unsigned int product_id(const unsigned int p) const
Definition: reaction.h:543
unsigned int reactant_stoichiometric_coefficient(const unsigned int r) const
Definition: reaction.h:552
CoeffType reactant_partial_order(const unsigned int r) const
Definition: reaction.h:570
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
Definition: eigen_utils.h:145
unsigned int n_reactants() const
Definition: reaction.h:498
CoeffType pi()
pi
template<typename CoeffType, typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::compute_rate_of_progress_and_derivatives ( const VectorStateType &  molar_densities,
const ChemicalMixture< CoeffType > &  chem_mixture,
const StateType &  temp,
const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R,
const VectorStateType &  dh_RT_minus_s_R_dT,
StateType &  net_reaction_rate,
StateType &  dnet_rate_dT,
VectorStateType &  dnet_rate_dX_s 
) const
inline

Definition at line 1242 of file reaction.h.

References antioch_deprecated.

1251  {
1254  (molar_densities, chem_mixture,
1255  KineticsConditions<StateType,VectorStateType>(temp),
1256  P0_RT, h_RT_minus_s_R, dh_RT_minus_s_R_dT, net_reaction_rate,
1257  dnet_rate_dT, dnet_rate_dX_s);
1258  }
void compute_rate_of_progress_and_derivatives(const VectorStateType &molar_densities, const ChemicalMixture< CoeffType > &, const KineticsConditions< StateType, VectorStateType > &conditions, const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R, const VectorStateType &dh_RT_minus_s_R_dT, StateType &net_reaction_rate, StateType &dnet_rate_dT, VectorStateType &dnet_rate_dX_s) const
Definition: reaction.h:1075
#define antioch_deprecated()
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::efficiency ( const unsigned int  s) const
inline

Definition at line 658 of file reaction.h.

References antioch_assert.

659  {
660 
661  antioch_assert(s < _efficiencies.size());
662  return _efficiencies[s];
663  }
#define antioch_assert(asserted)
std::vector< CoeffType > _efficiencies
efficiencies for three body reactions
Definition: reaction.h:379
template<typename CoeffType , typename VectorCoeffType >
const std::string & Antioch::Reaction< CoeffType, VectorCoeffType >::equation ( ) const
inline
Returns
the equation for this reaction.

Definition at line 410 of file reaction.h.

Referenced by Antioch::read_reaction_set_data().

411  {
412  return _equation;
413  }
std::string _equation
Definition: reaction.h:357
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
StateType Antioch::Reaction< CoeffType, VectorCoeffType >::equilibrium_constant ( const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R 
) const
inline
Todo:
Make this assertion vector-compatible

Definition at line 751 of file reaction.h.

References antioch_assert, antioch_assert_equal_to, and antioch_assert_greater.

Referenced by Antioch::ReactionSet< CoeffType >::get_reactive_scheme().

753  {
754  antioch_assert( this->initialized() );
756  // antioch_assert_greater( P0_RT, 0.0 );
757  antioch_assert_greater( h_RT_minus_s_R.size(), 0 );
758  antioch_assert_equal_to( h_RT_minus_s_R.size(), this->n_species() );
759 
760 
761 // DrG0 = - reactants + product
762 // K = (P0/(RT))^gamma exp(-DrG0)
763 // exppower = -DrG0 = reactants - products
764  StateType exppower = ( static_cast<CoeffType>(_reactant_stoichiometry[0])*
765  h_RT_minus_s_R[_reactant_ids[0]] );
766 
767  for (unsigned int s=1; s < this->n_reactants(); s++)
768  {
769  exppower += ( static_cast<CoeffType>(_reactant_stoichiometry[s])*
770  h_RT_minus_s_R[_reactant_ids[s]] );
771  }
772 
773  for (unsigned int s=0; s < this->n_products(); s++)
774  {
775  exppower -= ( static_cast<CoeffType>(_product_stoichiometry[s])*
776  h_RT_minus_s_R[_product_ids[s]] );
777  }
778  return ant_pow( P0_RT, static_cast<CoeffType>(this->gamma()) ) * ant_exp(exppower);
779  }
#define antioch_assert(asserted)
int gamma() const
Definition: reaction.h:667
bool initialized() const
Definition: reaction.h:455
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_greater(expr1, expr2)
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
unsigned int n_products() const
Definition: reaction.h:508
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
unsigned int n_reactants() const
Definition: reaction.h:498
template<typename CoeffType , typename VectorCoeffType >
template<typename StateType , typename VectorStateType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::equilibrium_constant_and_derivative ( const StateType &  T,
const StateType &  P0_RT,
const VectorStateType &  h_RT_minus_s_R,
const VectorStateType &  ddT_h_RT_minus_s_R,
StateType &  keq,
StateType &  dkeq_dT 
) const
inline
Todo:
Make these assertions vector-compatible

Definition at line 785 of file reaction.h.

References antioch_assert, antioch_assert_equal_to, and antioch_assert_greater.

791  {
792  antioch_assert(this->initialized());
793 
795  // antioch_assert_greater( P0_RT, 0.0 );
796  // antioch_assert_greater( T, 0.0 );
797  antioch_assert_greater( h_RT_minus_s_R.size(), 0 );
798  antioch_assert_equal_to( h_RT_minus_s_R.size(), this->n_species() );
799  antioch_assert_equal_to( ddT_h_RT_minus_s_R.size(), this->n_species() );
800 
801  // get the equilibrium constant
802  keq = this->equilibrium_constant( P0_RT, h_RT_minus_s_R );
803 
804  StateType ddT_exppower = ( static_cast<CoeffType>(_reactant_stoichiometry[0])*
805  ddT_h_RT_minus_s_R[_reactant_ids[0]] );
806 
807  for (unsigned int s=1; s<this->n_reactants(); s++)
808  ddT_exppower += ( static_cast<CoeffType>(_reactant_stoichiometry[s])*
809  ddT_h_RT_minus_s_R[_reactant_ids[s]] );
810 
811  for (unsigned int s=0; s<this->n_products(); s++)
812  ddT_exppower -= ( static_cast<CoeffType>(_product_stoichiometry[s])*
813  ddT_h_RT_minus_s_R[_product_ids[s]] );
814 
815  // compute its derivative
816  dkeq_dT = keq*(-static_cast<CoeffType>(this->gamma())/T + ddT_exppower);
817 
818  return;
819  }
#define antioch_assert(asserted)
int gamma() const
Definition: reaction.h:667
StateType equilibrium_constant(const StateType &P0_RT, const VectorStateType &h_RT_minus_s_R) const
Definition: reaction.h:751
bool initialized() const
Definition: reaction.h:455
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_greater(expr1, expr2)
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
unsigned int n_products() const
Definition: reaction.h:508
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
unsigned int n_reactants() const
Definition: reaction.h:498
template<typename CoeffType , typename VectorCoeffType >
template<typename FalloffType >
FalloffType & Antioch::Reaction< CoeffType, VectorCoeffType >::falloff ( )
inline

Return writeable reference to the falloff object, test type.

Definition at line 1263 of file reaction.h.

References antioch_error, Antioch::ReactionType::LINDEMANN_FALLOFF, Antioch::ReactionType::LINDEMANN_FALLOFF_THREE_BODY, Antioch::ReactionType::TROE_FALLOFF, and Antioch::ReactionType::TROE_FALLOFF_THREE_BODY.

1264  {
1265  switch(_type)
1266  {
1268  {
1269  return (static_cast<const FalloffReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->F();
1270  }
1271  break;
1272 
1274  {
1275  return (static_cast<const FalloffReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->F();
1276  }
1277  break;
1278 
1280  {
1281  return (static_cast<const FalloffThreeBodyReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->F();
1282  }
1283  break;
1284 
1286  {
1287  return (static_cast<const FalloffThreeBodyReaction<CoeffType,LindemannFalloff<CoeffType> >*>(this))->F();
1288  }
1289  break;
1290 
1291  default:
1292  {
1293  std::cerr << "You are trying to retrieve a Falloff object in a reaction that is not a falloff.\n"
1294  << "The reaction is " << *this << std::endl;
1295  antioch_error();
1296  return NULL;
1297  }
1298 
1299  }
1300  }
ReactionType::ReactionType _type
Definition: reaction.h:372
#define antioch_error()
template<typename CoeffType , typename VectorCoeffType >
const KineticsType< CoeffType, VectorCoeffType > & Antioch::Reaction< CoeffType, VectorCoeffType >::forward_rate ( unsigned int  ir = 0) const
inline

Return const reference to the forward rate object.

Definition at line 674 of file reaction.h.

References antioch_assert_less.

675  {
677  return *_forward_rate[ir];
678  }
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
KineticsType< CoeffType, VectorCoeffType > & Antioch::Reaction< CoeffType, VectorCoeffType >::forward_rate ( unsigned int  ir = 0)
inline

Return writeable reference to the forward rate object.

Definition at line 682 of file reaction.h.

References antioch_assert_less.

683  {
685  return *_forward_rate[ir];
686  }
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
int Antioch::Reaction< CoeffType, VectorCoeffType >::gamma ( ) const
inline

Definition at line 667 of file reaction.h.

668  {
669  return _gamma;
670  }
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::get_efficiency ( const unsigned int  s) const
inline

Definition at line 650 of file reaction.h.

References antioch_assert_less.

651  {
653  return _efficiencies[s];
654  }
#define antioch_assert_less(expr1, expr2)
std::vector< CoeffType > _efficiencies
efficiencies for three body reactions
Definition: reaction.h:379
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::get_parameter_of_chemical_process ( ReactionType::Parameters  parameter,
unsigned int  species = std::numeric_limits<unsigned int>::max() 
) const
inline

get a parameter from the chemical process

Definition at line 1415 of file reaction.h.

References antioch_error, Antioch::ReactionType::EFFICIENCIES, Antioch::ReactionType::TROE_ALPHA, Antioch::ReactionType::TROE_FALLOFF, Antioch::ReactionType::TROE_FALLOFF_THREE_BODY, Antioch::ReactionType::TROE_T1, Antioch::ReactionType::TROE_T2, and Antioch::ReactionType::TROE_T3.

1416  {
1417  CoeffType value(0);
1418  switch(parameter)
1419  {
1421  {
1422  value = this->get_efficiency(species); // tests inside, if not three-body or species wrong
1423  }
1424  break;
1426  {
1427  if(this->type() == ReactionType::TROE_FALLOFF)
1428  {
1429  value = (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_alpha();
1430  }
1431  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1432  {
1433  value = (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_alpha();
1434  }else
1435  {
1436  antioch_error();
1437  }
1438  }
1439  break;
1440  case ReactionType::TROE_T1:
1441  {
1442  if(this->type() == ReactionType::TROE_FALLOFF)
1443  {
1444  value = (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T1();
1445  }
1446  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1447  {
1448  value = (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T1();
1449  }else
1450  {
1451  antioch_error();
1452  }
1453  }
1454  break;
1455  case ReactionType::TROE_T2:
1456  {
1457  if(this->type() == ReactionType::TROE_FALLOFF)
1458  {
1459  value = (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T2();
1460  }
1461  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1462  {
1463  value = (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T2();
1464  }else
1465  {
1466  antioch_error();
1467  }
1468  }
1469  break;
1470  case ReactionType::TROE_T3:
1471  {
1472  if(this->type() == ReactionType::TROE_FALLOFF)
1473  {
1474  value = (static_cast<const FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T3();
1475  }
1476  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1477  {
1478  value = (static_cast<const FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().get_T3();
1479  }else
1480  {
1481  antioch_error();
1482  }
1483  }
1484  break;
1485  default:
1486  {
1487  antioch_error();
1488  }
1489  break;
1490  }
1491 
1492  return value;
1493  }
CoeffType get_efficiency(const unsigned int s) const
Definition: reaction.h:650
#define antioch_error()
ReactionType::ReactionType type() const
Type of reaction.
Definition: reaction.h:417
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::get_parameter_of_rate ( KineticsModel::Parameters  parameter,
unsigned int  n_reaction = 0,
const std::string &  unit = "SI" 
) const
inline

get a parameter from the rate constant

Definition at line 1320 of file reaction.h.

References antioch_assert_less.

1321  {
1322  antioch_assert_less(n_reaction,_forward_rate.size());
1323  return _forward_rate[n_reaction]->get_parameter(parameter);
1324  }
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::get_parameter_of_rate ( KineticsModel::Parameters  parameter,
unsigned int  n_reaction,
const std::string &  unit,
int  l 
) const
inline

get a parameter from the rate constant, vectorized version

Definition at line 1328 of file reaction.h.

References antioch_assert_less.

1329  {
1330  antioch_assert_less(n_reaction,_forward_rate.size());
1331  return _forward_rate[n_reaction]->get_parameter(parameter,l);
1332  }
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
const std::string & Antioch::Reaction< CoeffType, VectorCoeffType >::id ( ) const
inline
Returns
the reaction id.

Definition at line 396 of file reaction.h.

397  {
398  return _id;
399  }
std::string _id
Definition: reaction.h:356
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::initialize ( unsigned int  index = 0)
inline

Computes derived quantities.

Definition at line 723 of file reaction.h.

Referenced by tester().

724  {
725  _gamma = 0;
726  for (unsigned int r=0; r< this->n_reactants(); r++)
727  {
729  }
730 
731  for (unsigned int p=0; p < this->n_products(); p++)
732  {
734  }
735 
736  // gives kinetics object index in reaction set
737  for(typename std::vector<KineticsType<CoeffType,VectorCoeffType>* >::iterator it = _forward_rate.begin();
738  it != _forward_rate.end(); it++)
739  {
740  (*it)->set_index(index);
741  }
742 
743  // set initialization flag
744  _initialized = true;
745  }
unsigned int product_stoichiometric_coefficient(const unsigned int p) const
Definition: reaction.h:561
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
unsigned int n_products() const
Definition: reaction.h:508
unsigned int reactant_stoichiometric_coefficient(const unsigned int r) const
Definition: reaction.h:552
unsigned int n_reactants() const
Definition: reaction.h:498
template<typename CoeffType , typename VectorCoeffType >
bool Antioch::Reaction< CoeffType, VectorCoeffType >::initialized ( ) const
inline

Definition at line 455 of file reaction.h.

456  {
457  return _initialized;
458  }
template<typename CoeffType , typename VectorCoeffType >
KineticsModel::KineticsModel Antioch::Reaction< CoeffType, VectorCoeffType >::kinetics_model ( ) const
inline

Model of kinetics.

Definition at line 440 of file reaction.h.

441  {
442  return _kintype;
443  }
KineticsModel::KineticsModel _kintype
Definition: reaction.h:373
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::n_products ( ) const
inline
Returns
the number of products.

Definition at line 508 of file reaction.h.

References antioch_assert_equal_to, and antioch_assert_less.

Referenced by Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources(), Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources_and_derivs(), Antioch::ReactionSet< CoeffType >::get_reactive_scheme(), and Antioch::ReactionSet< CoeffType >::print_chemical_scheme().

509  {
510  antioch_assert_less(_product_ids.size(), this->n_species());
513  return _product_ids.size();
514  }
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
Definition: reaction.h:389
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
#define antioch_assert_less(expr1, expr2)
std::vector< std::string > _product_names
Definition: reaction.h:359
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::n_rate_constants ( ) const
inline

Return the number of rate constant objects.

Definition at line 477 of file reaction.h.

Referenced by Antioch::read_reaction_set_data().

478  {
479  return _forward_rate.size();
480  }
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::n_reactants ( ) const
inline
Returns
the number of reactants.

Definition at line 498 of file reaction.h.

References antioch_assert_equal_to, and antioch_assert_less.

Referenced by Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources(), Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources_and_derivs(), Antioch::ReactionSet< CoeffType >::get_reactive_scheme(), and Antioch::ReactionSet< CoeffType >::print_chemical_scheme().

499  {
503  return _reactant_ids.size();
504  }
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_less(expr1, expr2)
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
std::vector< std::string > _reactant_names
Definition: reaction.h:358
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::n_species ( ) const
inline

Definition at line 389 of file reaction.h.

390  {
391  return _n_species;
392  }
unsigned int _n_species
Definition: reaction.h:355
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::print ( std::ostream &  os = std::cout) const
inline

Formatted print, by default to std::cout.

Definition at line 824 of file reaction.h.

References Antioch::ReactionType::LINDEMANN_FALLOFF_THREE_BODY, Antioch::ReactionType::THREE_BODY, and Antioch::ReactionType::TROE_FALLOFF_THREE_BODY.

Referenced by tester().

825  {
826  os << "# Gas-Phase Reaction \"" << _equation << "\":\n";
827  if (this->n_species())
828  {
829  os << "# reactants: ";
830  for (unsigned int r=0; r<this->n_reactants(); r++)
831  os << this->reactant_name(r) << ":"
832  << this->reactant_stoichiometric_coefficient(r) << ","
833  << this->reactant_partial_order(r) << " ";
834  os << "\n"
835  << "# products: ";
836  for (unsigned int p=0; p<this->n_products(); p++)
837  os << this->product_name(p) << ":"
838  << this->product_stoichiometric_coefficient(p) << ","
839  << this->product_partial_order(p) << " ";
840  }
841  os << "\n# Chemical process: " << _type;
842  os << "\n# Kinetics model: " << _kintype;
843  (_reversible)?os << "\n# reversible":
844  os << "\n# irreversible";
845  for(unsigned int ir = 0; ir < _forward_rate.size(); ir++)
846  {
847  os << "\n# forward rate eqn: " << *_forward_rate[ir];
848  }
849 
850  if (_type == ReactionType::THREE_BODY ||
853  {
854  os << "\n# efficiencies: ";
855  for (unsigned int s=0; s<this->n_species(); s++)
856  os << s << ":" << this->efficiency(s) << " ";
857  }
858  os << "\n#";
859  return;
860  }
ReactionType::ReactionType _type
Definition: reaction.h:372
unsigned int n_species() const
Definition: reaction.h:389
KineticsModel::KineticsModel _kintype
Definition: reaction.h:373
const std::string & reactant_name(const unsigned int r) const
Definition: reaction.h:518
unsigned int product_stoichiometric_coefficient(const unsigned int p) const
Definition: reaction.h:561
CoeffType product_partial_order(const unsigned int p) const
Definition: reaction.h:579
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
unsigned int n_products() const
Definition: reaction.h:508
std::string _equation
Definition: reaction.h:357
unsigned int reactant_stoichiometric_coefficient(const unsigned int r) const
Definition: reaction.h:552
CoeffType reactant_partial_order(const unsigned int r) const
Definition: reaction.h:570
const std::string & product_name(const unsigned int p) const
Definition: reaction.h:526
CoeffType efficiency(const unsigned int s) const
Definition: reaction.h:658
unsigned int n_reactants() const
Definition: reaction.h:498
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::product_id ( const unsigned int  p) const
inline
template<typename CoeffType , typename VectorCoeffType >
const std::string & Antioch::Reaction< CoeffType, VectorCoeffType >::product_name ( const unsigned int  p) const
inline
Returns
the name of the p th product.

Definition at line 526 of file reaction.h.

References antioch_assert_less.

527  {
529  return _product_names[p];
530  }
#define antioch_assert_less(expr1, expr2)
std::vector< std::string > _product_names
Definition: reaction.h:359
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::product_partial_order ( const unsigned int  p) const
inline

Definition at line 579 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::ReactionSet< CoeffType >::get_reactive_scheme().

580  {
584  }
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_less(expr1, expr2)
std::vector< CoeffType > _species_product_partial_order
Definition: reaction.h:367
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::product_stoichiometric_coefficient ( const unsigned int  p) const
inline

Definition at line 561 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources(), Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources_and_derivs(), and Antioch::ReactionSet< CoeffType >::print_chemical_scheme().

562  {
565  return _product_stoichiometry[p];
566  }
std::vector< unsigned int > _product_ids
Definition: reaction.h:361
unsigned int n_species() const
Definition: reaction.h:389
std::vector< unsigned int > _product_stoichiometry
Definition: reaction.h:363
#define antioch_assert_less(expr1, expr2)
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_id ( const unsigned int  r) const
inline
template<typename CoeffType , typename VectorCoeffType >
const std::string & Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_name ( const unsigned int  r) const
inline
Returns
the name of the r th reactant.

Definition at line 518 of file reaction.h.

References antioch_assert_less.

519  {
521  return _reactant_names[r];
522  }
#define antioch_assert_less(expr1, expr2)
std::vector< std::string > _reactant_names
Definition: reaction.h:358
template<typename CoeffType , typename VectorCoeffType >
CoeffType Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_partial_order ( const unsigned int  r) const
inline

Definition at line 570 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::ReactionSet< CoeffType >::get_reactive_scheme().

571  {
575  }
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_less(expr1, expr2)
std::vector< CoeffType > _species_reactant_partial_order
Definition: reaction.h:366
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
template<typename CoeffType , typename VectorCoeffType >
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::reactant_stoichiometric_coefficient ( const unsigned int  r) const
inline

Definition at line 552 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources(), Antioch::KineticsEvaluator< CoeffType, StateType >::compute_mole_sources_and_derivs(), and Antioch::ReactionSet< CoeffType >::print_chemical_scheme().

553  {
556  return _reactant_stoichiometry[r];
557  }
unsigned int n_species() const
Definition: reaction.h:389
#define antioch_assert_less(expr1, expr2)
std::vector< unsigned int > _reactant_stoichiometry
Definition: reaction.h:362
std::vector< unsigned int > _reactant_ids
Definition: reaction.h:360
template<typename CoeffType , typename VectorCoeffType >
bool Antioch::Reaction< CoeffType, VectorCoeffType >::reversible ( ) const
inline
Returns
the reversibility state of reaction.

Definition at line 462 of file reaction.h.

Referenced by Antioch::ReactionSet< CoeffType >::get_reactive_scheme().

463  {
464  return _reversible;
465  }
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_efficiency ( const std::string &  ,
const unsigned int  s,
const CoeffType  efficiency 
)
inline

Definition at line 640 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::read_reaction_set_data().

643  {
646  }
#define antioch_assert_less(expr1, expr2)
CoeffType efficiency(const unsigned int s) const
Definition: reaction.h:658
std::vector< CoeffType > _efficiencies
efficiencies for three body reactions
Definition: reaction.h:379
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_id ( const std::string &  id)
inline

set the reaction id.

Definition at line 403 of file reaction.h.

Referenced by Antioch::read_reaction_set_data().

404  {
405  _id = id;
406  }
std::string _id
Definition: reaction.h:356
const std::string & id() const
Definition: reaction.h:396
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_kinetics_model ( const KineticsModel::KineticsModel  kin)
inline

Set the model of kinetics.

Definition at line 447 of file reaction.h.

448  {
449  _kintype = kin;
450  return;
451  }
KineticsModel::KineticsModel _kintype
Definition: reaction.h:373
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_parameter_of_chemical_process ( ReactionType::Parameters  parameter,
CoeffType  new_value,
unsigned int  species = std::numeric_limits<unsigned int>::max() 
)
inline

reset a parameter from the chemical process

Definition at line 1336 of file reaction.h.

References antioch_error, Antioch::ReactionType::EFFICIENCIES, Antioch::ReactionType::TROE_ALPHA, Antioch::ReactionType::TROE_FALLOFF, Antioch::ReactionType::TROE_FALLOFF_THREE_BODY, Antioch::ReactionType::TROE_T1, Antioch::ReactionType::TROE_T2, and Antioch::ReactionType::TROE_T3.

1337  {
1338  switch(parameter)
1339  {
1341  {
1342  this->set_efficiency(std::string(),species,new_value); // tests inside, if not three-body or species wrong
1343  }
1344  break;
1346  {
1347  if(this->type() == ReactionType::TROE_FALLOFF)
1348  {
1349  (static_cast<FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_alpha(new_value);
1350  }
1351  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1352  {
1353  (static_cast<FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_alpha(new_value);
1354  }else
1355  {
1356  antioch_error();
1357  }
1358  }
1359  break;
1360  case ReactionType::TROE_T1:
1361  {
1362  if(this->type() == ReactionType::TROE_FALLOFF)
1363  {
1364  (static_cast<FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T1(new_value);
1365  }
1366  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1367  {
1368  (static_cast<FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T1(new_value);
1369  }else
1370  {
1371  antioch_error();
1372  }
1373  }
1374  break;
1375  case ReactionType::TROE_T2:
1376  {
1377  if(this->type() == ReactionType::TROE_FALLOFF)
1378  {
1379  (static_cast<FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T2(new_value);
1380  }
1381  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1382  {
1383  (static_cast<FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T2(new_value);
1384  }else
1385  {
1386  antioch_error();
1387  }
1388  }
1389  break;
1390  case ReactionType::TROE_T3:
1391  {
1392  if(this->type() == ReactionType::TROE_FALLOFF)
1393  {
1394  (static_cast<FalloffReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T3(new_value);
1395  }
1396  else if(this->type() == ReactionType::TROE_FALLOFF_THREE_BODY)
1397  {
1398  (static_cast<FalloffThreeBodyReaction<CoeffType,TroeFalloff<CoeffType> >*>(this))->F().set_T3(new_value);
1399  }else
1400  {
1401  antioch_error();
1402  }
1403  }
1404  break;
1405  default:
1406  {
1407  antioch_error();
1408  }
1409  break;
1410  }
1411  }
#define antioch_error()
ReactionType::ReactionType type() const
Type of reaction.
Definition: reaction.h:417
void set_efficiency(const std::string &, const unsigned int s, const CoeffType efficiency)
Definition: reaction.h:640
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_parameter_of_rate ( KineticsModel::Parameters  parameter,
CoeffType  new_value,
unsigned int  n_reaction = 0,
const std::string &  unit = "SI" 
)
inline

reset a parameter from the rate constant

Definition at line 1304 of file reaction.h.

References antioch_assert_less, and Antioch::reset_parameter_of_rate().

1305  {
1306  antioch_assert_less(n_kin,_forward_rate.size());
1307  reset_parameter_of_rate(*_forward_rate[n_kin], parameter, new_value, unit);
1308  }
void reset_parameter_of_rate(KineticsType< CoeffType, VectorCoeffType > &rate, KineticsModel::Parameters parameter, const CoeffType new_value, const std::string &unit="SI")
The rate constant models derived from the Arrhenius model have an activation energy which is stored a...
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType, typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_parameter_of_rate ( KineticsModel::Parameters  parameter,
CoeffType  new_value,
unsigned int  n_reaction,
int  l,
const std::string &  unit = "SI" 
)
inline

reset a parameter from the rate constant, vector parameters

Definition at line 1312 of file reaction.h.

References antioch_assert_less, and Antioch::reset_parameter_of_rate().

1313  {
1314  antioch_assert_less(n_kin,_forward_rate.size());
1315  reset_parameter_of_rate(*_forward_rate[n_kin], parameter, new_value, l, unit);
1316  }
void reset_parameter_of_rate(KineticsType< CoeffType, VectorCoeffType > &rate, KineticsModel::Parameters parameter, const CoeffType new_value, const std::string &unit="SI")
The rate constant models derived from the Arrhenius model have an activation energy which is stored a...
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_reversibility ( const bool  reversible)
inline

Set the reversibility of reaction.

Definition at line 432 of file reaction.h.

Referenced by tester().

433  {
435  return;
436  }
bool reversible() const
Definition: reaction.h:462
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::set_type ( const ReactionType::ReactionType  type)
inline

Set the type of reaction.

reversible reactions are considered.

Definition at line 424 of file reaction.h.

425  {
426  _type = type;
427  return;
428  }
ReactionType::ReactionType _type
Definition: reaction.h:372
ReactionType::ReactionType type() const
Type of reaction.
Definition: reaction.h:417
template<typename CoeffType , typename VectorCoeffType >
void Antioch::Reaction< CoeffType, VectorCoeffType >::swap_forward_rates ( unsigned int  irate,
unsigned int  jrate 
)
inline

Swap two forward rates object.

Definition at line 484 of file reaction.h.

References antioch_assert_less.

Referenced by Antioch::read_reaction_set_data().

485  {
486  antioch_assert_less(irate,_forward_rate.size());
487  antioch_assert_less(jrate,_forward_rate.size());
488 
489  KineticsType<CoeffType>* rate_tmp = _forward_rate[jrate];
490  _forward_rate[jrate] = _forward_rate[irate];
491  _forward_rate[irate] = rate_tmp;
492 
493  return;
494  }
#define antioch_assert_less(expr1, expr2)
std::vector< KineticsType< CoeffType, VectorCoeffType > * > _forward_rate
The forward reaction rate modified Arrhenius form.
Definition: reaction.h:376
template<typename CoeffType , typename VectorCoeffType >
ReactionType::ReactionType Antioch::Reaction< CoeffType, VectorCoeffType >::type ( ) const
inline

Type of reaction.

reversible reactions are considered.

Definition at line 417 of file reaction.h.

Referenced by Antioch::read_reaction_set_data().

418  {
419  return _type;
420  }
ReactionType::ReactionType _type
Definition: reaction.h:372

Friends And Related Function Documentation

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::ostream& operator<< ( std::ostream &  os,
const Reaction< CoeffType, VectorCoeffType > &  rxn 
)
friend

Formatted print.

Definition at line 347 of file reaction.h.

348  {
349  rxn.print(os);
350  return os;
351  }

Member Data Documentation

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<CoeffType> Antioch::Reaction< CoeffType, VectorCoeffType >::_efficiencies
protected

efficiencies for three body reactions

Definition at line 379 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::string Antioch::Reaction< CoeffType, VectorCoeffType >::_equation
protected

Definition at line 357 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<KineticsType<CoeffType,VectorCoeffType>* > Antioch::Reaction< CoeffType, VectorCoeffType >::_forward_rate
protected

The forward reaction rate modified Arrhenius form.

Definition at line 376 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
int Antioch::Reaction< CoeffType, VectorCoeffType >::_gamma
protected

Definition at line 369 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::string Antioch::Reaction< CoeffType, VectorCoeffType >::_id
protected

Definition at line 356 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
bool Antioch::Reaction< CoeffType, VectorCoeffType >::_initialized
protected

Definition at line 370 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
KineticsModel::KineticsModel Antioch::Reaction< CoeffType, VectorCoeffType >::_kintype
protected

Definition at line 373 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
unsigned int Antioch::Reaction< CoeffType, VectorCoeffType >::_n_species
protected

Definition at line 355 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_product_ids
protected

Definition at line 361 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<std::string> Antioch::Reaction< CoeffType, VectorCoeffType >::_product_names
protected

Definition at line 359 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_product_stoichiometry
protected

Definition at line 363 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_reactant_ids
protected

Definition at line 360 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<std::string> Antioch::Reaction< CoeffType, VectorCoeffType >::_reactant_names
protected

Definition at line 358 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_reactant_stoichiometry
protected

Definition at line 362 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
bool Antioch::Reaction< CoeffType, VectorCoeffType >::_reversible
protected

Definition at line 371 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<int> Antioch::Reaction< CoeffType, VectorCoeffType >::_species_delta_stoichiometry
protected

Definition at line 368 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<CoeffType> Antioch::Reaction< CoeffType, VectorCoeffType >::_species_product_partial_order
protected

Definition at line 367 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_species_product_stoichiometry
protected

Definition at line 365 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<CoeffType> Antioch::Reaction< CoeffType, VectorCoeffType >::_species_reactant_partial_order
protected

Definition at line 366 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
std::vector<unsigned int> Antioch::Reaction< CoeffType, VectorCoeffType >::_species_reactant_stoichiometry
protected

Definition at line 364 of file reaction.h.

template<typename CoeffType = double, typename VectorCoeffType = std::vector<CoeffType>>
ReactionType::ReactionType Antioch::Reaction< CoeffType, VectorCoeffType >::_type
protected

Definition at line 372 of file reaction.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