Skip to main content

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

fibe-0.4.0.tar.gz (157.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fibe-0.4.0-py3-none-any.whl (64.8 kB view details)

Uploaded Python 3

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

Hashes for fibe-0.4.0.tar.gz
Algorithm Hash digest
SHA256 adac08bb803a573efc3483fee10716b3c45c2c433229098910c5566a216a2d74
MD5 40e320f4f9db91d65802039211df8af5
BLAKE2b-256 a4dbf48fac1dc11bece8e5f5b0054be1a6827d44b7d62fb5f12439cf8b392682

See more details on using hashes here.

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

Hashes for fibe-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fb7419687f9377d57c51d7ce8b21b420b03bdc31a7bf38b39daa749f698f3a2a
MD5 0787e6eceb7649cfa6357bdbacee9641
BLAKE2b-256 52667c56cd900ebfd2a5e136b8a502d7e0fa7b02b216c0d952c65b0169254d94

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.2

2 files

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page