27 #ifndef ANTIOCH_DUPLICATE_REACTION_H
28 #define ANTIOCH_DUPLICATE_REACTION_H
63 template <
typename CoeffType=
double>
77 template <
typename StateType,
typename VectorStateType>
82 template <
typename StateType,
typename VectorStateType>
87 VectorStateType& dkfwd_dX)
const;
94 template <
typename CoeffType>
97 const std::string &equation,
98 const bool &reversible,
103 template <
typename CoeffType>
112 template <
typename CoeffType>
113 template<
typename StateType,
typename VectorStateType>
116 (
const VectorStateType& ,
119 StateType kfwd = (*this->_forward_rate[0])(conditions);
120 for(
unsigned int ir = 1; ir < this->_forward_rate.size(); ir++)
122 kfwd += (*this->_forward_rate[ir])(conditions);
128 template <
typename CoeffType>
129 template<
typename StateType,
typename VectorStateType>
132 (
const VectorStateType& ,
136 VectorStateType& dkfwd_dX)
const
142 this->_forward_rate[0]->compute_rate_and_derivative(conditions,kfwd,dkfwd_dT);
144 for(
unsigned int ir = 1; ir < Reaction<CoeffType>::_forward_rate.size(); ir++)
146 this->_forward_rate[ir]->compute_rate_and_derivative(conditions,kfwd_tmp,dkfwd_dT_tmp);
148 dkfwd_dT += dkfwd_dT_tmp;
160 #endif // ANTIOCH_ELEMENTARY_REACTION_H
A single reaction mechanism.
const std::string & equation() const
#define antioch_assert_equal_to(expr1, expr2)
unsigned int n_species() const
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
DuplicateReaction(const unsigned int n_species, const std::string &equation, const bool &reversible=true, const KineticsModel::KineticsModel kin=KineticsModel::KOOIJ)
Construct a single reaction mechanism.
A single reaction mechanism.
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
The parameters are reduced parameters.
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > zero_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex)
const StateType & T() const
StateType compute_forward_rate_coefficient(const VectorStateType &molar_densities, const KineticsConditions< StateType, VectorStateType > &conditions) const
This class contains the conditions of the chemistry.