Tutorial: Advanced VMEC Profilesncsx_fieldlines.jpg

This tutorial introduces the user to more advanced pressure, iota, and current profile options available in the latest version of VMEC. The VMEC code defaults to 10th order polynomial expressions in normalized flux space for representation of various profiles. The user can choose more sophisticated profiles through the PMASS_TYPE, PCURR_TYPE, and PIOTA_TYPE name list variables.



The latest versions of VMEC provide the user with various representations of the pressure, current, and rotational transform (iota) profiles. The following options are available for the following profiles:
  • Pressure
    • Power Series (power_series) Default
    • Truncated Gaussian (gauss_trunc)
    • AM(0)( 1 - s ^ AM(1) ) ^ AM(2) (two_power)
    • Two Lorentz-Type Functions (two_Lorentz)
    • Pedestal Profile (pedestal)
    • Ratio of Polynomials (rational)
    • Cubic Spline (cubic_spline)
    • Akima Spline (Akima_spline)
  • Current (note: some profiles are parameterized in I(s)instead of the default I-prime(s)
    • Power Series (power_series) Default
    • Truncated Gaussian (gauss_trunc)
    • AM(0)( 1 - s ^ AM(1) ) ^ AM(2) (two_power)
    • Cubic Spline (cubic_spline_Ip)
    • Akima Spline (Akima_spline_Ip)
    • Power Series I(s) (power_series_I)
    • Pedestal Profile I(s) (pedestal)
    • Ratio of Polynomials I(s) (rational)
    • Sum of Arctangents I(s) (sum_atan)
    • Cubic Spline I(s) (cubic_spline_I)
    • Akima Spline I(s) (Akima_spline_I)
  • Rotational Transform (note: If LRFP=T then q=1/iota profile is specified)
    • Power Series (power_series) Default
    • Quadratic (nice_quadratic)
    • Ratio of Polynomials (rational)
    • Sum of Arctangents (sum_atan)
    • Cubic Spline (cubic_spline)
    • Akima Spline (Akima_spline)

In most cases the choice of profile type will redefine the meaning of the polynomial coefficients (see profile_functions.f). The splines require the user to supply an XX_AUX_S and XX_AUX_F array (in which XX is AM, AI, or AC). The XX_AUX_S array specifies the locations in normalized flux space (s=[0,1]) where the values are known. The XX_AUX_F array specifies the corresponding values of the function. VMEC will then use cubic splines (or Akima Splines) to interpolate between values. Below is a sample of a VMEC input namelist which utilizes splines:
!----- Pressure Parameters -----
  PMASS_TYPE = 'cubic_spline'
  GAMMA =  0.00000000000000E+00
  BLOAT =  1.00000000000000E+00
  SPRES_PED =  1.00000000000000E+00
  AM_AUX_F = 5.7987903122e+04      5.7152921444e+04      5.6127917699e+04      5.4954798561e+04      5.3669622346e+04      5.2303178636e+04      5.0881538678e+04      4.9426572228e+04      4.7956429898e+04      4.6485990907e+04      4.5027276587e+04      4.3589830215e+04      4.2181063979e+04      4.0806574381e+04      3.9470426410e+04      3.8175407367e+04      3.6923254597e+04      3.5714855581e+04      3.4550422888e+04      3.3429645632e+04      3.2351819062e+04      3.1315953953e+04      3.0320867468e+04      2.9365257183e+04      2.8447759922e+04      2.7566997071e+04      2.6721608020e+04      2.5910272902e+04      2.5131726768e+04      2.4384766230e+04      2.3668249975e+04      2.2981094486e+04      2.2322266147e+04      2.1690770841e+04      2.1085642056e+04      2.0505928406e+04      1.9950681367e+04      1.9418943945e+04      1.8909740897e+04      1.8422070776e+04      1.7954900541e+04      1.7507162827e+04      1.7077756014e+04      1.6665547196e+04      1.6269378019e+04      1.5888073261e+04      1.5520451954e+04      1.5165340721e+04      1.4821588987e+04      1.4488085598e+04      1.4163776275e+04      1.3847681577e+04      1.3538914609e+04      1.3236697680e+04      1.2940377473e+04      1.2649438001e+04      1.2363510686e+04      1.2082380909e+04      1.1805990414e+04      1.1534435019e+04      1.1267957095e+04      1.1006932423e+04      1.0751851135e+04      1.0503292476e+04      1.0261893042e+04      1.0028309123e+04      9.8031730703e+03      9.5870441888e+03      9.3803548471e+03      9.1833527176e+03      8.9960403404e+03      8.8181134866e+03      8.6489001194e+03      8.4873020823e+03      8.3317419448e+03      8.1801175810e+03      8.0297692222e+03      7.8774614245e+03      7.7193845646e+03      7.5511807170e+03      7.3679992160e+03      7.1645878899e+03      6.9354265997e+03      6.6749103386e+03      6.3775897912e+03      6.0384779561e+03      5.6534322364e+03      5.2196232788e+03      4.7360980605e+03      4.2044523774e+03      3.6296254870e+03      3.0208296361e+03      2.3926295839e+03      1.7661879682e+03      1.1706935033e+03      6.4499038466e+02      2.3943027903e+02      1.7995227582e+01      0.0000000000e+00
  AM_AUX_S = 0.0000000000e+00      1.0204081633e-02      2.0408163265e-02      3.0612244898e-02      4.0816326531e-02      5.1020408163e-02      6.1224489796e-02      7.1428571429e-02      8.1632653061e-02      9.1836734694e-02      1.0204081633e-01      1.1224489796e-01      1.2244897959e-01      1.3265306122e-01      1.4285714286e-01      1.5306122449e-01      1.6326530612e-01      1.7346938776e-01      1.8367346939e-01      1.9387755102e-01      2.0408163265e-01      2.1428571429e-01      2.2448979592e-01      2.3469387755e-01      2.4489795918e-01      2.5510204082e-01      2.6530612245e-01      2.7551020408e-01      2.8571428571e-01      2.9591836735e-01      3.0612244898e-01      3.1632653061e-01      3.2653061224e-01      3.3673469388e-01      3.4693877551e-01      3.5714285714e-01      3.6734693878e-01      3.7755102041e-01      3.8775510204e-01      3.9795918367e-01      4.0816326531e-01      4.1836734694e-01      4.2857142857e-01      4.3877551020e-01      4.4897959184e-01      4.5918367347e-01      4.6938775510e-01      4.7959183673e-01      4.8979591837e-01      5.0000000000e-01      5.1020408163e-01      5.2040816327e-01      5.3061224490e-01      5.4081632653e-01      5.5102040816e-01      5.6122448980e-01      5.7142857143e-01      5.8163265306e-01      5.9183673469e-01      6.0204081633e-01      6.1224489796e-01      6.2244897959e-01      6.3265306122e-01      6.4285714286e-01      6.5306122449e-01      6.6326530612e-01      6.7346938776e-01      6.8367346939e-01      6.9387755102e-01      7.0408163265e-01      7.1428571429e-01      7.2448979592e-01      7.3469387755e-01      7.4489795918e-01      7.5510204082e-01      7.6530612245e-01      7.7551020408e-01      7.8571428571e-01      7.9591836735e-01      8.0612244898e-01      8.1632653061e-01      8.2653061224e-01      8.3673469388e-01      8.4693877551e-01      8.5714285714e-01      8.6734693878e-01      8.7755102041e-01      8.8775510204e-01      8.9795918367e-01      9.0816326531e-01      9.1836734694e-01      9.2857142857e-01      9.3877551020e-01      9.4897959184e-01      9.5918367347e-01      9.6938775510e-01      9.7959183673e-01      9.8979591837e-01      1.0000000000e+00
!----- Current/Iota Parameters -----
  CURTOR =  1.401766E+06
  NCURR = 1
  PIOTA_TYPE = 'power_series'
  PCURR_TYPE = 'cubic_spline_Ip'
  AI =   9.505223E-01
     8.664788E-01  -1.999345E+01   1.462790E+02  -7.786226E+02   2.809674E+03
    -6.602835E+03   9.882455E+03  -9.050012E+03   4.611235E+03  -9.998666E+02
  AI_AUX_F = 0.0
  AI_AUX_S = 0.0
  AC =  3.4339293E+06
    1.9790689E+06 -2.1233084E+07 -8.0149736E+08  8.5407445E+09 -3.9754562E+10
    1.0406096E+11 -1.6245971E+11  1.4984895E+11 -7.5295245E+10  1.5876209E+10
  AC_AUX_F = 3.4048751000e+06      3.4220975602e+06      3.4309721219e+06      3.4290768887e+06      3.4154294597e+06      3.3899533868e+06      3.3533019286e+06      3.3065969891e+06      3.2512418189e+06      3.1887728784e+06      3.1207458891e+06      3.0486511622e+06      2.9738537015e+06      2.8975540694e+06      2.8207662062e+06      2.7443088950e+06      2.6688085093e+06      2.5947099176e+06      2.5222935115e+06      2.4516964300e+06      2.3829363274e+06      2.3159362849e+06      2.2505497027e+06      2.1865842239e+06      2.1238239403e+06      2.0620493004e+06      2.0010543039e+06      1.9406607942e+06      1.8807295368e+06      1.8211681577e+06      1.7619359946e+06      1.7030460042e+06      1.6445639394e+06      1.5866050697e+06      1.5293287590e+06      1.4729312524e+06      1.4176370432e+06      1.3636892082e+06      1.3113391454e+06      1.2608359283e+06      1.2124158452e+06      1.1662924242e+06      1.1226472315e+06      1.0816217571e+06      1.0433106470e+06      1.0077565004e+06      9.7494640702e+05      9.4481035076e+05      9.1722155893e+05      8.9199882344e+05      8.6891076248e+05      8.4768192619e+05      8.2800071762e+05      8.0952888557e+05      7.9191236137e+05      7.7479318493e+05      7.5782221377e+05      7.4067227646e+05      7.2305140367e+05      7.0471574326e+05      6.8548174307e+05      6.6523716928e+05      6.4395053469e+05      6.2167851500e+05      5.9857084146e+05      5.7487240327e+05      5.5092215887e+05      5.2714853632e+05      5.0406106623e+05      4.8223805933e+05      4.6231022431e+05      4.4494021658e+05      4.3079821192e+05      4.2053366594e+05      4.1474294338e+05      4.1394511854e+05      4.1851586665e+05      4.2869151822e+05      4.4450156695e+05      4.6574226973e+05      4.9194251840e+05      5.2233523601e+05      5.5583588168e+05      5.9103052795e+05      6.2617637615e+05      6.5921797574e+05      6.8782288276e+05      7.0944011709e+05      7.2139358329e+05      7.2094840906e+05      7.0560496696e+05      6.7313454627e+05      6.2193233285e+05      5.5130251442e+05      4.6183488918e+05      3.5585524784e+05      2.3795869819e+05      1.1563563385e+05      0.0000000000e+00
  AC_AUX_S = 0.0000000000e+00      1.0204081633e-02      2.0408163265e-02      3.0612244898e-02      4.0816326531e-02      5.1020408163e-02      6.1224489796e-02      7.1428571429e-02      8.1632653061e-02      9.1836734694e-02      1.0204081633e-01      1.1224489796e-01      1.2244897959e-01      1.3265306122e-01      1.4285714286e-01      1.5306122449e-01      1.6326530612e-01      1.7346938776e-01      1.8367346939e-01      1.9387755102e-01      2.0408163265e-01      2.1428571429e-01      2.2448979592e-01      2.3469387755e-01      2.4489795918e-01      2.5510204082e-01      2.6530612245e-01      2.7551020408e-01      2.8571428571e-01      2.9591836735e-01      3.0612244898e-01      3.1632653061e-01      3.2653061224e-01      3.3673469388e-01      3.4693877551e-01      3.5714285714e-01      3.6734693878e-01      3.7755102041e-01      3.8775510204e-01      3.9795918367e-01      4.0816326531e-01      4.1836734694e-01      4.2857142857e-01      4.3877551020e-01      4.4897959184e-01      4.5918367347e-01      4.6938775510e-01      4.7959183673e-01      4.8979591837e-01      5.0000000000e-01      5.1020408163e-01      5.2040816327e-01      5.3061224490e-01      5.4081632653e-01      5.5102040816e-01      5.6122448980e-01      5.7142857143e-01      5.8163265306e-01      5.9183673469e-01      6.0204081633e-01      6.1224489796e-01      6.2244897959e-01      6.3265306122e-01      6.4285714286e-01      6.5306122449e-01      6.6326530612e-01      6.7346938776e-01      6.8367346939e-01      6.9387755102e-01      7.0408163265e-01      7.1428571429e-01      7.2448979592e-01      7.3469387755e-01      7.4489795918e-01      7.5510204082e-01      7.6530612245e-01      7.7551020408e-01      7.8571428571e-01      7.9591836735e-01      8.0612244898e-01      8.1632653061e-01      8.2653061224e-01      8.3673469388e-01      8.4693877551e-01      8.5714285714e-01      8.6734693878e-01      8.7755102041e-01      8.8775510204e-01      8.9795918367e-01      9.0816326531e-01      9.1836734694e-01      9.2857142857e-01      9.3877551020e-01      9.4897959184e-01      9.5918367347e-01      9.6938775510e-01      9.7959183673e-01      9.8979591837e-01      1.0000000000e+00

Here the NCURR variable indicates that we wish to specify the current profile and the PCURR_TYPE indicates that we are specifying it as a cubic spline over I-prime(s). The power of the splines is that the user may provide an arbitrary level of detail to their profile and select higher data density where profiles are varying rapidly.