Skip to content

Commit 9c362e7

Browse files
committed
[CC] Updating tests
1 parent 93c2910 commit 9c362e7

File tree

4 files changed

+63
-12
lines changed

4 files changed

+63
-12
lines changed

Tests/Plot/LamHole/test_Hole_LSRPM.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
from pyleecan.Classes.HoleMLSRPM import HoleMLSRPM
1616
from Tests import save_plot_path as save_path
1717
from pyleecan.Classes.SlotWLSRPM import SlotWLSRPM
18-
from pyleecan.Classes.WindingCW2LT import WindingCW2LT
1918

2019

2120
"""unittest for Lamination with Hole LSRPM plot"""

Tests/Plot/LamWind/test_Slot_LSRPM_plot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
from pyleecan.Classes.VentilationTrap import VentilationTrap
1616
from pyleecan.Classes.Winding import Winding
1717
from pyleecan.Classes.WindingUD import WindingUD
18-
from pyleecan.Classes.WindingCW2LT import WindingCW2LT
19-
from pyleecan.Classes.WindingDW2L import WindingDW2L
2018
from pyleecan.Classes.SlotWLSRPM import SlotWLSRPM
2119

2220
from Tests import save_plot_path as save_path
@@ -112,7 +110,7 @@ def machine():
112110

113111
def test_Lam_Wind_LSRPM_wind_tan(machine):
114112
"""Test machine plot with Slot LSRPM and winding rad=1, tan=2"""
115-
machine.winding = WindingUD(user_wind_mat=wind_mat_LSRPM, qs=6, p=4, Lewout=0)
113+
machine.winding = WindingUD(wind_mat=wind_mat_LSRPM, qs=6, p=4, Lewout=0)
116114
machine.plot()
117115
fig = plt.gcf()
118116
fig.savefig(join(save_path, "test_Lam_Wind_sLSRPM_2-tan-wind.png"))

Tests/Plot/Schematics/test_LSRPM_plot.py renamed to Tests/Plot/test_LSRPM_plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_LSRPM():
9898
]
9999
).T
100100

101-
stator.winding = WindingUD(user_wind_mat=wind_mat_LSRPM, qs=6, p=4, Lewout=0)
101+
stator.winding = WindingUD(wind_mat=wind_mat_LSRPM, qs=6, p=4, Lewout=0)
102102

