femagtools 1.7.5__py3-none-any.whl → 1.7.7__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/bch.py +11 -1
- femagtools/dxfsl/area.py +108 -7
- femagtools/dxfsl/conv.py +15 -0
- femagtools/dxfsl/converter.py +44 -20
- femagtools/dxfsl/fslrenderer.py +93 -42
- femagtools/dxfsl/functions.py +8 -0
- femagtools/dxfsl/geom.py +126 -18
- femagtools/dxfsl/machine.py +30 -9
- femagtools/femag.py +3 -3
- femagtools/fsl.py +73 -48
- femagtools/isa7.py +2 -2
- femagtools/machine/effloss.py +2 -0
- femagtools/machine/pm.py +198 -42
- femagtools/machine/sm.py +294 -253
- femagtools/machine/utils.py +5 -14
- femagtools/model.py +32 -2
- femagtools/moo/algorithm.py +6 -0
- femagtools/nc.py +2 -0
- femagtools/opt.py +2 -1
- femagtools/plot/bch.py +19 -5
- femagtools/plot/char.py +4 -4
- femagtools/plot/nc.py +21 -4
- femagtools/plot/wdg.py +38 -26
- femagtools/templates/gen_hairpin_winding.mako +209 -0
- femagtools/templates/gen_winding.mako +8 -9
- femagtools/templates/magnetIron.mako +32 -6
- femagtools/templates/mesh-airgap.mako +9 -0
- femagtools/templates/rotor_winding.mako +10 -6
- femagtools/templates/statorRotor3.mako +8 -5
- femagtools/windings.py +31 -18
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/METADATA +1 -1
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/RECORD +38 -37
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/WHEEL +1 -1
- tests/test_windings.py +1 -1
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/LICENSE +0 -0
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/entry_points.txt +0 -0
- {femagtools-1.7.5.dist-info → femagtools-1.7.7.dist-info}/top_level.txt +0 -0
femagtools/__init__.py
CHANGED
femagtools/bch.py
CHANGED
@@ -62,9 +62,12 @@ def sttylosses(losses):
|
|
62
62
|
d['stteeth'] = losses[teeth]
|
63
63
|
try:
|
64
64
|
d['styoke_hyst'] = losses[yoke+'_hyst']
|
65
|
-
d['stteeth_hyst'] = losses[teeth+'_hyst']
|
66
65
|
d['styoke_eddy'] = losses[yoke+'_eddy']
|
66
|
+
d['stteeth_hyst'] = losses[teeth+'_hyst']
|
67
67
|
d['stteeth_eddy'] = losses[teeth+'_eddy']
|
68
|
+
except KeyError:
|
69
|
+
pass
|
70
|
+
try:
|
68
71
|
d['styoke_excess'] = losses[yoke+'_excess']
|
69
72
|
d['stteeth_excess'] = losses[teeth+'_excess']
|
70
73
|
except KeyError:
|
@@ -306,6 +309,13 @@ class Reader:
|
|
306
309
|
'torque': tq.tolist()}]
|
307
310
|
except (KeyError, IndexError):
|
308
311
|
pass
|
312
|
+
|
313
|
+
# check number of phases
|
314
|
+
try:
|
315
|
+
if 'm' not in self.machine:
|
316
|
+
self.machine['m'] = len(self.current_angles)
|
317
|
+
except:
|
318
|
+
pass
|
309
319
|
|
310
320
|
return self
|
311
321
|
|
femagtools/dxfsl/area.py
CHANGED
@@ -40,6 +40,8 @@ TYPE_MAGNET_OR_IRON = 9
|
|
40
40
|
TYPE_SHAFT = 10
|
41
41
|
TYPE_MAGNET_RECT_NEAR_AIRGAP = 11
|
42
42
|
TYPE_WINDINGS_OR_AIR = 12
|
43
|
+
TYPE_WINDINGS_OR_IRON = 13
|
44
|
+
TYPE_FD_WINDINGS = 15
|
43
45
|
TYPE_MAGNET_UNDEFINED = 99
|
44
46
|
TYPE_GROUP = 20
|
45
47
|
|
@@ -206,6 +208,8 @@ class Area(object):
|
|
206
208
|
return 'Iron'
|
207
209
|
if self.type == TYPE_WINDINGS:
|
208
210
|
return 'Windings'
|
211
|
+
if self.type == TYPE_FD_WINDINGS:
|
212
|
+
return 'Field Windings'
|
209
213
|
if self.type == TYPE_MAGNET_AIRGAP or self.type == TYPE_MAGNET_RECT:
|
210
214
|
return 'Magnet'
|
211
215
|
if self.type == TYPE_YOKE:
|
@@ -221,6 +225,8 @@ class Area(object):
|
|
221
225
|
return 'Iron'
|
222
226
|
if self.type == TYPE_WINDINGS:
|
223
227
|
return 'Wndg'
|
228
|
+
if self.type == TYPE_FD_WINDINGS:
|
229
|
+
return 'FD_Wndg'
|
224
230
|
if self.type == TYPE_MAGNET_AIRGAP or self.type == TYPE_MAGNET_RECT:
|
225
231
|
return 'Mag'
|
226
232
|
if self.type == TYPE_YOKE:
|
@@ -236,6 +242,8 @@ class Area(object):
|
|
236
242
|
return 'cyan'
|
237
243
|
if self.type == TYPE_WINDINGS:
|
238
244
|
return 'green'
|
245
|
+
if self.type == TYPE_FD_WINDINGS:
|
246
|
+
return 'yellow'
|
239
247
|
if self.type == TYPE_MAGNET_AIRGAP or self.type == TYPE_MAGNET_RECT:
|
240
248
|
return 'red'
|
241
249
|
if self.type == TYPE_YOKE:
|
@@ -251,6 +259,8 @@ class Area(object):
|
|
251
259
|
return 0.3
|
252
260
|
if self.type == TYPE_WINDINGS:
|
253
261
|
return 1.0
|
262
|
+
if self.type == TYPE_FD_WINDINGS:
|
263
|
+
return 1.0
|
254
264
|
if self.type == TYPE_MAGNET_AIRGAP or self.type == TYPE_MAGNET_RECT:
|
255
265
|
return 1.0
|
256
266
|
if self.type == TYPE_YOKE:
|
@@ -277,7 +287,9 @@ class Area(object):
|
|
277
287
|
return self.type == TYPE_IRON
|
278
288
|
|
279
289
|
def is_winding(self):
|
280
|
-
return
|
290
|
+
return \
|
291
|
+
self.type == TYPE_WINDINGS or \
|
292
|
+
self.type == TYPE_FD_WINDINGS
|
281
293
|
|
282
294
|
def is_magnet(self):
|
283
295
|
return self.type == TYPE_MAGNET_AIRGAP or self.type == TYPE_MAGNET_RECT
|
@@ -324,6 +336,17 @@ class Area(object):
|
|
324
336
|
return True
|
325
337
|
return False
|
326
338
|
|
339
|
+
def minmax_dist_from_center(self, center):
|
340
|
+
rmin = 1e20
|
341
|
+
rmax = 0
|
342
|
+
for n in self.list_of_nodes():
|
343
|
+
r = np.linalg.norm(np.array(n)-center)
|
344
|
+
if r < rmin:
|
345
|
+
rmin = r
|
346
|
+
if r > rmax:
|
347
|
+
rmax = r
|
348
|
+
return rmin, rmax
|
349
|
+
|
327
350
|
def minmax_angle_dist_from_center(self, center, dist):
|
328
351
|
circ = Circle(Element(center=center, radius=dist))
|
329
352
|
s = self.area[0]
|
@@ -1315,11 +1338,89 @@ class Area(object):
|
|
1315
1338
|
logger.debug("***** air #4\n")
|
1316
1339
|
return 0
|
1317
1340
|
|
1318
|
-
def
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1341
|
+
def mark_EESM_rotor_subregions(self,
|
1342
|
+
is_inner,
|
1343
|
+
mirrored,
|
1344
|
+
alpha,
|
1345
|
+
center,
|
1346
|
+
r_in,
|
1347
|
+
r_out,
|
1348
|
+
startangle,
|
1349
|
+
endangle):
|
1350
|
+
logger.debug("mark_EESM_rotor_subregions")
|
1351
|
+
|
1352
|
+
alpha = round(alpha, 6)
|
1353
|
+
|
1354
|
+
if self.is_circle():
|
1355
|
+
self.type = TYPE_AIR # air
|
1356
|
+
logger.debug(">>> air is a circle")
|
1357
|
+
return self.type
|
1358
|
+
|
1359
|
+
if is_inner:
|
1360
|
+
self.close_to_ag = np.isclose(r_out, self.max_dist, rtol=1e-9, atol=0.005)
|
1361
|
+
close_to_opposition = greater_equal(r_in * 1.05, self.min_dist)
|
1362
|
+
airgap_radius = r_out
|
1363
|
+
opposite_radius = r_in
|
1364
|
+
airgap_toleranz = -(self.max_dist - self.min_dist) / 50.0 # 2%
|
1365
|
+
else:
|
1366
|
+
self.close_to_ag = np.isclose(r_in, self.min_dist, rtol=1e-9, atol=0.005)
|
1367
|
+
close_to_opposition = greater_equal(self.max_dist * 1.05, r_out)
|
1368
|
+
airgap_radius = r_in
|
1369
|
+
opposite_radius = r_out
|
1370
|
+
airgap_toleranz = (self.max_dist - self.min_dist) / 50.0 # 2%
|
1371
|
+
|
1372
|
+
self.close_to_startangle = np.isclose(self.min_angle, startangle,
|
1373
|
+
1e-04, 1e-04)
|
1374
|
+
self.close_to_endangle = np.isclose(self.max_angle, endangle,
|
1375
|
+
1e-04, 1e-04)
|
1376
|
+
|
1377
|
+
logger.debug("\n***** mark_EESM_rotor_subregions [{}] *****"
|
1378
|
+
.format(self.id))
|
1379
|
+
logger.debug(" - close_to_ag : %s", self.close_to_ag)
|
1380
|
+
logger.debug(" - close_to_opposition: %s", close_to_opposition)
|
1381
|
+
logger.debug(" - min dist : %3.12f", self.min_dist)
|
1382
|
+
logger.debug(" - max dist : %3.12f", self.max_dist)
|
1383
|
+
logger.debug(" - airgap radius : %3.12f", airgap_radius)
|
1384
|
+
logger.debug(" - opposite radius : %3.12f", opposite_radius)
|
1385
|
+
logger.debug(" - close_to_startangle: %s", self.close_to_startangle)
|
1386
|
+
logger.debug(" - close_to_endangle : %s", self.close_to_endangle)
|
1387
|
+
logger.debug(" - alpha : %3.12f", alpha)
|
1388
|
+
logger.debug(" - min_angle : %3.12f", self.min_angle)
|
1389
|
+
logger.debug(" - max_angle : %3.12f", self.max_angle)
|
1390
|
+
|
1391
|
+
if self.has_iron_separator():
|
1392
|
+
logger.debug("***** iron (has iron separator)\n")
|
1393
|
+
self.type = TYPE_IRON # iron
|
1394
|
+
return self.type
|
1395
|
+
|
1396
|
+
if is_inner:
|
1397
|
+
# looking for shaft
|
1398
|
+
if close_to_opposition and not self.close_to_ag:
|
1399
|
+
logger.debug("-- check for shaft")
|
1400
|
+
if self.is_shaft_area(center):
|
1401
|
+
self.type = TYPE_SHAFT # shaft
|
1402
|
+
logger.debug("***** shaft (close to opposition)\n")
|
1403
|
+
return self.type
|
1404
|
+
|
1405
|
+
if close_to_opposition or self.close_to_ag:
|
1406
|
+
self.type = TYPE_IRON # iron
|
1407
|
+
logger.debug("***** iron (close to opposition)\n")
|
1408
|
+
return self.type
|
1409
|
+
|
1410
|
+
self.type = TYPE_WINDINGS_OR_IRON # windings or iron
|
1411
|
+
logger.debug("***** air (somewhere)\n")
|
1412
|
+
return self.type
|
1413
|
+
|
1414
|
+
def mark_PMSM_rotor_subregions(self,
|
1415
|
+
is_inner,
|
1416
|
+
mirrored,
|
1417
|
+
alpha,
|
1418
|
+
center,
|
1419
|
+
r_in,
|
1420
|
+
r_out,
|
1421
|
+
startangle,
|
1422
|
+
endangle):
|
1423
|
+
logger.debug("mark_PMSM_rotor_subregions")
|
1323
1424
|
|
1324
1425
|
alpha = round(alpha, 6)
|
1325
1426
|
|
@@ -1346,7 +1447,7 @@ class Area(object):
|
|
1346
1447
|
self.close_to_endangle = np.isclose(self.max_angle, endangle,
|
1347
1448
|
1e-04, 1e-04)
|
1348
1449
|
|
1349
|
-
logger.debug("\n*****
|
1450
|
+
logger.debug("\n***** mark_PMSM_rotor_subregions [{}] *****"
|
1350
1451
|
.format(self.id))
|
1351
1452
|
logger.debug(" - close_to_ag : %s", self.close_to_ag)
|
1352
1453
|
logger.debug(" - close_to_opposition: %s", close_to_opposition)
|
femagtools/dxfsl/conv.py
CHANGED
@@ -25,6 +25,16 @@ def main():
|
|
25
25
|
description='Process DXF file and create a plot or FSL file.')
|
26
26
|
argparser.add_argument('dxfile',
|
27
27
|
help='name of DXF file')
|
28
|
+
argparser.add_argument('--PMSM',
|
29
|
+
help='Permanent Magnet Synchronous Motor',
|
30
|
+
dest='PMSM',
|
31
|
+
action="store_true",
|
32
|
+
default=False)
|
33
|
+
argparser.add_argument('--EESM',
|
34
|
+
help='Electric Excited Synchronous Motor',
|
35
|
+
dest='EESM',
|
36
|
+
action="store_true",
|
37
|
+
default=False)
|
28
38
|
argparser.add_argument('--inner',
|
29
39
|
help='name of inner element',
|
30
40
|
dest='inner',
|
@@ -209,12 +219,17 @@ def main():
|
|
209
219
|
if args.sym_part not in (3, 4, 6, 8):
|
210
220
|
logger.error("Argument sympart not in (3, 4, 6, 8)")
|
211
221
|
sys.exit(1)
|
222
|
+
if args.EESM:
|
223
|
+
if args.PMSM:
|
224
|
+
logger.error("PMSM or EESM expected (default PMSM)")
|
225
|
+
sys.exit(1)
|
212
226
|
|
213
227
|
if not args.write_fsl:
|
214
228
|
if not (args.show_plots or args.show_areas or args.view):
|
215
229
|
args.write_fsl = True
|
216
230
|
|
217
231
|
res = convert(args.dxfile, # DXF-Filename
|
232
|
+
args.EESM, # motor type EESM or PMSM
|
218
233
|
rtol=args.rtol, # relative pickdist toleranz
|
219
234
|
atol=args.atol, # absolute pickdist toleranz
|
220
235
|
symtol=args.sym_tolerance,
|
femagtools/dxfsl/converter.py
CHANGED
@@ -158,7 +158,7 @@ def symmetry_search(machine,
|
|
158
158
|
return machine_ok
|
159
159
|
|
160
160
|
|
161
|
-
def build_machine_rotor(machine, inner, mindist, plt, single=False):
|
161
|
+
def build_machine_rotor(machine, inner, mindist, plt, EESM=False, single=False):
|
162
162
|
logger.debug("Begin of build_machine_rotor")
|
163
163
|
if machine.has_windings():
|
164
164
|
logger.debug("do nothing here with windings in rotor")
|
@@ -170,7 +170,7 @@ def build_machine_rotor(machine, inner, mindist, plt, single=False):
|
|
170
170
|
machine_temp = machine.undo_mirror()
|
171
171
|
machine_temp.delete_tiny_elements(mindist)
|
172
172
|
machine_temp.geom.set_rotor()
|
173
|
-
machine_temp.search_rotor_subregions(single=single)
|
173
|
+
machine_temp.search_rotor_subregions(EESM, single=single)
|
174
174
|
else:
|
175
175
|
machine_temp = machine
|
176
176
|
|
@@ -199,7 +199,7 @@ def build_machine_rotor(machine, inner, mindist, plt, single=False):
|
|
199
199
|
logger.debug("Auxiliary Lines created: rebuild subregions")
|
200
200
|
rebuild = True
|
201
201
|
if rebuild:
|
202
|
-
machine_temp.rebuild_subregions(single=single)
|
202
|
+
machine_temp.rebuild_subregions(EESM, single=single)
|
203
203
|
|
204
204
|
machine_temp.geom.recalculate_magnet_orientation()
|
205
205
|
if inner:
|
@@ -215,7 +215,7 @@ def build_machine_rotor(machine, inner, mindist, plt, single=False):
|
|
215
215
|
return machine_temp
|
216
216
|
|
217
217
|
|
218
|
-
def build_machine_stator(machine, inner, mindist, plt, single=False):
|
218
|
+
def build_machine_stator(machine, inner, mindist, plt, EESM=False, single=False):
|
219
219
|
logger.debug("Begin of build_machine_stator")
|
220
220
|
if not machine.geom.is_stator():
|
221
221
|
logger.debug("Rotor with windings")
|
@@ -230,7 +230,7 @@ def build_machine_stator(machine, inner, mindist, plt, single=False):
|
|
230
230
|
else:
|
231
231
|
machine_temp = machine
|
232
232
|
if machine_temp.create_auxiliary_lines():
|
233
|
-
machine_temp.rebuild_subregions(single=single)
|
233
|
+
machine_temp.rebuild_subregions(EESM, single=single)
|
234
234
|
|
235
235
|
if inner:
|
236
236
|
machine_temp.create_inner_corner_areas()
|
@@ -246,6 +246,7 @@ def build_machine_stator(machine, inner, mindist, plt, single=False):
|
|
246
246
|
|
247
247
|
|
248
248
|
def convert(dxfile,
|
249
|
+
EESM=False,
|
249
250
|
rtol=1e-04,
|
250
251
|
atol=1e-03,
|
251
252
|
mindist=0.01,
|
@@ -505,34 +506,38 @@ def convert(dxfile,
|
|
505
506
|
|
506
507
|
machine_inner.sync_with_counterpart(machine_outer)
|
507
508
|
|
508
|
-
machine_inner.search_subregions()
|
509
|
-
machine_outer.search_subregions()
|
509
|
+
machine_inner.search_subregions(EESM)
|
510
|
+
machine_outer.search_subregions(EESM)
|
510
511
|
|
511
512
|
# Inner mirrored rotor
|
512
513
|
if machine_inner.geom.is_rotor():
|
513
514
|
machine_inner = build_machine_rotor(machine_inner,
|
514
515
|
True, # is inner
|
515
516
|
mindist,
|
516
|
-
p
|
517
|
+
p,
|
518
|
+
EESM=EESM)
|
517
519
|
|
518
520
|
# Outer mirrored rotor
|
519
521
|
if machine_outer.geom.is_rotor():
|
520
522
|
machine_outer = build_machine_rotor(machine_outer,
|
521
523
|
False, # is outer
|
522
524
|
mindist,
|
523
|
-
p
|
525
|
+
p,
|
526
|
+
EESM=EESM)
|
524
527
|
|
525
528
|
if machine_inner.geom.is_stator() or machine_inner.has_windings():
|
526
529
|
machine_inner = build_machine_stator(machine_inner,
|
527
530
|
True,
|
528
531
|
mindist,
|
529
|
-
p
|
532
|
+
p,
|
533
|
+
EESM=EESM)
|
530
534
|
|
531
535
|
if machine_outer.geom.is_stator() or machine_outer.has_windings():
|
532
536
|
machine_outer = build_machine_stator(machine_outer,
|
533
537
|
False,
|
534
538
|
mindist,
|
535
|
-
p
|
539
|
+
p,
|
540
|
+
EESM=EESM)
|
536
541
|
machine_inner.sync_with_counterpart(machine_outer)
|
537
542
|
|
538
543
|
machine_inner.search_critical_elements(mindist)
|
@@ -635,7 +640,8 @@ def convert(dxfile,
|
|
635
640
|
logger.warning("it's not possible to create fsl-file")
|
636
641
|
return None
|
637
642
|
|
638
|
-
|
643
|
+
mtype = 'EESM' if EESM else 'PMSM'
|
644
|
+
fslrenderer = FslRenderer(basename, mtype)
|
639
645
|
inner = fslrenderer.render(machine_inner, inner=True)
|
640
646
|
outer = fslrenderer.render(machine_outer, outer=True)
|
641
647
|
if full_model:
|
@@ -647,14 +653,13 @@ def convert(dxfile,
|
|
647
653
|
params.get('nodedist'))
|
648
654
|
|
649
655
|
if params['external_rotor']:
|
650
|
-
conv['
|
656
|
+
conv['fsl_rotor'] = outer
|
651
657
|
conv['fsl_stator'] = inner
|
652
658
|
else:
|
653
|
-
conv['
|
659
|
+
conv['fsl_rotor'] = inner
|
654
660
|
conv['fsl_stator'] = outer
|
655
661
|
|
656
662
|
conv['fsl'] = fslrenderer.render_main(
|
657
|
-
machine,
|
658
663
|
machine_inner, machine_outer,
|
659
664
|
inner, outer,
|
660
665
|
params)
|
@@ -707,20 +712,30 @@ def convert(dxfile,
|
|
707
712
|
machine.geom.set_stator()
|
708
713
|
machine.set_inner_or_outer(part[1])
|
709
714
|
machine.search_stator_subregions(single=True)
|
710
|
-
machine = build_machine_stator(machine,
|
715
|
+
machine = build_machine_stator(machine,
|
716
|
+
inner,
|
717
|
+
mindist,
|
718
|
+
p,
|
719
|
+
EESM=EESM,
|
720
|
+
single=True)
|
711
721
|
|
712
722
|
params = create_femag_parameters_stator(machine,
|
713
723
|
part[1])
|
714
724
|
else:
|
715
725
|
machine.geom.set_rotor()
|
716
726
|
machine.set_inner_or_outer(part[1])
|
717
|
-
machine.search_rotor_subregions(single=True)
|
718
|
-
machine = build_machine_rotor(machine,
|
727
|
+
machine.search_rotor_subregions(EESM, single=True)
|
728
|
+
machine = build_machine_rotor(machine,
|
729
|
+
inner,
|
730
|
+
mindist,
|
731
|
+
p,
|
732
|
+
EESM=EESM,
|
733
|
+
single=True)
|
719
734
|
|
720
735
|
params = create_femag_parameters_rotor(machine,
|
721
736
|
part[1])
|
722
737
|
else:
|
723
|
-
machine.search_subregions(single=True)
|
738
|
+
machine.search_subregions(EESM, single=True)
|
724
739
|
|
725
740
|
machine.create_inner_corner_areas()
|
726
741
|
|
@@ -776,7 +791,8 @@ def convert(dxfile,
|
|
776
791
|
logger.warning("it's not possible to create fsl-file")
|
777
792
|
return None
|
778
793
|
|
779
|
-
|
794
|
+
mtype = 'EESM' if EESM else 'PMSM'
|
795
|
+
fslrenderer = FslRenderer(basename, mtype)
|
780
796
|
conv['fsl'] = fslrenderer.render(machine, inner, outer)
|
781
797
|
|
782
798
|
if params is not None:
|
@@ -800,13 +816,18 @@ def create_femag_parameters(m_inner, m_outer, nodedist=1):
|
|
800
816
|
parts_inner = int(m_inner.get_symmetry_part())
|
801
817
|
parts_outer = int(m_outer.get_symmetry_part())
|
802
818
|
|
819
|
+
slot_area = 0
|
803
820
|
if parts_inner > parts_outer:
|
821
|
+
from .area import TYPE_WINDINGS
|
822
|
+
slot_area = geom_inner.area_size_of_type(TYPE_WINDINGS)
|
804
823
|
num_slots = int(parts_inner)
|
805
824
|
num_poles = int(parts_outer)
|
806
825
|
num_sl_gen = int(geom_inner.get_symmetry_copies()+1)
|
807
826
|
alfa_slot = geom_inner.get_alfa()
|
808
827
|
alfa_pole = geom_outer.get_alfa()
|
809
828
|
else:
|
829
|
+
from .area import TYPE_WINDINGS
|
830
|
+
slot_area = geom_outer.area_size_of_type(TYPE_WINDINGS)
|
810
831
|
num_slots = int(parts_outer)
|
811
832
|
num_poles = int(parts_inner)
|
812
833
|
num_sl_gen = int(geom_outer.get_symmetry_copies()+1)
|
@@ -814,6 +835,7 @@ def create_femag_parameters(m_inner, m_outer, nodedist=1):
|
|
814
835
|
alfa_pole = geom_inner.get_alfa()
|
815
836
|
|
816
837
|
params['tot_num_slot'] = num_slots
|
838
|
+
params['slot_area'] = slot_area
|
817
839
|
params['num_sl_gen'] = num_sl_gen
|
818
840
|
params['num_poles'] = num_poles
|
819
841
|
params['nodedist'] = nodedist
|
@@ -851,6 +873,7 @@ def create_femag_parameters_stator(motor, position):
|
|
851
873
|
else:
|
852
874
|
params['dy1'] = 2*motor.geom.max_radius
|
853
875
|
params['da1'] = 2*motor.geom.min_radius
|
876
|
+
params['slot_area'] = motor.slot_area()
|
854
877
|
return params
|
855
878
|
|
856
879
|
|
@@ -864,4 +887,5 @@ def create_femag_parameters_rotor(motor, position):
|
|
864
887
|
else:
|
865
888
|
params['dy1'] = 2*motor.geom.max_radius
|
866
889
|
params['da1'] = 2*motor.geom.min_radius
|
890
|
+
params['slot_area'] = motor.slot_area()
|
867
891
|
return params
|