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.7.tar.gz
(14.8 kB
view hashes)
Built Distribution
Close
Hashes for magpylib_force-0.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abba099cb1b63c8018e273c81f085a38759ca6f36e5c9782c14ee78ea44c939 |
|
MD5 | 80b048a403fc206ab502789875497de3 |
|
BLAKE2b-256 | 984f38ecb2f165eef8a963b86175983b7a503764d1c98e1d5aaede78351abce9 |