103103
# Conductor setup
104104
stator.winding.conductor = CondType11(
@@ -170,7 +170,7 @@ def test_LSRPM():
170170
LSRPM = MachineIPMSM(
171171
name="LSRPM LSEE", stator=stator, rotor=rotor, shaft=shaft, frame=None
172172
)
173-
LSRPM.save(join(DATA_DIR, "Machine", "LSRPM_001.json"))
173+
# LSRPM.save(join(DATA_DIR, "Machine", "LSRPM_001.json"))
174174

175175
LSRPM.plot(is_show_fig=False, save_path=join(save_path, "test_LSRPM.png"))
176176

pyleecan/Data/Machine/LSRPM_001.json

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"__class__": "MachineIPMSM",
3-
"__save_date__": "2021_05_21 10h15min27s ",
4-
"__version__": "pyleecan_1.2.1",
3+
"__save_date__": "2021_05_21 11h02min16s ",
4+
"__version__": "pyleecan_1.3.0",
55
"desc": "",
66
"frame": null,
77
"logger_name": "Pyleecan.Machine",
@@ -70,9 +70,16 @@
7070
"__class__": "ImportMatrix",
7171
"is_transpose": false
7272
},
73+
"ModelBH": {
74+
"Bmax": 2.31,
75+
"Hmax": null,
76+
"__class__": "ModelBH",
77+
"delta": 100
78+
},
7379
"Wlam": 0,
7480
"__class__": "MatMagnetics",
7581
"alpha_Br": -0.001,
82+
"is_BH_extrapolate": false,
7683
"mur_lin": 1.05
7784
},
7885
"name": "MagnetPrius",
@@ -128,9 +135,16 @@
128135
"__class__": "ImportMatrix",
129136
"is_transpose": false
130137
},
138+
"ModelBH": {
139+
"Bmax": 2.31,
140+
"Hmax": null,
141+
"__class__": "ModelBH",
142+
"delta": 100
143+
},
131144
"Wlam": 0,
132145
"__class__": "MatMagnetics",
133146
"alpha_Br": 0,
147+
"is_BH_extrapolate": false,
134148
"mur_lin": 1
135149
},
136150
"name": "Material",
@@ -365,9 +379,16 @@
365379
"__class__": "ImportMatrix",
366380
"is_transpose": false
367381
},
382+
"ModelBH": {
383+
"Bmax": 2.31,
384+
"Hmax": null,
385+
"__class__": "ModelBH",
386+
"delta": 100
387+
},
368388
"Wlam": 0.0005,
369389
"__class__": "MatMagnetics",
370390
"alpha_Br": 0,
391+
"is_BH_extrapolate": false,
371392
"mur_lin": 2500.0
372393
},
373394
"name": "M400-50A",
@@ -386,7 +407,8 @@
386407
"rho": 7650.0
387408
}
388409
},
389-
"notch": []
410+
"notch": [],
411+
"yoke_notch": []
390412
},
391413
"shaft": {
392414
"Drsh": 0.028,
@@ -426,9 +448,16 @@
426448
"__class__": "ImportMatrix",
427449
"is_transpose": false
428450
},
451+
"ModelBH": {
452+
"Bmax": 2.31,
453+
"Hmax": null,
454+
"__class__": "ModelBH",
455+
"delta": 100
456+
},
429457
"Wlam": 0,
430458
"__class__": "MatMagnetics",
431459
"alpha_Br": 0,
460+
"is_BH_extrapolate": false,
432461
"mur_lin": 1
433462
},
434463
"name": "Material",
@@ -672,9 +701,16 @@
672701
"__class__": "ImportMatrix",
673702
"is_transpose": false
674703
},
704+
"ModelBH": {
705+
"Bmax": 2.31,
706+
"Hmax": null,
707+
"__class__": "ModelBH",
708+
"delta": 100
709+
},
675710
"Wlam": 0.0005,
676711
"__class__": "MatMagnetics",
677712
"alpha_Br": 0,
713+
"is_BH_extrapolate": false,
678714
"mur_lin": 2500.0
679715
},
680716
"name": "M400-50A",
@@ -705,10 +741,12 @@
705741
},
706742
"winding": {
707743
"Lewout": 0,
708-
"Npcpp": 2,
744+
"Nlayer": 1,
745+
"Npcp": 2,
709746
"Nslot_shift_wind": 0,
710747
"Ntcoil": 7,
711748
"__class__": "WindingUD",
749+
"coil_pitch": 1,
712750
"conductor": {
713751
"Hwire": 0.002,
714752
"Nwppc_rad": 1,
@@ -792,9 +830,16 @@
792830
"__class__": "ImportMatrix",
793831
"is_transpose": false
794832
},
833+
"ModelBH": {
834+
"Bmax": 2.31,
835+
"Hmax": null,
836+
"__class__": "ModelBH",
837+
"delta": 100
838+
},
795839
"Wlam": 0,
796840
"__class__": "MatMagnetics",
797841
"alpha_Br": 0,
842+
"is_BH_extrapolate": false,
798843
"mur_lin": 1
799844
},
800845
"name": "Material",
@@ -815,11 +860,19 @@
815860
},
816861
"type_winding_shape": 1
817862
},
863+
"end_winding": {
864+
"__class__": "EndWinding"
865+
},
866+
"is_aper_a": null,
867+
"is_change_layer": false,
868+
"is_permute_B_C": false,
869+
"is_reverse_layer": false,
818870
"is_reverse_wind": false,
819871
"p": 4,
872+
"per_a": null,
820873
"qs": 6,
821874
"type_connection": 0,
822-
"user_wind_mat": [
875+
"wind_mat": [
823876
[
824877
[
825878
[
@@ -1217,7 +1270,8 @@
12171270
]
12181271
]
12191272
]
1220-
}
1273+
},
1274+
"yoke_notch": []
12211275
},
12221276
"type_machine": 1
12231277
}

0 commit comments

Comments
 (0)