Skip to content

ForceFreeStates - BUGFIX! - Default the axis start to the fixed initialization - #514

Merged
matt-pharr merged 1 commit into
developfrom
bugfix/frobenius-axis-start-opt-in
Oct 9, 2026
Merged

matt-pharr merged 1 commit into
developfrom
bugfix/frobenius-axis-start-opt-in

Conversation

@jhalpern30

@jhalpern30 jhalpern30 commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Release note

  • Audience: users
  • Numerical impact: Forward and Riccati free-boundary energies, toroidal torque, and resonant fields move on cases that start at or below ψ_N = 0.01: diiid_n1 Re(et[1]) +3.7e-6 and PE toroidal torque 5.09e-2 → 1.16e-4, resonant fields 0.2–0.6%, Solovev energies ≤0.03%, kinetic NTV torques ≤0.2%. Riccati Δ′ and SLAYER outputs do not move, nor do equilibrium scalars or local-stability profiles. (harness @ 1d07e9e)
  • Migration: Set frobenius_psi_max to at least the starting ψ_N to use the Frobenius start. 0.01 restores the previous behavior for every axis-started case.

The default axis initialization is now the fixed start used by Fortran DCON (U₁ = 0, U₂ = I). The diagonal Frobenius start remains available by setting frobenius_psi_max above the starting surface. That start's m = 0 branch is an imaginary conjugate pair, so the sign of its U₁ follows roundoff and shows up as a spurious toroidal torque. This PR essentially moves the repo back to a tried and true initialization while retaining the Frobenius initialization for those who want to fix it in the future.

Regression report

Harness at 1d07e9e7e, develop at eb8e5f1bc (Alfven, 2 CPUs per case; 8 for diiid_error_field). Every changed quantity is tied to the axis start; equilibrium, q, pressure, Mercier, singular-surface and vacuum-matrix quantities are identical.

case changed / total notable moves
diiid_n1 20 / 53 Re(et[1]) +3.7e-6; PE toroidal torque 5.09e-2 → 1.16e-4 (−99.8%); resonant field b^r 0.60%; island widths 0.09%
diiid_n1_riccati 6 / 17 Re(et[1]) +3.8e-6; Δ′ matrices and delta_coil bit-identical
diiid_slayer_n1 0 / 17 unchanged (γ_Hz diff 3e-6)
solovev_n1 10 / 22 Re(et[1]) +1.9e-4 (0.03%); Im(et[1]) −1.0e-3 → −1.6e-5
solovev_multi_n 7 / 15 Re(et[1]) +4.5e-5
solovev_kinetic_calculated 10 / 17 Re(et[1]) 0.03%; ‖ξ_clebsch_α‖ −58%
solovev_kinetic_nuzero 7 / 14 Re(et[1]) 0.01%
solovev_kinetic_ntv 2 / 6 NTV torque 0.14%
solovev_kinetic_multiion 5 / 6 NTV torques 0.07–0.19%
diiid_error_field 8 / 10 EFC overlap 0.21%; EFC rotation-scan shifts and residual torque vs rotation up to 65%

Not run: diiid_multi_n, both Galerkin cases, efit_fixedbdy_separatrix, both GGJ cases (expected unchanged).

Notes for reviewers

Related to the issues brought up in #464 by demoting the Frobenius start to opt-in and removing the docstring claim that it behaves as a positive power of the starting ψ. The initialization itself is unchanged. This just moves the default to the legacy method until the Frobenius start is fully debugged.

On examples/DIIID-like_ideal_example at ψ_N = 1e-4, an earlier fixed-versus-Frobenius comparison moved et[1] by about 5e-6 (0.8012318 to 0.8012355), the perturbed-equilibrium plasma energy by −0.06%, the surface energy by +0.04%, and the toroidal torque from +0.051 to +1.2e-4. Resonant fields moved by 0.15–0.2%. The Δ′ matrix was only compared between the two Frobenius branches, so the Riccati cases (diiid_n1_riccati, diiid_slayer_n1) should be treated as moving until the harness says otherwise.

Harness cases expected to move: diiid_n1, diiid_error_field, diiid_n1_riccati, diiid_slayer_n1, solovev_n1, solovev_multi_n, and the four Solov'ev kinetic cases. Unchanged: diiid_multi_n (already pinned to 0), both Galerkin DIII-D cases, efit_fixedbdy_separatrix, and both GGJ cases.

…alization

The diagonal Frobenius start does not recover the axis limit it documented,
and its m = 0 branch is an imaginary pair whose sign follows roundoff.
frobenius_psi_max now defaults to 0, so that start is opt-in.
@github-actions github-actions Bot added bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading labels Oct 8, 2026
@jhalpern30
jhalpern30 requested a review from matt-pharr October 8, 2026 20:27
@jhalpern30 jhalpern30 self-assigned this Oct 8, 2026

@matt-pharr matt-pharr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some silly claude-isms in the comments but I am going to let it slide since we are gonna want to do a full comment comb through in the coming weeks

@matt-pharr

Copy link
Copy Markdown
Collaborator

CC @logan-nc IDK if you have heard of this before now but we are going to default frobenius axis init to off for the time being until the physical implications are better understood

@matt-pharr
matt-pharr merged commit c5e9699 into develop Oct 9, 2026
12 of 15 checks passed
@matt-pharr
matt-pharr deleted the bugfix/frobenius-axis-start-opt-in branch October 9, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was wrong and now is not changed-results Results move or an interface breaks - read before upgrading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants