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

Analytic equilibria #90

Open
johnomotani opened this issue Feb 3, 2021 · 3 comments
Open

Analytic equilibria #90

johnomotani opened this issue Feb 3, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@johnomotani
Copy link
Collaborator

johnomotani commented Feb 3, 2021

Parameterised, analytic equilibria can be created following the recipe in [Cerfon&Freidberg (2010)]. There is already a Python implementation https://github.com/johnomotani/CerfonFreidbergGeometry (although it could do with a few cosmetic upgrades). It would be nice to add a new tab to the hypnotoad GUI which could allow a user to tweak the parameters of the analytic equilibrium and save them into an input .yml file. Then the Psi function from CerfonFreidberg could be passed to TokamakEquilibrium (which should only need a small upgrade to TokamakEquilibrium), allowing hypnotoad to grid the analytical equilibrium.

Edit (updating comment below): Should note the health warning with these analytic equilibria - the equilibrium implies a pressure profile, which will generally not be consistent with a real machine or with the plasma solution produced by your code. Outside the separatrix things are probably even more dodgy - there's an analytic form for psi, but it assumes that the pressure is a linear function of psi, which is not realistic as in the SOL pressure is (a) not a flux function and (b) should drop quickly to ~0 and cannot (physically) be negative...

@johnomotani johnomotani added enhancement New feature or request help wanted Extra attention is needed labels Feb 3, 2021
@bendudson
Copy link
Contributor

This would be awesome!

@johnomotani
Copy link
Collaborator Author

Should note the health warning with these analytic equilibria - the equilibrium implies a pressure profile, which will generally not be consistent with a real machine or with the plasma solution produced by your code. Outside the separatrix things are probably even more dodgy - there's an analytic form for psi, but there are no flux surfaces so 'pressure profile' is not well defined, are there parallel currents as well or instead??

@johnomotani
Copy link
Collaborator Author

It could also be nice to have something like an n-wire vacuum-field option. The TorpexEquilibrium case already has code to create a psi function (and the other needed functions) from a list of coil fields and currents.

Todo for this:

  • Could do with tidying up the interface to 'psi' functions a bit. Probably would be good to make a base PsiFunction class, with subclass implementations for 'read from g-file', 'psi from coils', maybe a 'CerfonFreidberg psi', etc.
  • GUI tab for 'psi from set of coils'.
  • Probably need a work-around in TokamakEquilibrium because there'll be a singularity at the centre (where a coil representing the 'plasma current' is) rather than an O-point. Should be simple, we could say something like 'the first coil is the centre of the plasma. Need some kind of fudge to define psi_norm too, because psi diverges on the coil, so there's no maximum 'psi_axis'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants