Computes, analyzes and optimizes 3D MHD equilibria for stellarators and tokamaks
Project description
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/inputfile>
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 can be ran in two ways:
The first is through an input file specifying the equilibrium and solver options, this way can also can also accept VMEC input files.
The second is through a python script, where the equilibrium and solver options are specified programmatically, this method offers much more flexibility over what types of equilibrium solution, optimization and analysis can be performed. See the tutorial Script Interface for more detailed information.
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 of the input file method, 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 desc/examples/DSHAPE
, where the -p
flag tells DESC to plot the results once it finishes.
An example of the script usage to solve and optimize an equilibrium, refer to the python script desc/examples/precise_QA.py, which can be run from the DESC
directory from the command line with python3 desc/examples/precise_QA.py
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file desc-opt-0.10.3.tar.gz
.
File metadata
- Download URL: desc-opt-0.10.3.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f2ab47ba1d20ad69c358dda0401415dc3e59096aa6c1f92e163a8b233298912 |
|
MD5 | 27d8fd856d92b2a6bbc9df4e920b4988 |
|
BLAKE2b-256 | 9bc955f8582cc67ab38c2be469f2fbc286e2d107bcde7ba11ba10be62c83aec4 |
File details
Details for the file desc_opt-0.10.3-py3-none-any.whl
.
File metadata
- Download URL: desc_opt-0.10.3-py3-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26439ffa8d96d25e41e6907df8a2b97aaaf6fa35ba8729477459768ca59085f6 |
|
MD5 | 3b90936c68ece0324071c8018235fa06 |
|
BLAKE2b-256 | c7558e5972045f3f6a043d60adcca29752ab081f6bf9213262c1b6d38e156152 |