femagtools 1.8.9__py3-none-any.whl → 1.8.11__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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  """
4
4
  __title__ = 'femagtools'
5
- __version__ = '1.8.9'
5
+ __version__ = '1.8.11'
6
6
  __author__ = 'Ronald Tanner'
7
7
  __license__ = 'BSD'
8
8
  __copyright__ = 'Copyright 2023-2025 Gamma Technology'
femagtools/fsl.py CHANGED
@@ -765,18 +765,15 @@ class Builder:
765
765
  if pfefunc:
766
766
  sim['loss_funct'] = pfefunc
767
767
  '''
768
+ if sim.get('plots'):
769
+ plots = self.__render(sim, 'plots')
770
+ else:
771
+ plots = []
768
772
 
769
- if sim.get('calculationMode') in ('cogg_calc',
770
- 'ld_lq_fast',
771
- 'pm_sym_loss',
772
- 'torq_calc',
773
- 'psd_psq_fast'):
774
- return felosses + fslcalc
775
-
776
- return felosses + fslcalc + self.__render(sim, 'plots')
773
+ return felosses + fslcalc + plots
777
774
 
778
775
  def create_shortcircuit(self, model):
779
- return self.__render(model, 'shortcircuit')
776
+ return self.__render(model, 'shortcircuit') + self.__render(model, 'plots')
780
777
 
781
778
  def create_airgap_induc(self):
782
779
  return self.__render(dict(), 'airgapinduc')
femagtools/isa7.py CHANGED
@@ -1294,13 +1294,12 @@ class Isa7(object):
1294
1294
  scale_factor = poles/poles_sim
1295
1295
  return scale_factor
1296
1296
 
1297
- def get_magnet_data(self, ibeta=0, icur=0) -> list:
1297
+ def get_magnet_data(self, ibeta=None, icur=0) -> list:
1298
1298
  '''Extract magnet data from nc file
1299
1299
 
1300
1300
  Args:
1301
1301
  nc: nc object
1302
- icur, ibeta: load case
1303
-
1302
+ ibeta: loadcase (default: None)
1304
1303
  Returns:
1305
1304
  pm_data: list of magnet data
1306
1305
  '''
@@ -1350,12 +1349,6 @@ class Isa7(object):
1350
1349
  ecp = [e.center for e in se.elements]
1351
1350
  geometry = se.get_rect_geom()
1352
1351
 
1353
- bxy = []
1354
- for e in se.elements:
1355
- theta = np.arctan2(float(e.center[1]),
1356
- float(e.center[0]))
1357
- fd = self.flux_density(e, icur, ibeta)
1358
- bxy.append(Trot(-theta).dot((fd['bx'], fd['by'])))
1359
1352
  #= np.moveaxis(bxy, 1, 0)
1360
1353
  pd = dict(name='pm_data_se' + str(se.key),
1361
1354
  hm=geometry['h'],
@@ -1367,16 +1360,28 @@ class Isa7(object):
1367
1360
  mur=mur,
1368
1361
  loadcase=ibeta,
1369
1362
  numpoles=poles,
1370
- bl=transform_flux_density(geometry['alpha'],
1371
- np.array(bxy)),
1372
1363
  elcp=transform_coord(geometry, ecp),
1373
1364
  area=se.area(),
1374
1365
  spel_key=se.key)
1366
+ if ibeta != None:
1367
+ pd.update({'bl': self.get_magnet_flux_density(se, icur, ibeta)})
1375
1368
  pd.update(pos)
1376
1369
 
1377
1370
  pm_data.append(pd)
1378
1371
  return pm_data
1379
1372
 
1373
+ def get_magnet_flux_density(self, se, icur, ibeta) -> list:
1374
+ """returns the flux density Bx, By of all elements
1375
+ of this super element transformed to the main axis (alpha)
1376
+ Note: get_rect_geom must be called previously.
1377
+ """
1378
+ bxy = []
1379
+ for e in se.elements:
1380
+ theta = np.arctan2(float(e.center[1]),
1381
+ float(e.center[0]))
1382
+ fd = self.flux_density(e, icur, ibeta)
1383
+ bxy.append(Trot(-theta).dot((fd['bx'], fd['by'])))
1384
+ return transform_flux_density(se.alpha, np.array(bxy))
1380
1385
 
1381
1386
  class Point(object):
1382
1387
  def __init__(self, x, y):
@@ -1662,12 +1667,11 @@ class SuperElement(BaseEntity):
1662
1667
  # angle of main axis
1663
1668
  i = np.argmax(dc)
1664
1669
  c = np.vstack((c, c[0]))
1665
- alpha = np.arctan2(c[i+1, 1]-c[i, 1], c[i+1, 0]-c[i, 0])
1666
- if alpha < 0:
1667
- alpha += np.pi
1670
+ self.alpha = np.arctan2(c[i+1, 1]-c[i, 1], c[i+1, 0]-c[i, 0])
1671
+ #if alpha < 0:
1672
+ # alpha += np.pi
1668
1673
  return {'w': w, 'h': h, 'cxy': cxy,
1669
- 'area': area, 'alpha': alpha}
1670
-
1674
+ 'area': area, 'alpha': self.alpha}
1671
1675
 
1672
1676
  class SubRegion(BaseEntity):
1673
1677
  def __init__(self, key, sr_type, color, name, nturns, curdir, wb_key,
femagtools/leakinduc.py CHANGED
@@ -22,37 +22,6 @@ def end_wdg_leak_ind_hairpin_wires(): #TODO
22
22
  return L_ew
23
23
 
24
24
 
25
- #def slot_leakage_inductance_round_wires(p, q, w1, num_par_wdgs, layers):
26
- # '''returns slot leakage inductance per phase'''
27
- # mue0 = 4*np.pi*1e-7
28
- # if layers == 1:
29
- # lambda_slot = 0 # tbc
30
- # if layers == 2:
31
- # t1 = b2/bs
32
- # t2 = b1/b2
33
- # t12 = b1/b2
34
- # kt1 = (4*t1**2 - t1**4 - 4*np.log(t1) -3)/(4*(1 - t1)*(1 - t1**2)**2) if t1 != 1 else 0
35
- # kt2 = (4*t2**2 - t2**4 - 4*np.log(t2) - 3)/(4*(1 - t2)*(1 - t2**2)**2) if t2 != 1 else 0
36
- # kt12 = (t12**2 - 2*np.log(t12) - 1)/(2*(1 - t12)*(1 - t12**2)) if t12 != 1 else 0
37
- # const = 0.1424 + 0.5*np.arcsin(np.sqrt(1 - (bo/b1)**2)) + ho/bo
38
- # lambda_t = h2/b2*kt2 + const
39
- # lambda_b = h3/bs*kt1 + h2/(b2-b1)*np.log(b2/b1) + const if b2 != b1 else h3/bs*kt1 + const
40
- # lambda_tb = h2/b2*kt12 + const
41
- # lambda_slot = lambda_t + lambda_b + lambda_tb
42
- # L_slot = mue0*2/(p*q)*(w1/num_par_wdgs)**2*lambda_slot
43
- # return L_slot
44
-
45
-
46
- def slot_leak_ind_fea(): #TODO
47
- '''returns slot and tooth tip leakage inductance'''
48
- # make a single slot model with detailed windings
49
- # run current through windings
50
- # L_slot = flux / current
51
- # scale to get values per phase
52
- L_slot = 0
53
- return L_slot
54
-
55
-
56
25
  def harm_leak_ind(E_fft, order_fft, freq, Ia): # needs to be validated
57
26
  '''returns harmonic leakage inductance per phase'''
58
27
  L_harm = []
@@ -56,6 +56,10 @@ def jsonify(v):
56
56
 
57
57
 
58
58
  def get_magdata(task):
59
+ """result func used in parstudy
60
+ extracts the magnet data from the NC/ISA7 for
61
+ subsequent magnet loss calc
62
+ """
59
63
  basedir = Path(task.directory)
60
64
  bchfile_list = sorted(basedir.glob(
61
65
  '*_[0-9][0-9][0-9].B*CH'))
@@ -211,11 +215,7 @@ def parident(workdir, engine, temp, machine,
211
215
  rmagw = num_slices*[machine['magnet'][slotmodel]['rel_magn_width']]
212
216
  else:
213
217
  rmagw = machine['magnet'][slotmodel]['rel_magn_width']
214
- if len(rmagw) == 1:
215
- num_slices = kwargs.get('num_slices', 3)
216
- rmagw = num_slices*list(rmagw)
217
- else:
218
- num_slices = len(rmagw)
218
+ num_slices = len(rmagw)
219
219
 
220
220
  logger.info("num_slices %d rmagw %s", num_slices, rmagw)
221
221
  lfe = get_arm_lengths(machine['outer_diam'],
@@ -222,10 +222,7 @@ def efficiency_losses_map(eecpars, u1, T, temp, n, npoints=(60, 40),
222
222
  m = create_from_eecpars(xtemp, eecpars)
223
223
  else: # must be an instance of Machine
224
224
  m = eecpars
225
- if isinstance(T, list):
226
- r = {'T': T, 'n': n}
227
- rb = {'T': [], 'n': []}
228
- else: # calculate speed,torque characteristics
225
+ if np.isscalar(T): # calculate speed,torque characteristics
229
226
  nmax = n
230
227
  nsamples = npoints[0]
231
228
  rb = {}
@@ -249,15 +246,33 @@ def efficiency_losses_map(eecpars, u1, T, temp, n, npoints=(60, 40),
249
246
  with_mtpv=with_mtpv, with_mtpa=with_mtpa,
250
247
  with_pmconst=with_pmconst, with_tmech=with_tmech,
251
248
  **kwargs) # braking mode
252
-
253
- if kwargs.get('mesh_func', 0):
254
- ntmesh = kwargs['mesh_func'](r['n_type'], r['n'], r['T'],
249
+ if kwargs.get('mesh_func', 0):
250
+ ntmesh = kwargs['mesh_func'](r['n_type'], r['n'], r['T'],
251
+ rb['n'], rb['T'], npoints)
252
+ else:
253
+ ntmesh = _generate_mesh(r['n'], r['T'],
255
254
  rb['n'], rb['T'], npoints)
256
255
  else:
257
- ntmesh = _generate_mesh(r['n'], r['T'],
258
- rb['n'], rb['T'], npoints)
259
-
260
- logger.info("total speed,torque samples %d", ntmesh.shape[1])
256
+ nt = []
257
+ iq, id = m.iqd_torque(T[-1])
258
+ i1max = betai1(iq, id)[1]
259
+ logger.info("%s %s", n, T)
260
+ for nx in n:
261
+ w1 = 2*np.pi*nx*m.p
262
+ iq, id, tq = m.iqd_imax_umax(i1max, w1, u1, T[-1],
263
+ with_tmech=with_tmech,
264
+ with_mtpa=with_mtpa)
265
+ if np.isclose(tq, T[-1]):
266
+ tq = T[-1]
267
+ for Tx in T:
268
+ if Tx <= tq:
269
+ nt.append((nx, Tx))
270
+ if not nt:
271
+ raise ValueError("Speed, Torque Mesh is empty")
272
+ nsamples = len(n)
273
+ ntmesh = np.array(nt).T
274
+
275
+ logger.info("total speed,torque samples %s", ntmesh.shape)
261
276
  if isinstance(m, (PmRelMachine, SynchronousMachine)):
262
277
  if num_proc > 1:
263
278
  iqd = iqd_tmech_umax_multi(num_proc, ntmesh, m, u1, with_mtpa,
@@ -328,7 +343,7 @@ def efficiency_losses_map(eecpars, u1, T, temp, n, npoints=(60, 40),
328
343
  plcu2 = m.iqd_plcu2(*iqd)
329
344
  tfric = m.tfric
330
345
  try:
331
- plcu1_dc = m.iqd_plcu1(iqd[0], iqd[1],
346
+ plcu1_dc = m.iqd_plcu1(iqd[0], iqd[1],
332
347
  np.array([0.0 for i in f1])).tolist()
333
348
  plcu1_ac = [i-j for i, j in zip(plcu1.tolist(), plcu1_dc)]
334
349
  except:
@@ -397,6 +412,6 @@ def efficiency_losses_map(eecpars, u1, T, temp, n, npoints=(60, 40),
397
412
  plcu1=plcu1.tolist(),
398
413
  plcu2=plcu2.tolist(),
399
414
  plfric=plfric.tolist(),
400
- losses=ploss.tolist(),
401
- plcu1_dc=plcu1_dc,
415
+ losses=ploss.tolist(),
416
+ plcu1_dc=plcu1_dc,
402
417
  plcu1_ac=plcu1_ac)
femagtools/machine/pm.py CHANGED
@@ -315,25 +315,51 @@ class PmRelMachine(object):
315
315
  lambda w1: la.norm(self.uqd(w1, iq, id))-u*np.sqrt(2),
316
316
  w10)[0]
317
317
 
318
- def w1_imax_umax(self, i1max, u1max):
318
+ def w1_imax_umax(self, i1max, u1max, with_mtpa=True, with_tmech=True):
319
319
  """return frequency w1 and torque at voltage u1max and current i1max
