Skip to content

Preserve projected radius in direct flux coordinates - #2

Closed
krystophny wants to merge 1 commit into
mainfrom
equilibrium/projected-fieldline-radius
Closed

krystophny wants to merge 1 commit into
mainfrom
equilibrium/projected-fieldline-radius

Conversation

@krystophny

Copy link
Copy Markdown
Owner

direct_fl_int projects each field-line point back onto its target flux surface, but previously stored the uncorrected ODE radius in y_out. The resulting rzphi chart disagreed with the corrected coordinates used for field evaluation. Store the projected radius in the chart while preserving the ODE state and integration tolerances.

Validation:

  • The focused regression runs the existing circular EQDSK through read_eq_efit and checks the delivered chart against the input flux function. Its maximum normalized flux residual is 2.45438e-5 before the fix and 2.90926e-6 after it (threshold 1e-5).
  • With the same TC24 EQDSK, mpsi=512, mtheta=1024 and etol=1e-8, reconstructed Bpol error against the input field falls from 3.43968e-4 to 1.88200e-5 in L2, and from 3.59914e-3 to 4.25633e-4 in maximum norm. Toroidal flux is unchanged; q and the consumer's |B| remain stable. The remaining field error still exceeds the benchmark targets and is tracked separately.
  • Native reader build and focused regression pass; independent review found no scope or test issue. git diff --check passes.

Chris&AI

@krystophny

krystophny commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner Author

The complete projected-radius correction is integrated into the canonical GPEC production fork through PR6, squash 91808b3. It also projects the current upstream common-angle samples and passes the existing delivered-chart oracle at its unchanged tolerance. The maintained upstream report355 and this original source branch remain retained.

Chris&AI

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