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.
Files changed (38) hide show
  1. femagtools/__init__.py +1 -1
  2. femagtools/dxfsl/area.py +38 -9
  3. femagtools/dxfsl/converter.py +2 -1
  4. femagtools/dxfsl/fslrenderer.py +8 -1
  5. femagtools/dxfsl/geom.py +19 -8
  6. femagtools/dxfsl/svgparser.py +31 -4
  7. femagtools/femag.py +14 -0
  8. femagtools/fsl.py +74 -28
  9. femagtools/isa7.py +41 -0
  10. femagtools/job.py +2 -2
  11. femagtools/machine/afpm.py +5 -1
  12. femagtools/machine/utils.py +4 -3
  13. femagtools/model.py +7 -0
  14. femagtools/moo/population.py +9 -7
  15. femagtools/nc.py +12 -0
  16. femagtools/plot/__init__.py +1 -1
  17. femagtools/plot/nc.py +22 -5
  18. femagtools/plot/wdg.py +38 -5
  19. femagtools/svgfsl/converter.py +6 -0
  20. femagtools/templates/gen_winding.mako +10 -3
  21. femagtools/templates/magnetIron.mako +30 -46
  22. femagtools/templates/magnetIron2.mako +39 -0
  23. femagtools/templates/magnetIron3.mako +39 -0
  24. femagtools/templates/magnetIron4.mako +39 -0
  25. femagtools/templates/magnetIron5.mako +39 -0
  26. femagtools/templates/magnetIronV.mako +34 -54
  27. femagtools/templates/magnetSector.mako +32 -47
  28. femagtools/templates/prepare_thermal.mako +219 -0
  29. femagtools/templates/statorRotor3.mako +3 -22
  30. femagtools/windings.py +67 -39
  31. {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/METADATA +3 -1
  32. {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/RECORD +38 -37
  33. {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/WHEEL +1 -1
  34. tests/test_fsl.py +1 -1
  35. tests/test_windings.py +13 -2
  36. {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/LICENSE +0 -0
  37. {femagtools-1.7.7.dist-info → femagtools-1.7.9.dist-info}/entry_points.txt +0 -0
  38. {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(wdg):
64
- assert round(wdg.axis(), 3) == 0.32
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):