You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Examples - BUGFIX - Re-tune the Solovev wall fixture and close out follow-ups from the surface-sampling review #544
Follow-ups from @d-burg's review of #398 (sample every flux surface at the same straight-fieldline (SFL) angles). He marked these as fine to leave for after the merge.
1. The Solovev fixture is now a ~1000:1 cancellation
After #398, Solovev_ideal_example gives et[1] = 0.0109 against ep = −10.42 and ev = +10.43. Any later change that moves ep by 1e-4 relative moves et[1] by ~10 %, so solovev_n1 and the Solovev kinetic cases will amplify every future change.
Re-tune [Wall] standoff_fraction (currently 0.2415) so et[1] sits clearly away from marginal, then re-pin the Solovev harness baselines.
2. Is the ~2500× NTV torque move in solovev_kinetic_ntv resonant amplification?
Hypothesis from the review: sitting this close to marginal amplifies the plasma response by roughly (0.677 / 0.0107)² ≈ 4000. Comparing the response amplitude between develop and #398 at the same applied field would settle it. Re-tuning the wall (item 1) should shrink the effect.
3. Put the dense-output samples exactly on ψ = ψ₀
direct_fieldline_int's refinement callback saves pre-refinement states (save_positions=(true, false)). The dense interpolant is therefore offset by one step's refinement, and the SFL samples sit slightly off the surface, at tolerance level. Calling direct_refine on each sample would put them on the surface exactly. Not blocking: measured on Solovev, traced points lie within 1.4e-5 in ψ of the exact surfaces, which is the floor set by the ψ(R, Z) spline.
Re item 3 (put the SFL samples exactly on ψ=ψ₀): PrincetonUniversity/GPEC#355 proposed the same thing for the Fortran code — direct_refine on each common-angle sample before evaluating r² and the Jacobian, leaving the integrator state and θ(η), φ untouched. We closed it there (not a bug fix; O(etol) effect; v1.6 release day) and are treating this issue as the home for it.
Two points from that review worth carrying over: (a) the case for doing it is high mpsi — per-surface radial drift is uncorrelated between surfaces, so ∂(r²)/∂ψ from the spline amplifies it by ~1/Δψ and the metric derivatives get noisier as the radial grid is refined, not smoother; (b) the fork measurement behind #355 (krystophny/GPEC#2) claims a ~20× drop in reconstructed Bpol error at mpsi=512, etol=1e-8 on a TC24 g-file, which is more than the mechanism predicts and would be worth reproducing with the round-trip ψ residual as the metric. Note the current callback feeds the refined radius back into the integrator (refine_affect!), which Fortran never did, so the Julia and Fortran charts already differ at tolerance level here.
Activity
logan-nc commentedon Oct 24, 2026
Re item 3 (put the SFL samples exactly on ψ=ψ₀): PrincetonUniversity/GPEC#355 proposed the same thing for the Fortran code —
direct_refineon each common-angle sample before evaluating r² and the Jacobian, leaving the integrator state and θ(η), φ untouched. We closed it there (not a bug fix; O(etol) effect; v1.6 release day) and are treating this issue as the home for it.Two points from that review worth carrying over: (a) the case for doing it is high mpsi — per-surface radial drift is uncorrelated between surfaces, so ∂(r²)/∂ψ from the spline amplifies it by ~1/Δψ and the metric derivatives get noisier as the radial grid is refined, not smoother; (b) the fork measurement behind #355 (krystophny/GPEC#2) claims a ~20× drop in reconstructed Bpol error at mpsi=512, etol=1e-8 on a TC24 g-file, which is more than the mechanism predicts and would be worth reproducing with the round-trip ψ residual as the metric. Note the current callback feeds the refined radius back into the integrator (
refine_affect!), which Fortran never did, so the Julia and Fortran charts already differ at tolerance level here.