Problem
sbeg is fed verbatim as the radial coordinate to whichever magfie is
active during init_starting_surf, so its physical meaning depends on the
sampling path:
- VMEC equilibrium runs (any field type) sample via VMEC
magfie, whose
x(1) = s (normalized toroidal flux): sbeg = s.
- Boozer runs sample via
magfie_boozer, x(1) = s: sbeg = s.
- The scaled REFCOORDS path samples at
x(1) = rho (scaled_to_ref_coords:
chartmap reference u_ref = x_scaled; VMEC reference u_ref = x_scaled**2,
so the integration coordinate is sqrt(s)): sbeg = rho = sqrt(s).
So sbeg = 0.5 starts at s = 0.5 on the Boozer/VMEC path but at
s = 0.25 on the scaled REFCOORDS path. Comparing a VMEC run on one path
against a chartmap run on the other starts particles on different physical
surfaces. export_boozer_chartmap_tool also writes start points as
rho = sqrt(s), so a start.dat carries the reference convention of the
run that produced it.
Geometric/UNKNOWN (map2disc) references have no toroidal flux, so s is
undefined there.
Proposal
Anchor sbeg to normalized toroidal flux s wherever a toroidal flux is
defined: convert s to the active sampling coordinate (identity for
Boozer/VMEC, sqrt for the scaled REFCOORDS path) at the points that seed
start positions (init_starting_surf, sample_grid, volume-sampler
bounds). For geometric/UNKNOWN references keep sbeg as the reference
radial coordinate and state that at startup. Add a characterization test
asserting sbeg = s_target starts on the same physical surface for VMEC
and a rho_tor chartmap of the same equilibrium. Expect golden-record
movement on the REFCOORDS/RK45 path; regenerate with justification.
Problem
sbegis fed verbatim as the radial coordinate to whichevermagfieisactive during
init_starting_surf, so its physical meaning depends on thesampling path:
magfie, whosex(1) = s(normalized toroidal flux):sbeg = s.magfie_boozer,x(1) = s:sbeg = s.x(1) = rho(scaled_to_ref_coords:chartmap reference
u_ref = x_scaled; VMEC referenceu_ref = x_scaled**2,so the integration coordinate is
sqrt(s)):sbeg = rho = sqrt(s).So
sbeg = 0.5starts ats = 0.5on the Boozer/VMEC path but ats = 0.25on the scaled REFCOORDS path. Comparing a VMEC run on one pathagainst a chartmap run on the other starts particles on different physical
surfaces.
export_boozer_chartmap_toolalso writes start points asrho = sqrt(s), so astart.datcarries the reference convention of therun that produced it.
Geometric/
UNKNOWN(map2disc) references have no toroidal flux, sosisundefined there.
Proposal
Anchor
sbegto normalized toroidal fluxswherever a toroidal flux isdefined: convert
sto the active sampling coordinate (identity forBoozer/VMEC,
sqrtfor the scaled REFCOORDS path) at the points that seedstart positions (
init_starting_surf,sample_grid, volume-samplerbounds). For geometric/
UNKNOWNreferences keepsbegas the referenceradial coordinate and state that at startup. Add a characterization test
asserting
sbeg = s_targetstarts on the same physical surface for VMECand a rho_tor chartmap of the same equilibrium. Expect golden-record
movement on the REFCOORDS/RK45 path; regenerate with justification.