Skip to content

Lower the radial power of the initial guess when no axis avoids a fold - #33

Merged
krystophny merged 1 commit into
developfrom
fix/low-radial-power-init
Nov 7, 2026
Merged

krystophny merged 1 commit into
developfrom
fix/low-radial-power-init

Conversation

@krystophny

Copy link
Copy Markdown
Member

Strongly shaped boundaries, such as STELLOPT's belt-pinch and m45.OHseries decks, fold over near the edge in GVEC's initial guess whatever the axis. The cause is that each boundary mode enters the guess like rho^m, so at the edge the radial derivative is dominated by the high-m modes. For these decks #31's axis guess is not enough.

  • New Fortran parameter init_low_radial_power (default False, so existing runs are unchanged): modes with m >= 2 enter the initial guess like rho^2 (even m) or rho^3 (odd m). The parity keeps them regular at the axis.
  • gvec.util.guess_axis uses the same power when the option is set.
  • pygvec run tries the option, with a matching guessed axis, after the guessed axis alone has failed. That makes the sequence: given axis, guessed axis, guessed axis with the lower power.

Checks:

  • belt14, belt20 and m45.OHseries now initialise and iterate.
  • n5qh.fx3.a55z and nfp4_QI_finite_beta still fail: for them no axis gives a positive initial Jacobian under either power, according to the linear program in guess_axis evaluated per plane.
  • New test test_run_lowers_radial_power_after_bad_jacobian (the belt20 boundary) fails without the change and passes with it. test_init_average_axis.py passes 14/14.

Chris&AI

Strongly shaped boundaries such as STELLOPT's belt pinches fold over near the edge for every axis when each mode enters the initial guess like rho^m. The new option init_low_radial_power scales modes m >= 2 like rho^2 (even) or rho^3 (odd) instead, and pygvec run tries it, with a matching guessed axis, after the guessed axis alone has failed.
@krystophny
krystophny added this pull request to the merge queue Nov 7, 2026
Merged via the queue into develop with commit 1ca0c4b Nov 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant