Code Monkey home page Code Monkey logo

inductance's Introduction

Inductance

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

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.

inductance's People

Contributors

dgarnier avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.