Abstract

A compact and comprehensive interface between magneto-hydrodynamic (MHD) equilibrium codes and gyro-kinetic, particle orbit, MHD stability, and transport codes is presented. Its irreducible set of equilibrium data consists of three (in the 2-D case with occasionally one extra in the 3-D case) functions of coordinates and four 1-D radial profiles together with their first and mixed derivatives. The C reconstruction routines, accessible also from FORTRAN, allow the calculation of basis functions and their first derivatives at any position inside the plasma and in its vicinity. After this all vector fields and geometric coefficients, required for the above mentioned types of codes, can be calculated using only algebraic operations with no further interpolation or differentiation. Program summaryProgram Title: ESIProgram Files doi:http://dx.doi.org/10.17632/w6z58s6ntv.1Licensing provisions: GNU General Public License 3 (GPL)Programming language: CSupplementary material:C2esi.c, F2esi.f, demoC.c, demoF.c RZdemoC.c, RZdemoF.f programs for generation the ESI data and demonstration of their use.Nature of problem: In plasma simulations, the equilibrium codes play a fundamental role in supplying the information about magnetic configuration for different more sophisticated plasma problems: stability, transport, particle orbit or gyro-kinetics. At present, there are two extreme approaches to make a choice of output data from numerical equilibria. One of them requires all functions, necessary for the client code, at all necessary positions to be supplied by the equilibrium codes. This approach works only for closely related pairs of codes, making them highly dependent on each other. It requires excessive storage capacities because the required data may not be very smooth. This approach is not-suitable also for the situation when the client codes need physics variables at unpredictable positions inside the plasma.The other approach uses only primitive information from the equilibrium codes, such as coordinates of grid points and a few radial profiles. Then, the client codes generate all the necessary functions from equilibrium data with their own mappers, which use interpolation and numerical differentiation of original data, both causing convergence problems in the client codes.Solution method: The Equilibrium Spline Interface ( ESI), is proposed as a universal buffer between the equilibrium codes and the other plasma physics codes. ESI possesses comprehensive information about magnetic configuration and is able to provide it to magnetic confinement codes in the ready to use form.Additional comments: The main file esiXZ.c with ESI routines is described in the main text. Two (C and FORTRAN) programs C2esi.c, F2esi.f demonstrate the generation of ESI data files. Four other demo programs, linked with esiXZ.c demonstrate the use of the interface in magnetic flux coordinates ( demoC.c, demoF.f) and in laboratory cylindrical coordinates r,z ( RZdemoC.c, RZdemoF.f).

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call