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.10.2.tar.gz (1.4 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.10.2-cp313-cp313-win_amd64.whl (277.4 kB view details)

Uploaded CPython 3.13Windows x86-64

dipoleq-0.10.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (372.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

dipoleq-0.10.2-cp313-cp313-macosx_11_0_x86_64.whl (345.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ x86-64

dipoleq-0.10.2-cp313-cp313-macosx_11_0_arm64.whl (309.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

dipoleq-0.10.2-cp312-cp312-win_amd64.whl (277.3 kB view details)

Uploaded CPython 3.12Windows x86-64

dipoleq-0.10.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (372.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

dipoleq-0.10.2-cp312-cp312-macosx_11_0_x86_64.whl (345.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ x86-64

dipoleq-0.10.2-cp312-cp312-macosx_11_0_arm64.whl (309.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

dipoleq-0.10.2-cp311-cp311-win_amd64.whl (278.7 kB view details)

Uploaded CPython 3.11Windows x86-64

dipoleq-0.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (373.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dipoleq-0.10.2-cp311-cp311-macosx_11_0_x86_64.whl (341.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ x86-64

dipoleq-0.10.2-cp311-cp311-macosx_11_0_arm64.whl (307.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

dipoleq-0.10.2-cp310-cp310-win_amd64.whl (277.7 kB view details)

Uploaded CPython 3.10Windows x86-64

dipoleq-0.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (372.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dipoleq-0.10.2-cp310-cp310-macosx_11_0_x86_64.whl (340.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ x86-64

dipoleq-0.10.2-cp310-cp310-macosx_11_0_arm64.whl (306.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for dipoleq-0.10.2.tar.gz
Algorithm Hash digest
SHA256 9b77aa93e70748dc3b4b6df7daf9352e175ef34d9ab0b18238934944f9f9dfd0
MD5 8990a095f71d4820da1b3970440d033b
BLAKE2b-256 2971f61976af4e79238304bdf33fc33814f0693905c695810f0caa96ddb06129

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2.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.10.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dipoleq-0.10.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 277.4 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dipoleq-0.10.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a7d36a09e4d242727516029f8e7d58bc090a268db9b787e81cb00c0809af19a4
MD5 711a402c87286f90425a2f15d799cffb
BLAKE2b-256 1e7a9d6875c82291cafccd407d1e8b0c908242b55d2aed018d0436ca8fba09ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp313-cp313-win_amd64.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.10.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 83ceb4d19a172a222f0cc0546785922340639b48af53bc3a0ca96d80fcdb79df
MD5 42d3733c0acd86531f1c8d9052d55dab
BLAKE2b-256 5fd96a96382d79d520163efc6e135869f41bd86c9ca937731f966504a7f1fd48

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_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.10.2-cp313-cp313-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp313-cp313-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 d2857c5448a2f64fd4ecec4961928b79b84225b1623f534f458b057d3215a85f
MD5 f5ea036ee8cefec43b266ef0d1db3aab
BLAKE2b-256 326bbc61748e6fbd8345df42bc5bd5fa2afdcf74546a0a4626de1f280d7e4be7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c6bb0ec5244fda120dd80ace4da8384f5d396c9a38970070566cdbe14b4a876e
MD5 243015bd919330cd7026b6b96efebbd0
BLAKE2b-256 6ca7d367c607c26ed3f0726e161b208e589113f0e3dfff6008486f0ebb20486a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-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.10.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dipoleq-0.10.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 277.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dipoleq-0.10.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 08ca96a05e1f06a5204096f9f1aee446a68abd405d334fc3bb86095d8e7a7a33
MD5 c638df20346bb00295754a5e39ec5de1
BLAKE2b-256 5d8775d28cf453892f9724e7689687071a39a5c41ad904ab4c64a6678560f799

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp312-cp312-win_amd64.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.10.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1763fa795ddf145a2c1fd8c195a04fdbd3ea732176bc89ad26978ca02cbb1cd5
MD5 eb11e75241420026a102b19198fa7ac2
BLAKE2b-256 c0849cd1d3d311a2eba96886142dc69f31eaba6944474dcd0f1811d350b210ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_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.10.2-cp312-cp312-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp312-cp312-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 2441df84bc21f603bb49760e58748361e79c415c93850330a01be0cc579ef684
MD5 31d3cd706b368d3eaa1c29cef9a043bc
BLAKE2b-256 4d8e7d9f0eab3cc435590ee499d8ea9417cdee193bebd25ebfe6fa6f1b1635e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 08c6767e69fc1ed05e9b26a36eef1d020f76003f83ed73209afeacb41af8496f
MD5 572d2e1d261cd5b5ebe152dbe27c30cf
BLAKE2b-256 452300ad51a5e977725410f5372d59c8e021020e709a7d1334e528eef9bc8d3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-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.10.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: dipoleq-0.10.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 278.7 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dipoleq-0.10.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bb83c5a96a527d38fadac8fb78533e17572670ad375d98cd7ea2791782728046
MD5 4172e66a9be32fc27b798c392a0aed5d
BLAKE2b-256 433e60588f16814018f7990b37a65724e16427b41ba1359840a533c88dba2f53

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp311-cp311-win_amd64.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.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 490410dc495ffc2b785a13431803a80a49b9515a84fbf6ce8c14a724142af7e5
MD5 a490f1ef24e53faab320cb45c91edf7c
BLAKE2b-256 c155efef86de8cc95d52233b5406f7c30cc6ed667db4c9104c47a883bb821538

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_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.10.2-cp311-cp311-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp311-cp311-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 0703bf0ac7bd325ab370453053363a2e140546a9e12c5ce19a1513688d1dff2a
MD5 bc8991727237954b812db242f56555da
BLAKE2b-256 7e4124207da977f3d859b08e2c6ca5d8cca3ac4562488322c75401981af46b29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96ae09df4fc17df587dfcc059f78df87e55d16e167c5e30256a0e2aedf156f26
MD5 83d34502c8e53fa1a5b21a690ff2651e
BLAKE2b-256 5ace29e5e2fea02736be33587f9d96a4350be05dff550f4b178c8d99036dc190

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-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.10.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: dipoleq-0.10.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 277.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for dipoleq-0.10.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e0f078df56d45bf2ce6080566d08ed51e456acac4ec638e7ce06d2d3dd761041
MD5 a1974219f6a639cc029b2c5da16dcacc
BLAKE2b-256 59295cb573d73a083cc5bee8b1758956ea685535f5daddd36aa08cc0c16f56a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp310-cp310-win_amd64.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.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f9a7fc9b6c457f608f64a090b67e10b4bbcd62e54d811104f097dbf782a08b33
MD5 12ef6706a1b42feb2aa99d6f75e69d56
BLAKE2b-256 0eac020019325ce6d7971effbd773bae6a1dbfb66eda7c57a70e751af70f4760

See more details on using hashes here.

Provenance

The following attestation bundles were made for dipoleq-0.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_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.10.2-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 0a09e7c310c3829572820e9f6e895a1c9f0fe640800a22c07c4482decbde8bdc
MD5 8f158bc7956de5d810de0032006124f6
BLAKE2b-256 150f58fb3325d47aae177bebf8f4537298fb78848202392d7db75f333b358e5d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dipoleq-0.10.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 78e1149f6aa4eb0417e202ff73f14d5b4a5899a0921754e81438f3ce62ab7b6d
MD5 41ba5305a8abc0d61959de84faa46ad5
BLAKE2b-256 e54a00bfaad3b99a1d54d213c5d721a48cec6b5444ceb0ed33977450bfc728fa

See more details on using hashes here.

Provenance

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

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