Equations
Virtual Casing Principle
Let Gamma be a closed toroidal surface with outward unit normal n.
Let B be the total magnetic field on Gamma, decomposed into
interior and exterior contributions:
The virtual casing principle provides an explicit expression for
B_ext on the surface in terms of singular layer potentials:
where G denotes the Laplace single-layer potential:
The interior field is obtained by reversing the signs:
Internal vs External Off-Surface
For off-surface targets, the jump term is absent. The external and internal fields are:
The off-surface gradients are obtained by differentiating these expressions and using the second-derivative Laplace kernel.
The two vector layer potentials used are:
A Laplace single-layer gradient (
FxdUin the reference code)A Biot-Savart single-layer (
FxU)
The kernels are (up to scaling) derivatives of 1 / |r|.
Kernel Formulas
Let r = x - x' be the displacement from a source to a target point.
The kernels implemented follow the BIEST convention with a 1/(4*pi) factor.
Laplace single-layer:
Gradient of single-layer:
Second derivatives:
Biot-Savart (single-layer):
The derivative FxdU for Biot-Savart is implemented explicitly to match the
reference code in biest/kernel.hpp.
Off-Surface Evaluation
For off-surface targets r:
The singular +1/2 jump term is absent off the surface.
Field-Period Symmetry
The surface and field may be defined on a half field period using stellarator symmetry. The toroidal grid is shifted by half a grid point for the symmetric case.
A full description of the grid conventions is in the reference code and reproduced in the Numerics section.