ukaea / PROCESS

PROCESS is a systems code at UKAEA that calculates in a self-consistent manner the parameters of a fusion power plant with a specified performance, ensuring that its operating limits are not violated, and with the option to optimise to a given function of these parameters.
https://ukaea.github.io/PROCESS/
MIT License
27 stars 11 forks source link

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

Open jonmaddock opened 4 years ago

jonmaddock commented 4 years ago

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:

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 commented 4 years ago

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

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

jonmaddock commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

In GitLab by @ajpearcey on Mar 3, 2022, 11:24

here are more papers which tackle this problem

Simple, general, realistic, robust, analytic tokamak equilibria. Part 1. Limiter and divertor tokamaks

Simple, general, realistic, robust, analytic tokamak equilibria. Part 2. Pedestals and flow