vmec_jax.external_fields.coils_jaxΒΆ
Pure-JAX Fourier coils and Biot-Savart external-field sampling.
The Fourier coefficient convention intentionally matches ESSOS:
dofs[..., 0]constant term.
dofs[..., 2*k-1]coefficient multiplying
sin(2*pi*k*t).dofs[..., 2*k]coefficient multiplying
cos(2*pi*k*t).
The Biot-Savart normalization also matches ESSOS phase-1 behavior:
1e-7 * current * mean(gamma_dash x (x - gamma) / |x - gamma|^3).
Functions
|
Expand base currents using ESSOS symmetry ordering. |
|
Expand base Fourier curve coefficients using ESSOS symmetry ordering. |
|
Evaluate coil Biot-Savart field at Cartesian points. |
|
Build symmetry-expanded direct-coil geometry for Biot-Savart sampling. |
|
Smooth approximation to the minimum distance between distinct coils. |
|
Return Euclidean norm of symmetry-expanded physical currents. |
|
Return per-coil, per-segment curvature after symmetry expansion. |
|
Return per-coil centerline lengths after symmetry expansion. |
|
Smooth approximation to the minimum coil-plasma distance. |
|
Evaluate |
|
Evaluate |
|
Smooth squared penalty for coil curvature above |
|
Return full symmetry-expanded |
|
Evaluate Fourier curve centerlines. |
|
Smooth squared penalty for coil lengths above |
|
Sample the direct-coil field at cylindrical coordinates. |
|
Sample cylindrical direct-coil field from prebuilt coil geometry. |
|
JIT-sample cylindrical field from prebuilt geometry. |
|
Sample Cartesian direct-coil field from prebuilt coil geometry. |