File cx_reaction.hxx#

Defines

CX_REACTION_H#
namespace hermes
struct CXReaction : public hermes::Reaction#
#include <cx_reaction.hxx>

Reaction subclass that handles charge exchange reactions.

See CXReaction::transform_additional for the CX-specific sources.

Public Functions

CXReaction(std::string name, Options &alloptions)#

Main constructor for CXReaction.

Adds appropriate permissions and diagnostics, checks that reaction string is a valid CX reaction.

Parameters:
  • name

  • alloptions – The options object

CXReaction(std::string name, Options &alloptions, Solver*)#

CXReaction constructor used by component factory.

Parameters:
  • name

  • alloptions – The options object

  • solver – The solver object for the simulation (discarded by this class)

void set_species_and_validate()#

Characterise the roles of the species involved in this reaction and check that the species are valid for CX. Intended to be term-order-independent.

Use the reaction parser to categorise reactants and products. See r1, r2, p1 and p2 docstrings for details.

void transform_additional(GuardedOptions &state, const RateData &rate_data) final#

Perform additional transform tasks specific to CX reactions.

Parameters:
  • state – The current simulation state to be modified

  • rate_data – The rate calculation results from parent class

Private Members

bool has_neutral_reactant#

True if one reactant has zero charge, false otherwise.

bool no_neutral_cx_mom_gain#

Make neutral-ion CX behave as in diffusive neutrals.

std::string r1#

Reactant in the lower charge state (e.g. ‘h’ in ‘ne+3 + h -> ne+2 + h+’ or ‘d’ in ‘d + t+ -> d+ + t’)

std::string r2#

Reactant in the higher charge state (e.g. ‘ne+3’ in ‘ne+3 + h -> ne+2 + h+’ or ‘t+’ in ‘d + t+ -> d+ + t’)

std::string p1#

Product formed by r1 losing an electron (e.g. ‘h+’ in ‘ne+3 + h -> ne+2 + h+’ or ‘d+’ in ‘d + t+ -> d+ + t’)

std::string p2#

Product formed by r2 gaining an electron (e.g. ‘ne+2’ in ‘ne+3 + h -> ne+2 + h+’ or ‘t’ in ‘d + t+ -> d+ + t’)