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

“One size fits all” analytic solutions to the Grad–Shafranov equation #933

Open
jonmaddock opened this issue Sep 17, 2019 · 8 comments
Assignees
Labels
Physics Relating to the physics models

Comments

@jonmaddock
Copy link
Contributor

In GitLab by @mkovari on Sep 17, 2019, 15:28

An extended analytic solution to the Grad–Shafranov equation using Solov’ev profiles is presented. The solution describes standard tokamaks, spherical tokamaks, spheromaks, and field reversed configurations. It allows arbitrary aspect ratio, elongation, and triangularity as well as a plasma surface that can be smooth or possess a double or single null divertor X-point.

Physics of Plasmas 17, 032502 (2010); https://doi.org/10.1063/1.3328818, Antoine J. Cerfon and Jeffrey P. Freidberg

The equations have been fully coded up in Matlab by Cerfon. All you need to do is supply the following parameters:

  • epsilon,
  • kappa,
  • delta,
  • xsep = x-location of the X-point,
  • ysep = y-location of the X-point,
  • and a parameter determining the beta regime of interest, called A in the article. (Values have been provided by for ITER and NSTX.)

The numerical work is trivial: solving a set of up to twelve linear algebraic equations.

This might be much simpler and faster than EMEQ in generating equilibria for Plasmod. It might also be useful for Rabbit (with or without Plasmod). It could be used for any physics model that requires a knowledge of the flux surfaces.

Note that this is a simplification - for example, the current density is finite, not zero, at the plasma edge. The current profile is an output, not an input, so it will not be consistent with the current profile calculated by Plasmod.

As for the rest of PROCESS: strictly speaking we would want to recalculate all the poloidal fields, since this model gives the poloidal flux everywhere. It would give a q profile, but probably not the right one.

It would be easy to convert the code into Python. We could then plot the flux surfaces trivially.

There would also be a benefit in converting the code to Fortran. We already have a matrix invertor (subroutine hinv), and Fortran has matrix multiplication built in: matmul. This would allow us to output data files of temperature, density and radiation per unit volume against the normalised flux, as is conventional. (I have tried the matlab2fortran code, but it doesn't run on our old version of matlab. The regexp function seems to have been changed.)

On the other hand, we could create all these quantities in Python, as they are only outputs. This would have the benefit of allowing us to create a Python suite that can be used standalone to implement Cerfon's equations and plot whatever you want.

To make the code more consistent we could use the flux surfaces to do the volume integrations more accurately - for example fusion power. This would require some effort, to derive the volume between adjacent flux surfaces.

@jonmaddock
Copy link
Contributor Author

In GitLab by @mkovari on Sep 17, 2019, 15:36

It would also enable us to output pretty pictures like this:
image

@jonmaddock
Copy link
Contributor Author

In GitLab by @emiralle on Sep 30, 2019, 16:14

Hi @mkovari,

I believe FreeGS (https://github.com/bendudson/freegs) does something similar and it is already in Python. I'd be happy to help if needed.

Enrique

@jonmaddock
Copy link
Contributor Author

In GitLab by @skahn on Dec 10, 2020, 17:58

It seems that the magic A parameter can be derived from beta, that is also a PROCESS input.

Is it the case @mkovari ?
The inversion may not be monotonic ...

@jonmaddock
Copy link
Contributor Author

In GitLab by @mkovari on Dec 11, 2020, 16:23

The paper does seem to have a relation, but I don't think I got it working. @ajpearcey ?

@jonmaddock
Copy link
Contributor Author

In GitLab by @skahn on Dec 11, 2020, 16:53

The relation I see are the following

image

and

image

I am not sure on how to revert that :D

@jonmaddock
Copy link
Contributor Author

In GitLab by @ajpearcey on Dec 15, 2020, 10:37

I have just come accross the paper Extended Solov'ev type equilibria for rotating plasmas with positive and negative triangularity. This could be worth looking at for future work on negative trianglarity models.

ref @skahn @mkovari @jmorris-uk @stuartmuldrew

@jonmaddock
Copy link
Contributor Author

@chris-ashe
Copy link
Collaborator

If this is implemented then the first scaling by Andrade et.al in #3355 can be used properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Physics Relating to the physics models
Projects
None yet
Development

No branches or pull requests

3 participants