Maintainers
Pricing
Enterprise
More
More
Documentation
Try Live
Rankings
Install
Blog
Docs7
Ask
New
Add Docs
STELLOPT
https://princetonuniversity.github.io/STELLOPT
Admin
STELLOPT is a stellarator optimization suite designed to optimize three-dimensional
...
Tokens:
149,632
Snippets:
798
Trust Score:
9.7
Update:
1 month ago
Context
Chat
Benchmark
Latest
Show doc for...
Code
Info
Show Results
Tokens:
Raw
Copy
Link
Tokens:
Raw
Copy
Link
### Install external dependencies via EPEL Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20Redhat Download and install the EPEL repository, then install NetCDF, NCL, and HDF5 packages. ```bash wget http://mirrors.mit.edu/epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6-8.noarch.rpm yum -assumeyes install netcdf* yum install ncl* yum install hdf5* ``` -------------------------------- ### NMORPH Execution Example Source: https://princetonuniversity.github.io/STELLOPT/NMORPH Example command line execution of NMORPH with specified input files and surface/mode parameters. ```bash NMORPH -a axis.test -dom boundary.test -i iboundary.test -g extended_mesh -cf extended_field -c coils.test -s 99 -m_use 8 -n_use 6 ``` -------------------------------- ### Verify COILOPT++ Compilation Support Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Coil%20Optimization%20Old Example of the terminal output confirming that COILOPT++ libraries were detected during the STELLOPT setup process. ```bash --------------------------------------------------- COILOPT++ libraries where located in /u/user/src/COILOPT++/ Build with COILOPT++ support? (default: y) --------------------------------------------------- y / n : y Compiling with COILOPT++ support! ``` -------------------------------- ### BOOTSJ Input File Example Source: https://princetonuniversity.github.io/STELLOPT/BOOTSJ Example input file content for calculating bootstrap current on surfaces 2, 5, and 37 for a VMEC run with the extension 'test'. ```fortran test 2 5 37 ``` -------------------------------- ### Install Homebrew dependencies Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20OS%20X%20Brew Install the required system packages for STELLOPT using Homebrew. ```bash # gcc10 : Working # gcc11 : Issue with hdf5 23.02.2024 # gcc12 : Issue with hdf5 23.02.2024 # gcc13 : Working as of 14.11.2024 # gcc14 : Libraries still missing (14.11.2024) brew install git brew install gcc brew install openmpi brew install netcdf brew install netcdf-fortran brew install fftw brew install openblas brew install scalapack brew install python3 # All other python modules should be handled durring # install using pip and setuptools ``` -------------------------------- ### COBRAVMEC Input File Format (pre 4.1) Source: https://princetonuniversity.github.io/STELLOPT/COBRAVMEC Example of the legacy input file structure for COBRAVMEC, specifying starting angles and surfaces for growth rate calculations. ```text 5 5 test 0.00 1.58 3.14 4.78 5.46 0.00 1.58 3.14 4.62 5.00 5 20 30 40 50 60 ``` -------------------------------- ### Interactive Execution Example Source: https://princetonuniversity.github.io/STELLOPT/DESCUR Example of an interactive session running the DESCUR executable. ```text >~/bin/xcurve Enter spectral convergence parameter = 0 for polar, = 1 for equal arclength >1 for smaller spectral width = 4 corresponds to STELLOPT choice): 4 Use (default) VMEC-compatible compression (V) or Advanced Hirshman-Breslau compression (A): V Select source of curve data to be fit: 0 : Points from file 1 : Fourier coeffs from file (wout file allowed) 2 : Solove'ev Equilibrium 3 : Assorted 2-D shapes 3 Shape to fit: 1=ellipse; 2=D; 3=bean; 4=belt; 5=square; 6=heliac) 3 ORDERING SURFACE POINTS Average elongation = 1.2850E+00 Raxis = 3.0000E+00 Zaxis = -6.4514E-17 Number of Theta Points Matched = 400 Number of Phi Planes = 1 Max Poloidal Mode Number = 19 Max Toroidal Mode Number = 1 Fitting toroidal plane # 1 RAXIS = 3.000E+00 ZAXIS = -6.451E-17 R10 = 1.697E+00 ITERATIONS RMS ERROR FORCE GRADIENT <M> MAX m DELT 1 1.604E-02 8.625E-04 1.66 19 9.70E-01 100 3.179E-05 2.417E-05 1.69 19 9.70E-01 114 1.161E-05 8.099E-06 1.69 19 9.70E-01 ANGLE CONSTRAINTS WERE APPLIED BASED THE POLAR DAMPING EXPONENT (PEXP) = 4 RM**2 + ZM**2 SPECTRUM COMPUTED WITH P = 4.00 AND Q = 1.00 TIME: 6.21E-02 SEC. OUTPUTTING FOURIER COEFFICIENTS TO OUTCURVE FILE Do you wish to plot this data (Y/N)? N ``` -------------------------------- ### TORLINES Execution Example Source: https://princetonuniversity.github.io/STELLOPT/TORLINES An example of running TORLINES using mpirun, showing the resulting console output and parameter summary. ```bash >mpirun -np 64 ~/bin/xtorlines -vmec ncsx_c09r00_free -coil coils.c09r00 -auto TORLINES Version 1.00 -----TORLINES File Parameters----- k: 70 nu: 90 nv: 60 bound_sep: 1.200 -----VMEC File Parameters----- file: ncsx_c09r00_free m: 11 nu: 90 n: 6 nv: 60 mnmax: 137 nfp: 3 ns: 99 Total Current: -178.653 [kA] ----- Vacuum Grid Info. ----- Eq. Surface: 59 Grid Points: 59400 ----- COILS Information ----- FILE: coils.c09r00 Coil Periodicity: 3 Current Systems: 10 Current Type: SCALED Num Coils = 6 EXTCUR = 652.272 [kA] Num Coils = 6 EXTCUR = 651.869 [kA] Num Coils = 6 EXTCUR = 537.744 [kA] Num Coils = 8 EXTCUR = 0.000 [A] Num Coils = 8 EXTCUR = 0.000 [A] Num Coils = 8 EXTCUR = 28.095 [kA] Num Coils = 12 EXTCUR = -54.805 [kA] Num Coils = 4 EXTCUR = 30.123 [kA] Num Coils = 2 EXTCUR = 94.241 [kA] Num Coils = 18 EXTCUR = 45.514 [kA] Vacuum Field Calculation [ 99]% ----- Virtual Casing Information ----- INTEGRAL TYPE: Surface Current MIN_GRID_DISTANCE = 6.0493E-02 NORMAL_AREA = 2.4595E+01 NR = 1; NU = 128; NV = 128; NFP = 3 NUVP = 49152 ABS_TOL = 0.0000E+00; REL_TOL = 5.0000E-03 MIN_CLS = 0 (16777216) Plasma Field Calculation [ 99]% ---------- EXECUTION ---------- ---- Rough GRID ---- rho = [ 0.00000, 1.00000]; ----- FOLLOWING FIELD LINES ----- Method: NAG Lines: 201 Steps: 180000 Delta-phi: 0.3491E-01 Tol: 0.1000E-08 Type: M Fieldline Calculation [ 75]% ---- Edge GRID ---- rho = [ 0.78824, 1.00000]; ----- FOLLOWING FIELD LINES ----- Method: NAG Lines: 201 Steps: 180000 Delta-phi: 0.3491E-01 Tol: 0.1000E-08 Type: M Fieldline Calculation [ 75]% ---- Final GRID ---- rho = [ 0.00000, 1.00000]; ----- FOLLOWING FIELD LINES ----- Method: NAG Lines: 201 Steps: 180000 Delta-phi: 0.3491E-01 Tol: 0.1000E-08 Type: M Fieldline Calculation [ 83]% ---------- TORLINES DONE ---------- ``` -------------------------------- ### Install STELLOPT dependencies via apt-get Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20Debian Use these commands to install the required compilers, libraries, and tools on a Debian system. ```bash sudo apt-get install git sudo apt-get install gcc sudo apt-get install gfortran sudo apt-get install openmpi-bin sudo apt-get install libopenmpi-dev sudo apt-get install libopenblas-dev sudo apt-get install libscalapack-openmpi-dev sudo apt-get install libnetcdf-dev sudo apt-get install libnetcdff-dev sudo apt-get install libhdf5-openmpi-dev sudo apt-get install hdf5-tools sudo apt-get install python3 pip ######### FOR MANGO ############# sudo apt-get install libnlopt-dev sudo apt-get install libnlopt-cxx-dev sudo apt-get install libeigen3-dev sudo apt-get install libgsl-dev ``` -------------------------------- ### TERPSICHORE Input Configuration Source: https://princetonuniversity.github.io/STELLOPT/Tutorial%20TERPSICHORE%20NCSX Example configuration file for TERPSICHORE, defining Fourier coefficients and equilibrium parameters. ```text ncsx_c09r00_fixed C C MM NMIN NMAX MMS NSMIN NSMAX NPROCS INSOL 32 -16 16 55 -7 7 1 0 C C TABLE OF FOURIER COEFFIENTS FOR BOOZER COORDINATES C EQUILIBRIUM SETTINGS ARE COMPUTED FROM FIT/VMEC C C M= 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 N 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 -16 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 16 C LLAMPR LVMTPR LMETPR LFOUPR 0 0 0 0 LLHSPR LRHSPR LEIGPR LEFCPR 9 9 1 1 LXYZPR LIOTPL LDW2PL LEFCPL 0 1 1 1 LCURRF LMESHP LMESHV LITERS 1 1 3 1 LXYZPL LEFPLS LEQVPL LPRESS 1 1 0 2 C C PVAC PARFAC QONAX QN DSVAC QVAC NOWALL 1.0001E+00 0.0000E+00 2.8323E+00 0.0000E+00 1.0000E+00 1.0001E+00 -2 C C AWALL EWALL DWALL GWALL DRWAL DZWAL NPWALL 1.5000E+00 1.0000E+00 5.0000E-01 1.4960E+00 0.0000E+00 0.0000E+00 3 C C RPLMIN XPLO DELTAJP WCT CURFAC 1.0000E-05 1.0000E-06 4.0000E-02 1.0578E-01 1.0000E+00 C C MODELK = 1 C C NUMBER OF EQUILIBRIUM FIELD PERIODS PER STABILITY PERIOD: NSTA = 3 C C TABLE OF FOURIER COEFFIENTS FOR STABILITY DISPLACEMENTS C C M= 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 N 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -6 ``` -------------------------------- ### Execution Command Source: https://princetonuniversity.github.io/STELLOPT/EXTENDER Example command to execute EXTENDER on 4 processors using mpirun. ```bash > mpirun -np 4 ./bin/EXTENDER -vmec2000 wout.test -i extender_in.test -c coils.test_machine -NU 360 -NV 72 -s test ``` -------------------------------- ### Compile pySTEL Source: https://princetonuniversity.github.io/STELLOPT/pySTEL Builds LIBSTELL and installs Python components using pip and setuptools. ```bash make pystel ``` -------------------------------- ### Install optional dependencies Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20OS%20X%20Brew Additional packages required for specific codes like TRAVIS and SFINCS. ```bash ############ TRAVIS ############ brew install netcdf-cxx ############ SFINCS ############ brew install superlu brew install petsc ``` -------------------------------- ### Set environment variables and build Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20OS%20X%20Brew Configure the environment and execute the build script. ```bash export STELLOPT_PATH=<path to your repository> export MACHINE=osx_brew ./build_all ``` ```bash ./build_all >& stellopt_build.log ``` -------------------------------- ### Example cobra_grate.ext output format Source: https://princetonuniversity.github.io/STELLOPT/COBRAVMEC The output file contains growth rates for each surface, grouped by starting zeta and theta positions. ```text 0.000E+00 0.000E+00 4 2 -5.35845793E-02 3 -6.64339650E-02 4 -7.78813285E-02 5 -8.61553492E-02 3.140E+00 0.000E+00 4 2 -5.19600197E-02 3 -6.72031207E-02 4 -7.57780371E-02 5 -8.64640971E-02 ``` -------------------------------- ### Configure STELLOPT Input File for COILOPT++ Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Coil%20Optimization%20Old Example of the &OPTIMUM namelist configuration including coil optimization parameters like NPOPULATION, NU_BNORM, and TARGET_COIL_BNORM. ```fortran &OPTIMUM !-------------------------------------------------------------------- ! Optimizer Run Control Parameters !-------------------------------------------------------------------- NFUNC_MAX = 100 EQUIL_TYPE = 'vmec2000' OPT_TYPE = 'lmdif' FTOL = 1.000000000000E-006 XTOL = 1.000000000000E-030 GTOL = 1.000000000000E-030 EPSFCN = 1.000000000000E-005 FACTOR = 1.000000000000E+002 MODE = 1 NPOPULATION = 10 !-------------------------------------------------------------------- ! OPTIMIZED QUANTITIES !-------------------------------------------------------------------- LRHO_OPT(-5:5,0) = 11*T LRHO_OPT(-5:5,1) = 11*T LRHO_OPT(-5:5,2) = 11*T LRHO_OPT(-5:5,3) = 11*T LRHO_OPT(-5:5,4) = 11*T LRHO_OPT(-5:5,5) = 11*T LRHO_OPT(-5:5,6) = 11*T LRHO_OPT(-5:5,7) = 11*T LBOUND_OPT(1:4,0) = 4*T RHO_EXP = 4 !-------------------------------------------------------------------- ! COIL OPTIMIZATION !-------------------------------------------------------------------- NU_BNORM = 256 NV_BNORM = 64 TARGET_COIL_BNORM = 0.000000000000E+000 SIGMA_COIL_BNORM = 1.000000000000E+000 / &END ``` -------------------------------- ### COILOPT++ Input Configuration Source: https://princetonuniversity.github.io/STELLOPT/COILOPT Example of the text-based input file used to define file paths, optimization parameters, and physical constraints for the COILOPT++ code. ```C++ cwsfilename[0] = cws // Coil winding surface file (multiple may be specified) modsplinename[0] = fd.spline // Modular coil spline file (number matches surface) Bmatch.woutname = wout.vmec_test // Text VMEC file name Bmatch.cdfname = wout_vmec_test.nc // netCDF VMEC file name Bmatch.bnormname = bnorm.vmec_test // Normal field file (as calculated by BNORM code) Bmatch.bgridname = bgrid.dat // Normal field file (B on grid?) Bmatch.beqoutname = b_norm_eq.dat // Equilibrium normal field grid file (produced by COILOPT++) Bmatch.bcoiloutprefix = b_norm_final // Prefix for final coil normal field (produced by COILOPT++) tvinname = tv.in tvoutprefix = tv xyzname = coilxyz.dat uvroot = uv xyzfized[0] = coils.machine_aux // Auxilliary coils file (one for each auxilliary current group) Bmatch.normalize = 1; // On by default. Bmatch.nu = 16; // Number of pts in u direction at which to compare // B_normal_plasma with B_normal_coils // Note: if this is left at zero, it will be reset to // 4 times the maximum poloidal mode number in the // Fourier expansion of the plasma field. Bmatch.nv = 32; // Number of pts in v direction at which to compare // B_normal_plasma with B_normal_coils // Note: if this is left at zero, it will be reset to // 4 times the maximum toroidal mode number in the // Fourier expansion of the plasma field. ncwss = 1; // Just one winding surface by default. Ip_targ = 0.0; // Use plasma equilibrium value by default. curscale[0] = 1.0 // Rescale current by specified amount (number matches surface) targlenfactor[0] = 0.0; // coil length to target lmodcur[0] = 1 // Vary coil current lmodgeom = 1 // Vary coil geometry lconstrainIp = 1 curscal[iws] = 1.0; // Rescale currents by specified amount targlenfactor[iws] = 0.0; // Make coils as short as possible lmodcur[iws] = 1; lmodgeom = 1; lconstrainIp[iws] = 0; lsamecur[iws] = 0; sadcircvurat[iws] = 0.0; curvar = 0.04; curautoscal = 1; // Rescale currents to match target R BT at plasma surface bgtfR0B0 = 0.0; // Note: I_TF = 5e+06 * bgtfR0B0 nfixedgeom = 0; // By default, don't read in fixed unsplined coilsets. lccfixed[0] = 0; // By default, fixed geom. coil current can vary. lverbose = 0; nseg_curv = 400; nseg_coil = 100; dphiguess = 0.1; maxcurv = -0.105; // Set negative to use constant coil spacing (faster) smartcc = 0; minccsep = 0.0; // No penalty for touching coils powccsep = 2.0; ssexcfracw = 0.1; for (int icoil=0; icoil<MAXSC; icoil++) { // No bounds on saddle pos. by default sadmodl[icoil] = settings.sadmodr[icoil] = -1; sadrectumin[icoil] = settings.sadrectvmin[icoil] = 0.0; sadrectumax[icoil] = settings.sadrectvmax[icoil] = 1.0; } sadmodws = 0; sadmodwf = 0.04; sadrectpfw = 0.02; ``` -------------------------------- ### Configure BOOTIN Namelist in Input File Source: https://princetonuniversity.github.io/STELLOPT/Bootstrap%20Calculation%20for%20NCSX-Like%20configuration Define the BOOTIN namelist within the input file to set simulation parameters like temperature profiles and density. ```fortran &INDATA MGRID_FILE = 'none' LFREEB = F DELT = 9.00E-01 TCON0 = 2.00E+00 . . . RBC(1,10) = -1.08453911913102E-06 ZBS(1,10) = 8.60890353665843E-05 RBC(2,10) = 1.04051545504927E-04 ZBS(2,10) = -2.17661420286656E-04 RBC(3,10) = -5.21965328013036E-04 ZBS(3,10) = -2.67111216700977E-04 RBC(4,10) = -4.95991087393098E-04 ZBS(4,10) = 2.43875640076056E-05 RBC(5,10) = -1.94520415280627E-04 ZBS(5,10) = 1.55759001593971E-04 RBC(6,10) = -6.94143617569942E-05 ZBS(6,10) = 4.40565098025554E-05 / &BOOTIN MBUSE = 72 ! From Boozer Transformation NBUSE = 24 ! From Boozer Transformation ZEFF1 = 1.0 DAMP_BS = 0.001 TEMPRES = 1.0 ! Coefficient Te=P^TEMPRES TETI = 1.0 ! Te/Ti DENS0 = 1.0 ! 10^20 [m^-3] / ``` -------------------------------- ### Install system packages via yum Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20Redhat Install the required GNU compilers, OpenMPI, and LAPACK libraries using the yum package manager. ```bash yum install gcc* yum install openmpi* yum install lapack* ``` -------------------------------- ### NEO Input Configuration File Source: https://princetonuniversity.github.io/STELLOPT/NEO%20tutorial Example of a standalone NEO input file. The file uses a specific text format rather than a Fortran namelist. ```text this line is ignored this line is ignored this line is ignored this line is ignored neo_out 10 ! no_fluxs = Number of flux surfaces to analyze. 9 19 29 39 49 59 69 79 89 99 ! fluxs_arr = Indices of flux surfaces to analyze. 200 ! theta_n 200 ! phi_n 0 ! max_m_mode 0 ! max_n_mode 75 ! npart 1 ! multra 0.01 ! acc_req 100 ! no_bins 75 ! nstep_per 500 ! nstep_min 2000 ! nstep_max 0 ! calc_nstep_max 1 ! eout_swi 0 ! lab_swi 0 ! inp_swi 2 ! ref_swi 1 ! write_progress 0 ! write_output_files 0 ! spline_test 0 ! write_integrate 0 ! write_diagnostic this line is ignored this line is ignored this line is ignored 0 ! calc_cur neo_cur 0 ! npart_cur 0 ! alpha_cur 0 ! write_cur_inte ``` -------------------------------- ### Install Dependencies via MacPorts Source: https://princetonuniversity.github.io/STELLOPT/STELLOPT%20Compilation%20OS%20X%20MacPorts Commands to install required compilers, libraries, and Python modules. Replace gccXX and pythonYYY with the desired versions. ```bash # gcc10 : Working # gcc11 : Issue with hdf5 23.02.2024 # gcc12 : Issue with hdf5 23.02.2024 # gcc13 : Working as of 14.11.2024 # gcc14 : Working as of 18.09.2025 # gcc15 : No OpenMPI as of 18.09.2025 export MACOSX_DEPLOYMENT_TARGET=26.0 # Needed at the 10.15->26.0 phase sudo port install git sudo port install gccXX (gccXX should be gcc10 or another gcc variant) sudo port install openmpi-gccXX +fortran # The next two are needed for hdf5 and netcdf to build properly sudo port install llvm-18 sudo port install clang-18 +analyzer +libstdcxx sudo port select --set mpi openmpi-gccXX-fortran sudo port select --set gcc mp-gccXX sudo port select --set clang mp-clang-17 sudo port select --set llvm mp-llvm-18 # Because of dependencies if HDF5 can't be built with +openmpi neither can netcdf sudo port install hdf5 +fortran +hl +gccXX (+openmpi issue with libc++) sudo port install netcdf (+openmpi issue with libc++) sudo port install netcdf-fortran +gccXX (+openmpi issue with libc++) sudo port install fftw-3 +openmpi +gccXX # This section for using OpenBLAS sudo port install OpenBLAS +lapack +native +gccXX sudo port install scalapack +openmpi +openblas +gccXX # This section for using the Accelerate Framework sudo port install scalapack +openmpi +accelerate +gccXX sudo port install pythonYYY sudo port select --set python pythonYYY sudo port select --set python3 pythonYYY sudo port install pyYYY-pip sudo port select --set pip pipYYY sudo port select --set pip3 pipYYY # All other python modules should be handled durring # install using pip and setuptools ```