Model B: REGCOIL-like current potential¶
This model is the closest conceptual match to REGCOIL:
Instead of driving currents by injecting charge at points (electrodes), we represent the surface current as a divergence-free field generated by a current potential \(\Phi\) on the surface.
Divergence-free surface currents¶
On a smooth surface, a divergence-free surface current density can be written as:
where \(\Phi(\theta,\phi)\) has units of Amperes. This representation automatically enforces:
This is the “current potential” framework used by REGCOIL and related coil-design formulations.
Net poloidal / toroidal currents and multi-valued \(\Phi\)¶
The current potential can contain secular (multi-valued) terms that correspond to net currents linking the torus:
where:
\(I_{\mathrm{pol}}\) is the net poloidal current [A] (sets a dominant toroidal \(1/R\) field scale via Ampère’s law)
\(I_{\mathrm{tor}}\) is the net toroidal current [A] (sets a dominant poloidal field component)
The derivatives are:
Important
The secular terms \(\theta\) and \(\phi\) are discontinuous when wrapped to \([0,2\pi)\) (a sawtooth). Do not differentiate them with FFTs.
In torus-solver, the secular contributions are handled analytically by adding the constant derivatives shown above.
Implementation on the circular torus¶
For the circular torus, one convenient formula is:
which is equivalent to \(\hat{\mathbf n}\times \nabla_s \Phi\).
In the code:
src/torus_solver/current_potential.pysurface_current_from_current_potential(...)(single-valued \(\Phi\) only)surface_current_from_current_potential_with_net_currents(...)(recommended)
Relation to REGCOIL¶
REGCOIL solves a regularized least-squares problem for \(\Phi\) on a coil surface, typically minimizing some norm of \(B_n\) on a plasma boundary (plus regularization in \(|K|^2\) or related measures). In this repository:
examples/inverse_design/optimize_vmec_surface_Bn.pyimplements an analogous idea on a circular torus coil surface using:Fourier coefficients for \(\Phi_{\mathrm{sv}}\)
an objective based on normalized \(B_n/|B|\)
L-BFGS (from
jaxopt) and JAX autodiff
This makes it easy to experiment with differentiable extensions (new objectives, constraints, and parameterizations) while remaining close to the REGCOIL viewpoint.