fibe
FIxed Boundary Equilibrium (FIBE) solver for tokamak plasma geometries in pure Python
Installation
This package is available on PyPI, so installation can simply be done with:
pip install fibe
However, if you wish to make modifications to the source code or use alpha versions, it is possible to install via:
git clone <this_repo>
pip install [--user] -e fibe
Quick setup
Using the following lines in your script should allow for quick setup (parameters in <> are user-defined):
from fibe import FixedBoundaryEquilibrium
eq = FixedBoundaryEquilibrium()
eq.define_grid_and_boundary_with_mxh(
nr=129,
nz=129,
rgeo=<R0_m>,
zgeo=<Z0_m>,
rminor=<Rmin_m>,
kappa=<kappa>,
cos_coeffs=[0.0, 0.0, 0.0],
sin_coeffs=[0.0, np.arcsin(<delta>), -<zeta>],
)
eq.initialize_profiles_with_minimal_input(<P0_Pa>, <Ip_A>, <Bt_T>)
eq.initialize_psi()
eq.solve_psi()
To view the solution in script:
eq.plot_contour()
eq.plot_profiles()
To save the output in GEQDSK format:
eq.to_geqdsk(<geqdsk_filename>)
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 fibe-0.4.0.tar.gz.
File metadata
- Download URL: fibe-0.4.0.tar.gz
- Upload date:
- Size: 157.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adac08bb803a573efc3483fee10716b3c45c2c433229098910c5566a216a2d74
|
|
| MD5 |
40e320f4f9db91d65802039211df8af5
|
|
| BLAKE2b-256 |
a4dbf48fac1dc11bece8e5f5b0054be1a6827d44b7d62fb5f12439cf8b392682
|
File details
Details for the file fibe-0.4.0-py3-none-any.whl.
File metadata
- Download URL: fibe-0.4.0-py3-none-any.whl
- Upload date:
- Size: 64.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb7419687f9377d57c51d7ce8b21b420b03bdc31a7bf38b39daa749f698f3a2a
|
|
| MD5 |
0787e6eceb7649cfa6357bdbacee9641
|
|
| BLAKE2b-256 |
52667c56cd900ebfd2a5e136b8a502d7e0fa7b02b216c0d952c65b0169254d94
|