320
320
 
321
321
  Keyword arguments:
322
322
  u1max -- the maximum voltage (Vrms)
323
- i1max -- the maximum current (Arms)"""
324
- iq, id, T = self.mtpa(i1max)
325
- n0 = u1max/np.linalg.norm(self.psi(iq, id))/2/2/np.pi/self.p
326
- sign = -1 if i1max > 0 else 1
327
- res = so.minimize(
328
- lambda n: sign*self.mtpa_tmech(i1max, n)[2],
329
- n0,
330
- constraints={
331
- 'type': 'eq',
332
- 'fun': lambda n:
333
- np.sqrt(2)*u1max - la.norm(
334
- self.uqd(2*np.pi*n*self.p,
323
+ i1max -- the maximum current (Arms)
324
+ with_mtpa -- use minimum current
325
+ with_tmech -- use mech torque
326
+ """
327
+ if with_mtpa:
328
+ iq, id, T = self.mtpa(i1max)
329
+ n0 = u1max/np.linalg.norm(self.psi(iq, id))/2/2/np.pi/self.p
330
+ if with_tmech:
331
+ sign = -1 if i1max > 0 else 1
332
+ res = so.minimize(
333
+ lambda n: sign*self.mtpa_tmech(i1max, n)[2],
334
+ n0,
335
+ constraints={
336
+ 'type': 'eq',
337
+ 'fun': lambda n:
338
+ np.sqrt(2)*u1max - np.linalg.norm(
339
+ self.uqd(2*np.pi*n*self.p,
335
340
  *self.mtpa_tmech(i1max, n)[:2]))})
