File rate_helper.hxx#

Defines

RATE_HELPER_H#

Typedefs

typedef std::function<BoutReal(BoutReal, BoutReal, BoutReal)> RateFunctionType#
template<typename LimiterType = hermes::Limiter, typename IdxType = Ind3D>
struct RateHelper#
#include <rate_helper.hxx>

Public Functions

inline RateHelper(const Options &state, const std::vector<std::string> &reactant_names, RateFunctionType rate_calc_func, const Region<IdxType> region)#

Construct a new RateHelper, extracting and storing some fields from the state for use later in the rate calculation.

Template Parameters:
  • LimiterType

  • RegionType

Parameters:
  • state

  • reactant_names – vector of reactant names

  • rate_calc_func – function with which to compute the rate from the mass action factor, n_e and T_e

  • region – the region in which to calculate the rate

inline Field3D calc_rate()#

Compute the cell-averaged reaction rate, accounting for the mass action factor (product of reactant densities)

Template Parameters:
  • LimiterType

  • IdxType

Returns:

Field3D the cell-averaged reaction rate

Private Functions

inline BoutReal mass_action(IdxType i)#
inline BoutReal mass_action_left(IdxType i, IdxType ym, IdxType yp)#
inline BoutReal mass_action_right(IdxType i, IdxType ym, IdxType yp)#

Private Members

const Region<IdxType> region#

region in which to calculate the rate

RateFunctionType rate_calc_func#

Function to calculate reaction rate as a function of n_e, T_e.

Field3D n_e#

Electron density and temperature.

Field3D T_e#
std::vector<Field3D> n_reactants#

Reactant densities.