Skip to main content

Code for 2D inductance calculations

Project description

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.

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

inductance-0.1.5.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

inductance-0.1.5-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: inductance-0.1.5.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for inductance-0.1.5.tar.gz
Algorithm Hash digest
SHA256 071ab4f59e72f7e74b463a3b187e011506724a2c05f6d8a21120aae69ea56664
MD5 a42a5c1db607302593d9c3a76686d890
BLAKE2b-256 2370b6c2fa2eca2ab266b6157421fc68a3e290595415c006dc094e4d9585c099

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inductance-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.4

File hashes

Hashes for inductance-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 20655caf95ab98c9976ab1f09c6866af60746bbc4dc2e9287c2df04a7ed1cbff
MD5 1b971cd9586557d3e5ab3b20aed00883
BLAKE2b-256 e65a76278c5a2e9c4f7c0caed96a22eadf8911b20f2495b8e5ec91b4ddacb3d1

See more details on using hashes here.

Supported by

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