Skip to content

PerturbedEquilibrium - Decide the sign convention of the effective resonant field #688

Open

Description

@matt-pharr

Summary

The stored effective resonant field (resonant_area_weighted_field, its coupling matrix C_resonant_area_weighted_field, and the _asymptotic copies added in #666) carries the phase of the flux the shielding current itself produces, which is anti-phase with the applied resonant field. docs/src/conventions.md describes it as "the resonant flux the shielding current cancels", i.e. in phase with the applied field. Magnitudes, island widths, Chirikov parameters, singular values and |overlaps| are unaffected; only the phase of the stored complex values (and of the coupling-matrix rows) is π from what the docs describe.

This matters now because matched results (#666) also store the penetrated field penetrated_area_weighted_field, which is in phase with the applied field (plus the inner-layer lag). Compared directly, the two are ~180° apart, so islands drawn from the effective field put their O-points on the X-points of the penetrated islands.

Evidence

DIII-D-like Galerkin example (examples/DIIID-like_gal_resistive_example), n = 1 DIII-D C-coil forcing (1 kA cosine phasing). Phases relative to the coil-only (vacuum) resonant 𝒥b^ψ harmonic on each rational surface, computed with the forcing's own compute_coil_forcing_modes! at ψ_s; matched run with GGJ at η = 8e-8, 1 Hz:

q ideal b_eff (finite-width) ideal b_eff (asymptotic) matched b_eff (asymptotic) matched b_pen
2 178.7° 178.7° −179.5° 23.9°
3 176.7° 176.7° 176.5° 19.6°
4 176.3° 176.3° 175.8° 19.6°
5 122.0° 121.6° 121.7° −28.4°

On q = 2–4, b_eff is within ~4° of anti-phase with the vacuum field, while b_pen lags the vacuum field by ~20–24°, which matches the GGJ layer phase (arg Δ_in ≈ −24° at 1 Hz on every surface). q = 5 sits near the edge (ψ_N ≈ 0.97), where the plasma response modifies the applied field's phase. b_pen − b_eff is still ~150° there.

Islands from the same matched run (dashed: effective, drawn with the stored b_eff phase; filled: penetrated):

image

Where the sign comes from

coupling_rows in src/PerturbedEquilibrium/SingularCoupling.jl forms the resonant current as jump · (−j_c / (2π m)) and the flux as singflx = L_mm · I / (2π n), with L_mm the real, positive diagonal surface inductance. So the flux has the phase of the current. This is a term-for-term port of Fortran gpout_singcoup (singcurs = −delcurs/ifac, singflx_mn = MATMUL(fsurfindmats, fkaxmn)), so Fortran GPEC carries the same sign.

Options

  1. Keep the stored sign (Fortran parity). Document that the effective field is the shielding current's own flux, anti-phase with the applied field, and have plots that combine it with the penetrated field use −b_eff. This is what PerturbedEquilibrium - FEATURE! - Resistive matched perturbed equilibrium with GGJ and CCC models, asymptotic-based resonant metrics, and antihermitian resonant torque calculations #666 does.
  2. Flip the sign in coupling_rows so the stored effective field is the applied resonant flux the docs describe, directly comparable with penetrated_area_weighted_field. This changes the phase of a ubiquitous output (and departs from Fortran), so it needs group discussion and a release-note entry before anyone implements it.

Which convention should GPEC use, and should the resonant current's sign follow?

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