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.0.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.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (397.4 kB view details)

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

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.15+ x86-64

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

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

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.15+ x86-64

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

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

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.15+ x86-64

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

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

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

Uploaded CPython 3.10macOS 11.0+ ARM64

dipoleq-0.11.0-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.0.tar.gz.

File metadata

  • Download URL: dipoleq-0.11.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0314641966a54530b9f760a0d35fc60febd71214f251932b708fa16828edbd50
MD5 4912d94d2bebb1f66c219395202b28a4
BLAKE2b-256 5cac93a0ad7b973d1795525ac6bd9b2f01e96c67c29883d6c079783d5270cc3d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c5b19d784dbdda428e78c6c49d7cf2dd12d6399c0108ea40b118e4aee4859c36
MD5 9fc905b17c8d408748f51f4ece14b6bf
BLAKE2b-256 abe53851034fc26358e19038cb4474ff377180aa5bd3026cca25d8e5698b0b93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b4e5e745f5fb88f724a764eaf4a47c6b107e1541ed56519fb4f5fa5082d5043
MD5 5087a26cb6793d60457307f72c448b4c
BLAKE2b-256 2bd273b97b2010752e0ee597a3f71d17b9675bc2f1931c9622cda6d521e2bd5c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 e3c3d98740f22708ae35e7dc358e54e0be923026b5846f6575fe944788fbdff3
MD5 65194006470c8e9211426594f8ce298b
BLAKE2b-256 5533774867c1b624c7987fca88d964c172b28574eee3228cc353bb0942c52921

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b88a06731a068ef43de319e5c4c3fac6a699a237b2a2be994f339fe360877e8c
MD5 1a0a91fcb4cae36cea9953ba66bfc7e8
BLAKE2b-256 5662c25aa45239640aef25b19220f46d7f9e2d94099ca4bc393bfb9a464533e3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f992bcba31ee7a1d53b0095dda3abc595f19eda9abcdd22f3d1498874e6eddf7
MD5 f9ddd0ce54a39b475edc1430c29c6542
BLAKE2b-256 18157b91258a32e26b2037308d6858253f2c29e35d182b8cff3fcd24b81302f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 88ea2b1ec701cfbb0752d3fad1c337fd4d7a41653e76a5c8935dc31814221994
MD5 626d30e1e9c83326aacabeb3a63386fb
BLAKE2b-256 187a4e04c9ad97c33a7e4c87038cf078b66b36c7fbdfc13777d6d3c5c8b7958f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb5947671a8e3e86557e2be66508a6e43a6c700d28c6ed09c9178cec97952fe3
MD5 67493b16cd28f806c4d77a0d9e5887d0
BLAKE2b-256 c3d7adf451beee847d97aba06e981a59af89d514fda7677332acddf1146d2be9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 daee5137a4b0ddcd7588bbc3a47cf6840d83a2ee2c548acd293431150104c1c7
MD5 c976c07b2aa3d66ea20238d730ad94f1
BLAKE2b-256 b68ac69df28ac836c642b157c158b87c50cadbd123c349d86c594a82bdf16fe6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 cd33534a1fa6d9cb10630310e6a34fb04e46152965b995cfec0b140b5ef6149d
MD5 7d747c425b838df8d6bd70edfd4d79a6
BLAKE2b-256 85c627f316e70b419ba11abd5506379522f6476ea585b52da04ff00083b5cb4e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b22dbe303bb8fd29a76f2e8759e8eb8cc2a3192f9fe8cbf29c973b589dd03b69
MD5 56eb1c3279a4fd2c6ab3da1ed5c47115
BLAKE2b-256 54e649b7a422c5991819bb9e399951a1524d82a073e4818b4516429450220456

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1a4d1f9142bfc38239c34b745ef070c6fd2c508a230e4ed33c47e48da1a107ec
MD5 2979432cc1254f8831194023809e9ece
BLAKE2b-256 cb99e268bf3b73d370eb2290d50405ac0d39ee58f78fdbde512b9f9d2c028825

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.11.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 df84917b247d4d00a55c1b6b0713737fb67baab6b22ae05d12329bd595fd194c
MD5 5675ed86b10190d57123b178530bfa00
BLAKE2b-256 266c112cecd814d2bc2f83d4125008e88a9396e2bac2e348b61d3b266625c4f4

See more details on using hashes here.

Provenance

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