336
- return 2*np.pi*res.x[0]*self.p, self.mtpa_tmech(i1max, res.x[0])[2]
341
+ return 2*np.pi*res.x[0]*self.p, self.mtpa_tmech(i1max, res.x[0])[2]
342
+ return so.fsolve(lambda x: np.linalg.norm(
343
+ self.uqd(x, iq, id)) - u1max*np.sqrt(2),
344
+ 2*np.pi*self.p*n0), T
345
+
346
+ iq, id = iqd(0, i1max)
347
+ n0 = u1max/np.linalg.norm(self.psi(iq, id))/2/2/np.pi/self.p
348
+ if with_tmech:
349
+ sign = -1 if i1max > 0 else 1
350
+ res = so.minimize(
351
+ lambda n: sign*self.tmech_iqd(iq, id, n),
352
+ n0,
353
+ constraints={
354
+ 'type': 'eq',
355
+ 'fun': lambda n:
356
+ np.sqrt(2)*u1max - np.linalg.norm(
357
+ self.uqd(2*np.pi*n*self.p, iq, id))})
358
+ return 2*np.pi*res.x[0]*self.p, self.tmech_iqd(iq, id, res.x[0])
359
+
360
+ return so.fsolve(lambda x: np.linalg.norm(
361
+ self.uqd(x, iq, id)) - u1max*np.sqrt(2),
362
+ 2*np.pi*self.p*n0), self.torque_iqd(iq, id)
337
363
 
338
364
  def w1_u(self, u, iq, id):
339
365
  """return frequency w1 at given voltage u and id, iq current
@@ -497,16 +523,17 @@ class PmRelMachine(object):
497
523
  logger.debug("field weakening mode %.2f kW @ %.0f rpm %.1f Nm; "
498
524
  "u1=%.0f V; plfric=%.2f W",
499
525
  P/1000, n*60, T, u1max, self.pfric(n))
500
- iq, id = self.iqd_torque_imax_umax(T, n, u1max, with_tmech=with_tmech)[:2]
526
+ iq, id = self.iqd_torque_imax_umax(T, n, u1max,
527
+ with_tmech=with_tmech, with_mtpa=with_mtpa)[:2]
501
528
 
502
529
  if with_tmech:
503
530
  tcon = {'type': 'eq',
504
531
  'fun': lambda iqd:
505
- self.tmech_iqd(*iqd, n) - T}
532
+ T - self.tmech_iqd(*iqd, n)}
506
533
  else:
507
534
  tcon = {'type': 'eq',
508
535
  'fun': lambda iqd:
509
- self.torque_iqd(*iqd) - T}
536
+ T - self.torque_iqd(*iqd)}
510
537
 
511
538
  res = so.minimize(lambda iqd: np.linalg.norm(iqd), (iq, id),
512
539
  method='SLSQP',
@@ -522,7 +549,7 @@ class PmRelMachine(object):
522
549
  log(res.x)
523
550
  if i1 > abs(i1max):
524
551
  return self.iqd_imax_umax(i1max, w1, u1max, T,
525
- with_mtpv=False,
552
+ with_mtpv=False, with_mtpa=with_mtpa,
526
553
  with_tmech=with_tmech)
527
554
  if with_tmech:
528
555
  return *res.x, self.tmech_iqd(*res.x, n)
@@ -538,7 +565,7 @@ class PmRelMachine(object):
538
565
  log((iq, id, tq))
539
566
  return iq, id, tq
540
567
 
541
- def iqd_torque_imax_umax(self, torque, n, u1max, with_tmech=False, log=0):
568
+ def iqd_torque_imax_umax(self, torque, n, u1max, with_tmech=False, with_mtpa=True, log=0):
542
569
  """return d-q current and torque at stator frequency w1,
543
570
  max voltage and current"""
544
571
  if with_tmech:
@@ -553,29 +580,33 @@ class PmRelMachine(object):
553
580
  return (iq, id, torque)
554
581
  # Field weaking range
555
582
  imax = betai1(iq, id)[1]
556
- iq, id, tq = self.iqd_imax_umax(imax, w1, u1max, torque,
583
+ iq, id, tq = self.iqd_imax_umax(imax, w1, u1max, torque, with_mtpa=with_mtpa,
557
584
  with_mtpv=False, with_tmech=with_tmech)
558
585
  if log:
559
586
  log((iq, id, tq))
560
587
  return iq, id, tq
561
588
 
562
- def iqd_imax_umax(self, i1max, w1, u1max, torque, with_mtpv=True, with_tmech=True):
589
+ def iqd_imax_umax(self, i1max, w1, u1max, torque, with_mtpv=True, with_tmech=True, with_mtpa=True):
563
590
  """return d-q current and shaft torque at stator frequency and max voltage
564
591
  and max current (for motor operation if maxtorque else generator operation)"""
565
-
566
592
  if torque > 0:
593
+ sign=-1
567
594
  # -pi/2 --> 0
568
595
  b0, b1 = max(-np.pi/2, self.betarange[0]), 0
569
596
  if max(self.betarange) < b1:
570
597
  raise ValueError(
571
598
  f"invalid betarange for maxtorque>0: {self.betarange}")
572
599
  else:
600
+ sign=1
573
601
  # -pi/2 --> -pi
574
602
  b0, b1 = -np.pi/2, max(-np.pi, self.betarange[0])
575
603
  if min(self.betarange) > b0:
576
604
  raise ValueError(
577
605
  f"invalid betarange for maxtorque<0: {self.betarange}")
578
-
606
+ if with_mtpa:
607
+ iq, id, _ = self.mtpa(i1max)
608
+ else:
609
+ iq, id = iqd(0, i1max)
579
610
  deps = 1e-6
580
611
  kmax = 100
581
612
 
@@ -678,7 +709,6 @@ class PmRelMachine(object):
678
709
  i1max - betai1(*iqd)[1]})
679
710
  res = so.minimize(lambda iqd: sign*self.torque_iqd(*iqd), i0,
680
711
  method='SLSQP', constraints=constraints)
681
- #logger.info("mtpv %s", res)
682
712
  if res['success']:
683
713
  return res.x[0], res.x[1], sign*res.fun
684
714
  raise ValueError(f"mtpv w1={w1} u1={u1} i0 {i0} iqd0 {iqd0} maxtorque={maxtorque} res: {res['message']}")
@@ -703,7 +733,6 @@ class PmRelMachine(object):
703
733
  res = so.minimize(lambda iqd: sign*self.tmech_iqd(*iqd, n), i0,
704
734
  method='SLSQP',
705
735
  constraints=constraints)
706
- #logger.info("mtpv_torque %s", res)
707
736
  if res['success']:
708
737
  return res.x[0], res.x[1], sign*res.fun
709
738
  #logger.warning("w1=%.1f u1=%.1f maxtorque=%s %s: %s", w1, u1, maxtorque, res.x, res.message)
@@ -758,11 +787,9 @@ class PmRelMachine(object):
758
787
  returns list of speed limit for each interval
759
788
  calculates with friction and windage losses if with_tmech=True
760
789
  """
