Skip to content

Add explicit-energy monoenergetic Lorentz collisions - #522

Open
krystophny wants to merge 3 commits into
mainfrom
feat/monoenergetic-lorentz
Open

Add explicit-energy monoenergetic Lorentz collisions#522
krystophny wants to merge 3 commits into
mainfrom
feat/monoenergetic-lorentz

Conversation

@krystophny

@krystophny krystophny commented Sep 1, 2026

Copy link
Copy Markdown
Member

Risk tier

  • T3: physics, output behavior, coordinate convention

Correctness contract

This adds explicit particle energy and an opt-in pitch-only lorentz_nustar model for monoenergetic transport benchmarks. It records the normalization in NetCDF and assigns each particle a reproducible, distinct deterministic collision seed state. The same particle ID replays the same stream in paired field runs; different particles no longer repeat one common stream.

Legacy facE_al input and the full pitch-plus-energy collision operator remain the defaults. Existing orbit-history and loss schemas are reused.

particle_energy_eV is eV, lorentz_major_radius_cm is cm, and nu_star_standard = R0*nu/(abs(iota)*v0). Signed iota is retained in metadata. The Lorentz mode keeps absolute momentum/energy fixed and obeys P_l(t)=P_l(0) exp[-nu*l*(l+1)*t/2].

Tests and source

The seeded oracle gives P1 numerical 0.337608 versus exact 0.335160, P2 numerical -0.034062 versus exact -0.037649, with momentum unchanged exactly. Focused profiles, collision, NetCDF and campaign tests pass. The branch initially changed the legacy untagged deterministic seed and made test_spectre_crossing_l1 fail reproducibly; c708294 restores that exact legacy state while retaining tagged particle streams, and the formerly failing test now passes locally in 69.77 s. A full local check builds all targets and passes that regression; its only failure is the separately pre-existing test_spectre_validation mu-scatter threshold.

Data/campaign and corrected parity runs: https://gitlab.tugraz.at/plasma/proj/ntv/bench_aug30835/-/merge_requests/8

@krystophny krystophny added tier/T3 physics or output behavior size/L review size up to 1000 changed lines labels Sep 1, 2026
@krystophny
krystophny requested a review from 01stamat September 1, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L review size up to 1000 changed lines tier/T3 physics or output behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant