ESSOS: e-Stellarator Simulation and Optimization Suite
Project description
❯ ESSOS: e-Stellarator Simulation and Optimization Suite
Table of Contents
- Overview
- Features
- Project Structure
- Getting Started
- Usage
- Testing
- Project Roadmap
- Contributing
- License
- Acknowledgments
Overview
ESSOS is an open-source project in Python that uses JAX to optimize stellarator coils. Optimization can be applied to several objectives, such as alpha particle confinement, plasma boundaries and magnetic field equilibria (including near-axis expansions). It leverages automatic differentiation and efficient numerical methods to streamline optimization efforts, creating a specialized and fast numerical tool for optimizing force-free stellarator equilibria. It is parallelized using JAX's sharding tools. It can be imported in a Python script using the essos package, or run directly in the command line as essos. To install it, use
pip install essos
Alternatively, you can download it and run the example scripts in the repository after downloading it as
git clone https://github.com/uwplasma/ESSOS
cd ESSOS
pip install .
python examples/trace_particles_from_coils.py
The project can be downloaded in its GitHub repository.
Features
- JAX Integration: Utilizes JAX for automatic differentiation and efficient numerical computations.
- Optimization: Implements optimization routines for stellarator coil design.
- Particle Tracing: Traces alpha particles in magnetic fields generated by coils.
- Fieldline Tracing: Traces magnetic field lines.
- Coils and Near-Axis Fields: Models and optimizes electromagnetic coils and near-axis magnetic fields.
Project Structure
ESSOS/
├── essos/
│ ├── __init__.py
│ ├── __main__.py
│ ├── coils.py
│ ├── constants.py
│ ├── dynamics.py
│ ├── fields.py
│ ├── objective_functions.py
│ ├── optimization.py
│ ├── plot.py
│ └── surfaces.py
├── examples/
│ ├── create_stellarator_coils.py
│ ├── optimize_coils_and_nearaxis.py
│ ├── optimize_coils_for_nearaxis.py
│ ├── optimize_coils_particle_confinement_fullorbit.py
│ ├── optimize_coils_particle_confinement_guidingcenter.py
│ ├── optimize_coils_vmec_surface.py
│ ├── trace_fieldlines_coils.py
│ ├── trace_particles_coils_fullorbit.py
│ ├── trace_particles_coils_guidingcenter.py
│ ├── trace_particles_vmec.py
│ └── comparisons_SIMSOPT/
│ └── inputs/
│ ├── ESSOS_bio_savart_LandremanPaulQA.json
│ ├── SIMSOPT_bio_savart_LandremanPaulQA.json
│ ├── wout_n3are_R7.75B5.7.nc
│ └── wout_LandremanPaul2021_QA_reactorScale_lowres.nc
├── tests/
│ ├── test_coils.py
│ ├── test_constants.py
│ ├── test_dynamics.py
│ ├── test_fields.py
├── README.md
├── LICENSE.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── setup.py
├── pyproject.toml
└── requirements.txt
Getting Started
Prerequisites
- Python 3.8 or higher
Installation
From PyPI
To install ESSOS from PyPI, run:
pip install essos
From Source
To install ESSOS from source, clone the repository and install the package:
git clone https://github.com/uwplasma/ESSOS
cd ESSOS
pip install .
Usage
ESSOS can be run directly in the command line as essos, or by following one of the examples in the examples folder. For example, to trace particles in a magnetic field generated from coils, run:
python examples/trace_particles_coils_guidingcenter.py
Testing
To run the tests, use pytest:
pytest .
Project Roadmap
- Allow several optimization algorithms
- Allow plotly and/or Mayavi visualization
- Add DESC and SPEC equilibria for tracing
- Add beam injection examples
- Add plotting for near-axis expansion
- Add particle collisions
Contributing
Contributions are welcome! Please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
ESSOSproject. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/uwplasma/ESSOS
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
License
This project is protected under the MIT License. For more details, refer to the LICENSE file.
Acknowledgments
- This project was developed as part of the New Talents in Physics Fellowship, awarded by the Calouste Gulbenkian Foundation.
- We acknowledge the help of the whole UWPlasma plasma group.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file essos-0.15.tar.gz.
File metadata
- Download URL: essos-0.15.tar.gz
- Upload date:
- Size: 4.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f8edc49605c190a823ab5ec99f35a1797f65317367d0dc724debb42593bec1f
|
|
| MD5 |
540cc9dc2695141949e83d17516bab38
|
|
| BLAKE2b-256 |
c7f7b8edf7920fc9bd906561b8198540762ee39b4d109fe4823745a7715e73d5
|
Provenance
The following attestation bundles were made for essos-0.15.tar.gz:
Publisher:
pypi_publish.yml on uwplasma/ESSOS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
essos-0.15.tar.gz -
Subject digest:
3f8edc49605c190a823ab5ec99f35a1797f65317367d0dc724debb42593bec1f - Sigstore transparency entry: 218396269
- Sigstore integration time:
-
Permalink:
uwplasma/ESSOS@229a321caf401efc164ff22c5b85b5eb1d766851 -
Branch / Tag:
refs/tags/v0.15 - Owner: https://github.com/uwplasma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@229a321caf401efc164ff22c5b85b5eb1d766851 -
Trigger Event:
release
-
Statement type:
File details
Details for the file essos-0.15-py3-none-any.whl.
File metadata
- Download URL: essos-0.15-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0869bbff811cc6b2a85608cfbf4a67940879acab77d1e4a2e96dc51ba621532
|
|
| MD5 |
b51ff8ff2928885f5e43eee2acb4ca63
|
|
| BLAKE2b-256 |
86bbc4992515d64d36ad03d31dd3a3b24ec800a0b1c8989ef72141052852a34f
|
Provenance
The following attestation bundles were made for essos-0.15-py3-none-any.whl:
Publisher:
pypi_publish.yml on uwplasma/ESSOS
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
essos-0.15-py3-none-any.whl -
Subject digest:
c0869bbff811cc6b2a85608cfbf4a67940879acab77d1e4a2e96dc51ba621532 - Sigstore transparency entry: 218396275
- Sigstore integration time:
-
Permalink:
uwplasma/ESSOS@229a321caf401efc164ff22c5b85b5eb1d766851 -
Branch / Tag:
refs/tags/v0.15 - Owner: https://github.com/uwplasma
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_publish.yml@229a321caf401efc164ff22c5b85b5eb1d766851 -
Trigger Event:
release
-
Statement type: