Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Added Interface term to single stage finitebeta #355

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rogeriojorge
Copy link
Contributor

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.

@rogeriojorge
Copy link
Contributor Author

@f0uriest Could you help with the reference here so that we can compare the terms added here with the ones in the literature?

@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

All modified lines are covered by tests ✅

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%) ⬇️

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%) ⬆️

... and 10 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@f0uriest
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants