Repository navigation
GPEC - NEW FEATURE - Emit optional perturbed Boozer and Hamada field strength - #344
Closed
krystophny wants to merge 5 commits into
Closed
krystophny wants to merge 5 commits into
krystophny wants to merge 5 commits into
Conversation
… b_lag_perp with pmodb
pmodb_flag now also writes b_lag_perp and b_lag_perp_fun to the profile
NetCDF output: the Lagrangian field strength of the perpendicular
displacement alone,
b_lag_perp = lagb + (xi_perp^zeta/q) d_theta B
= eulb + xi_perp.grad B,
the gauge-invariant input that NTV consumers in perturbed Boozer or Hamada
coordinates need. It is the quantity gpdiag_pmodb already prints as llagb;
lagb itself is the xi^zeta = 0 gauge and is unchanged. The ASCII
gpec_pmodb file keeps its format.
…nregularized output
This was referenced Oct 22, 2026
Collaborator
Author
|
Closing: new features now go to the Julia code (OpenFUSIONToolkit/GPEC), and Fortran GPEC receives bug fixes only. The Boozer/Hamada field-line gauge work continues in OpenFUSIONToolkit/GPEC#560, building on the perpendicular-gauge output of OpenFUSIONToolkit/GPEC#543. The derivation and generated kernels on this branch remain the reference for the port. Chris&AI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With pmodb_flag=t and reg_flag=f, add b_lag_perp to NetCDF. With pmodb_gauge_flag=t, additionally solve the field-line gauge equation and emit b_lag_boozer or b_lag_hamada, according to the matching working chart. The gauge and output harmonic coordinates are recorded separately. Existing ASCII columns retain their format.
The target equation is D w=-(div xi_X+a delta B_X/B), a=2 for Boozer and 0 for Hamada, with angles in turns and delta B_target=delta B_X+w partial_theta B.
docs/pmodb_target_gauge.rstand native FortSym Q1-Q8 derive it. The real/complex leaves are proved and emitted bygen/pmodb_gauge/generate.py; ordinary builds require no CAS. Only unregularized solutions in a matching Boozer/Hamada working chart are accepted. Nonzero resonant sources fail explicitly; finite spectral/spline resolution remains.Validation: native Make build; generated code reproduces; the actual operator passes parallel-displacement cancellation, zero-source and resonant-source tests. Hamada-to-Boozer output agrees with the unchanged rmp_torque c3614334 kernel. An end-to-end Boozer run writes finite correctly tagged NetCDF output; exact labels are absent for regularized output. Native operator tests are wired into GNU CI. This is independent of the radial-derivative fix topic: its gauge source uses the derivative selected by gpeq_sol directly.
Chris&AI