Skip to main content

User Friendly Magnetic Field Calculations

Project description

Pymagnet

User friendly magnetic field calculations in Python

Calculating Magnetic Fields and Forces

Forms of this library have been used in a number of projects including Liquid flow and control without solid walls, Nature 2020.

Features

This code uses analytical expressions to calculate the magnetic field due to simple magnets. These include:

  • 3D objects: cubes, cuboids, cylinders
  • 2D: rectangles, squares

There are helper functions to plot the data as either line or countour plots, but the underlying data is also accessible.

Prerequisites

Ensure you have Python version >= 3.6 (to use f-strings), and the following packages:

  • numpy
  • matplotlib

Partial TODOs

  • Implement arbitrary orientation in public code
  • 3D rendering of slices

Licensing

Source code licensed under the Mozilla Public License Version 2.0

Documentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

This is a human-readable summary of (and not a substitute for) the license, adapted from CS50x. Official translations of this license are available in other languages.

You are free to:

  • Share — copy and redistribute the material in any medium or format.
  • Adapt — remix, transform, and build upon the material.

Under the following terms:

  • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original
  • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.

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

pymagnet-0.1.0.tar.gz (817.7 kB view details)

Uploaded Source

Built Distribution

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

pymagnet-0.1.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file pymagnet-0.1.0.tar.gz.

File metadata

  • Download URL: pymagnet-0.1.0.tar.gz
  • Upload date:
  • Size: 817.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for pymagnet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5646fcaea8aaec26f4d05261a17fb5396d73dc948b9e83c335e353873ad78c15
MD5 955c946271416b9acb62f6b0715c508a
BLAKE2b-256 48b58f797dd92d5bbfb9794ceac7e4cc199b3e7607c98c7ad4c8d67a9b941710

See more details on using hashes here.

File details

Details for the file pymagnet-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymagnet-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for pymagnet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3722b439e714bf9143c965071eefe06275ca9c8360ed0069bb19a2bd7088b53a
MD5 15604f0a8543298f03bb7c66e2e8f965
BLAKE2b-256 3b0e4dd59d799acaa15d9f560a191e970c61b1085c06831f75312c524d3e96bd

See more details on using hashes here.

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