761
- if with_tmech:
762
- w1type, T = self.w1_imax_umax(i1max, u1max)
763
- else:
764
- iq, id, T = self.mtpa(i1max)
765
- w1type = self.w1_umax(u1max, iq, id)
790
+ w1type, T = self.w1_imax_umax(i1max, u1max,
791
+ with_tmech=with_tmech,
792
+ with_mtpa=with_mtpa)
766
793
  Pmax = w1type/self.p*T
767
794
  # check max speed:
768
795
  sp = speedmax
@@ -776,7 +803,7 @@ class PmRelMachine(object):
776
803
  else:
777
804
  iq, id, tq = self.iqd_imax_umax(
778
805
  i1max, w1max, u1max,
779
- T, with_mtpv=False,
806
+ T, with_mtpv=False, with_mtpa=with_mtpa,
780
807
  with_tmech=with_tmech)
781
808
  break
782
809
  except ValueError:
@@ -804,7 +831,8 @@ class PmRelMachine(object):
804
831
  with_mtpa, with_tmech)[:2]
805
832
  else:
806
833
  iq, id = self.iqd_imax_umax(i1max, wx, u1max,
807
- T, with_mtpv=False)[:2]
834
+ T, with_mtpa=with_mtpa,
835
+ with_mtpv=False)[:2]
808
836
  i1 = betai1(iq, id)[1]
809
837
  try:
810
838
  if with_tmech:
@@ -957,42 +985,53 @@ class PmRelMachine(object):
957
985
  r = dict(id=[], iq=[], uq=[], ud=[], u1=[], i1=[], T=[],
958
986
  beta=[], gamma=[], phi=[], cosphi=[], pmech=[], n=[], type_op=[])
959
987
 
988
+ i1max = 0
960
989
  if kwargs.get('i1max', 0):
961
- w1type, T = self.w1_imax_umax(kwargs['i1max'], u1max)
990
+ i1max = kwargs['i1max']
991
+ w1, Tf = self.w1_imax_umax(i1max, u1max,
992
+ with_mtpa=with_mtpa,
993
+ with_tmech=with_tmech)
994
+ if with_mtpa:
995
+ iq, id, T = self.mtpa(i1max)
996
+ else:
997
+ iq, id = iqd(0, i1max)
962
998
 
963
999
  if np.isscalar(T):
964
- tmax = self.torquemax(self.i1range[1])
965
- tmin = 0
966
- if self.betarange[0] < -np.pi/2:
967
- tmin = -self.torquemin(self.i1range[1])
968
- if tmin > T or T > tmax:
969
- if with_torque_corr:
970
- Torig = T
971
- if T > 0:
972
- T = np.floor(tmax)
1000
+ if i1max == 0:
1001
+ tmax = self.torquemax(self.i1range[1])
1002
+ tmin = 0
1003
+ if self.betarange[0] < -np.pi/2:
1004
+ tmin = -self.torquemin(self.i1range[1])
1005
+ if tmin > T or T > tmax:
1006
+ if with_torque_corr:
1007
+ Torig = T
1008
+ if T > 0:
1009
+ T = np.floor(tmax)
1010
+ else:
1011
+ T = np.ceil(tmin)
1012
+ logger.warning("corrected torque: %f -> %f Nm",
1013
+ Torig, T)
973
1014
  else:
974
- T = np.ceil(tmin)
975
- logger.warning("corrected torque: %f -> %f Nm",
976
- Torig, T)
1015
+ raise ValueError(
1016
+ f"torque {T} Nm out of range ({tmin:.1f}, {tmax:.1f} Nm)")
1017
+
1018
+ if with_mtpa:
1019
+ iq, id = self.iqd_torque(T)
1020
+ i1max = betai1(iq, id)[1]
1021
+ if T < 0:
1022
+ i1max = -i1max
977
1023
  else:
978
- raise ValueError(
979
- f"torque {T} Nm out of range ({tmin:.1f}, {tmax:.1f} Nm)")
1024
+ i1max = self.i1_torque(T, 0)
1025
+ iq, id = iqd(0, i1max)
980
1026
 
981
- if with_mtpa:
982
- iq, id = self.iqd_torque(T)
983
- i1max = betai1(iq, id)[1]
984
- if T < 0:
985
- i1max = -i1max
986
- else:
987
- i1max = self.i1_torque(T, 0)
988
- iq, id = iqd(0, i1max)
1027
+ if with_tmech:
1028
+ w1, Tf = self.w1_imax_umax(i1max, u1max, with_mtpa=with_mtpa,
1029
+ with_tmech=with_tmech)
1030
+ else:
1031
+ iq, id = self.iqd_torque(T)
1032
+ Tf = T
1033
+ w1 = self.w1_umax(u1max, iq, id)
989
1034
 
990
- if with_tmech:
991
- w1, Tf = self.w1_imax_umax(i1max, u1max)
992
- else:
993
- iq, id = self.iqd_torque(T)
994
- Tf = T
995
- w1 = self.w1_umax(u1max, iq, id)
996
1035
  assert w1>0, f"Invalid values u1 {u1max}, T {T}, iq: {iq} id: {id}"
997
1036
  n1 = w1/2/np.pi/self.p
998
1037
  r['n_type'] = n1
@@ -1030,11 +1069,7 @@ class PmRelMachine(object):
1030
1069
  logger.info("sample intervals %s", nstab)
1031
1070
  for nx in np.linspace(0, n1, nstab[0]):
1032
1071
  if with_tmech:
1033
- iq, id = self.iqd_tmech(Tf, nx, (iq, id),
1034
- with_mtpa or nx == n1)[:2]
1035
- else:
1036
- iq, id = self.iqd_torque(Tf, (iq, id),
1037
- with_mtpa or nx == n1)[:2]
1072
+ T = self.tmech_iqd(iq, id, nx)
1038
1073
  r['id'].append(id)
1039
1074
  r['iq'].append(iq)
1040
1075
  r['n'].append(nx)
@@ -1042,6 +1077,7 @@ class PmRelMachine(object):
1042
1077
 
1043
1078
  r['type_op'] = list(betai1(iq, id))
1044
1079
  Pmax = 2*np.pi*n1*Tf
1080
+ tq = Tf
1045
1081
  for ns, nu, iv in zip(nstab[1:], speedrange[2:], interv):
1046
1082
  # find id, iq, torque in fieldweakening range
1047
1083
  if ns > 0:
