Skip to main content

An extension to the Magpylib library, providing force computation

Project description

Magpylib-Force

This package provides force and torque computation for Magpylib objects. Its work in progress and will finally be integrate into the Magpylib package.

Installation

pip install magpylib-force

Example code:

import magpylib as magpy
from mforce import getFTcube

# all inputs and output in SI units

cube1 = magpy.magnet.Cuboid(
    dimension=(1,1,1),
    polarization=(1,1,1),
)
cube2 = cube1.copy(position=(1,0,2))
cube2.mesh = (10,10,10)

F,T = getFTcube(cube1, [cube2, cube2.copy()], anchor=(0,0,0))
print(F)
print(T)

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

magpylib_force-0.1.6.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

magpylib_force-0.1.6-py3-none-any.whl (12.0 kB view hashes)

Uploaded Python 3

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