Skip to main content

DipolEq equilibrium solver python bindings.

Project description

DipolEq

Documentation Status Actions Status codecov PyPI version PyPI platforms Contributor Covenant Ruff

Dipole equilibrium design code

Based on "TokaMac v2.0" by L. Bai and M. Mauel at Columbia University.

Can be used to show high beta equilibria in a dipole confined plasma. In other words, solve the Grad-Shafranov equation in a machine with an "first closed flux surface" and no toroidal field.

The code is licensed under the MIT license. (Except for the ClibPDF code, which no longer is available but was licensed for free use in academic use. This code is not linked into the python package version of this code.)

If you use this code, please reference this paper as source.

D. T. Garnier, J. Kesner, and M. E. Mauel, “Magnetohydrodynamic stability in a levitated dipole,” Phys. Plasmas, vol. 6, no. 9, pp. 3431–3434, Jan. 1999, doi: 10.1063/1.873601.

C Code - Command Line Version

Compilation

The original code is written in C (and some C++) and gives a command line interface, that outputs a PDF, HDF5 and other output files. The code can be compiled with cmake. There are example codes for how to process hdf5 files (into, for example an EFIT gfile) in the postprocess directory.

Dependencies

Ubuntu

The recommended build is for hdf5, zlib and libjpeg libraries to be installed:

sudo apt install cmake gcc zlib1g-dev libjpeg-dev libhdf5-dev

macOS

cmake and hdf5 can be installed with macports or homebrew and should be enough to compile the code.

brew install cmake hdf5

or

sudo port install cmake hdf5

Build and Install

The code can be configured and compiled with cmake. The recommended way to compile is to create a build directory and run cmake from there:

cd dipoleq
mkdir build
cd build
cmake ..
cmake --build .
sudo cmake --install .

Usage

The code can be run from the command line with the following command:

dipoleq -f <input_file>

See the Testing directories for examples of input files [*.in].

There is a second command line tool that can be used to generate a EFIT gfile from the output hdf5 file:

dipoleq_geqdsk <output.h5>

Python Module Interface

A python version of the code is now available. This relies on the pybind11 library to wrap the C code into a python module. This wraps the main features of the code into a python module, although the outer loop of the code is now in python. The python module is not yet fully documented, but the main features are available, and regularly tested against the original C code. For packaging, the "scikit-build-core" package is used to build the code using a standard pyproject.toml file.

Complilation

The python module can be compiled with the following command: pip install . This may install in your user directory or in a virtual environment. It will also install the dipoleq and dipoleq_geqdsk command line tools as well, though these are actually calls to the python / pybind11 version of the code and no longer include ClibPDF or HDF5 directly. This may become the preferred way to install the code in the future.

Usage

Python usage is still in development. More on this soon.

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

dipoleq-0.11.0a6.tar.gz (3.3 MB view details)

Uploaded Source

Built Distributions

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

