hermes-3 icon indicating copy to clipboard operation
hermes-3 copied to clipboard

Refactor H isotope charge exchange to use the new reactions framework.

Open oparry-ukaea opened this issue 3 months ago • 0 comments

Some implementation details:

  • Reorganises RateHelper to cope with (Amjuel) fits that are a function of (T), (E,T) and (n,T).
  • RateHelper is templated on the param types, but Reaction decides which to use at runtime. This allows subclasses to (for instance) read the type from a json file.
  • Momentum and energy 'channels' are introduced to allow developers to override the default splitting of momentum and energy between reactant products. H isotope CX sets channels such that all of the incoming ion [energy/momentum] is transferred to the outgoing neutral and vice-versa.
  • ReactionParser is modified to cope with momentum and energy transfer in symmetric reactions (e.g. h + h+ -> h+ + h)
  • tests/integrated/1D-recycling/runtest has been modified to significantly tighten up the tolerances as far as possible and regression data is now stored separately depending on the compiler optimisation level (which is extracted from the run output).

ToDo:

  • [x] Check that diagnostics values haven't changed for 1D-recyling.
  • [x] Move calculation of collision frequencies into RateHelper and Reaction::transform.
  • [ ] Generalise more of HydrogenChargeExchange::transform_additional (hopefully remove completely).
  • [ ] Regression test for non-symmetric CX (not covered by 1D-recycling)

oparry-ukaea avatar Sep 19 '25 13:09 oparry-ukaea