Skip to content

X-point treatment and Jtor refinement#29

Merged
georgeholt1 merged 18 commits into
mainfrom
jtor_refinement_new
Apr 29, 2025
Merged

X-point treatment and Jtor refinement#29
georgeholt1 merged 18 commits into
mainfrom
jtor_refinement_new

Conversation

@nicamo
Copy link
Copy Markdown
Collaborator

@nicamo nicamo commented Apr 7, 2025

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)

@nicamo nicamo requested a review from kpentland April 8, 2025 18:07
@nicamo nicamo requested a review from georgeholt1 April 17, 2025 08:15
@kpentland
Copy link
Copy Markdown
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 georgeholt1 merged commit 7fcbc1c into main Apr 29, 2025
1 check passed
@georgeholt1 georgeholt1 deleted the jtor_refinement_new branch April 29, 2025 09:42
@nicamo nicamo restored the jtor_refinement_new branch April 29, 2025 14:05
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.

3 participants