Skip to main content

Inductance

PyPI Status Python Version License Read the documentation at https://inductance.readthedocs.io/ Tests Codecov pre-commit Ruff

This is a python library to calculate inductance. Mostly for the purposes of calcualting magnetically confined plasmas. It might someday actually contain some plasma physics, but lets not get too carried away.

Features

  • Self-inductance formulas

    • self inductance of circular, circular hollow, and rectangular section by Maxwell's approximation
    • Lyle's approximation for thick coil solenoid self inductances to 4th and 6th order.
    • Butterworth's approximation for long solenoids
    • Lorentz's perfect analytic solution for current sheet solenoids
    • Babic and Akyel's approximation for thin solenoids
  • Mutual-inductance formulas

    • mutual inductance of filaments (Maxwell)
  • Filamentary models

    • utility functions to create filament arrays from rectangular definitions of coils and subcoils
    • calculation for filament array mutual inductance
    • calculation of filament array self inductance
  • Green's functions

    • calculation of Green's functions for Psi, Br, and Bz from filamented coils to points
      • with Numba, calculation of green's functions for arbitrary grids of points
    • calculation fo Green's functions for coil forces
  • Arbitrary coil shapes

    • rudimentary support for arbitrary wire filament coil shapes

Requirements

Inductance requires NumPy and uses Numba for acceleration. It is written in mostly pure python referencing academic articles for calculating inductances by various methods, most of which rely on elliptic functions. Inductance provides Numba accelerated pure python elliptic functions.

It is possible to remove the dependence on Numba and get most of the functionality of Inductance. The plan is to provide different options, including with alternative accelerators, such as JAX. For now, the requirements are:

  • python >= 3.8
  • numpy >= 1.24
  • numba >= 0.57

Installation

You can install inductance via pip from PyPI:

$ pip install inductance

Reference

Please see the reference for details.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, inductance is free and open source software.

Issues

For now, this is a very early release. It is likely a new top level API will be developed as the library matures.

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inductance-0.1.8.tar.gz (163.5 kB view details)

Uploaded Source

Built Distribution

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

inductance-0.1.8-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file inductance-0.1.8.tar.gz.

File metadata

  • Download URL: inductance-0.1.8.tar.gz
  • Upload date:
  • Size: 163.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for inductance-0.1.8.tar.gz
Algorithm Hash digest
SHA256 fc1301431a618b44460d16cfec91bc8fb86ceb48f55e41651d012ddc3cd60270
MD5 2b61f84f86c3ab92bd5c51c08c66fa5c
BLAKE2b-256 ae0deff3b5daf95808effb7c725a025a482d11da16fbf3d419ad044332b0f104

See more details on using hashes here.

Provenance

The following attestation bundles were made for inductance-0.1.8.tar.gz:

Publisher: release.yml on dgarnier/inductance

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

File details

Details for the file inductance-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: inductance-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for inductance-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e11653e8f560e5d28890dd9dbb13bf292513c237f4d8b86e3f1fce1ddb510a55
MD5 e826c7aef5f4603924a32b0fe972c03c
BLAKE2b-256 50aafa73d90de8b45e6a4b56ececd76d5c3c5856314a3b8ae89a22086de75b22

See more details on using hashes here.

Provenance

The following attestation bundles were made for inductance-0.1.8-py3-none-any.whl:

Publisher: release.yml on dgarnier/inductance

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

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.8 This release

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

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