22
33#include " common/macros.hpp"
44
5+ /* * @file KineticReactions.hpp
6+ * @brief Header file for the KineticReactions class.
7+ * @author HPC-REACT Team
8+ * @date 2023
9+ */
10+
511namespace hpcReact
612{
713namespace bulkGeneric
@@ -21,6 +27,9 @@ class KineticReactions
2127 using IntType = INT_TYPE;
2228 using IndexType = INDEX_TYPE;
2329
30+ /* *
31+ * @copydoc KineticReactions::computeReactionRates_impl()
32+ */
2433 template < typename PARAMS_DATA,
2534 typename ARRAY_1D_TO_CONST,
2635 typename ARRAY_1D,
@@ -107,6 +116,36 @@ class KineticReactions
107116
108117
109118private:
119+
120+ /* *
121+ * @brief Compute the reaction rates for a given set of species concentrations.
122+ * @tparam PARAMS_DATA The type of the parameters data.
123+ * @tparam CALCULATE_DERIVATIVES Whether to calculate the derivatives of the reaction rates with respect to the species concentrations.
124+ * @tparam ARRAY_1D_TO_CONST The type of the array of species concentrations.
125+ * @tparam ARRAY_1D The type of the array of reaction rates.
126+ * @tparam ARRAY_2D The type of the array of reaction rates derivatives.
127+ * @param temperature The temperature of the system.
128+ * @param params The parameters data.
129+ * @param speciesConcentration The array of species concentrations.
130+ * @param reactionRates The array of reaction rates.
131+ * @param reactionRatesDerivatives The array of reaction rates derivatives.
132+ * @details
133+ * This function computes the reaction rates for a given set of reactions.
134+ * If CALCULATE_DERIVATIVES is true, it also computes the derivatives of the reaction rates with respect to the species concentrations.
135+ *
136+ * The expression for the reaction rate ( \f$ \dot{R}_r \f$ ) for reaction \f$ r \f$ is given by:
137+ * \f[
138+ \dot{R}_r = k^f_{r} \prod_{ \mathclap{ \substack{ i = 1,...,N_s \\ \nu_{ri} < 0 } } } [C_i]^{-\nu_{ri}}
139+ - k^r_{r} \prod_{ \mathclap{ \substack{ i = 1,...,N_s \\ \nu_{ri} > 0 } } } [C_i]^{\nu_{ri}}
140+ * \f]
141+ *
142+ * The expression for the derivative of the reaction rate ( \f$ \frac{d\dot{R}_r}{dC_i} \f$ ) for reaction \f$ r \f$ is given by:
143+ * \f[
144+ * \frac{\partial \dot{R}_r}{ \partial [C]_i } =
145+ * k^f_{r} \left( -\nu_{ri} [C_i]^{-\nu_{ri}-1 } \prod_{ \mathclap{ \substack{ j = 1,...,N_s \\ \nu_{rj} < 0, j \ne i } } } [C_j]^{-\nu_{rj}} \right )
146+ * - k^r_{r} \left( \nu_{ri} [C_i]^{ \nu_{ri}-1 } \prod_{ \mathclap{ \substack{ j = 1,...,N_s \\ \nu_{rj} > 0, j \ne i } } } [C_j]^{\nu_{rj}} \right )
147+ * \f]
148+ */
110149 template < typename PARAMS_DATA,
111150 bool CALCULATE_DERIVATIVES,
112151 typename ARRAY_1D_TO_CONST,
0 commit comments