@@ -1062,8 +1098,9 @@ class PmRelMachine(object):
1062
1098
  else:
1063
1099
  iq, id, tq = self.iqd_imax_umax(
1064
1100
  i1max, w1, u1max,
1065
- Tf, with_tmech=with_tmech,
1066
- with_mtpv=with_mtpv)
1101
+ tq, with_tmech=with_tmech,
1102
+ with_mtpv=with_mtpv,
1103
+ with_mtpa=with_mtpa)
1067
1104
  else:
1068
1105
  if with_tmech:
1069
1106
  iq, id, tq = self.mtpv_tmech(w1, u1max,
@@ -1452,6 +1489,7 @@ class PmRelMachinePsidq(PmRelMachine):
1452
1489
  if k in pfe}
1453
1490
  except KeyError as e:
1454
1491
  logger.warning("loss map missing: %s", e)
1492
+
1455
1493
  pass
1456
1494
 
1457
1495
  def psi(self, iq, id):
femagtools/parstudy.py CHANGED
@@ -179,8 +179,11 @@ class ParameterStudy(object):
179
179
  extra_result_files = []
180
180
  if simulation.get('airgap_induc', False):
181
181
  extra_result_files.append('bag.dat')
182
- simulation['arm_length'] = model.lfe
183
- simulation['lfe'] = model.lfe
182
+ try:
183
+ simulation['arm_length'] = model.lfe
184
+ simulation['lfe'] = model.lfe
185
+ except AttributeError:
186
+ pass
184
187
  simulation['move_action'] = model.move_action
185
188
  simulation['phi_start'] = 0.0
186
189
  try:
@@ -206,11 +209,11 @@ class ParameterStudy(object):
206
209
  except:
207
210
  pass
208
211
  for k in ('num_slots', 'num_slots_gen'):
209
- if k not in machine['stator']:
210
- try:
211
- machine['stator'][k] = model.stator[k]
212
- except:
213
- pass
212
+ try:
213
+ if k not in machine['stator']:
214
+ machine['stator'][k] = model.stator[k]
215
+ except KeyError:
216
+ pass
214
217
  job = engine.create_job(self.femag.workdir)
215
218
  if self.femag.cmd:
216
219
  engine.cmd = [self.femag.cmd]
@@ -135,7 +135,7 @@ def shortcircuit(femag, machine, bch, simulation, engine=0):
135
135
  scdata = shortcircuit_2phase(femag, machine, simulation, engine)
136
136
 
137
137
  else:
