Skip to content

PerturbedEquilibrium - FEATURE - Complete the resistive perturbed-equilibrium workflow from Galerkin and matched results #635

Open

Description

@logan-nc

The resistive, coil-driven perturbed equilibrium cannot run end to end yet. That run is Galerkin Δ′ with the edge-source (rpec) columns, then inner-layer matching, then PerturbedEquilibrium. It is the last link of Fortran GPEC's RDCON → RMATCH → GPEC chain (PrincetonUniversity/GPEC#210).

Why it stops: the plasma response is built from the free-boundary δW, through the edge response wp. Galerkin and inner-layer-matched results do not publish wp, so #556 made PerturbedEquilibrium refuse them with an error instead of silently returning only the forcing.

Two ways to close it:

  1. Publish wp from closed Galerkin and matched results. The existing energy route then works unchanged, and PerturbedEquilibrium - BUGFIX! - Refuse Galerkin and matched results until they publish wp #556's refusal lifts on its own (it checks free_boundary).
  2. Port Fortran's other inductance route (resp_index = 1).
    • Fortran builds the plasma inductance from the flux response and a surface-current response, L = Φ·K⁻¹ (gpec/gpresp.f, plas_indmats(j) from kapmats(j) and flxmats).
    • For Galerkin and RDCON results Fortran computes only j = 1 and forces resp_index = 1 (gpec/rdcon.f: "since we don't have energies").
    • resp_index = 0, the energy identity, is what Julia uses today.

What is already ready:

  • examples/DIIID-like_gal_resistive_pe_example keeps its coil forcing and [PerturbedEquilibrium] section for this.
  • The harness case gal_resistive_pe tracks the eight PerturbedEquilibrium/SingularCoupling/ quantities. They read N/A until this lands; until then its remove_sections stops the run before PE, so it duplicates gal_resistive_diiid.
  • Done when: the remove_sections line is dropped and the eight quantities are tracked.
  • Tearing - TEST - Check the resistive singular-coupling chain against Fortran RMATCH #633, the check against Fortran RMATCH, needs this for its last step.

Timing: v2.1 might be a good fit, but @matt-pharr, please set the milestone that works for you.

Activity

  1. added this to the GPEC v2.1.0 milestone on Nov 2, 2026
  2. logan-nc commented on Nov 2, 2026

    @logan-nc
    CollaboratorAuthor

    The example and harness case for this feature were removed from v2.0 in #636, commit 31d63eb, because a Galerkin or matched result cannot drive [PerturbedEquilibrium] yet. As shipped, the deck stopped at that stage, and its harness case stripped [ForcingTerms] and [PerturbedEquilibrium], so it tracked only N/A.

    Restore both from 332d400 as this issue's acceptance test:

    git checkout 332d4001b -- examples/DIIID-like_gal_resistive_pe_example regression-harness/cases/gal_resistive_pe.toml

    This issue is done when:

    • the example deck runs end to end;
    • the harness case runs without remove_sections, and its singular-coupling quantities (island half-widths, Chirikov overlap, resonant and penetrated fields, Δ′) are no longer N/A;
    • the example's row is added back to the examples table in docs/src/workflow.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureNew capability

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions