Magnetic Equations with FreeFem++: the Grad-Shafranov Equation & the Current Hole

FreeFem++ is a software for the numerical solution of partial differential equations. It is based on finite element method. The FreeFem++ platform aims at facilitating teaching and basic research through prototyping. For the moment this platform is restricted to the numerical simulations of problems which admit a variational formulation. Our goal in this work is to evaluate the FreeFem++ tool on basic magnetic equations arising in Fusion Plasma in the context of the ITER project. First we consider the Grad-Shafranov equation, which is derived from the static ideal MHD equations assuming axisymetry. Some of the properties of the equation and its analytical solutions are discussed. Second we discretize a reduced resistive MHD model which admits solutions of the Grad-Shafranov equation as stationary solutions. Then the physical stability of these stationary solutions is investigated through numerical experiments and the numerical stability of the algorithm is discussed.