DESC
DESC copied to clipboard
Adding adjoint ideal-ballooning stability solver to DESC
Infinite-n ideal MHD ballooning modes are of significant interest to both the tokamak and the stellarator community. These instabilities are also related to smaller-scale kinetic instabilities, which cause significant heat loss from fusion reactors. This commit adds the ability to both analyze and optimize MHD equilibria against the ideal ballooning mode.
An adjoint implementation of an ideal ballooning solver has only been successfully demonstrated previously on a much smaller scale. If this commit works, it would be at least an order of magnitude faster than the linked code.
Here are the tasks:
- [x] Add geometry coefficients
- [x] Test geometric coefficients. Maybe compare it with Patrick's fork in DESC. Add a test
- [x] Add the differential pseudospectral matrix operators
- [x] Compare the spectral solution with the finite-difference solution (both eigenvalues and eigenfunction). Add a new test
- [x] Compare results with my older solver
- [x] Eigendecomposition and adjoint of the matrices. Wrap the routine in DESC magic.
- [x] Compare results for the HELIOTRON case with COBRAVMEC
Codecov Report
Merging #631 (5d15cc0) into master (065bef8) will decrease coverage by
0.28%. The diff coverage is79.55%.
:exclamation: Current head 5d15cc0 differs from pull request most recent head 452e7f4. Consider uploading reports for the commit 452e7f4 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #631 +/- ##
==========================================
- Coverage 94.96% 94.68% -0.28%
==========================================
Files 79 79
Lines 19296 19355 +59
==========================================
+ Hits 18325 18327 +2
- Misses 971 1028 +57
| Files | Coverage Δ | |
|---|---|---|
| desc/compute/_basis_vectors.py | 100.00% <100.00%> (ø) |
|
| desc/compute/_core.py | 100.00% <100.00%> (ø) |
|
| desc/compute/_metric.py | 100.00% <100.00%> (ø) |
|
| desc/compute/_stability.py | 73.30% <68.02%> (-26.70%) |
:arrow_down: |
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Can we benchmark against COBRAVMEC for the Heliotron example?
Uploading some comparison results here
Closing and opening a new PR that imports changes from a repo in the main branch because forked branch is causing issues!