The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
TokaMaker: 2D static and time-dependent Grad-Shafranov Equilibria

TokaMaker solves variants of a system of equations corresponding to Ideal MHD force balance for an axisymmetric plasma in response to actively and passively driven currents in nearby conductors (eg. coils and structures).

\[ \Delta^* \psi = \begin{cases} -\frac{1}{2}\frac{\partial F^2}{\partial \psi} - \mu_0 R^2 \frac{\partial P}{\partial \psi} & \text{if } \textbf{r} \in \mathcal{P}\\ -R \mu_0 J_{\phi} & \text{if } \textbf{r} \in \mathcal{S},\mathcal{C} \\ 0 & \text{elsewhere;} \end{cases} \]

where \( \mathcal{P} \), \( \mathcal{S} \), and \( \mathcal{C} \) are axisymmetric domains corresponding to the plasma, passive conducting structures (eg. vacuum vessels), coils respectively.

TokaMaker should primarily be used through the python interface using the OpenFUSIONToolkit.TokaMaker python module and the OpenFUSIONToolkit.TokaMaker.TokaMaker class.

TokaMaker examples

The following examples illustrate usage of TokaMaker to compute different Grad-Shafranov equilibria. For examples of how to create new meshes, see Mesh generation examples using gs_Domain.

Fixed Boundary Equilibria

Free Boundary Equilibria

Equilibrium Reconstruction

Dipole Equilibria

Other workflows/examples

Building meshes using gs_Domain

TokaMaker includes built-in meshing functionality through the gs_Domain class, which leverages the triangle python package to generated unstructured triangular grids. The process of geometry definition is broken into two stages:

First, logical information about the geometry is defined using define_region(). This method's functionality varies based on the type of region being defined, which must be one of the following:

  • plasma: The region where the plasma can exist and the classic Grad-Shafranov equation with \( F*F' \) and \( P' \) are allowed. There can only be one region of this type
  • vacuum: A region where no current can flow and \( \nabla^* \psi = 0 \) is solved
  • boundary: A special case of the vacuum region, which forms the outer boundary of the computational domain. A region of this type is required if more than one region is specified
  • conductor: A region where toroidal current can flow passively (no externally applied voltage). For this type of region the resistivity should be specified with the argument eta in units of \( \omega \mathrm{-m} \).
  • coil: A region where toroidal current can flow with specified amplitude through set_coil_currents() or via shape optimization set_coil_reg() and set_isoflux()

Next, geometric information about each region defined in the prior step is performed using one of the following methods:

  • add_rectangle() defines the region as a simple rectangle with a specified center, width, height, and optional rotation.
  • add_polygon() defines the region as any closed polygon from a list of (R,Z) points.
  • add_annulus() defines the region as an annulus between two closed polygons that must not cross.
  • add_enclosed() defines the region by specifying a point within a space enclosed by other regions (eg. between a VV and a limiter). This is useful to avoid having to define a new curve(s) in complex configurations.

Mesh generation examples using gs_Domain

The following examples illustrate usage of gs_Domain to create meshes for TokaMaker.