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.1.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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (400.6 kB view details)

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

dipoleq-0.11.1-cp314-cp314-macosx_11_0_arm64.whl (322.0 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

dipoleq-0.11.1-cp314-cp314-macosx_10_15_x86_64.whl (364.9 kB view details)

Uploaded CPython 3.14macOS 10.15+ x86-64

dipoleq-0.11.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (400.5 kB view details)

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

dipoleq-0.11.1-cp313-cp313-macosx_11_0_arm64.whl (322.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dipoleq-0.11.1-cp313-cp313-macosx_10_15_x86_64.whl (365.2 kB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

dipoleq-0.11.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (400.6 kB view details)

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

dipoleq-0.11.1-cp312-cp312-macosx_11_0_arm64.whl (322.0 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dipoleq-0.11.1-cp312-cp312-macosx_10_15_x86_64.whl (365.2 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

dipoleq-0.11.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (401.1 kB view details)

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

dipoleq-0.11.1-cp311-cp311-macosx_11_0_arm64.whl (322.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dipoleq-0.11.1-cp311-cp311-macosx_10_15_x86_64.whl (365.3 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

dipoleq-0.11.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (401.1 kB view details)

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

dipoleq-0.11.1-cp310-cp310-macosx_11_0_arm64.whl (322.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

dipoleq-0.11.1-cp310-cp310-macosx_10_15_x86_64.whl (365.5 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file dipoleq-0.11.1.tar.gz.

File metadata

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

File hashes

Hashes for dipoleq-0.11.1.tar.gz
Algorithm Hash digest
SHA256 1f80f828661f4fe38725a3bb76ab596895131401cbbeca919a240d3890f2136d
MD5 ad33078130feb6516b54aafa8f80c0b5
BLAKE2b-256 1d6d2abdc5b26f3013c213799a7297438a7513b44f03ce9d76be29a028a00927

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1.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.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9f04faccd03787f806d98b21a294e59bb442c501bf130e31cf00d49532a0943f
MD5 78c96c3dbd6c1876771166691f0cfd3c
BLAKE2b-256 2374401e8d7ee2852a12fbcf5765869946a6ba66bf61ba9ffd638980f7a60257

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-cp314-cp314-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.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5d8cf1068669cb4741330b4ba0942d5b114d0eb3d0b8ad46bdbfacd52bd92871
MD5 72966e13dad6d417986e740c432718cf
BLAKE2b-256 3f2425dc8889a435f8463f98d7a228c118aae4ffc420a794b664312fb4944b60

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-cp314-cp314-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.1-cp314-cp314-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp314-cp314-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5ea2539650593076fcee46ed2ebedcc4430320fee6b07d495ba0a66ad5054a97
MD5 7ac23df01aff48301d74ee9e3eea1884
BLAKE2b-256 5eea0f2316baa3c63092dab71012811a6c2af11ea124f153f768f667264ec5a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-cp314-cp314-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.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1ceebf5826ed06fd50932ae399c3f562afa3901f43a8a1939e3480db2e504734
MD5 ac48211ed55dcf405139014acda5676a
BLAKE2b-256 6196e0595b757716fd048bf044b68e3d3b5538d528c29473ca374975b1a45ca7

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9276c5a29543b1429408c50d19a798a442fc5837497c8fd821ee7545eb41d410
MD5 7865109458216b394d277d8e21d0d0f4
BLAKE2b-256 9818d9fd5f3c3959f7795c99158d82512e472cb1b6a16d60f41158bf21761c7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 b5a35c80e1ceaa82ad52e8dd3b5a1571bef41b4dc2556a50d7fc5e524436a322
MD5 3ce7bc361b0bfe1ff65cca393c3befcf
BLAKE2b-256 edcd249b4de415d229c6599bf87996d337de177564b99a056662c50c8cdd5a6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 64abeba7b3aeb10585d9b04daabc524abe0c38e1dfde2891cb6cd26919e42fa8
MD5 45918b70ee0a768e2764d4da6995c0d5
BLAKE2b-256 0bd8ebeb6d4f268bbf0cc4a0ca7056d38fc38f31102a14cb07f91fbf6b048c55

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9ab6cf1e6f27faab3d7bf174969da9cb76f8da0e57be98cd4dab53bad17e2d4f
MD5 aadc4e6b5aa392765a8736321112555a
BLAKE2b-256 73ecb30d1cca94434bf4614278d2a6ffe8e69a7d06de75e491688a15f9546ed2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c7c8fe33f79d196bfe28a0403b2293363b302033bfaa5dd79591517fa1c15257
MD5 a853ee9a653976093822b920699e7d37
BLAKE2b-256 cfdc23c43edceabc4c9c936006c706dd567260300e73825d3a08c00b2eddf3b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea5b332c9160acf0b90153210f58c83205a1a336876ed50b061abea9c506ff15
MD5 373ecce41bd3f8c789d80d28c3ae7ba5
BLAKE2b-256 fb549fc9a77c1ce227ef7cd95ddd67145b1ca925db93c21b96f3c6bd64525ba2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb8794f6dbe215e5967e8109f1c783ca0dbc8df27f69b27c4130db903ec547f2
MD5 b3d676362f817e1d309f50218f02dd0f
BLAKE2b-256 3f15213f0408c6b8c8845741ec450cb2823fa0253781e58399fd55ec3104afe4

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 29bea8ddc01e15d86226a29d17a1d9e1b2060f4697c22e57614afa7d456412ad
MD5 e52c864f686d0631ca0d505ac3cb1001
BLAKE2b-256 5507ed3de5b1135f49ea6707611cf17084e42744e7015d2a189dba68b6331336

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6737da9535e7d0d2c8278c64e2e4c73e51f0c71dd23bec7253a6aee90561ca36
MD5 d33a0d738205eb8dc516e0af7d1e2215
BLAKE2b-256 fb9e01f2cd23f676c28830cc844d7a557a24cb38d9efa47965bbbe6f7a20b352

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eaabdc1a5152abb609af4640cd18b48de4db84b6e48cb6ce14a37376e01778d3
MD5 16718436dbec39546afa7842b4f869c0
BLAKE2b-256 af758aaf832322b3b255129146c7d332d1085ee5559d5b339fd23b0c39ec4427

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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.1-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.11.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7b820359f762a09e15a4232d8fca6f7921db4d38518175091d0e9a5dfe10b26c
MD5 ea7e12ed9ced04ced3526fea1db39bfd
BLAKE2b-256 0196747c7efe7ff08724df80dcbe96d545509a1bf7a606e03952c9029d905246

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.11.1-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