This code constructs globally quasi-symmetric stellarator equilibria with anisotropic pressure near axis expansion to any order.
Click here to read pyAQSC documentations.
The python codes requires Numpy, Matplotlib, and JAX. To install a JAX version matching your hardware, see the official JAX installation guide.
The Maxima notebooks requires wxMaxima to view. The notebooks are not required to run the main code, but contains source expressions much of code is parsed from.
βββ README.MD
βββ docs/ -> Documentations
βββ dist/ -> Built python package
βββ examples/ -> Jupyter notebooks with use cases for the code.
βββ magnetic_recursion_relations/ -> Maxima notebooks for iterating the
β β magnetic equations
β βββ <Quantity name>.wxmx -> Maxima notebooks for the recursion relations.
β βββ general_formulae/ -> Maxima notebooks directly expanding
β the governing equations. for reference only.
βββ MHD_recursion_relations/ -> Maxima notebooks for iterating the
β β magnetic and force balance equations
β βββ looped.lisp -> Variables associated with the "looped equation"[2].
β β see Looped.wxmx and Looped study simplified.wxmx
β β see for details.
β βββ <Quantity name>.wxmx -> ...
β βββ general_formulae/ -> ...
β
βββ maxima_scripts/ -> Maxima libraries
β βββ near_axis_expansion.mac -> Stores the governing equations and
β β variable dependencies.
β βββ power_mode_matching/ -> A standalone, symbolic infinite/finite
β β β power/Fourier series order/mode matcher.
β β βββ power_matching.mac -> The power series order matcher
β β βββ trig_fourier_or... .mac -> The Fourier series mode matcher
β βββ python_parser.mac -> A code translating maxima summations
β β to python codes. Works with
β β python_source/math_utilities.py
β βββ sbatch_maxima.mac -> A code generating slurm jobscripts for
β β evaluating maxima expressions in parallel
β βββ test_cases/ -> Test cases for Maxima scripts.
βββ src/aqsc/ -> Python source for the main code.
βββ __init__.py
βββ config.py -> Configurations. (numerical, run-time, ...)
βββ equilibrium.py -> Contains the Equilibrium object that manages
β the iteration of an equilibrium represented
β by near axis expansion. Also contains wrappers
β for methods in parsed/ and MHD_parsed/.
βββ chiphiepsfunc.py -> A list-like data structure for storing power coeffs.
βββ chiphifunc.py -> A data structure representing f(chi,phi)
β as chi Fourier coeffs on phi grids, implementation
β for operators, and some solvers/utilities.
βββ chiphifunc_test_suite.py -> Useful functions for testing and plotting.
βββ math_utilities.py -> More numerical operations needed to run
β python methods in python_source/parsed/
βββ looped_solver.py -> Solver for the "looped equations" [2, 3]
βββ parsed/ -> Parsed expressions for the magnetic-only
β recursion relations [1]. All generated by notebooks
βββ looped_coefs/ -> Coefficients in the looped equations.
βββ MHD_parsed/ -> Parsed expressions for the full (magnetic and
force balance) recursion relations [2]. All
generated by notebooks in MHD_recursion_relations/
- Weakly Quasisymmetric Near-Axis Solutions to all Orders
- Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. I. Generalized force balance
- Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. II. Circular axis stellarator solutions
- pyQSC