Inconsistent treatment of multiple totally trapped particles

Issue #235 new
David Dickinson created an issue

In parts of the GS2 algorithm we allow for the presence of multiple pitch angles which can correspond to totally trapped particles. This is particularly relevant for systems where bmag has >1 local minimum per 2 pi.

However, this possibility is not accounted for everywhere. For example, in invert_rhs_1 we set is_not_ttp simply based on if we are considering the last pitch angle on the grid and have trapped particles. This is then used to guard some actions. In the situation where the are multiple totally trapped pitch angles (e.g. when considering a local minimum in bmag greater than the global minimum) we may then need to take extra care.

The il_is_ttp method in le_grids also does not allow for multiple trapped pitch angles so care should be taken with this. We could generalise this to account for this. We would probably want to make an array the same shape as forbid and do something like

is_ttp(ig, il) = il >= ittp(ig) .and. .not. forbid(ig, il)

The proper treatment of totally trapped particles can make a big difference in simulation results.

Comments (1)

  1. Log in to comment