femagtools 1.8.13__py3-none-any.whl → 1.8.15__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 +36 -9
- femagtools/femag.py +8 -1
- femagtools/fsl.py +31 -37
- femagtools/isa7.py +16 -0
- femagtools/job.py +9 -0
- femagtools/machine/__init__.py +7 -38
- femagtools/machine/afpm.py +12 -2
- femagtools/machine/effloss.py +7 -8
- femagtools/machine/im.py +57 -26
- femagtools/machine/pm.py +2 -1
- femagtools/machine/sizing.py +92 -7
- femagtools/machine/sm.py +5 -1
- femagtools/machine/utils.py +37 -14
- femagtools/multiproc.py +6 -0
- femagtools/parstudy.py +1 -1
- femagtools/plot/wdg.py +26 -5
- femagtools/templates/FE-losses.mako +0 -3
- femagtools/templates/ec-rotorbar.mako +1 -2
- femagtools/templates/ld_lq_fast.mako +1 -1
- femagtools/templates/mesh-airgap.mako +0 -1
- femagtools/templates/noloadflux-rot.mako +5 -32
- femagtools/templates/statorRing.mako +1 -1
- femagtools/utils.py +5 -1
- femagtools/windings.py +32 -14
- {femagtools-1.8.13.dist-info → femagtools-1.8.15.dist-info}/METADATA +31 -2
- {femagtools-1.8.13.dist-info → femagtools-1.8.15.dist-info}/RECORD +34 -35
- {femagtools-1.8.13.dist-info → femagtools-1.8.15.dist-info}/WHEEL +1 -1
- femagtools-1.8.15.dist-info/licenses/LICENSE +26 -0
- tests/test_femag.py +1 -1
- tests/test_fsl.py +5 -5
- tests/test_windings.py +11 -0
- femagtools/templates/rotor_winding_ks2.mako +0 -44
- femagtools/templates/rotor_winding_ks2_ecSimulation.mako +0 -44
- {femagtools-1.8.13.dist-info → femagtools-1.8.15.dist-info}/entry_points.txt +0 -0
- {femagtools-1.8.13.dist-info → femagtools-1.8.15.dist-info}/top_level.txt +0 -0
@@ -90,6 +90,7 @@ end
|
|
90
90
|
if nrot == nil then
|
91
91
|
nrot = nodes
|
92
92
|
end
|
93
|
+
nrot=1 -- otherwise too long and only 1 is needed to have results
|
93
94
|
curvec = {${','.join([str(x) for x in model['curvec']])}} -- A rms
|
94
95
|
|
95
96
|
print("\nNo load flux simulation (DC) with rotation\n")
|
@@ -106,13 +107,9 @@ rotate({
|
|
106
107
|
})
|
107
108
|
|
108
109
|
file_psi = io.open("psi-rot-mag.dat","w")
|
109
|
-
value={}
|
110
|
-
temp={}
|
111
110
|
for n=1,nrot+1 do
|
112
111
|
|
113
112
|
pos, bag = calc_field(phi, curvec, file_psi)
|
114
|
-
value[n]=#pos
|
115
|
-
temp[n]=pos
|
116
113
|
bags[n] = bag
|
117
114
|
phi = n*dphi
|
118
115
|
rotate({angle=phi, mode="absolute"})
|
@@ -120,40 +117,16 @@ end
|
|
120
117
|
rotate({mode = "reset"}) -- restore the initial state (discard any changes)
|
121
118
|
file_psi:close()
|
122
119
|
|
123
|
-
-- add otherwise nil value in bags[n][i][k]
|
124
|
-
for i=1, #value-1 do
|
125
|
-
if value[i]<value[i+1] then
|
126
|
-
num_pos=value[i]
|
127
|
-
end
|
128
|
-
end
|
129
|
-
-- end
|
130
|
-
|
131
|
-
--for i=1, #curvec do
|
132
|
-
-- bagfile = string.format("noloadbag-%d.dat", i)
|
133
|
-
-- file_bag = io.open(bagfile,"w")
|
134
|
-
-- for k = 1, num_pos do --#pos do -- add otherwise nil value in bags[n][i][k]
|
135
|
-
-- file_bag:write(string.format("%g ", pos[k]))
|
136
|
-
-- for n=1, nrot+1 do
|
137
|
-
-- file_bag:write(string.format("%g ",
|
138
|
-
-- bags[n][i][k])) -- Br, rotpos, cur, pos
|
139
|
-
-- end
|
140
|
-
-- file_bag:write("\n")
|
141
|
-
-- end
|
142
|
-
-- file_bag:close()
|
143
|
-
--end
|
144
|
-
|
145
|
-
-- add otherwise nil value in bags[n][i][k]
|
146
120
|
for i=1, #curvec do
|
147
121
|
bagfile = string.format("noloadbag-%d.dat", i)
|
148
122
|
file_bag = io.open(bagfile,"w")
|
149
|
-
for
|
150
|
-
|
151
|
-
|
152
|
-
file_bag:write(string.format("%g ", pos[k]))
|
123
|
+
for k = 1, #pos do
|
124
|
+
file_bag:write(string.format("%g ", pos[k]))
|
125
|
+
for n=1, nrot+1 do
|
153
126
|
file_bag:write(string.format("%g ",
|
154
127
|
bags[n][i][k])) -- Br, rotpos, cur, pos
|
155
128
|
end
|
156
129
|
file_bag:write("\n")
|
157
130
|
end
|
158
131
|
file_bag:close()
|
159
|
-
end
|
132
|
+
end
|
femagtools/utils.py
CHANGED
@@ -10,7 +10,10 @@ def fft(pos, y, pmod=0):
|
|
10
10
|
pmod: number of poles in model (ignored if 0)
|
11
11
|
"""
|
12
12
|
model_angle = pos[-1] - pos[0]
|
13
|
-
|
13
|
+
if 360/model_angle < 1:
|
14
|
+
ntiles=1
|
15
|
+
else:
|
16
|
+
ntiles = int(round(360/model_angle))
|
14
17
|
|
15
18
|
if pmod:
|
16
19
|
negative_periodic = pmod % 2
|
@@ -51,6 +54,7 @@ def fft(pos, y, pmod=0):
|
|
51
54
|
alfa0 = np.angle(Y[i])
|
52
55
|
alfa = np.angle(Y[:nmax])
|
53
56
|
|
57
|
+
|
54
58
|
return {'a': a, 'a0': a0, 'T0': T0, 'alfa0': alfa0,
|
55
59
|
'alfa': alfa,
|
56
60
|
'nue': (2*np.abs(Y[:nmax])/N).tolist(),
|
femagtools/windings.py
CHANGED
@@ -12,6 +12,12 @@
|
|
12
12
|
Number of coils per phase: c = Q * l/2/m
|
13
13
|
Number of parallel circuits (coil groups): g
|
14
14
|
Number of turns per phase: w1 = Q * n * l/2/m/g
|
15
|
+
|
16
|
+
Refs:
|
17
|
+
odd number of phases
|
18
|
+
doi:10.1007/s00502-021-00873-6
|
19
|
+
even number of phases
|
20
|
+
doi:10.1049/iet-epa.2020.0553
|
15
21
|
"""
|
16
22
|
import numpy as np
|
17
23
|
import femagtools.bch
|
@@ -131,8 +137,6 @@ def end_wdg_length_hairpins(wire_h, wire_w, wire_th, wire_gap,
|
|
131
137
|
|
132
138
|
|
133
139
|
class Winding(object):
|
134
|
-
# TODO: raise ValueError "Unbalanced winding" if Q % (m * gcd(Q, p)) != 0
|
135
|
-
|
136
140
|
def __init__(self, arg):
|
137
141
|
"""create winding either from bch winding section or winding dict()
|
138
142
|
|
@@ -199,15 +203,29 @@ class Winding(object):
|
|
199
203
|
coilwidth = self.yd
|
200
204
|
|
201
205
|
self.yd = coilwidth
|
206
|
+
if self.m % 2: # odd number of phases
|
207
|
+
q1, q2, Yk, Qb = q1q2yk(self.Q, self.p, self.m, self.l)
|
208
|
+
j = 2 if layers == 1 else 1
|
209
|
+
k1 = [(q1 + q2)*i for i in range(self.m)]
|
210
|
+
k2 = (q1*(self.m+1) + q2*(self.m-1))//2
|
211
|
+
pos = [[(j*Yk*(k + n)) % Qb
|
212
|
+
for n in range(q1)] for k in k1]
|
213
|
+
neg = [[j*Yk*(k + n + k2) % Qb
|
214
|
+
for n in range(q2)] for k in k1]
|
215
|
+
else: # even number of phases
|
216
|
+
if np.mod(self.Q, 4/self.l*self.m*np.gcd(self.Q, self.p)):
|
217
|
+
raise ValueError(
|
218
|
+
f"Unbalanced winding: Q={self.Q}, p={self.p}, m={self.m}")
|
219
|
+
t = np.gcd(self.Q, self.p)
|
220
|
+
Qb = self.Q//t
|
221
|
+
seq = np.array([i for j in range(Qb)
|
222
|
+
for i in range(Qb) if (j*self.p//t - i) % Qb == 0])
|
223
|
+
if self.l == 1:
|
224
|
+
seq = seq[::2]
|
225
|
+
seq = np.array(seq).reshape((-1, 6))
|
226
|
+
pos = seq[::2].T
|
227
|
+
neg = seq[1::2].T
|
202
228
|
|
203
|
-
q1, q2, Yk, Qb = q1q2yk(self.Q, self.p, self.m, self.l)
|
204
|
-
j = 2 if layers == 1 else 1
|
205
|
-
k1 = [(q1 + q2)*i for i in range(self.m)]
|
206
|
-
k2 = (q1*(self.m+1) + q2*(self.m-1))//2
|
207
|
-
pos = [[(j*Yk*(k + n)) % Qb
|
208
|
-
for n in range(q1)] for k in k1]
|
209
|
-
neg = [[j*Yk*(k + n + k2) % Qb
|
210
|
-
for n in range(q2)] for k in k1]
|
211
229
|
if self.l > 1:
|
212
230
|
slots = [sorted([(k, 1, 1)
|
213
231
|
for k in p] + [(k, -1, 1)
|
@@ -495,16 +513,16 @@ class Winding(object):
|
|
495
513
|
if not is_upper(r, s*taus - (x-taus/2))]
|
496
514
|
for key in self.windings]
|
497
515
|
|
498
|
-
z = ([[d*s for s, d in zip(u, ud)] for u, ud in zip(upper, udirs)],
|
499
|
-
[[d*s for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)])
|
516
|
+
z = ([[int(d*s) for s, d in zip(u, ud)] for u, ud in zip(upper, udirs)],
|
517
|
+
[[int(d*s) for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)])
|
500
518
|
# complete if not basic winding:
|
501
519
|
Qb = self.Q//num_basic_windings(self.Q, self.p, self.l)
|
502
520
|
|
503
521
|
if not np.asarray(upper).size or not np.asarray(lower).size:
|
504
522
|
layers = 1
|
505
523
|
if layers == 1 and z[1]:
|
506
|
-
z = ([[d*s for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)],
|
507
|
-
[[d*s for s, d in zip(u, ud)] for u, ud in zip(upper, udirs)])
|
524
|
+
z = ([[int(d*s) for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)],
|
525
|
+
[[int(d*s) for s, d in zip(u, ud)] for u, ud in zip(upper, udirs)])
|
508
526
|
|
509
527
|
if max([abs(n) for m in z[0] for n in m]) < Qb:
|
510
528
|
return [[k + [-n+Qb//2 if n < 0 else -(n+Qb//2) for n in k]
|
@@ -1,14 +1,42 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: femagtools
|
3
|
-
Version: 1.8.
|
3
|
+
Version: 1.8.15
|
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
|
-
License
|
6
|
+
License: Copyright (c) 2016-2023, Semafor Informatik & Energie AG, Basel
|
7
|
+
Copyright (c) 2023-2024, Gamma Technology LLC
|
8
|
+
All rights reserved.
|
9
|
+
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
11
|
+
modification, are permitted provided that the following conditions
|
12
|
+
are met:
|
13
|
+
|
14
|
+
Redistributions of source code must retain the above copyright notice,
|
15
|
+
this list of conditions and the following disclaimer.
|
16
|
+
|
17
|
+
Redistributions in binary form must reproduce the above copyright notice,
|
18
|
+
this list of conditions and the following disclaimer in the documentation
|
19
|
+
and/or other materials provided with the distribution.
|
20
|
+
|
21
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
22
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
23
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
24
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
|
25
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
26
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
27
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
28
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
29
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
30
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
31
|
+
THE POSSIBILITY OF SUCH DAMAGE.
|
32
|
+
|
7
33
|
Classifier: Programming Language :: Python :: 3
|
8
34
|
Classifier: Intended Audience :: Science/Research
|
35
|
+
Classifier: License :: OSI Approved :: BSD License
|
9
36
|
Classifier: Topic :: Scientific/Engineering
|
10
37
|
Requires-Python: >=3.7
|
11
38
|
Description-Content-Type: text/markdown
|
39
|
+
License-File: LICENSE
|
12
40
|
Requires-Dist: numpy
|
13
41
|
Requires-Dist: scipy
|
14
42
|
Requires-Dist: mako
|
@@ -36,6 +64,7 @@ Provides-Extra: test
|
|
36
64
|
Requires-Dist: pytest; extra == "test"
|
37
65
|
Provides-Extra: all
|
38
66
|
Requires-Dist: femagtools[dxfsl,meshio,mplot,svgfsl,test,vtk,zmq]; extra == "all"
|
67
|
+
Dynamic: license-file
|
39
68
|
|
40
69
|
|
41
70
|
# Introduction to Femagtools
|
@@ -1,9 +1,9 @@
|
|
1
|
-
femagtools/__init__.py,sha256=
|
1
|
+
femagtools/__init__.py,sha256=qICbWqrJVPMO4pvagU-k07Q0dkOXxLyKxNhgp6aGXYQ,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
|
5
5
|
femagtools/asm.py,sha256=CiL0KWaF4P7O6-VwmGLdva_icwmPrPiI-TFQ19XYTKk,7660
|
6
|
-
femagtools/bch.py,sha256=
|
6
|
+
femagtools/bch.py,sha256=e6kKyp4iaGb-GPMxwq5LgcyA0GQxteRJDfZsLZVfLyw,75732
|
7
7
|
femagtools/bchxml.py,sha256=KrRjAdrUPZXmiWvonu9HhpG_NvImMBpiXWTL4iSr4kE,3142
|
8
8
|
femagtools/condor.py,sha256=J8z9iBdvrGu3I1eFNoyKV8AXzRoTEPGLSak6cXUQxAM,10766
|
9
9
|
femagtools/conductor.py,sha256=rXO7c7Qh_s7JpgILmLd4IbG64vP6Eh143YF9u25Mdwg,1076
|
@@ -15,18 +15,18 @@ femagtools/dakotaout.py,sha256=6nn0PXsB40mPKiQLenqAtHy0KXCO7kvqqQ-aD2JhQvw,5573
|
|
15
15
|
femagtools/docker.py,sha256=XDVmLBB0z4sZZpcrx7Wbm84xl4ksj7aqn5-ZOPxdxm4,7460
|
16
16
|
femagtools/ecloss.py,sha256=3qwfb_9qpWw99asUDcQgdbP51VGXp4MlLQZDhywWHEk,35051
|
17
17
|
femagtools/erg.py,sha256=IXKq76P9qLt_ssNOP78v8Qizk3J2Zg80yaKDSjzwoJE,1224
|
18
|
-
femagtools/femag.py,sha256=
|
18
|
+
femagtools/femag.py,sha256=rJ_n1Fvu8RcL-6LTH5o-lvV8pP0kpsqmx6RggsiJMhU,45013
|
19
19
|
femagtools/forcedens.py,sha256=7NNv75Vg9vQ_fy8W4kM2rlSO970zaSmeurhPmdAxsOU,8485
|
20
|
-
femagtools/fsl.py,sha256=
|
20
|
+
femagtools/fsl.py,sha256=AWyc7mIgUL2tjqw_kmK22y-gZXhTzOccyhjJLwCqKcg,37736
|
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=
|
27
|
+
femagtools/isa7.py,sha256=qtmBx53IIbn4rO2pCTFqn0h1f-REbQ0uEWAJ9T85LgI,67033
|
28
28
|
femagtools/jhb.py,sha256=stJxkmzHpfUIBVcFw7jWbV5KN9_EFqzOCgacyhUqWvM,1779
|
29
|
-
femagtools/job.py,sha256=
|
29
|
+
femagtools/job.py,sha256=sh4yk8RVEFai7YDBMsVg19p9xEd6_sfyNX5WQSY7HEY,11726
|
30
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
|
@@ -34,22 +34,22 @@ femagtools/mcv.py,sha256=nVemXwRPHkvlz7IIwnUONfQglnOcTnp3CsPwU1eG3OI,48604
|
|
34
34
|
femagtools/me.py,sha256=z6RJkvSbgMmorCQTxKvq44uIYKh82uYYExjkNePJCmE,1813
|
35
35
|
femagtools/model.py,sha256=dk9x-iqRzgOTdTCeU_ynUZGb1bt4FvU1ZGMPXytMbUg,17965
|
36
36
|
femagtools/moproblem.py,sha256=kOP8pRdD8YXz28_M2WKnFgl3eeJ7tqg49ohoazsmUOg,2825
|
37
|
-
femagtools/multiproc.py,sha256=
|
37
|
+
femagtools/multiproc.py,sha256=XSYe18kZOaY6C_9gH_neWR0H3S8q2l8dda3dbXlNb54,9265
|
38
38
|
femagtools/mxw2msh.py,sha256=CIIqAvfs8U-A0OfuOAoDaqNSmoMSHSI_tW1CPFRCP5E,2151
|
39
39
|
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=
|
43
|
+
femagtools/parstudy.py,sha256=eHOcHHZAQMPnYwyQpnX9daZIMKhZZl8aDeEPXBgSS-k,20550
|
44
44
|
femagtools/poc.py,sha256=yPWmpi8Q2g7NmpAi2YV5ezyo0VUj67EK0tcX2wikerw,7207
|
45
45
|
femagtools/semi_fea.py,sha256=WZtYKrzhDruETyuEW2kpiNp9OaA7Hheq3qJiAIYtsjg,3475
|
46
46
|
femagtools/shortcircuit.py,sha256=ZugEzPnofsVb2ZLInEbjkjwEVzLL1dNTJtqSueaHc8A,14301
|
47
47
|
femagtools/tks.py,sha256=mDi45S5go9-jwALh6rS9RWPoOFBORZm0-XL4ECjSf_8,7531
|
48
48
|
femagtools/ts.py,sha256=yoYjpKrr_0b-tHfsX5azJEBXHUs9PN8P-SMhbjjRhCA,48381
|
49
|
-
femagtools/utils.py,sha256=
|
49
|
+
femagtools/utils.py,sha256=yZYgAKHsvK7QyY2-ijE3gSzXlE3vfuhD5dx7myyw434,1703
|
50
50
|
femagtools/vbf.py,sha256=9XGfhftmD9carU8ByQ5DwqoR4daq5mJ39eMqruwml0Q,2444
|
51
51
|
femagtools/vtu.py,sha256=Sf83dHIfCKY2km-MIUHKKoj-JKN4PDX7kkPLZXyIYY4,10723
|
52
|
-
femagtools/windings.py,sha256=
|
52
|
+
femagtools/windings.py,sha256=eGRoDbi9yruiWHqZysamBLPJefw8IQX3Lq4KpG4oIKo,28216
|
53
53
|
femagtools/zmq.py,sha256=62x5VRk0TMNER0-EZ8E28IdLKzsttlbxy1U_3wocNLc,9618
|
54
54
|
femagtools/dxfsl/__init__.py,sha256=MywcCdpKPKs4qJBJJgeDsikJFJ2P48dbTuNk303f5pM,76
|
55
55
|
femagtools/dxfsl/area.py,sha256=CpTMRBF8_AJmJMkkn-LgRv27U5xJ5Ohhd2ppRvESPNU,69757
|
@@ -70,14 +70,14 @@ femagtools/dxfsl/plotrenderer.py,sha256=q2cORuxJEf1Ws6oCY9c0gF6N3kDrcI6WOz3u5Vl6
|
|
70
70
|
femagtools/dxfsl/shape.py,sha256=uQqbgXIA2_KP2XRdhCfVfGWjcjwzhJ5t9RhiqR9R98c,61668
|
71
71
|
femagtools/dxfsl/svgparser.py,sha256=RY2TU9MK6gOaNmI6w6RNqcw7H9YGmK-NUwvdylKBcsE,3763
|
72
72
|
femagtools/dxfsl/symmetry.py,sha256=dXfZVIqT49nbMirY5YVaRPi8kNB8reaiq-eIbhw1Z54,43936
|
73
|
-
femagtools/machine/__init__.py,sha256=
|
74
|
-
femagtools/machine/afpm.py,sha256=
|
75
|
-
femagtools/machine/effloss.py,sha256=
|
76
|
-
femagtools/machine/im.py,sha256=
|
77
|
-
femagtools/machine/pm.py,sha256=
|
78
|
-
femagtools/machine/sizing.py,sha256=
|
79
|
-
femagtools/machine/sm.py,sha256=
|
80
|
-
femagtools/machine/utils.py,sha256=
|
73
|
+
femagtools/machine/__init__.py,sha256=xDY9QSUVL2Y17I4fq-nXsb5uMHCIxnCmGVIiL0fZZYE,7447
|
74
|
+
femagtools/machine/afpm.py,sha256=_Ei1FMuoC1GiI0z90qnyuxNrefkmeRdtDZKm20glzNY,40711
|
75
|
+
femagtools/machine/effloss.py,sha256=Mf_C6rFrVn5ku-3IJnyD07XfccHAcTk4wVotCzLKoiQ,16423
|
76
|
+
femagtools/machine/im.py,sha256=UeN1e0JTwsbaFjGhJFBmhwRDlgckNNf8_A69YmG6ABE,39545
|
77
|
+
femagtools/machine/pm.py,sha256=hXG71o2TqTxqy-FRy1WoeSOT-KysOGeZlCCnaLfISuE,70026
|
78
|
+
femagtools/machine/sizing.py,sha256=QO-k-UALmSPFNf8ajJPDnzKtlbkiAhX1DqWCRLr-H9k,32306
|
79
|
+
femagtools/machine/sm.py,sha256=hQC_guN6qCJPrFWyECNyJyVmu13wzPxTioqXnGT4AtA,39191
|
80
|
+
femagtools/machine/utils.py,sha256=HRM9UHY0UwuBWyK2dAfwlPuvMkXYBVqHlmEsUIdSNJk,21694
|
81
81
|
femagtools/moo/__init__.py,sha256=zinmWEOrsEz6DmMX0Dbn4t6_1UR-p4bEGqyR1wUQk_Q,175
|
82
82
|
femagtools/moo/algorithm.py,sha256=e-Cgp2rp_hG9DXqWqluzQGNIWvCfthUgLD8O-aVPofA,5763
|
83
83
|
femagtools/moo/population.py,sha256=krIl8tOJXPhCgBemkqn-jwvZg1VzsGniqMN_KAFxbuw,10203
|
@@ -95,9 +95,9 @@ femagtools/plot/machine.py,sha256=fVLOZTc19Ru8eXLdtoTeIYsHRWhGLkn_YVZ6qO6KgrE,26
|
|
95
95
|
femagtools/plot/mcv.py,sha256=ijZg6KPwZC7sDxEzGEUfVWvDoSEfgcaH-hzQMt7E90I,3671
|
96
96
|
femagtools/plot/nc.py,sha256=E7_7WNG3MNrV4QPJJqng1nfuXf3ZbjAGeonthqQlMss,11349
|
97
97
|
femagtools/plot/phasor.py,sha256=5QG1GkXKVksc8P6Q4thKADf6W1l8rDKeArIHFYvbXlw,4858
|
98
|
-
femagtools/plot/wdg.py,sha256=
|
98
|
+
femagtools/plot/wdg.py,sha256=uTEtpW_xCXueGnkWx8fTQHruBiayw62AVTXkc9vz9iM,10536
|
99
99
|
femagtools/svgfsl/converter.py,sha256=5q4LognshXNTpUWLnU5rtgCfAwZnEuPzqsgyeRYC-VM,3019
|
100
|
-
femagtools/templates/FE-losses.mako,sha256=
|
100
|
+
femagtools/templates/FE-losses.mako,sha256=cfDlO11vWovz2muPLg9X2rgeHD9Ihaz8PRiz63MRr88,819
|
101
101
|
femagtools/templates/afm_rotor.mako,sha256=4yoEA4fOq9FRcwxOMRw1oX4Bs_jcrtyHOY6kHPYJ5MY,3175
|
102
102
|
femagtools/templates/afm_stator.mako,sha256=l1xEwxffZ1jyx5wuJ3rhVbVlZirJzD2K8n4i5Dvbxuc,5344
|
103
103
|
femagtools/templates/airgapinduc.mako,sha256=aCMLZ7P4vjeSGikIetkwymgDjESdftPN_aYx2LfjfsY,246
|
@@ -113,13 +113,13 @@ femagtools/templates/conduct-data.mako,sha256=quT9S1cq2C2GyeoUe-erxV6w20KvRPuJVJ
|
|
113
113
|
femagtools/templates/connect_models.mako,sha256=8j1hzBMeoDJ7-GL5BH-S5p53Bu5jtqqsC2_w6MSwWnI,663
|
114
114
|
femagtools/templates/cu_losses.mako,sha256=EeNwINYuwBuhbo9LH3STdQOTxOyyWw_BANgh_BSV9TE,1339
|
115
115
|
femagtools/templates/displ_stator_rotor.mako,sha256=dsf9qW0i79aWAbOxaHwWfiq-Tn6WCDx46PQyEvL3SMw,830
|
116
|
-
femagtools/templates/ec-rotorbar.mako,sha256=
|
116
|
+
femagtools/templates/ec-rotorbar.mako,sha256=RbA1TVNczEEddTNjvGLPxILExxp4rIgoxXe1YT6a4Is,1672
|
117
117
|
femagtools/templates/fe-contr.mako,sha256=Gj4EFpAk_SVW_SIeW5eRRJAsYXTTpl-djuyb47n3Dj8,1898
|
118
118
|
femagtools/templates/fieldcalc.mako,sha256=bEtff9HeD6hTpB9t3COt40V1oGeT0a_6ouWTQlKIGX8,749
|
119
119
|
femagtools/templates/gen_hairpin_winding.mako,sha256=O3up0yjj3BDqFgpIY28fILKt7NX9NbgXTbd0sb3MM6A,5340
|
120
120
|
femagtools/templates/gen_winding.mako,sha256=kVMRkonDLHRB12bJ5e0Pwb1-8hBGVMM4dn1FEo70bok,3984
|
121
121
|
femagtools/templates/inductances.mako,sha256=OpcW3E7LW09J8eoXylzfq2R16LKKxzJDr0PGCdHzixM,560
|
122
|
-
femagtools/templates/ld_lq_fast.mako,sha256=
|
122
|
+
femagtools/templates/ld_lq_fast.mako,sha256=vO7_zLpZThNpBu_LSGnZ8k1S8eF87DEmxUse4rRVmmk,1448
|
123
123
|
femagtools/templates/leak_dist_wind.mako,sha256=vs8fpxcM203kL8BVNuR8BKSmMsQM6U1_vTtYXZIfdSc,600
|
124
124
|
femagtools/templates/leak_evol_wind.mako,sha256=JKff7ZEpndKmFYr7R0xaef_49YV6TG0tZeE8wQejR7Q,770
|
125
125
|
femagtools/templates/leak_tooth_wind.mako,sha256=LYCPSXhSLApidthuuGNiApLh0EJZOPZmTX0LZ5cOblQ,431
|
@@ -135,12 +135,12 @@ femagtools/templates/magnetSector.mako,sha256=vSyZVkYtuX2Bct5kpRRGjqez3xnca5PJVP
|
|
135
135
|
femagtools/templates/magnetSectorLinear.mako,sha256=ez2rkZslw66Zy4DCDiLjI2K45nEjGgunl0jsXseO_Zs,727
|
136
136
|
femagtools/templates/magnetShell.mako,sha256=vpyZIZ5tOsrmUVM00Kime7zyu1lK9P61xq78jB8BLdo,1295
|
137
137
|
femagtools/templates/magnetShell2.mako,sha256=4IJBfBTPxuYHr1SAcVvNdQoGd8emwsx8vMKQPI9pRlc,4080
|
138
|
-
femagtools/templates/mesh-airgap.mako,sha256=
|
138
|
+
femagtools/templates/mesh-airgap.mako,sha256=bHmiz-Ul_S0x7mJH_b2VWXu6aH7FyXB7dcTwr5JAg9c,4022
|
139
139
|
femagtools/templates/modal_analysis.mako,sha256=Thf62FBqL738qnp1ongPr196GJY27vwElKqPfMWF45s,2298
|
140
140
|
femagtools/templates/modified_steinmetz.mako,sha256=qrJ18XtoU39kjbcdywCJCLObQGaO-eC3Cl-1P4xLZWg,1327
|
141
141
|
femagtools/templates/mult_cal_fast.mako,sha256=TTEPmWKpqq8rSO_usYvHl9rTMopHNGoEhmRuhEgYTrg,1344
|
142
142
|
femagtools/templates/new_model.mako,sha256=P7658h99bKrA6YbP1D365ImIZPGEAZoBeYCdq0DT0AA,345
|
143
|
-
femagtools/templates/noloadflux-rot.mako,sha256=
|
143
|
+
femagtools/templates/noloadflux-rot.mako,sha256=Rcoq0qTR4hzPaG--5IbgqFaX6b4u04AGvyHOP-M0WjU,3275
|
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
|
@@ -159,8 +159,6 @@ femagtools/templates/rotorAsyn.mako,sha256=r_gce0oic24nPdI7BmERM1sokXpC5vvm8Sm0T
|
|
159
159
|
femagtools/templates/rotorKs2.mako,sha256=PtWyvW71gObgWIUnnqS9VnMX1oCfxw_sF9eAwUzeAyQ,1908
|
160
160
|
femagtools/templates/rotor_msh.mako,sha256=50nep93hyVFG-KOJujPnJpCaIrIsG9VL71Zy8WGuxa0,1910
|
161
161
|
femagtools/templates/rotor_winding.mako,sha256=rK5CBX4AJ1_SS5vL02_xVLmlWDlU2fosw4pLTlDFLlk,866
|
162
|
-
femagtools/templates/rotor_winding_ks2.mako,sha256=9xSxJpgNHkLP21dDhIjkI-ssSWxMUY_ViX5ZHZshU7A,1007
|
163
|
-
femagtools/templates/rotor_winding_ks2_ecSimulation.mako,sha256=raP7HvmL1W45tGPi86FlkNpO72ZogBl6GqN1hdh0aJ0,1031
|
164
162
|
femagtools/templates/shortcircuit.mako,sha256=Mr1zRtF_Y2QZ1qpTn8_-PASYrTFRYWpByhDzdWx87ys,1981
|
165
163
|
femagtools/templates/srm.mako,sha256=NneriEFv1wurQCGBI2xozzF2pTzlzS8pEPqtKm0SASQ,2077
|
166
164
|
femagtools/templates/stator1.mako,sha256=1sf0lzLXsjwiBNk3OGLwlio3GUVFogfxqEwaySVO6cs,761
|
@@ -168,12 +166,13 @@ femagtools/templates/stator2.mako,sha256=7Ae9sfaX7H4ummL6-g8iG42ArUvl6J809TW2tOd
|
|
168
166
|
femagtools/templates/stator3Linear.mako,sha256=pNe3C1wT0W2C0qePo3sEyebW1z_dpTuJzg0r5kf3JQY,760
|
169
167
|
femagtools/templates/stator4.mako,sha256=Jq8pfIuOmmpyGOL1z2aQZfbwMS5-Zyn6OGJ51LCBVKs,1179
|
170
168
|
femagtools/templates/statorBG.mako,sha256=fh0cVOZVWyLojlGxWJoFz2pvdL6Yxy4xzhY-Joc2xeg,893
|
171
|
-
femagtools/templates/statorRing.mako,sha256=
|
169
|
+
femagtools/templates/statorRing.mako,sha256=sDgDmk71EoE8d4e9cmyqKqRldfC8uKMmpHEjXJGIt_k,2071
|
172
170
|
femagtools/templates/statorRotor3.mako,sha256=6ycHlkSnk-TKFdoxiOqjpr6Pk0l634w3_O94vvRP4BI,4357
|
173
171
|
femagtools/templates/stator_msh.mako,sha256=Neze1ielMCk7TrARyhOra91fFQVT8Phsgk2Omt_aMG8,1799
|
174
172
|
femagtools/templates/therm-dynamic.mako,sha256=pEz7jrUpopK1-RqgulNnrkSaCZDjfLelsVo6cBqmpac,3142
|
175
173
|
femagtools/templates/therm_static.mako,sha256=ulevp4AP-kZ1_qdScPMaX9tLqvvP0t9lFflWTXgUxaE,1310
|
176
174
|
femagtools/templates/torq_calc.mako,sha256=et6O9ZEkPMOYcaJVpYtH2u3aoU0iyhRCPkfN4ZLdjxA,2353
|
175
|
+
femagtools-1.8.15.dist-info/licenses/LICENSE,sha256=NaQe4uvkszQPJmiRPHecfk-Ab9VSRXo8xQLGNVHTeFo,1362
|
177
176
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
178
177
|
tests/test_afpm.py,sha256=ge5CXnVQ7E5gVViTI9hQOC0hHetBci18pY9prbUCAqU,16849
|
179
178
|
tests/test_airgap_induction.py,sha256=cmpy1og59oWEyCO4oF_zDuc1DUwCbdeebNL1ujpZza4,1065
|
@@ -185,9 +184,9 @@ tests/test_convert.py,sha256=oseuhm3Iw-9b4WzBjA_Og2lgXPqKYicLUnfadq5Yick,6497
|
|
185
184
|
tests/test_dxfsl.py,sha256=DBAjtwNAwcB7VYZBjul7xf4ovu14n3Z0fxyreVzAW4A,383
|
186
185
|
tests/test_effloss.py,sha256=-kJJNgS5c6saHXjNuhAe5GdWfr9mEYpPo8fE8OtjsNA,1142
|
187
186
|
tests/test_erg.py,sha256=kRVzpXa6JDdbxTss18HUWKny9Dx8IMx9uGTrbQCnHwg,523
|
188
|
-
tests/test_femag.py,sha256=
|
187
|
+
tests/test_femag.py,sha256=l7-av3eitLm7bwTuunEmVeTspi82ifPrlz7f1boGdVI,1934
|
189
188
|
tests/test_forcedens.py,sha256=Yzl3SAmJNkZN9dA3aLxRvwY8fKsw077Fl0iJm6zJ5Sk,536
|
190
|
-
tests/test_fsl.py,sha256=
|
189
|
+
tests/test_fsl.py,sha256=oe5dHxR0G3sfGvsRtO6fEIn0R3oQFugsSkGzhyFPQR4,16624
|
191
190
|
tests/test_heat_source_network.py,sha256=TC-Gl4iy9jnMGfsY_24XjwlP-SDxP345JKVT8xRwsFo,690
|
192
191
|
tests/test_hxy.py,sha256=pVb6ZfDhBy5-DXa3gh7RQmLFG8p5cSYB8gdGLC8kjAk,640
|
193
192
|
tests/test_im.py,sha256=55wfCoA8_PuogI_RsC3AjUQCpR84T-HddtHuU1NxfPc,662
|
@@ -212,7 +211,7 @@ tests/test_tksreader.py,sha256=8QtPAzxPJbkpxd1Nw2I7ggaTaKaL4WY55JJBHkZAzus,766
|
|
212
211
|
tests/test_ts.py,sha256=tR2x5cKU9gw2fUprzaPgPbCvmDOHDO36JUPCCoTlY7Y,1833
|
213
212
|
tests/test_vbfreader.py,sha256=-6oAhLJDb7K3Ui5O1mtHvbskawEfgyIH-Of5n-8u-fc,832
|
214
213
|
tests/test_vtu.py,sha256=pGpHuAcaCk5zDYTBBp_akOEenZOpq-IzGl_kaMtodyA,1469
|
215
|
-
tests/test_windings.py,sha256=
|
214
|
+
tests/test_windings.py,sha256=WKFabGC6-TpCnxXL9U91J84INK_ntkMMU1FZRuE7m6k,6142
|
216
215
|
tests/engines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
217
216
|
tests/engines/test_amazon.py,sha256=4uy36NIo0epi3CgjUm8vl4snLpr4NRvUoWi6Zew_zcE,2014
|
218
217
|
tests/engines/test_config.py,sha256=_I1Z5RuubgnOGQeZHjAsCsovt0WEMH0o4ILz032l_Bc,663
|
@@ -223,8 +222,8 @@ tests/moo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
223
222
|
tests/moo/test_algorithm.py,sha256=Em8sFm2vzPmuIzRrBBnUQLU_TYuJHSf-kEeozw0XeX4,2563
|
224
223
|
tests/moo/test_population.py,sha256=FvX9LRCxQx0_E2GxHQ5vKwOYFBQiNbT6Lmv5GmNWjTQ,5471
|
225
224
|
tests/moo/test_problem.py,sha256=ALeP4u7g-dFhfwWL8vxivdrrYzVKPjHMCAXzzgyNZbs,467
|
226
|
-
femagtools-1.8.
|
227
|
-
femagtools-1.8.
|
228
|
-
femagtools-1.8.
|
229
|
-
femagtools-1.8.
|
230
|
-
femagtools-1.8.
|
225
|
+
femagtools-1.8.15.dist-info/METADATA,sha256=tFQ51rVZ5aZLm_-o116EK8gTaOuPU3xOo2Km76rTi_k,6213
|
226
|
+
femagtools-1.8.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
227
|
+
femagtools-1.8.15.dist-info/entry_points.txt,sha256=jrvOkZPiN44u1sASeu271VRaVIv5V-uRpN0_N5U_R8c,248
|
228
|
+
femagtools-1.8.15.dist-info/top_level.txt,sha256=Ri4YWtU8MZTzNje9IKyXhTakNbsrCynuWdon4Yq94Dc,17
|
229
|
+
femagtools-1.8.15.dist-info/RECORD,,
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Copyright (c) 2016-2023, Semafor Informatik & Energie AG, Basel
|
2
|
+
Copyright (c) 2023-2024, Gamma Technology LLC
|
3
|
+
All rights reserved.
|
4
|
+
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
6
|
+
modification, are permitted provided that the following conditions
|
7
|
+
are met:
|
8
|
+
|
9
|
+
Redistributions of source code must retain the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer.
|
11
|
+
|
12
|
+
Redistributions in binary form must reproduce the above copyright notice,
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
14
|
+
and/or other materials provided with the distribution.
|
15
|
+
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
18
|
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
19
|
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
|
20
|
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
21
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
22
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
23
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
24
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
25
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
26
|
+
THE POSSIBILITY OF SUCH DAMAGE.
|
tests/test_femag.py
CHANGED
@@ -70,7 +70,7 @@ def test_run_script(monkeypatch, tmpdir):
|
|
70
70
|
magnetizingCurves=mcv, magnets=magnetmat)
|
71
71
|
|
72
72
|
fsl = femag.create_fsl(machine, simulation)
|
73
|
-
assert len(fsl) ==
|
73
|
+
assert len(fsl) == 94
|
74
74
|
assert femag.model.magnet['temp_prop']['magntemp'] == 60.0
|
75
75
|
|
76
76
|
r = femag(machine, simulation)
|
tests/test_fsl.py
CHANGED
@@ -304,18 +304,18 @@ class FslBuilderTest(unittest.TestCase):
|
|
304
304
|
self.m['stator']['ffactor'] = 1.1
|
305
305
|
model = femagtools.MachineModel(self.m)
|
306
306
|
fsl = self.builder.create_fe_losses(model)
|
307
|
-
self.assertEqual(len(fsl),
|
307
|
+
self.assertEqual(len(fsl), 19)
|
308
308
|
ffact = [float(f.split('=')[1])
|
309
309
|
for f in fsl if f.startswith('m.ffactor')][0]
|
310
310
|
self.assertEqual(ffact, self.m['stator']['ffactor'])
|
311
311
|
feloss = [f.split('"')[1]
|
312
|
-
for f in fsl if f.find('pre_models')
|
312
|
+
for f in fsl if f.find('pre_models') >= 0][0]
|
313
313
|
self.assertEqual(feloss, 'FE-Losses-1')
|
314
314
|
|
315
315
|
def test_run_models(self):
|
316
316
|
feapars['calculationMode'] = "cogg_calc"
|
317
317
|
fsl = self.builder.create_analysis(feapars)
|
318
|
-
self.assertEqual(len(fsl),
|
318
|
+
self.assertEqual(len(fsl), 28)
|
319
319
|
|
320
320
|
feapars['calculationMode'] = "pm_sym_fast"
|
321
321
|
fsl = self.builder.create_analysis(feapars)
|
@@ -327,13 +327,13 @@ class FslBuilderTest(unittest.TestCase):
|
|
327
327
|
|
328
328
|
feapars['calculationMode'] = "torq_calc"
|
329
329
|
fsl = self.builder.create_analysis(feapars)
|
330
|
-
self.assertEqual(len(fsl),
|
330
|
+
self.assertEqual(len(fsl), 28)
|
331
331
|
|
332
332
|
def test_run_existing_model(self):
|
333
333
|
model = femagtools.MachineModel('data/magnsec')
|
334
334
|
feapars['calculationMode'] = "cogg_calc"
|
335
335
|
fsl = self.builder.create(model, feapars)
|
336
|
-
self.assertEqual(len(fsl),
|
336
|
+
self.assertEqual(len(fsl), 67)
|
337
337
|
|
338
338
|
def test_create_plots(self):
|
339
339
|
pars = copy.deepcopy(feapars)
|
tests/test_windings.py
CHANGED
@@ -163,3 +163,14 @@ def test_zoneplan():
|
|
163
163
|
w = femagtools.windings.Winding(
|
164
164
|
{'Q': 60, 'p': 32, 'm': 3, 'l': 1})
|
165
165
|
assert [1, -2, 3, -4, 5, -6, -17, 18, -19, 20] == w.zoneplan()[0][0]
|
166
|
+
|
167
|
+
def test_zoneplan_6phase():
|
168
|
+
w = femagtools.windings.Winding(
|
169
|
+
{'Q': 24, 'p': 11, 'm': 6, 'l': 1})
|
170
|
+
assert [
|
171
|
+
[1, -2, -13, 14],
|
172
|
+
[-11, 12, 23, -24],
|
173
|
+
[-9, 10, 21, -22],
|
174
|
+
[-7, 8, 19, -20],
|
175
|
+
[-5, 6, 17, -18],
|
176
|
+
[-3, 4, 15, -16]] == w.zoneplan()[0]
|
@@ -1,44 +0,0 @@
|
|
1
|
-
-- Winding (ROTOR_KS2)
|
2
|
-
|
3
|
-
Q1 = m.tot_num_sl
|
4
|
-
Q2 = ${model['num_slots']}
|
5
|
-
m.tot_num_sl = Q2
|
6
|
-
% if model.get('num_slots_gen', 0):
|
7
|
-
m.num_sl_gen = ${model['num_slots_gen']}
|
8
|
-
% else:
|
9
|
-
m.num_sl_gen = Q2 * m.npols_gen/m.num_poles
|
10
|
-
% endif
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
m.zeroangl = ${model.get('zeroangl',0)}
|
15
|
-
|
16
|
-
m.mcvkey_yoke = mcvkey_yoke
|
17
|
-
|
18
|
-
|
19
|
-
dphi=1e-2
|
20
|
-
|
21
|
-
num_wires=1
|
22
|
-
dir = {'wi', 'wo'}
|
23
|
-
|
24
|
-
-- set subregions 'Bar'
|
25
|
-
r=da2/2 - m.slot_height/2
|
26
|
-
phi=180/Q2+m.zeroangl
|
27
|
-
xcoil, ycoil = pd2c(r,phi-dphi)
|
28
|
-
--delete_sreg(xcoil, ycoil)
|
29
|
-
--def_new_wdg(xcoil, ycoil, yellow, "Exc", num_wires, 10.0, dir[1])
|
30
|
-
def_currdens_se(xcoil, ycoil, 5)
|
31
|
-
|
32
|
-
for i=2, m.num_sl_gen do
|
33
|
-
phi=(2*i-1)*180/Q2 + m.zeroangl
|
34
|
-
xcoil, ycoil = pd2c(r,phi)
|
35
|
-
--delete_sreg(xcoil, ycoil)
|
36
|
-
pole_per_encoche = Q2 / m.num_poles
|
37
|
-
pole_num = i // pole_per_encoche
|
38
|
-
|
39
|
-
if pole_num % 2 == 0
|
40
|
-
then def_currdens_se(xcoil, ycoil, 5) --add_to_wdg(xcoil, ycoil, wsamekey, dir[1], 'wser')
|
41
|
-
else
|
42
|
-
def_currdens_se(xcoil, ycoil, -5) --add_to_wdg(xcoil, ycoil, wsamekey, dir[2], 'wser')
|
43
|
-
end
|
44
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
-- Winding (ROTOR_KS2)
|
2
|
-
|
3
|
-
Q1 = m.tot_num_sl
|
4
|
-
Q2 = ${model['num_slots']}
|
5
|
-
m.tot_num_sl = Q2
|
6
|
-
% if model.get('num_slots_gen', 0):
|
7
|
-
m.num_sl_gen = ${model['num_slots_gen']}
|
8
|
-
% else:
|
9
|
-
m.num_sl_gen = Q2 * m.npols_gen/m.num_poles
|
10
|
-
% endif
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
m.zeroangl = ${model.get('zeroangl',0)}
|
15
|
-
|
16
|
-
m.mcvkey_yoke = mcvkey_yoke
|
17
|
-
|
18
|
-
|
19
|
-
dphi=1e-2
|
20
|
-
|
21
|
-
num_wires=1
|
22
|
-
dir = {'wi', 'wo'}
|
23
|
-
|
24
|
-
-- set subregions 'Bar'
|
25
|
-
r=da2/2 - m.slot_height/2
|
26
|
-
phi=180/Q2+m.zeroangl
|
27
|
-
xcoil, ycoil = pd2c(r,phi-dphi)
|
28
|
-
--delete_sreg(xcoil, ycoil)
|
29
|
-
--def_new_wdg(xcoil, ycoil, yellow, "Exc", num_wires, 10.0, dir[1])
|
30
|
-
def_currdens_se(xcoil, ycoil, 5)
|
31
|
-
|
32
|
-
--for i=2, m.num_sl_gen do
|
33
|
-
-- phi=(2*i-1)*180/Q2 + m.zeroangl
|
34
|
-
-- xcoil, ycoil = pd2c(r,phi)
|
35
|
-
-- --delete_sreg(xcoil, ycoil)
|
36
|
-
-- pole_per_encoche = Q2 / m.num_poles
|
37
|
-
-- pole_num = i // pole_per_encoche
|
38
|
-
|
39
|
-
-- if pole_num % 2 == 0
|
40
|
-
-- then def_currdens_se(xcoil, ycoil, 5) --add_to_wdg(xcoil, ycoil, wsamekey, dir[1], 'wser')
|
41
|
-
-- else
|
42
|
-
-- def_currdens_se(xcoil, ycoil, -5) --add_to_wdg(xcoil, ycoil, wsamekey, dir[2], 'wser')
|
43
|
-
--end
|
44
|
-
--end
|
File without changes
|
File without changes
|