Giter Club home page Giter Club logo

coilcalc's Introduction

magcoilcalc - Axisymmetric circular current loops (coils) magnetic field calculator

Introduction

Highly uniform magnetic field with minimal lateral field gradient is required for the generation and preservation of the spin-polarized state of 3He and 129Xe gasses and other noble gas species with non-zero nuclear spin. magcoilcalc is designed to be useful in the design, simulation and optimization of magnet systems used to generate an uniform magnetic field intended to support such systems.

Installation

pip install magcoilcalc. Requires Python >= 3.4, numpy and matplotlib.

Limitations

Before you get your hopes up, magcoilcalc is only for circular axisymmetric current loops with no support for non-unity relative permeability. This geometry is versatile and useful, but this package won't get you far for other problems other than building spin-polarizer magnets. For proper 2D EM FEM software check FEMM out. magcoilcalc is still going to be useful for quickly mapping out a large parameter space, or for getting a quick answer typing on one hand while holding that magnet wire mid-winding with the other.

Support for infinitely thin cylindrical current sheets are also being worked on. You can spawn one with magcoilcalc.CurrentSheet with the usual parameters, but these are not vectorized so can be slow on a large mesh.

Mu-metal shielding

magcoilcalc in incapable of dealing with non-unity relative permeability. Simulate mu-metal shields in FEMM upon your finished design in magcoilcalc.

Usage

Users are encouraged to refer to cookbook examples for usage examples with line-by-line comments.

Found a bug?

The author still discovers yet another misconception in his understanding of elementary electromagnetism once in a while. If you find something not quite right, you are probably right - open an issue or drop me an email!

coilcalc's People

Contributors

sq-meng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

coilcalc's Issues

Error in class CurrentSheet

Hi,

Thanks for this usefull software !

It seems there is a small copy/paste error in the class CurrentSheet which prevent the use of optimized current sheet calculation functions.

By replacing return CurrentLoop by return CurrentSheet in the core.py the problem is solved.

class CurrentSheet(SourceBaseClass):
    def __init__(self, x_span: (list, float, int), radius, nturns: int, current: float, current_multiplier=1):
.......
.......
    def __copy__(self):
        return CurrentLoop(self.x_span, self.radius[0], self.nturns, self.current)
class CurrentSheet(SourceBaseClass):
    def __init__(self, x_span: (list, float, int), radius, nturns: int, current: float, current_multiplier=1):
.......
.......

    def __copy__(self):
        return CurrentSheet(self.x_span, self.radius[0], self.nturns, self.current)

Regards
Dr. Nicolas Bruyant

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.