Vacuum computes the magnetostatic response of the region between the plasma boundary and a conducting wall, or of free space when there is no wall, following Chance (1997) and Chance et al. (2007).
It runs inside ForceFreeStates whenever vac_flag = true, and its matrices are shared with PerturbedEquilibrium.
For a normal displacement \xi of the plasma boundary, expanded in the poloidal harmonics of the run, the perturbed vacuum field is found from a Green's-function integral over the boundary and the wall, and the vacuum energy is the quadratic form \delta W_v = \xi^\dagger W_v \xi.
W_v is the vacuum part of the free-boundary energy, W = W_\mathrm{plasma} + W_\mathrm{vacuum}, whose eigenvalues decide the ideal kink stability on the Stability page: a close conducting wall raises W_v and stabilizes external modes, no wall gives the free-space limit.
ForceFreeStates scales wv by the resonance factors (m - nq)(m' - nq) of its row and column harmonics, the convention of Chance (1997), before adding it to the plasma energy; compute_vacuum_response returns it unscaled.
When the run needs it, the module also returns the vacuum surface-current matrix I_v, which PerturbedEquilibrium inverts into the surface inductance L of the plasma response.
The wall is the optional [Wall] section of the deck; omit it for no wall.
shape selects one of five shapes, each with its own keys, and equal_arc_wall (default true) distributes the wall nodes by equal arc length:
# one [Wall] section per deck; the five shapes:
[Wall]
shape = "conformal" # the plasma boundary expanded by standoff_fraction minor radii
standoff_fraction = 0.3
[Wall]
shape = "elliptical" # an ellipse of the given minor radius
minor_radius = 0.3
[Wall]
shape = "dee" # a D-shaped wall: standoff_fraction, half_thickness, elongation, center_offset, triangularity, corner_sharpness
standoff_fraction = 0.3
elongation = 1.5
triangularity = 0.5
[Wall]
shape = "mod_dee" # the same shape placed by minor_radius instead of standoff_fraction
minor_radius = 0.3
[Wall]
shape = "file" # a wall contour read from a file
file = "wall.dat"examples/Solovev_ideal_example holds a near-marginal kink by a conformal wall; the DIII-D-like examples run without one.
In a script the shapes are ConformalWall, EllipticalWall, DeeWall, ModDeeWall and FileWall, passed as the wall keyword of the solve (nothing for no wall), and the response itself is
using GeneralizedPerturbedEquilibrium
inputs = Vacuum.VacuumInput(eq, 0.995, 256, 1, 1:10, [1]) # the surface at ψ_N = 0.995: mtheta, nzeta, m_modes, n_modes
vac = Vacuum.compute_vacuum_response(inputs, Vacuum.ConformalWall(; standoff_fraction=0.3); compute_Iv=true)
vac.wv, vac.I_v, vac.plasma_pts, vac.wall_pts # I_v is zero unless compute_Iv=truewith eq a PlasmaEquilibrium; VacuumInput(; x, z, ν, mtheta_in, m_modes, n_modes, mtheta, nzeta) takes a boundary given point by point instead, where ν(ψ, θ) is the toroidal-angle offset of the straight-field-line coordinates, \phi = 2\pi\zeta + \nu with \phi the internal toroidal angle of the Conventions Reference (the laboratory angle carries the helicity sign).
With [ForceFreeStates] nzeta_vacuum > 1 the response is evaluated on a toroidal grid, with the singular correction of the 3D kernel (examples/Solovev_ideal_example_3D).
| Dataset | Meaning |
|---|---|
ForceFreeStates/FreeBoundaryStability/W_vacuum, vacuum_eigenvalue |
the vacuum energy matrix on the control surface and its least eigenvalue |
PerturbedEquilibrium/ResponseMatrices/surface_inductance |
the surface inductance L derived from I_v |
SurfaceGeometries/Plasma/x, y, z and SurfaceGeometries/Wall/x, y, z |
the plasma boundary and wall point clouds, for visualization |
- The Legendre functions of the Green's function are evaluated from Bulirsch's elliptic integrals, and by 32-point Gaussian quadrature for large arguments (
n\hat\rho \geq 0.1). - For n = 0 with a closed wall the kernel is regularized automatically.
Modules = [GeneralizedPerturbedEquilibrium.Vacuum]
GeneralizedPerturbedEquilibrium.Vacuum.compute_vacuum_response