Adiabatic, constant-volume reactor at density rho with state y = (Y_1 .. Y_Ns, T): dY_k/dt = W_k omega_k / rho, dT/dt = -sum_k u_k omega_k / (rho cv), with u_k the molar internal energies. The ODE system of integrate().
More...
|
| KOKKOS_INLINE_FUNCTION uint32_t | size () const |
| |
| KOKKOS_INLINE_FUNCTION double | atol (const uint32_t i) const |
| |
| template<typename Lanes > |
| KOKKOS_INLINE_FUNCTION bool | admissible (const Lanes &lanes, const double *y) const |
| |
| template<typename Lanes > |
| KOKKOS_INLINE_FUNCTION void | rhs (const Lanes &lanes, const double *y, double *f) const |
| |
| template<typename Lanes > |
| KOKKOS_INLINE_FUNCTION void | rhs_jacobian (const Lanes &lanes, const double *y, double *f, double *J) const |
| |
| template<typename Lanes > |
| KOKKOS_INLINE_FUNCTION double | forcing_temperature_derivative (const Lanes &lanes, const double *cp_R) const |
| | d(sum_k e_k g_k) / dT = sum_k cv_k g_k.
|
| |
| template<typename Lanes , typename Powers > |
| KOKKOS_INLINE_FUNCTION void | compact_jacobian (const Lanes &lanes, const double *y, double *J, const double T, const Powers &p, const double cv, const double inv_rho_cv, const double dT_dt, const double *h_RT, const double *cp_R, const double *omega, const double *domega_dT, const ReactionDerivatives &d) const |
| | f(y) and, if J is not null, the Jacobian df/dy (in the lanes' layout, see dense_index), from d omega / dC and d q / dT by the chain rule (C_k = rho Y_k / W_k).
|
| |
| template<typename Lanes > |
| KOKKOS_INLINE_FUNCTION void | evaluate (const Lanes &lanes, const double *y, double *f, double *J) const |
| |
template<
typename MemorySpace = Kokkos::DefaultExecutionSpace::memory_space>
struct chemistry::ConstantVolumeReactor< MemorySpace >
Adiabatic, constant-volume reactor at density rho with state y = (Y_1 .. Y_Ns, T): dY_k/dt = W_k omega_k / rho, dT/dt = -sum_k u_k omega_k / (rho cv), with u_k the molar internal energies. The ODE system of integrate().
With a forcing g (n_species + 1 values), the reactor also receives the constant sources rho g_k of its partial densities and rho g_e of its internal energy per volume, rho being the initial density: y_k = rho_k / rho then sums to the current density over rho, and dy_k/dt = W_k omega_k / rho + g_k, dT/dt = (g_e - sum_k e_k g_k - sum_k u_k omega_k / rho) / sum_k y_k cv_k, still autonomous, with the species rows of the Jacobian unchanged. Over a call of length forcing_time, the exact solution can fall below zero by forcing_time max(0, -g_k) at most where the forcing removes a species faster than chemistry restores it, so that much is admissible.