Skip to content

Commit 7c31a3b

Browse files
committed
readme
1 parent 72fc14b commit 7c31a3b

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
11
# Magpy-Force
22

33
This package provides force and torque computation for Magpylib objects.
4+
5+
# Installation
6+
7+
`pip install magpylib-force`
8+
9+
# Example code:
10+
11+
```
12+
import magpylib as magpy
13+
from mforce import getFTcube
14+
15+
# all inputs and output in SI units
16+
17+
cube1 = magpy.magnet.Cuboid(
18+
dimension=(1,1,1),
19+
polarization=(1,1,1),
20+
)
21+
cube2 = cube1.copy(position=(1,0,2))
22+
cube2.mesh = (10,10,10)
23+
24+
F,T = getFTcube(cube1, [cube2, cube2.copy()], anchor=(0,0,0))
25+
print(F)
26+
print(T)
27+
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "mforce"
3-
version = "0.1.2dev"
3+
version = "0.1.3"
44
dependencies = [
55
"numpy>=1.20",
66
"scipy>=1.7",

0 commit comments

Comments
 (0)