Stellarator Optimization Package
DESC solves for and optimizes 3D MHD equilibria using pseudo-spectral numerical methods and automatic differentiation.
The theoretical approach and implementation details used by DESC are presented in these papers [1] [2] [3] [4] and documented at Theory. Please cite our work if you use DESC!
Quick Start
The easiest way to install DESC is from pypi: pip install desc-opt
For more detailed instructions on installing DESC and its dependencies, see Installation.
The code is run using the syntax desc <path/to/input_file>
and the full list of command line options are given in Command Line Interface. (Note that you may have to prepend the command with python -m
)
DESC requires an input file to specify the equilibrium and solver options, and can also accept VMEC input files.
Refer to Inputs for documentation on how to format the input file.
The equilibrium solution is output in a HDF5 binary file, whose format is detailed in Outputs.
As an example usage, to use DESC to solve for the equilibrium of the high-beta, D-shaped plasma described with the DSHAPE input file, the command from the DESC
directory is
desc -p examples/DESC/DSHAPE
Where the -p
flag tells DESC to plot the results once it finishes.
Repository Contents
desc contains the source code including the main script and supplemental files. Refer to the API documentation for details on all of the available functions and classes.
docs contains the documentation files.
examples contains example input files along with corresponding DESC solutions, which are also accessible using the desc.examples.get function.
tests contains routines for automatic testing.
Contribute
- Using DESC Interactively
- Using DESC Interactively (Using Spline Basis for profiles)
- Saving To VMEC-Formatted Output
- Solving Equilibria with Fixed Axis and Fixed NAE O(rho) Behavior in DESC
- Creating a DESC Equilibrium from a pyQsc Near-Axis Equilibrium
- Solving Equilibria with Fixed Axis and Fixed NAE \(O(\rho)\) Behavior in DESC
- Solving Current-Constrained Equilibria