PR: Added Interface term to single stage finitebeta
The single stage optimization, up to now, has minimized the squared flux corrected for the target magnetic field. According to texts on free boundary [add reference], an extra term is needed that minimizes the squared of the magnetic field just outside the plasma boundary and the square of magnetic field just inside the boundary. Added that term here to the optimization.
@f0uriest Could you help with the reference here so that we can compare the terms added here with the ones in the literature?
Codecov Report
All modified lines are covered by tests :white_check_mark:
Comparison is base (
8e65c49) 91.15% compared to head (ecc91d0) 90.78%. Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #355 +/- ##
==========================================
- Coverage 91.15% 90.78% -0.37%
==========================================
Files 70 70
Lines 12384 12386 +2
==========================================
- Hits 11289 11245 -44
- Misses 1095 1141 +46
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 90.78% <100.00%> (-0.37%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Files | Coverage Δ | |
|---|---|---|
| src/simsopt/mhd/virtual_casing.py | 98.92% <100.00%> (+0.01%) |
:arrow_up: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I haven't seen any particularly clear explanation in the literature, the least bad is probably Hirshman's 1986 paper on free boundary VMEC (doi:10.1016/0010-4655(86)90058-5).
That was using NESTOR to compute the total B outside the plasma due to the coils + plasma field. The equations implemented here are similar but using the virtual casing code to get B_plasma.
One possible extra complication is the presence of a sheet current on the plasma boundary. This is needed when pressure at the edge is nonzero, but is also in general allowed even when edge pressure is zero (at least I haven't been able to prove it's not there). Physically this is just because the plasma itself is a conductor immersed in a magnetic field, so you can get a sheet current that causes a jump in the tangential component of B. In practice it seems like this is usually negligible (for all of the equilibria I've tested in free boundary DESC the field due to the sheet current ends up being < 1e-8x smaller than the field from other sources)