PrincetonUniversity / STELLOPT

This is the GitHub repository for STELLOPT, the state-of-the-art stellarator optimization code.
https://princetonuniversity.github.io/STELLOPT/
MIT License
65 stars 18 forks source link

Update TERPSICHORE tutorial documentation #102

Open zhucaoxiang opened 3 years ago

zhucaoxiang commented 3 years ago

On the page TERPSICHORE tutorial, there is an NCSX example. However, it is reported that the test case cannot be reproduced. I have fixed the errors that I found, but the problem is more like an inconsistent input file and screen output. @lazersos When you have time, could you please check this?

  1. Input parameters are not consistent with the screen output In the tutorial, people are advised to modify the parameters to be
       NI = 48
       NJ=151
       NK=151
       MLMNV=94
       MLMNB=256
       MLMNS=382
       IVAC=24
       LSSL=4446
       LSSD=2745
       MMAXDF=127
       NMAXDF=31

    However, several variables are not the same as the screen output on the same page, e.g. NJ, NK. Here is what I guessed based on the screen output.

      INTEGER :: NI=48, IVAC=12, NVI=72, 
     &           NJ=421, NK=423, NJK=178083, 
     &           MLMNV=94, MLMNB=264, MLMNS=382, 
     &           LSSL=4446, LSSD=2745, 
     &           MMAXDF=127, NMAXDF=31, 
     &           MD=91, MDY=91, ND=72, ND1=73, 
     &           NA = 13195
  1. IOTA and other quantities are not the same. When executing TERPSICHORE with the updated parameters, the screen output information are still not the same as the one written on the wiki page. Here is a glance at the IOTA values when executing TERPSICHORE on my computer.
 npwall    awall     ewall     dwall     gwall     drwal     dzwal
    3    1.200E+00 2.000E+00-3.200E-01 5.200E+00 0.000E+00-1.000E-01

rplmin =  1.0000E-05 xplo =  1.0000E-06 djp =  4.0000E-02 wct =  6.6667E-01 curfac=  1.0000E+00

      IOTA           M           VP          P
  0.00E+00  0.00E+00      0.00000000E+00  0.00E+00
  3.99E-01  4.71E+04      1.58426377E+00  5.92E-02
  4.10E-01  4.70E+04      1.58250000E+00  5.90E-02
  4.20E-01  4.68E+04      1.58089983E+00  5.89E-02
  4.29E-01  4.66E+04      1.57937752E+00  5.86E-02
  4.37E-01  4.64E+04      1.57788826E+00  5.83E-02
  4.44E-01  4.61E+04      1.57637575E+00  5.79E-02
  4.51E-01  4.57E+04      1.57478697E+00  5.74E-02
  4.58E-01  4.53E+04      1.57307892E+00  5.69E-02
  4.65E-01  4.48E+04      1.57122078E+00  5.63E-02
  4.71E-01  4.42E+04      1.56919400E+00  5.56E-02
  4.78E-01  4.37E+04      1.56699027E+00  5.49E-02

This might be also in your interest @amwrightau @gdwei123 .

zhucaoxiang commented 3 years ago

@lazersos are you still updating the wiki pages at https://github.com/PrincetonUniversity/STELLOPT/wiki. @jcschmitt mentioned he thought that was the place for hosting the wiki pages. Personally, I was also confused about where to put the documentation. I put everything into the gh-pages because the wiki section seems not able to show equations. Anyway, after googling, it looks like [(link)[https://stackoverflow.com/questions/32430473/what-are-the-main-functionality-differences-between-github-wiki-and-readme]]

I propose we remove the contents in the wiki pages for now (I am not quite sure if there is anything in wiki pages not in gh-pages) and put developer-related documentation there.

lazersos commented 3 years ago

@zhucaoxiang I've only be updating the gh-pages. I would agree that if we have development related stuff we should probably keep that on a separate wiki. I was unaware there were two wiki's I just thought https://github.com/PrincetonUniversity/STELLOPT/wiki was a copy of the other one.

jcschmitt commented 3 years ago

The fort.18 file that is used as an example file is not consistent with the LI383 configuration that I have found. Unless there is a inconsistency in the codes that use this particular file (stellopt_kink.f90 and tprgl0.module_ap.f), then the first number in the fort.18 file (or terpsichore_eq file) is supposed to be WB from VMEC or VOLI for terpsichore- (this is the volume integrated magnetic energy in VMEC- I'm not sure it is even used in the terpspichore code - unless I am mistaken, it is read in, but not used in any calculations).

For my LI383 configuration, I get wb = 9.619874145635E-02, but the example fort.18 file has wb=1.319698479775E+00, an order of magnitude larger.

Additionally, from my LI383 configuration, RMN(0,0) ~ 1.4737 and in the existing fort.18 file, RMN(0,0) ~ 4.00416.

I suspect that the fort.18 file in the examples section is actually from a pilot-plant ARIES configuration.

zhucaoxiang commented 3 years ago

@jcschmitt It is likely the case. We should find a benchmark case and update the corresponding output.

lazersos commented 3 years ago

@jcschmitt that makes sense. It may have been a ARIES-CS case. It was just the first file I was given to test running the code.