Skip to main content

Constructs QS stellarator equilibrium to all orders.

Project description

pyAQSC

This code constructs globally quasi-symmetric stellarator equilibria with anisotropic pressure near axis expansion to any order.

Documentations

Click here to read pyAQSC documentations.

Dependencies

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.

Repository structure and files

├── README.MD
├── test_data_eduardo/              -> Known leading order terms for some equilibria.
├── 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/

References

  1. Weakly Quasisymmetric Near-Axis Solutions to all Orders
  2. Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. I. Generalized force balance
  3. Solving the problem of overdetermination of quasisymmetric equilibrium solutions by near-axis expansions. II. Circular axis stellarator solutions
  4. pyQSC

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aqsc-0.1.5.tar.gz (120.2 kB view hashes)

Uploaded Source

Built Distribution

aqsc-0.1.5-py3-none-any.whl (121.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page