Skip to content

Add adaptive native split orbit and collision tracing - #189

Open
eduardolneto wants to merge 16 commits into
mainfrom
feat/native_split_collisions
Open

eduardolneto wants to merge 16 commits into
mainfrom
feat/native_split_collisions

Conversation

@eduardolneto

Copy link
Copy Markdown
Contributor

PR summary:

Adds forward GC and Lorentz tracing with separately controlled native orbit and collision intervals. The moment predictor controls coupled errors while retaining the existing collision maps and Brownian increments through rejected trials.

  • Adds specialized GPU execution and GC spatial diffusion for Cartesian, VMEC and Boozer coordinates.
  • Supports background profiles and an optional impact-parameter Coulomb logarithm.
  • Consolidates the implementation into essos/split.py, without restructuring public field classes.
  • Adds reproducible thermalization, first-passage, spatial-diffusion, mirror/helix, convergence, timing and memory benchmarks.
  • Retains README PNGs and reproduction scripts; excludes generated reports and temporary artifacts.

@rogeriojorge
rogeriojorge force-pushed the feat/native_split_collisions branch from afefacf to 9f796f6 Compare October 31, 2026 10:48
…enter collision step

The Ito speed drift contains 2 D_par/v, which diverges as v -> 0. Explicit
Euler overshoots it whenever v^2 < 2 D_par h, throwing slow ions to
nonthermal speeds (up to ~100 kT for a 1 keV bath). Applying it as
v -> sqrt(v1^2 + 4 D_par h) keeps the drift to O(h) and v > 0. The Spitzer
test now runs to 6 tau_s and checks relaxation to 3T/2.

@rogeriojorge rogeriojorge left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidate benchmark scripts, remove results/* folder, reduce number of readme figures and compress them, and make additions to readme more concise, deliberate and sober.

@rogeriojorge

Copy link
Copy Markdown
Member

Eduardo, status on the split solver.

Fix already on this branch: below about 2 keV, a proton in an electron bath could jump to an unphysical energy in one step, because the explicit 2 D_par / v drift overshoots when v^2 < 2 D_par h. The speed update is now v = sqrt(v1^2 + 4 D_par h). With it the mean energy follows Spitzer slowing-down within a few percent.

#197 (into this branch) trims the PR without changing the default path:

  • removes the committed results file, 5 figures and 10 reference/validation benchmark scripts (+119 / -2425 on top of the earlier trim)
  • adds one example, native_split_slowing_down.py
  • adds tests: Spitzer slowing down at 10 keV and 500 eV, Ito vs Stratonovich on the same Wiener paths (1e-5), an absent bath, and a particle lost mid-step

Merging: #191 contains this branch through a merge. If this PR is squash-merged, #191 will conflict in split.py, the split tests and the README. Merging with a merge commit (or retargeting #191 to this branch) avoids it.

Please have a look at #197 and merge it into this branch if you agree.

@rogeriojorge

Copy link
Copy Markdown
Member

Main moved and this PR now conflicts in essos/dynamics.py. I did not push to your branch. #251 merges main into feat/native_split_collisions and targets it.

The conflict is the same as on #187: main's _masked exterior term and finite placeholder for non-finite segment starts, combined with your _terms/_solve structure. In essos/rk.py, _vmec_radial now uses the same parabola past the last grid point as main's VMEC interpolation.

Tests under JAX_ENABLE_X64=1: test_native_orbit.py, test_native_split.py and test_dynamics.py, 154 passed. Merging #251 clears the conflict here.

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.

2 participants