Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary-equilibrium GUI tab #31

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Preliminary-equilibrium GUI tab #31

wants to merge 8 commits into from

Conversation

ZedThree
Copy link
Member

Adds an "Equilibrium" tab, moves previous interface into a "Mesh" tab

This is a bit rough, there's some copy-pasted bits from other parts of the code. I think we'd want to do a bit of refactoring of things before this goes in.

The Equilibrium tab has some controls for changing the different psi limits, and instantly changes the corresponding values in the options table in the Mesh tab.

The normalised and unnormalised values are hard-linked: changing one instantly changes the other correctly, both are stored in the GUI options table/dict.

There are controls to separate the inner SOL, PF and lower/upper PF. If not separated, they take their values from the "parent" control (so the inner SOL takes its value from SOL).

I've split tokamak.read_geqdsk into two, one half just_read_geqdsk returns a dict with the read info in, and a couple of calculated values, and read_geqdsk is just a thin wrapper around this and TokamakEquilibrium, just the change didn't affect anything else. Likely it's best to just drop read_geqdsk in favour of just_read_geqdsk

I've not changed the existing interface really, outside of moving it into a tab. This means it's possible to load different geqdsk files in the two tabs, which would be silly. Probably best thing is to remove the geqdsk reader from the mesh tab.

Enabling all the psi limits* makes the plot a bit messy. This could be cleaned up if we moved some logic out of Equilibrium. We probably don't want to do wall intersections here? But plotting the private flux limits in the correct place is presumably possible.

Are there other options that make sense to go here?

How expensive would it be to try and draw outlines of the different regions Hypnotoad will eventually mesh?

hypnotoad_preliminary_equilibrium


* Do we have a good name for the category of thing that psi_core, psi_sol are? In different places I've called them "limits" or "contours".

@ZedThree ZedThree added the wip Work in progress label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wip Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant