You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Check coordinate independence of all resonant coupling matrices #237
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.
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%.
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.
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.
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.
Activity
logan-nc commentedon Oct 22, 2026
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.
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%.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.mtheta, ODE tolerance, coil forcing and the plasma response.@matt-pharr:
C_penetrated_area_weighted_fieldcould 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 incompute_singular_coupling_metrics!. We're leaving that gap for now.matt-pharr commentedon Oct 22, 2026
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.
logan-nc commentedon Oct 27, 2026
Status: the scan posted above showed the five matrices coordinate-independent once
singfac_minconverges, 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.