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.2.tar.gz (193.4 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.2-py3-none-any.whl (87.2 kB view details)

Uploaded Python 3

File details

Details for the file fibe-0.4.2.tar.gz.

File metadata

  • Download URL: fibe-0.4.2.tar.gz
  • Upload date:
  • Size: 193.4 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.2.tar.gz
Algorithm Hash digest
SHA256 ec814e82e03e0f72e3bd6c9da31cf08c0e9cbab3f834454a0517dd5698c38bad
MD5 a380f6b148731f83d93f09b85babae77
BLAKE2b-256 15b591f676591fd5181745db820386e51e67aba6d68919a16567bccb914c93d6

See more details on using hashes here.

File details

Details for the file fibe-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: fibe-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 87.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c76d922c16b584da4c59ab93a4ef72afd079076e6227d820c59dea73aa45ba8
MD5 2427858b00f6a4e15f00ec6792b302e6
BLAKE2b-256 66f215af018af2e0e3ea67402507b4e85de42e5ab8aa76257427a0f263d6f51a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 files

0.4.1

2 files

0.4.0

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