STELLOPT

State-of-the-art stellarator optimization code

NEO

The NEO code (Nemov V. V., Kasilov S.V., Kernbichler W., and Heyn M. F., "Evaluation of 1/nu neoclassical transport in stellarators" Phys. of Plas., 6 (12), 1999) calculates neoclassical transport coefficients in the 1/nu for a given set of Boozer coordinates generated by BOOZ_XFORM.


Theory

The NEO code solves for the neoclassical transport coefficients for the 1/nu regime using an analytic solution of the banana kinetic equation. The code makes no simplifying assumptions about the magnetic field and all classes of trapped particles are taken into account. The main purpose of the code is to calculate the effective helical ripple for a given VMEC equilibria. This is achieved through conversion of the VMEC coordinate system to Boozer coordinates.


Compilation

NEO is a component of the STELLOPT suite of codes. Compilation of the STELLOPT suite is discussed on the STELLOPT Compilation Page.


Input Data Format

The NEO code utilizes a text file for runtime control. The text file allows the user to specify 3 lines of commentary which are not read by the code. The following example shows an input file. Commentary lines (denoted by '!') are for explanation and would cause an error condition if they were present.

'#'
'#'
'#'
boozmn.ext          ! Boozer output file to utilize in calculation.
neo_out.ext         ! NEO output file name
 9                  ! Number of surfaces on which to conduct calculation
 2 3 4 5 6 7 8 9 10 ! Surfaces on which calculation is to be conducted (number must match above number)
 200                ! Number of points in theta (>100)
 200                ! Number of points in zeta (>100)
 0                  ! Maximum poloidal mode number
 0                  ! Maximum toroidal mode number
 50                 ! Number of test particles for J_perp integration (>50)
 1                  ! Maximum number of trapped particles (1: singly trapped, 2: doubly trapped....n-trapped)
 0.01               ! Required accuracy for each integration along field line (~0.01 is good)
 100                ! Number of bins in poloidal direction to be filled on a toroidal cut (~100)
 50                 ! Number of integration steps per field period (>50)
 500                ! Minimum number of field periods to traverse (>=500)
 5000               ! Maximum number of field periods to traverse (>=2000)
 0                  ! CALC_NSTEP_MAX
 1                  ! Output control (1: basic, 2: detailed, 10: simple)
 0                  ! Lab specific switch (0: PPPL)
 0                  ! Input format swtich (0: BOOZ_XFORM)
 2                  ! Reference |B| value for eps_eff (1: inner flux surface, 2: max on flux surface)
 0                  ! WRITE_PROGRESS
 0                  ! Controls additional output (0: none, 1: theta/phi dump)
 0                  ! Spline routine testing (0: none, 1: along given phi, 2: along given theta, 3: diagonal)
 0                  ! Write integration quantities (conver.dat)
 0                  ! Write diagnostic quantities (diagnostic.dat and diagnostic_add.dat)
'#'
'#'
'#'
 0                  ! CALC_CUR
neo_cur.ext         ! CUR_FILE
200                 ! NPART_CUR
2                   ! ALPHA_CUR
0                   ! WRITE_CUR_INTE

Execution

The NEO code takes the neo_in file extension as a command line arguments at runtime. For example if we had a file 'neo_in.test' file we could execute NEO by the following command:

yourmachine:0005> ~/bin/xneo test

Output Data Format

The NEO code has variable output which is controlled by the EOUT_SWI, WRITE_PROGRESS, and CALC_CUR variables. The WRITE_PROGRESS variable controls output to standard out. Setting its value to 0 supreses this output. The code always writes textual output to the 'neolog.ext' file, where 'ext' is the output extension. The following table explains the columns of the this file:

PSI_IND   N_IOTA   M_IOTA   N_GAP   NFP_RAT   NFL_RAT   N   EPSTOT
------------------------------------------------------
PSI_IND:
N_IOTA:
M_IOTA:
N_GAP:
NFP_RAT:
NFL_RAT:
N:
EPSTOT:          Total epsilon effective (eps_eff)^(3/2)

The EOUT_SWI controls the format of the 'neo_out' file (=1,2,10). The following tables explain the columns of the textual output found in this file: EOUT_SWI = 1

SURFACE_LABEL   EPSTOT   REFF   IOTA   B_REF   R_REF
------------------------------------------------------
SURFACE_LABEL:   Indicates flux surface
EPSTOT:          Total epsilon effective (eps_eff)^(3/2)
REFF:
IOTA:            Rotational transform
B_REF:           Reference value of |B|
R_REF:           Reference value of |R|

EOUT_SWI = 2

SURFACE_LABEL   EPSTOT   REFF   IOTA   B_REF   R_REF   EPSPAR(1)   EPSPAR(2)   CTRONE   CTRTOT   BAREPH   BAREPT   YPS
----------------------------------------------------------------------------------------------------------------------
SURFACE_LABEL:   Indicates flux surface
EPSTOT:          Total epsilon effective (eps_eff)^(3/2)
REFF:
IOTA:            Rotational Transform
B_REF:           Reference value of |B|
R_REF:           Reference value of |R|
EPSPAR(1):       Contribution to effective ripple from singly trapped particles
EPSPAR(2):       Contribution to effective ripple from singly and doubly trapped particles
CTRONE:          Fraction of singly trapped particles
CTRTOT:          Fraction of all trapped particles
BAREPH:          'Ripple' amplitude defined through fraction of singly trapped particles
BAREPT:          'Toroidal' amplitude defined through full fraction of trapped particles

EOUT_SWI = 10

B_REF   R_REF   EPSTOT
-----------------------
B_REF:           Reference value of |B|
R_REF:           Reference value of |R|
EPSTOT:          Total epsilon effective (eps_eff)^(3/2)

If the CALC_CUR variable is set to 1 then the file specified by CUR_FILE (see above) will contain textual output. The following table explains the columns of the this file:

PSI_IND   LAMBDA_B   LAMBDA_PS1   LAMBDA_PS2   LAMBDA_B1   LAMBDA_B2

Visualization

The data present in the files output by NEO is in a textual table form. Most plotting packages should be able to plot this output.


Tutorials

Running NEO for an NCSX configuration