femagtools 1.7.7__py3-none-any.whl → 1.7.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- femagtools/__init__.py +1 -1
- femagtools/dxfsl/area.py +38 -9
- femagtools/dxfsl/converter.py +2 -1
- femagtools/dxfsl/fslrenderer.py +8 -1
- femagtools/dxfsl/geom.py +19 -8
- femagtools/dxfsl/svgparser.py +31 -4
- femagtools/femag.py +14 -0
- femagtools/fsl.py +74 -28
- femagtools/isa7.py +41 -0
- femagtools/job.py +2 -2
- femagtools/machine/afpm.py +5 -1
- femagtools/machine/utils.py +4 -3
- femagtools/model.py +7 -0
- femagtools/moo/population.py +9 -7
- femagtools/nc.py +12 -0
- femagtools/plot/__init__.py +1 -1
- femagtools/plot/nc.py +22 -5
- femagtools/plot/wdg.py +38 -5
- femagtools/svgfsl/converter.py +6 -0
- femagtools/templates/gen_winding.mako +10 -3
- femagtools/templates/magnetIron.mako +30 -46
- femagtools/templates/magnetIron2.mako +39 -0
- femagtools/templates/magnetIron3.mako +39 -0
- femagtools/templates/magnetIron4.mako +39 -0
- femagtools/templates/magnetIron5.mako +39 -0
- femagtools/templates/magnetIronV.mako +34 -54
- femagtools/templates/magnetSector.mako +32 -47
- femagtools/templates/prepare_thermal.mako +219 -0
- femagtools/templates/statorRotor3.mako +3 -22
- femagtools/windings.py +67 -39
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/METADATA +3 -1
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/RECORD +38 -37
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/WHEEL +1 -1
- tests/test_fsl.py +1 -1
- tests/test_windings.py +13 -2
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/LICENSE +0 -0
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/entry_points.txt +0 -0
- {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/top_level.txt +0 -0
tests/test_windings.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
#!/usr/bin/env python
|
2
2
|
#
|
3
3
|
import pytest
|
4
|
+
import numpy as np
|
4
5
|
import femagtools.windings
|
5
6
|
|
6
7
|
|
@@ -60,8 +61,18 @@ def test_slots(wdg):
|
|
60
61
|
[[1, -5, -6], [4, -8, -9], [-2, -3, 7]])
|
61
62
|
|
62
63
|
|
63
|
-
def test_axis(
|
64
|
-
|
64
|
+
def test_axis():
|
65
|
+
for wpar, expected in [
|
66
|
+
({'Q': 168, 'p': 7, 'm': 3, 'l': 2, 'yd': 10}, 14.99973842075893),
|
67
|
+
({'Q': 90, 'p': 12, 'm': 3, 'l': 2, 'yd': 4}, 11.99951171875), # TODO
|
68
|
+
({'Q': 108, 'p': 9, 'm': 3, 'l': 2, 'yd': 5}, 11.666259765625),
|
69
|
+
({'Q': 96, 'p': 4, 'm': 3, 'l': 2, 'yd': 10}, 26.249542236328125),
|
70
|
+
({'Q': 144, 'p': 16, 'm': 3, 'l': 2, 'yd': 4}, 7.49969482421875),
|
71
|
+
({'Q': 144, 'p': 12, 'm': 3, 'l': 2, 'yd': 5}, 8.74969482421875),
|
72
|
+
({'Q': 54, 'p': 3, 'm': 3, 'l': 2, 'yd': 8}, 36.66585286458334),
|
73
|
+
({'Q': 48, 'p': 4, 'm': 3, 'l': 1, 'yd': 6}, 29.99908447265625)]:
|
74
|
+
wdg = femagtools.windings.Winding(wpar)
|
75
|
+
assert round(wdg.axis()/np.pi*180, 2) == round(expected, 2)
|
65
76
|
|
66
77
|
|
67
78
|
def test_winding_factor(wdg):
|
File without changes
|
File without changes
|
File without changes
|