Enforce up-down symmetry throughout inverse solves - #101
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
force_up_down_symmetric=True.optimize_currents().Motivation
Previously, symmetry forcing was passed only to the main forward corrections performed by the inverse loop. The initial inverse update could therefore react to an odd component in the supplied plasma flux, while the baseline and perturbed forward solves used to construct the full Jacobian silently ran without symmetry forcing. This meant the inverse solve did not consistently remain in the requested even-plasma subspace.
The flag constrains the plasma response; exactly symmetric currents in independent upper/lower coils still require those currents to be linked or constrained by the machine/control model.
Validation
plasma_psiis projected before inverse iteration.test_inverse_static_solver.pyandtest_static_solver.py: 4 passed.4.39e-6, and reports a relative plasma-flux parity error of0.000e+00.Scope
The runtime implementation adds only the initial projection and missing argument propagation. Behaviour is unchanged when
force_up_down_symmetric=False. The example amendment adds one explanation and one parity diagnostic.