Equilibrium

The equilibrium as an abstract class

The main function of the equilibrium1 module is to provide the normalized magnetic field components as functions of normalized toroidal coordinates. The module follows an abstract design pattern, with specialized implementations for various types of equilibria, ranging from simple slab geometries to numerically prescribed 3D stellarator configurations. Equilibrium initialization is handled through a factory method, as demonstrated in the following example:

use equilibrium_m, only: equilibrium_t
use equilibrium_factory_m, only: create_equilibrium, get_equilibrium_identifier

integer :: id_eq
class(equilibrium_t), allocatable :: equi

! Get equilibrium identifier
id_eq = get_equilibrium_identifier('CIRCULAR_TOROIDAL')

! Initialise equilibrium, where parameters are read from 'params.in' file
call create_equilibrium(equi, id_eq, 'params.in')

After the initialisation several routines providing information on the magnetic geometry are available, e.g.:

by = equi%by(x, y, phi)     ! Vertical normalised field component
rho = equi%rho(x, y, phi)   ! Normalised flux label

Circular toroidal geometry

Each equilibrium type has specific characteristics and requires distinct parameters for initialization. As an illustrative example, we provide a more detailed explanation of the CIRCULAR_TOROIDAL equilibrium. This equilibrium describes circular magnetic flux surfaces in toroidal geometry, with a prescribed safety factor profile . The in-plane coordinates and represent the major radius and vertical coordinate, respectively, both normalized to the major radius of the magnetic axis, ​. The flux label measures the normalized distance to the magnetic axis, defined as . The normalized magnetic field components are given by:

with the geometric poloidal angle.

The equilibrium parameters are provided via the following namelist, which is read from file during initialization as discussed above:

&equi_circular_toroidal_params
    rhomin                  = 0.1       ! Inner limiting flux surface (Can also be zero, to include magnetic axis)
    rhomax                  = 0.2       ! Outer limiting flux surface 
    ! q at center of domain is 3
    q_0                     = 2.166     ! Safety factor on axis
    q_quad_param            = 33.333    ! Parameter for quadratic q-profile, q(rho) = q0 + q_quad_param * rho^2
/

We note that the CIRCULAR_TOROIDAL equilibrium also supports the superposition of a helical magnetic field perturbation, which can create magnetic islands. This feature is not discussed in the current context.

Further equilibria

For a detailed description of the other equilibrium types, we refer to the source code and provide a brief overview below:


  1. It is important to clarify that the term "equilibrium" may be somewhat misleading here. In PARALLAX, the term primarily refers to magnetic field configurations, which do not necessarily represent an equilibrium state, as this depends on additional factors such as the pressure profile.