Skip to content

Test the Jacobian orientation with a quantity the lasym rotation preserves - #28

Open
CharlesCNorton wants to merge 1 commit into
jonathanschilling:masterfrom
CharlesCNorton:fix/lasym-jacobian-orientation
Open

Test the Jacobian orientation with a quantity the lasym rotation preserves#28
CharlesCNorton wants to merge 1 commit into
jonathanschilling:masterfrom
CharlesCNorton:fix/lasym-jacobian-orientation

Conversation

@CharlesCNorton

Copy link
Copy Markdown
Contributor

Fixes #27.

The orientation test runs on a boundary that has already been rotated in the poloidal angle when lasym is set, and rtest*ztest is not invariant under that rotation. The m=1 determinant is, and it reduces to rtest*ztest for a stellarator-symmetric boundary, where rbsc and zbcc are zero, so the symmetric path keeps the criterion it had.

Checked with input.up_down_asym_current relabelled by theta -> pi - theta, which leaves the surface alone and reverses the poloidal direction. Before this change the rotation leaves ztest at 3.7e-17, the test cannot fire, and the run takes 7 Jacobian resets and stops at the 2001 iteration cap with fsqr = 2.07e-02. After it the run converges in 1544 iterations to fsqr = 8.7e-12, and volume_p, aspect, Rmajor_p, Aminor_p, ctor, buco, jcurv, presf and phipf agree with the run on the boundary as given to machine precision. What remains is the poloidal gauge: the two runs differ by the residual rotation, which shows up in the grid-sampled extrema rmax_surf and zmax_surf and in iotaf at the 1e-3 level.

input.up_down_asym_current and input.cth_like_fixed_bdy_asym are unchanged bit for bit, so the test is inert on a boundary that is already oriented correctly, and a stellarator-symmetric run never enters the branch.

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.

The Jacobian orientation test is not invariant under the poloidal rotation applied to an asymmetric boundary

1 participant