138
- logger.warning("Empty shortcircuit results for type %d",
138
+ logger.warning("Empty shortcircuit results for type %s",
139
139
  simulation.get('sc_type', 'unknown'))
140
140
  # must reset calcmode
141
141
  if calcmode:
@@ -1,4 +1,3 @@
1
- -- Plots
2
1
  % for p in model.get('plots', []):
3
2
  % if not isinstance(p, str):
4
3
  % if p[0] == 'field_lines':
femagtools/windings.py CHANGED
@@ -70,46 +70,64 @@ def end_wdg_length_round_wires(layers, Rp, Rb, r_wire, h, coil_span, Q, bore_dia
70
70
  l_ew = 2*h + l + z + (Rb + r_wire)*(np.pi - 2)
71
71
  return l_ew, h, Rp, Rb
72
72
 
73
- def end_wdg_hairpin_check(alpha, h, dmin, l_h, wire_w, tooth_wmin):
73
+ def end_wdg_hairpin_check(alpha, h, dmin, l_h, wire_w, tooth_wmin, h_conn):
74
74
  alpha = alpha*np.pi/180 # ensure alpha is in radians
75
+ dmin_new = 0
76
+ alpha_new = 0
77
+ h_new = 0
78
+
79
+ if dmin < 0.0015:
80
+ dmin = 0.0015
81
+ if h_conn < 0.005:
82
+ h_conn = 0.005
83
+
75
84
  if alpha == 0 and h == 0: # end wdg parameters not set
76
- alpha = np.arcsin((dmin + wire_w)/(tooth_wmin + wire_w))
77
- h = np.tan(alpha)*l_h/2
78
- elif alpha == 0 and h > 0: # imposed end wdg height
79
- alpha = np.arctan(h/l_h)
80
- dmin = np.sin(alpha)*(tooth_wmin + wire_w) - wire_w
81
- if dmin < 0.0015: # imposed end wdg height is not feasible - calculate min end wdg parameters
82
- dmin = 0.0015
83
- alpha = np.arcsin((dmin + wire_w)/(tooth_wmin + wire_w))
84
- h = np.tan(alpha)*l_h/2
85
+ alpha_new = np.arcsin((dmin + wire_w)/(tooth_wmin + wire_w))
86
+ h_new = np.tan(alpha_new)*l_h/2
87
+
88
+ elif h > 0: # imposed end wdg height
89
+ alpha_new = np.arctan(h/l_h)
90
+ dmin_new = np.sin(alpha_new)*(tooth_wmin + wire_w) - wire_w
91
+ if dmin_new < dmin: # imposed end wdg height is not feasible - calculate min end wdg parameters
92
+ dmin_new = dmin
93
+ alpha_new = np.arcsin((dmin_new + wire_w)/(tooth_wmin + wire_w))
94
+ h_new = np.tan(alpha_new)*l_h/2
95
+
85
96
  elif alpha > 0: # imposed end wdg angle
86
- dmin = np.sin(alpha)*(tooth_wmin + wire_w) - wire_w
87
- if dmin < 0.0015: # imposed end wdg angle is not feasible - calculate min end wdg parameters
88
- dmin = 0.0015
89
- alpha = np.arcsin((dmin + wire_w)/(tooth_wmin + wire_w))
90
- h = np.tan(alpha)*l_h/2
91
- return h, alpha, dmin
97
+ dmin_new = np.sin(alpha)*(tooth_wmin + wire_w) - wire_w
98
+ if dmin_new < dmin: # imposed end wdg angle is not feasible - calculate min end wdg parameters
99
+ dmin_new = dmin
100
+ alpha_new = np.arcsin((dmin_new + wire_w)/(tooth_wmin + wire_w))
101
+ h_new = np.tan(alpha_new)*l_h/2
102
+
103
+ if dmin_new > dmin:
104
+ dmin = dmin_new
105
+ if alpha_new > alpha:
106
+ alpha = alpha_new
107
+ if h_new > h:
108
+ h = h_new
109
+
110
+ return h, alpha, dmin, h_conn
92
111
 
93
112
  def end_wdg_length_hairpins(wire_h, wire_w, wire_th, wire_gap,
94
- layers, coil_pitch, Q, bore_diam, slot_h, slot_w,
113
+ layers, coil_pitch, Q, bore_diam, slot_w, slot_h,
95
114
  h_bent=0, h_welded=0, h_conn=0.005, alpha_bent=0, alpha_welded=0, dmin=0.0015): # needs to be validated
96
115
  '''return end wdg length of single pin for bent and welded side, average end wdg length,
97
116
  bent and welded side end wdg heights, bending angles and min distances between pins'''
98
117
 
99
118
  R_avg = bore_diam/2 + wire_th + layers/2*(wire_h + wire_gap) + wire_h/2
100
- l_h = R_avg/2*coil_pitch/Q*np.pi*(bore_diam + wire_th + slot_h)
119
+ l_h = R_avg*coil_pitch/Q*2*np.pi
101
120
  tooth_wmin = (bore_diam + 2*wire_th)*np.pi/Q - slot_w
102
121
 
103
- h_bent, alpha_bent, dmin = end_wdg_hairpin_check(alpha_bent, h_bent, dmin, l_h, wire_w, tooth_wmin)
104
-
122
+ h_bent, alpha_bent, dmin, h_conn = end_wdg_hairpin_check(alpha_bent, h_bent, dmin, l_h, wire_w, tooth_wmin, h_conn)
105
123
  h_welded = h_welded - h_conn if h_welded - h_conn > 0 else 0
106
- h_welded, alpha_welded, dmin = end_wdg_hairpin_check(alpha_welded, h_welded, dmin, l_h, wire_w, tooth_wmin)
124
+ h_welded, alpha_welded, dmin, h_conn = end_wdg_hairpin_check(alpha_welded, h_welded, dmin, l_h, wire_w, tooth_wmin, h_conn)
107
125
 
108
- l_bent = 2*(0.002 + wire_w/2*alpha_bent + wire_w*(np.pi/2 - alpha_bent) + np.sqrt((l_h/2)**2 + h_bent**2))
109
- l_welded = 2*(0.002 + wire_w/2*alpha_bent + wire_w*(np.pi/2 - alpha_bent) + np.sqrt((l_h/2)**2 + h_welded**2)) + h_conn
126
+ l_bent = 2*(0.003 + wire_w/2*alpha_bent + wire_w*(np.pi/2 - alpha_bent) + np.sqrt((l_h/2)**2 + h_bent**2))
127
+ l_welded = 2*(0.003 + wire_w/2*alpha_bent + wire_w*(np.pi/2 - alpha_bent) + np.sqrt((l_h/2)**2 + h_welded**2)) + h_conn
110
128
  l_ew = (l_bent + l_welded)/2
111
129
  h_welded = h_welded + h_conn
112
- return l_bent, l_welded, l_ew, h_bent, h_welded, alpha_bent*180/np.pi, alpha_welded*180/np.pi, dmin
130
+ return l_bent, l_welded, l_ew, h_bent, h_welded, h_conn, alpha_bent*180/np.pi, alpha_welded*180/np.pi, dmin
113
131
 
114
132
 
115
133
  class Winding(object):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: femagtools
3
- Version: 1.8.9
3
+ Version: 1.8.11
4
4
  Summary: Python API for FEMAG
5
5
  Author-email: Ronald Tanner <tar@semafor.ch>, Dapu Zhang <dzhang@gtisoft.com>, Beat Holm <hob@semafor.ch>, Günther Amsler <amg@semafor.ch>, Nicolas Mauchle <mau@semafor.ch>
6
6
  License: Copyright (c) 2016-2023, Semafor Informatik & Energie AG, Basel
@@ -1,4 +1,4 @@
1
- femagtools/__init__.py,sha256=PWCIZG-FFAcwgx3DdNrvXuU1HpMNmFzbAzIZJ-2Biv4,1600
1
+ femagtools/__init__.py,sha256=OjqGiMTH-XiYM7D-s7y7ZBDVyqoZzGDKh78C5m5kB78,1601
2
2
  femagtools/airgap.py,sha256=hELJXe52yUw82JwZ1tGUXUtRhMG2_WSUBVeGkTZSAM8,1900
3
3
  femagtools/amazon.py,sha256=O1ICuv21XDAJi1qK1Sigs2TdS6hDZP19OzvmE2t76wU,12069
4
4
  femagtools/amela.py,sha256=2q-Xsj6i6nQ3iKheBR1vQ4FulJfF1i-L8w3a3U8GYWo,4362
@@ -17,17 +17,17 @@ femagtools/ecloss.py,sha256=nES8mtXNFitmxDvKL5o39hZl6qu-HfR6kUh9eBA9zxQ,34660
17
17
  femagtools/erg.py,sha256=IXKq76P9qLt_ssNOP78v8Qizk3J2Zg80yaKDSjzwoJE,1224
18
18
  femagtools/femag.py,sha256=ScrZ9gbWQIy4eIhF0Wmi41lSFm7-WRtiLcJOvkITcHo,44864
19
19
  femagtools/forcedens.py,sha256=7NNv75Vg9vQ_fy8W4kM2rlSO970zaSmeurhPmdAxsOU,8485
20
- femagtools/fsl.py,sha256=e6qeGEUdbupwDXMPNGwpSxdRENjyWrUuXEFXGIoXavE,37187
20
+ femagtools/fsl.py,sha256=hP2TBxjHXsWhrc6Uhd8s2ODVRqmMfsW8dFS2h-d6OwE,36990
21
21
  femagtools/getset.py,sha256=yJ6Em35DeWK7WNZW0qjjS5s7LUkVh5mbgxF59HHm5FM,3017
22
22
  femagtools/gmsh.py,sha256=IKhNiviIBji4cMxAhxaYXNqBRMNAPSKsBGdnGyxkyQw,3903
23
23
  femagtools/google.py,sha256=ugRyHY1zBjHR4aNfbA7GeF-ZU_NgleuVTZaWpi_XLT4,17144
24
24
  femagtools/grid.py,sha256=s7LfKKLm2H4-cza2kSEANq6vwxq10Su3TJl3kHShHRA,1561
25
25
  femagtools/heat_source_network.py,sha256=dz3nTK084SR2fyy1167wlpBlGrzv54OqCCGKPNWqpsU,16836
26
26
  femagtools/hxy.py,sha256=PkiZ_-CRhtvtpkmLAP8iMtwvzh7CjKGGcAbOhFb4Nls,6275
27
- femagtools/isa7.py,sha256=6wDyJmMMVncjOt8ObnFyvYxdpRTUc93IE6bOfWmu6u8,66067
27
+ femagtools/isa7.py,sha256=HqTQmbOLmLi75ytXpkryeYiXqUChi07mBUNYYj9xOjk,66365
28
28
  femagtools/jhb.py,sha256=stJxkmzHpfUIBVcFw7jWbV5KN9_EFqzOCgacyhUqWvM,1779
29
29
  femagtools/job.py,sha256=sIRVXsyoupfRXqGsWyOHMetcKlWIyggxfVURjM8aD54,11322
30
- femagtools/leakinduc.py,sha256=TMCz0DNbVwRPAYIe-kt9Ttu4aO-HhMZSIP_MTTLaSDo,2267
30
+ femagtools/leakinduc.py,sha256=4IGZaV8S1ZG6L3hgZsCXqMsMNRH4F88l9EsvUjSXDSE,999
31
31
  femagtools/losscoeffs.py,sha256=7B29VdEsmv8HSP749X3QBb_E-XN6Z9dvNleKiRLWaMI,7721
32
32
  femagtools/magnet.py,sha256=Nuk060bT4Wa3lX74HdefqTTtUxLaERDSBYTTpbi6KP4,1093
33
33
  femagtools/mcv.py,sha256=nVemXwRPHkvlz7IIwnUONfQglnOcTnp3CsPwU1eG3OI,48604
@@ -40,16 +40,16 @@ femagtools/nc.py,sha256=sKfFaeT8hPVUCb1axPIwfUVxuUsnrHygdfqiHv7G_YA,15216
40
40
  femagtools/netlist.py,sha256=CSCl8setLZ_L8DCnNWaNA3-wLe1yo-fmzARZoVvYfaA,2052
41
41
  femagtools/ntib.py,sha256=76g1ZO3Fq_kN-HTMBvaKvJmMMlJMyEPFeNAcJPq3w7Y,3099
42
42
  femagtools/opt.py,sha256=wBU0yh3hZlNti_zfIvtKcPg1EJrnE3I1BqmVxLGWixU,8753
43
- femagtools/parstudy.py,sha256=WY1LxvN44LBqhmZb2dnNO5lVRW3oNyRiKmyi6QxdmqU,19792
43
+ femagtools/parstudy.py,sha256=vsXR2aamfVpdP9wEz-_ZT_KpFE256lg_sP_6dAQ3rOs,19866
44
44
  femagtools/poc.py,sha256=yPWmpi8Q2g7NmpAi2YV5ezyo0VUj67EK0tcX2wikerw,7207
45
45
  femagtools/semi_fea.py,sha256=WZtYKrzhDruETyuEW2kpiNp9OaA7Hheq3qJiAIYtsjg,3475
46
- femagtools/shortcircuit.py,sha256=9LjnX4z3Kt_DI7DO_h-ivZqxvPt8eAnkJ8_RIFB_q-s,13936
46
+ femagtools/shortcircuit.py,sha256=_A_7csabj5gfRR7bfqNuC05-2HqP2-UMiYX4BSvfpQs,13936
47
47
  femagtools/tks.py,sha256=mDi45S5go9-jwALh6rS9RWPoOFBORZm0-XL4ECjSf_8,7531
48
48
  femagtools/ts.py,sha256=x9aCMVASjdBZuyI2pJGMyi1dveGFd_pWQ20cZ-l_moc,47216
49
49
  femagtools/utils.py,sha256=dJkQ5xsoVMzSEB5-2hEiwe2of9mLmsDo8nkrnSN-gPE,1643
50
50
  femagtools/vbf.py,sha256=9XGfhftmD9carU8ByQ5DwqoR4daq5mJ39eMqruwml0Q,2444
51
51
  femagtools/vtu.py,sha256=Sf83dHIfCKY2km-MIUHKKoj-JKN4PDX7kkPLZXyIYY4,10723
52
- femagtools/windings.py,sha256=Jk1FGLnKMltDct_plcaFW-NMUE6YFrP57LtJrdw1Un0,27140
52
+ femagtools/windings.py,sha256=p7BkIbi8mMc_CmWqAjOZNKz1-GlQb4kON4rWhvlARf8,27498
53
53
  femagtools/zmq.py,sha256=HY8U7dxXkgE48151nvLcnLPa8OFBZcZTrB2XcjBc0Y4,9413
54
54
  femagtools/dxfsl/__init__.py,sha256=MywcCdpKPKs4qJBJJgeDsikJFJ2P48dbTuNk303f5pM,76
55
55
  femagtools/dxfsl/area.py,sha256=CpTMRBF8_AJmJMkkn-LgRv27U5xJ5Ohhd2ppRvESPNU,69757
@@ -71,10 +71,10 @@ femagtools/dxfsl/shape.py,sha256=uQqbgXIA2_KP2XRdhCfVfGWjcjwzhJ5t9RhiqR9R98c,616
71
71
  femagtools/dxfsl/svgparser.py,sha256=RY2TU9MK6gOaNmI6w6RNqcw7H9YGmK-NUwvdylKBcsE,3763
72
72
  femagtools/dxfsl/symmetry.py,sha256=dXfZVIqT49nbMirY5YVaRPi8kNB8reaiq-eIbhw1Z54,43936
73
73
  femagtools/machine/__init__.py,sha256=B7yeRZzf29NWCWy8C8iJFdTr9bszAoMRcVEpblhCeg4,7256
74
- femagtools/machine/afpm.py,sha256=lNfJ8vvq70e3G5pLwW7t_ynRBOPgbgvd1Jgi9sIbBMI,40239
75
- femagtools/machine/effloss.py,sha256=wVsXqMni74IopYb6SHNWjEh-_6rjeLNNiWMB29ar0ms,14898
74
+ femagtools/machine/afpm.py,sha256=ZkYk-acfmwV2ebhU8BUE6dKYkDrCR8UKp1plxEdZ4v8,40223
75
+ femagtools/machine/effloss.py,sha256=6mPm4Y_3lVXc1hOyCgTfRkGK3IAeC8gSxNnbSPL7or8,15508
76
76
  femagtools/machine/im.py,sha256=isMSoCnIk4Hj47MwBNP5PW7a2rI-7N35A9zHGOSl43s,38111
77
- femagtools/machine/pm.py,sha256=C4vDdPIsIRUKtzY3b1RNT1v37p1uP3pMUduftNejcPc,68129
77
+ femagtools/machine/pm.py,sha256=PTzQDIjHzKSoO2WT1jYH5cvCUCdAkmlmCfd2N35EbIs,69967
78
78
  femagtools/machine/sizing.py,sha256=6IUSdp6HNGHlSaWMy0mjzLGxp3UtxFLfdzQ_4MYx7TI,30069
79
79
  femagtools/machine/sm.py,sha256=SLaSuGJ8zXIFq6uBR2iu4uLXyWJZjA3iHAaTC8Jm-gw,39117
80
80
  femagtools/machine/utils.py,sha256=25QNxP8lp31W7kB-gcIA1Vd_9UcYlxrahqZ-k3ALU_s,20985
@@ -144,7 +144,7 @@ femagtools/templates/noloadflux-rot.mako,sha256=BiAtTL0mj8ukbRiPKKyH80PpzugGIJKZ
144
144
  femagtools/templates/noloadflux.mako,sha256=vYUpZRLOAixNoBbB-Nc-Y9niPYsSUEPvBCOjw26uFdg,4661
145
145
  femagtools/templates/noloadfluxdc.mako,sha256=n3M4gNxf4Q-i7B8ft69Ism9lquRqh-pf4ET4KYwdQb0,3146
146
146
  femagtools/templates/open.mako,sha256=Zl5yvdwT5BflJIPVmReggzSrTQhepbef62EoCuw_mQg,344
147
- femagtools/templates/plots.mako,sha256=6xfmncVbzDiJLF6V0B6fha23H19R7P26DvcTTwzJ5A0,630
147
+ femagtools/templates/plots.mako,sha256=2Cy4ArHE_FG6nHPJefZR3BTp9ZQD5oykYhsrzCWLyBk,621
148
148
  femagtools/templates/pm_sym_f_cur.mako,sha256=Tk4ImaSN1vPfybzersJd5AmLHnqJjWHigCeBn_Cr40U,1558
149
149
  femagtools/templates/pm_sym_fast.mako,sha256=wD_bwszJ5svPOL1AtWThbkuMyxi-wRAPpP3AMlJGwPM,2450
150
150
  femagtools/templates/pm_sym_loss.mako,sha256=FNAvi_gmTXsGylrpi7lLKPoOOcNCV1mG6rc8gnXQ8u0,1098
@@ -184,7 +184,7 @@ tests/test_effloss.py,sha256=-kJJNgS5c6saHXjNuhAe5GdWfr9mEYpPo8fE8OtjsNA,1142
184
184
  tests/test_erg.py,sha256=kRVzpXa6JDdbxTss18HUWKny9Dx8IMx9uGTrbQCnHwg,523
185
185
  tests/test_femag.py,sha256=l7-av3eitLm7bwTuunEmVeTspi82ifPrlz7f1boGdVI,1934
186
186
  tests/test_forcedens.py,sha256=Yzl3SAmJNkZN9dA3aLxRvwY8fKsw077Fl0iJm6zJ5Sk,536
187
- tests/test_fsl.py,sha256=e8NnUZLsG1Fh9fBOix_ClAl754b9lcqFp4EZR5HoDio,16623
187
+ tests/test_fsl.py,sha256=pjgqRo5fhrKYWg-bWjPm_O6-kwVyr-ZK-oOFUgYtyso,16623
188
188
  tests/test_heat_source_network.py,sha256=TC-Gl4iy9jnMGfsY_24XjwlP-SDxP345JKVT8xRwsFo,690
189
189
  tests/test_hxy.py,sha256=pVb6ZfDhBy5-DXa3gh7RQmLFG8p5cSYB8gdGLC8kjAk,640
190
190
  tests/test_im.py,sha256=55wfCoA8_PuogI_RsC3AjUQCpR84T-HddtHuU1NxfPc,662
@@ -199,7 +199,7 @@ tests/test_mcv.py,sha256=Vv51WU3WU0AkgcSpyujMdJ2KvSdLNsks5HGtY0pWMOY,4749
199
199
  tests/test_mcvreader.py,sha256=3cgq22b_iaWLrs4WWOUNHqJREnv0YoFivNpAb4teEJs,2118
200
200
  tests/test_me.py,sha256=En00OrOhZclBO4u74q5Os0FgVP4TGFLzz99LF0QHXHA,196
201
201
  tests/test_model.py,sha256=kYjjFgZPIex3foX3skiOdD5MCcmA2JP7oDDuE9txv_U,2698
202
- tests/test_nc.py,sha256=aTYWF5BDakA9sYRmkSHD0oLWXcOxkVYKKUE8r-nNfAE,4625
202
+ tests/test_nc.py,sha256=Qhd8SppnWULcEiGphhhn4K_8PfhV7Wh17NAC63R_-N0,4630
203
203
  tests/test_parident.py,sha256=zwj-f-Q_s5dBr_fEvzd5iZqNVIcLwkoi_FF2_FNTiaw,1393
204
204
  tests/test_parstudy.py,sha256=wk7WfYQrx5dtv6MnmWCfNAEInvRKsbVXYEUIIR9zLbQ,3200
205
205
  tests/test_pocfile.py,sha256=eiMLBRQxDnHIGiqku6EXcQ3fb7wGIxhXmb20iyLlPRU,5816
@@ -220,9 +220,9 @@ tests/moo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
220
220
  tests/moo/test_algorithm.py,sha256=Em8sFm2vzPmuIzRrBBnUQLU_TYuJHSf-kEeozw0XeX4,2563
221
221
  tests/moo/test_population.py,sha256=FvX9LRCxQx0_E2GxHQ5vKwOYFBQiNbT6Lmv5GmNWjTQ,5471
222
222
  tests/moo/test_problem.py,sha256=ALeP4u7g-dFhfwWL8vxivdrrYzVKPjHMCAXzzgyNZbs,467
223
- femagtools-1.8.9.dist-info/LICENSE,sha256=NaQe4uvkszQPJmiRPHecfk-Ab9VSRXo8xQLGNVHTeFo,1362
224
- femagtools-1.8.9.dist-info/METADATA,sha256=hMiKfPVFbKiP4TvfbVxXIVzk5VSOv7-hYJuz9uejQr0,6190
225
- femagtools-1.8.9.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
226
- femagtools-1.8.9.dist-info/entry_points.txt,sha256=jrvOkZPiN44u1sASeu271VRaVIv5V-uRpN0_N5U_R8c,248
227
- femagtools-1.8.9.dist-info/top_level.txt,sha256=Ri4YWtU8MZTzNje9IKyXhTakNbsrCynuWdon4Yq94Dc,17
228
- femagtools-1.8.9.dist-info/RECORD,,
223
+ femagtools-1.8.11.dist-info/LICENSE,sha256=NaQe4uvkszQPJmiRPHecfk-Ab9VSRXo8xQLGNVHTeFo,1362
224
+ femagtools-1.8.11.dist-info/METADATA,sha256=S4Peo7fKYPOUPvhtG7ZkLhuluCeYh4ZlhdoQH7AIor4,6191
225
+ femagtools-1.8.11.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
226
+ femagtools-1.8.11.dist-info/entry_points.txt,sha256=jrvOkZPiN44u1sASeu271VRaVIv5V-uRpN0_N5U_R8c,248
227
+ femagtools-1.8.11.dist-info/top_level.txt,sha256=Ri4YWtU8MZTzNje9IKyXhTakNbsrCynuWdon4Yq94Dc,17
228
+ femagtools-1.8.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
tests/test_fsl.py CHANGED
@@ -319,11 +319,11 @@ class FslBuilderTest(unittest.TestCase):
319
319
 
320
320
  feapars['calculationMode'] = "pm_sym_fast"
321
321
  fsl = self.builder.create_analysis(feapars)
322
- self.assertEqual(len(fsl), 36)
322
+ self.assertEqual(len(fsl), 34)
323
323
 
324
324
  feapars['calculationMode'] = "mult_cal_fast"
325
325
  fsl = self.builder.create_analysis(feapars)
326
- self.assertEqual(len(fsl), 34)
326
+ self.assertEqual(len(fsl), 32)
327
327
 
328
328
  feapars['calculationMode'] = "torq_calc"
329
329
  fsl = self.builder.create_analysis(feapars)
tests/test_nc.py CHANGED
@@ -100,7 +100,7 @@ def test_geom(pm):
100
100
  assert g['h'] == pytest.approx(0.00308, abs=1e-5)
101
101
  assert g['cxy'] == pytest.approx((0.02317, 0.007528), abs=1e-5)
102
102
  assert g['area'] == pytest.approx(3.45e-05, abs=1e-6)
103
- assert g['alpha'] == pytest.approx(1.885, abs=1e-3)
103
+ assert g['alpha'] == pytest.approx(-1.2566371, abs=1e-3)
104
104
 
105
105
  def test_calc_iron_loss(pm):
106
106
  import numpy as np