X-point treatment and Jtor refinement#29
Merged
Conversation
Collaborator
|
I've tested this along with the corresponding PR in FreeGSNKE and everything seems to work smoothly for now with respect to the example notebooks (small patches may be required as we test things further). Happy to merge. |
georgeholt1
approved these changes
Apr 29, 2025
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.
Added checks to choice of primary Xpoint to make static solver more stable. When the proposed primary Xpoint is such to generate a sudden change in plasma volume wrt previous calculations, the next Xpoint is considered.
Lao85 profile object set up for grid refinement.
I've also set things up so that the tokamak object keeps a vectorised version of the currents in all the coils, tokamak.current_vec. The equilibrium has the vectorised green functions at eq._vgreen (the dictionary eq._pgreen is still there). The two are used in combination by the forward_solve capability in freeGSNKE. Note that to allow for that, coil currents should not be set by directly modifying the attribute (e.g. coil.current=value), rather the newly added method of the tokamak object should be used, e.g. tokamak.set_coil_current(coil_label, value)