dipoleq-0.11.0a6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (397.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

dipoleq-0.11.0a6-cp313-cp313-macosx_11_0_arm64.whl (319.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dipoleq-0.11.0a6-cp313-cp313-macosx_10_15_x86_64.whl (363.8 kB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

dipoleq-0.11.0a6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (397.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

dipoleq-0.11.0a6-cp312-cp312-macosx_11_0_arm64.whl (319.7 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dipoleq-0.11.0a6-cp312-cp312-macosx_10_15_x86_64.whl (363.8 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

dipoleq-0.11.0a6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (398.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

dipoleq-0.11.0a6-cp311-cp311-macosx_11_0_arm64.whl (320.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dipoleq-0.11.0a6-cp311-cp311-macosx_10_15_x86_64.whl (363.6 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

dipoleq-0.11.0a6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (397.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

dipoleq-0.11.0a6-cp310-cp310-macosx_11_0_arm64.whl (319.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

dipoleq-0.11.0a6-cp310-cp310-macosx_10_15_x86_64.whl (363.1 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file dipoleq-0.11.0a6.tar.gz.

File metadata

  • Download URL: dipoleq-0.11.0a6.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dipoleq-0.11.0a6.tar.gz
Algorithm Hash digest
SHA256 70b49e24556bbafba4c2b127b594288a5f880469b5defc0c81b0e02fc997961f
MD5 78a802e4f60d077a2202d37d1f06bbcc
BLAKE2b-256 a7b39ce83cd84c12c79687cce8a69833b05edfb77e046969b1187c116620e7b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6.tar.gz:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5bb9d7c93c5391f4f2b0f930df7eb92a5b20c5a484fb00a8e9db8e35d18a0c8e
MD5 65f7f49fcc669b6e9056f4daeff05137
BLAKE2b-256 509cfb9816040d1b5450081c16e02a37e853dd1a985fb57735a04dc0862e963e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 21e3270b5da11bc91bf1f73bbbb33d9443a9328460fecd498c73c72f8e7980b7
MD5 5c88485beb73f254d875e2e6ed3aebf2
BLAKE2b-256 526ffa3ed711c98884d00c77f9a7940b7bf331633df0d1c2e153ba1aa071733f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 8371183e199a09d710acff4b08e5260b2fb219e049ed76765e9d29c00cfd2b9b
MD5 4a901cfe797bc107c8c96ed03af3cdc6
BLAKE2b-256 4aaeb231433388a7959ea31e438e7e1119cac7f65b34cdb833ca975a6b2869d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp313-cp313-macosx_10_15_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 262309115d25efc8605c7711e0cbdf2a850de7bc1c19db06b3d191dd80f4a9ff
MD5 3a3023127e844551f662f2cc1852ce57
BLAKE2b-256 11a397c3c3625bae44b6b829cfffdb679cb60540f00b93497ae81e70a15494f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 782028a335c41b736f029e5e9267ae65ad5362d6adc706f25aaffe03bd31c174
MD5 4a3a66fba5d42b5036b3016f31b3220c
BLAKE2b-256 3cf2952a66e08199883c1d0713bbd08fabbc2bbc12f142f19d4324a79799b953

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d70647c765092e7c8b28877ba75b5e73eae0c4ca024bb92556c8d7d242ed6751
MD5 bba5ee59682b9920851529357c713f54
BLAKE2b-256 b554997ccf67a6a83a8ec9b862e6bf974e8666423cb3f8d2f53e2440f316d0be

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp312-cp312-macosx_10_15_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6a79ce01584505355dd6c29ca145f5108a3295bd628f0ea48e0a68cfb8ff487e
MD5 1e74b7eca79b74181c107f3f16d45c87
BLAKE2b-256 1840a4eec9ebe4b6a137f3ab52f34cb857ea880be871117f4a89f36b4e72505c

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 61262d194a71fbdce9f6e203b1770070560e31e7e492e30d2dfd410917587e99
MD5 652cda22ac93b3fe4b588d887e8e7bbf
BLAKE2b-256 59d370296fae1dd1b9ded16e1c5821312bc2b92a7aba9a8baa0a85172d6cdca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 f4fd4461f2db08eaa67c6ca143c072db8b7cbedf6f5002b046515ea2350b81aa
MD5 25a9477265ffa7998b22d297a25fda0f
BLAKE2b-256 0743788531922e91967228bf0cb25e514df8c8d3c38c4ce46aaa640142fe6aab

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp311-cp311-macosx_10_15_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 163e5c523f8ea4e0262ddb8ff897394a1a7b617329cfa64e26462f466c3af583
MD5 af4bb6245686432cc138c30c44dde62f
BLAKE2b-256 31804f5af200b81dd86026a0665acfdd51976a46841a65f34262173119b570a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8d0009f5a4669b29a4321c4e33b01367c739ba85e636b43d7e9153c92c533db8
MD5 309e433025d2782445703aebaf1f5f26
BLAKE2b-256 b6fe2d523291d8e0530f75d19cdc4fdd04eab2d8ef5500d7428123b9b176ec72

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dipoleq-0.11.0a6-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.0a6-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 329b968feac1474250b1a20f046a49758c483721aabcf23e6c3c75d1406834a1
MD5 ea8bc27df3aa2977b4ff82dce7ef553a
BLAKE2b-256 714ae821eb55a9dd41231cae9cdfb2c9c4236775d4a3d4f11a9b1681b83c0b60

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.0a6-cp310-cp310-macosx_10_15_x86_64.whl:

Publisher: build-wheels.yml on dgarnier/dipoleq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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