DESC icon indicating copy to clipboard operation
DESC copied to clipboard

increase MPOL of VMEC input by one so that DESC eq has requisite reso…

Open dpanici opened this issue 1 year ago • 9 comments
trafficstars

…lution to capture shafranov shift

without this increase, the auto continuation solve from the command line yields an equilibrium with barely any shafranov shift

Things to check

  • [ ] If the continuation method steps are weird or have changed
  • [ ] if it is indeed the MPOL thing (MPOL to MPOL-1 upon loading VMEC was changed about 2 years ago, but 6 months ago we lowered the resolution from 12 to 8... so worth checking the code at that point)

dpanici avatar Apr 28 '24 19:04 dpanici

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.27%. Comparing base (87592bc) to head (874e4b0). Report is 1916 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1005   +/-   ##
=======================================
  Coverage   95.26%   95.27%           
=======================================
  Files          87       87           
  Lines       21719    21719           
=======================================
+ Hits        20691    20692    +1     
+ Misses       1028     1027    -1     

see 1 file with indirect coverage changes

codecov[bot] avatar Apr 28 '24 19:04 codecov[bot]

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

I think the following files also have to be updated to stay self-consistent with this change:

  • input.HELIOTRON_desc_no_continuation
  • input.HELIOTRON_desc_no_continuation_output.h5
  • basic_equilibrium.ipynb
  • advanced_equilibrium_continuation.ipynb

the files that need updating have ben updated. The no continuation input does not need updating as the resolution was not changed for that one.

dpanici avatar Apr 29 '24 18:04 dpanici

Feels really weird that going from m=8 to m=9 makes such a big difference?

f0uriest avatar Apr 30 '24 01:04 f0uriest

Feels really weird that going from m=8 to m=9 makes such a big difference?

@dpanici are you sure this PR is necessary? The notebooks on master look like they already have the correct Shafranov shift

ddudt avatar Apr 30 '24 03:04 ddudt

Feels really weird that going from m=8 to m=9 makes such a big difference?

@dpanici are you sure this PR is necessary? The notebooks on master look like they already have the correct Shafranov shift

Yea I am sure. If you rerun the examples on master, you completely lose the shafranov shift. Try it for yourself and see

dpanici avatar Apr 30 '24 15:04 dpanici

Feels really weird that going from m=8 to m=9 makes such a big difference?

I also agree but this is the result I see, if the point of the notebook is to just use the automatic contiunation that by default is used when running on a vmec input file, it currently results in an equilibrium with barely any shafranov shift on master after running python -m desc input.HELIOTRON

This is fixed if we up the resolution by 1. The current saved input.HELIOTRON_output.h5 on master has L=M=8 resolution, so possibly what happened is it is from before we made the change so that when we load a VMEC input file, we set MPOL to be one less than what VMEC's MPOL is

image

dpanici avatar Apr 30 '24 15:04 dpanici

ok, im still a bit worried this is indicative of some larger issue. Can you check to see when it broke? Was it just because we changed the default m from vmec?

f0uriest avatar May 01 '24 17:05 f0uriest

Note to self, must make a new environment locally to load in older DESC versions

dpanici avatar May 06 '24 15:05 dpanici

make as an issue then merge this in @dpanici

dpanici avatar Jul 03 '24 19:07 dpanici

Please clean up the pr title and description before merging

f0uriest avatar Jul 06 '24 18:07 f0uriest