Skip to content

PerturbedEquilibrium - FEATURE - Emit the Lagrangian field-strength perturbation in the Boozer and Hamada field-line gauges #560

Open

Description

@krystophny

#543 writes the perturbation that drives neoclassical transport in the perpendicular-displacement gauge (dBoB_lagrangian, div_xi_perp). NEO-2, NEO-RT and other Boozer- or Hamada-based consumers need the Lagrangian field-strength perturbation in their own field-line gauge instead. Changing the gauge adds a displacement w along the field line, which is found from the magnetic differential equation

D w = -(div xi_X + a * delta B_X / B),   a = 2 (Boozer), a = 0 (Hamada),

where angles are in turns and delta B_target = delta B_X + w * partial_theta B. Nonzero resonant sources must fail explicitly rather than being regularized silently.

The Fortran implementation, with its derivation and FortSym-generated kernels, is in GPEC#344 (docs/pmodb_target_gauge.rst, gen/pmodb_gauge/). That PR will not be merged in Fortran, because new features now go to the Julia code. Its tests should be carried over: cancellation of a parallel displacement, zero source, and resonant source rejection. A Hamada-to-Boozer cross-check is also available against an independent kernel.

Proposed scope: after #543 lands, add the gauge solve and dBoB_lagrangian_boozer / _hamada outputs, either to the on-demand helper of #429 or as new HDF5 datasets, whichever the #429 decision prefers. The gauge contracts are documented in #540.

Chris&AI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions