Skip to content

Check coordinate independence of all resonant coupling matrices #237

Closed

Description

@logan-nc

Right now GPEC calculates 5 resonant coupling matrices:

│   ├── C_resonant_flux      # [n_rational × numpert_total] coupling matrix
│   ├── C_resonant_current
│   ├── C_island_width_sq
│   ├── C_penetrated_field
│   ├── C_delta_prime

As per #233 all should use coordinate independent conventions. On the RHS of A = C . x it is clear x needs to be the half-area weighted field. All should use the definition of half-area decomposed field divided by sqrt(A_control_surface) so the units are Tesla. On the LHS of the standard coupling matrix, [Park 2008] made it clear the right quantity to use is the flux (not the field), but there is an Area normalization here to make that have units of Tesla as well. It should be clearly documented and annotated which Area is used (local singular surface areas for each mode or a common control surface area for the full vector).

For the others, each should also be explicitly confirmed to be coordinate independent. They should be (as long as psi is always normalized poloidal flux), but I'd like to see plotted proof. In particular, I would like someone to double check if C_penetrated_field has field or flux on the LHS.

Activity

  1. added this to the GPEC v2.0.0 milestone on Jun 17, 2026
  2. logan-nc commented on Oct 22, 2026

    @logan-nc
    CollaboratorAuthor

    Findings from the coordinate scan (DIII-D-like n = 1 deck, C-coil forcing, Hamada / PEST / Boozer / equal-arc). Fix and figures are in #555.

    • The coupling matrices are coordinate-independent. At singfac_min = 1e-6, Hamada, PEST and Boozer agree on |bʳ| to within 0.5% on 4 of the 5 rational surfaces (1.4% for PEST at ψ = 0.993), and on the singular values of C̃ to within 0.7%.
    • The 8–20% scatter was singfac_min = 1e-4. It left the outer surfaces unconverged (q = 4 off by 12–20%). All four outputs (resonant field, current, island width², Δ′) moved by the same ratio, so the matrix definitions are fine. PerturbedEquilibrium - BUGFIX! - Converge the singular coupling with singfac_min = 1e-6 in the forward-integrator decks #555 sets 1e-6 in the forward-integrator decks only, because the Riccati Δ′ picks up a spurious imaginary part at smaller offsets.
    • Ruled out: equilibrium mtheta, ODE tolerance, coil forcing and the plasma response.
    • Equal-arc needs many more poloidal harmonics; compare it only at matched resolution.

    @matt-pharr: C_penetrated_area_weighted_field could not be checked. Runs that match inner-layer solutions skip the singular coupling, so no deck writes it. Its rows are a field in T by construction, now documented in compute_singular_coupling_metrics!. We're leaving that gap for now.

  3. matt-pharr commented on Oct 22, 2026

    @matt-pharr
    Collaborator

    Yes, sounds good @logan-nc. One thing to keep in mind is that the GGJ model is derived only in hamada coordinates, so there might be a subtlety there once we have RPEC working in julia. I will make sure to investigate that.

  4. logan-nc commented on Oct 27, 2026

    @logan-nc
    CollaboratorAuthor

    Status: the scan posted above showed the five matrices coordinate-independent once singfac_min converges, and #555 carries that fix with the figures; it is approved and waiting to merge. The one unchecked matrix, C_penetrated_area_weighted_field, is written by no deck because runs that match inner-layer solutions skip the singular coupling, so it cannot be scanned until a deck exercises it. Suggest closing on #555's merge and tracking the penetrated-field check with whatever PR first writes that dataset.

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions