Skip to content

Fix RK near-axis pseudo-Cartesian coordinates#402

Merged
krystophny merged 1 commit into
mainfrom
fix/rk-axis-pseudocartesian
Jun 19, 2026
Merged

Fix RK near-axis pseudo-Cartesian coordinates#402
krystophny merged 1 commit into
mainfrom
fix/rk-axis-pseudocartesian

Conversation

@krystophny

Copy link
Copy Markdown
Member

Summary

Fix the RK near-axis pseudo-Cartesian transform used by orbit_timestep_axis.

The old path entered the near-axis chart as (s cos theta, s sin theta) but treated it as (sqrt(s) cos theta, sqrt(s) sin theta) when evaluating velocity and returning to flux coordinates. That made the axis an artificial sink for some mirror-trapped particles.

This PR makes the chart consistent:

  • enter with (sqrt(s) cos theta, sqrt(s) sin theta)
  • recover s = x^2 + y^2
  • use the matching 0.5 chain-rule factor in velo_axis
  • keep the floor only for field evaluation, not as the physical radial mapping

This is the RK-only extraction from PR #401. The symplectic near-axis experiment stays stacked there.

Verification

fo check

{"ok":true,"stage":"done","target":"","summary":"build and tests passed","hint":"","rerun":"","log_path":"","elapsed_s":2.401,"modules":469,"cached":0,"changed":469}

@krystophny krystophny enabled auto-merge (squash) June 19, 2026 11:41
@krystophny krystophny merged commit 5078353 into main Jun 19, 2026
7 checks passed
@krystophny krystophny deleted the fix/rk-axis-pseudocartesian branch June 19, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant