Summary
orbit_model = ORBIT_CP6D_RK (8), the adaptive Cash-Karp RK45 full-orbit
classical-particle integrator, is unsupported for production loss tracing and
now error stops in validate_orbit_model_config. Use ORBIT_CP6D_BORIS (7).
Problem
The adaptive step is an independent cross-check for the fixed-step Boris CP
integrator: same physics, same chartmap field, error-controlled substeps. On a
bounded plasma it scores confined particles as lost. Adaptive substeps overshoot
the LCFS, the chartmap cart_field evaluation faults outside s = 1, and the
macrostep aborts. Confined fractions come out far below Boris (W7-X high-mirror
reactor, 1000 alphas, 1 ms: CP-RK partial ~0.57 vs CP-Boris 0.894 vs ASCOT5
full orbit 0.898), and the run accumulates hundreds of near-edge field faults.
Cause
cp_rk_rhs calls the chartmap field evaluation at trial positions the adaptive
controller proposes. Near the edge those trials land past s = 1, where the
chartmap inversion has no root, so the evaluation faults instead of returning a
usable field. The integrator has no loss event, so it cannot stop a particle at
the boundary; it can only fault and drop the macrostep.
Resolution
Two pieces, both already noted as follow-up to the port:
- Graceful past-edge field: return the clamped-edge field for
s >= 1 instead
of faulting, so a trial step past the boundary is well defined.
odeint loss event (ode_event_t): stop integration when the particle
crosses s = 1, scoring a genuine loss at the crossing time rather than
relying on a field fault.
With both, re-enable ORBIT_CP6D_RK and add it as the independent-integrator
cross-check against CP-Boris in the benchmark matrix.
Summary
orbit_model = ORBIT_CP6D_RK(8), the adaptive Cash-Karp RK45 full-orbitclassical-particle integrator, is unsupported for production loss tracing and
now
error stops invalidate_orbit_model_config. UseORBIT_CP6D_BORIS(7).Problem
The adaptive step is an independent cross-check for the fixed-step Boris CP
integrator: same physics, same chartmap field, error-controlled substeps. On a
bounded plasma it scores confined particles as lost. Adaptive substeps overshoot
the LCFS, the chartmap
cart_fieldevaluation faults outsides = 1, and themacrostep aborts. Confined fractions come out far below Boris (W7-X high-mirror
reactor, 1000 alphas, 1 ms: CP-RK partial ~0.57 vs CP-Boris 0.894 vs ASCOT5
full orbit 0.898), and the run accumulates hundreds of near-edge field faults.
Cause
cp_rk_rhscalls the chartmap field evaluation at trial positions the adaptivecontroller proposes. Near the edge those trials land past
s = 1, where thechartmap inversion has no root, so the evaluation faults instead of returning a
usable field. The integrator has no loss event, so it cannot stop a particle at
the boundary; it can only fault and drop the macrostep.
Resolution
Two pieces, both already noted as follow-up to the port:
s >= 1insteadof faulting, so a trial step past the boundary is well defined.
odeintloss event (ode_event_t): stop integration when the particlecrosses
s = 1, scoring a genuine loss at the crossing time rather thanrelying on a field fault.
With both, re-enable
ORBIT_CP6D_RKand add it as the independent-integratorcross-check against CP-Boris in the benchmark matrix.