Skip to content

Commit c6562ac

Browse files
committed
[CC] Setup dimensions in ventilations
1 parent e6a0177 commit c6562ac

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

Tests/Methods/Machine/test_comp_periodicity.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
# Machine with ventilation
2626
TP = load(join(DATA_DIR, "Machine", "Toyota_Prius.json"))
2727
# Only Zh matters for periodicity comp
28-
v2 = VentilationCirc(Zh=2)
29-
v4 = VentilationCirc(Zh=4)
30-
v8 = VentilationCirc(Zh=8)
31-
v9 = VentilationCirc(Zh=9)
32-
v16 = VentilationCirc(Zh=16)
28+
H0 = 0.1235
29+
D0 = 0.01
30+
v2 = VentilationCirc(Zh=2, D0=D0, H0=H0)
31+
v4 = VentilationCirc(Zh=4, D0=D0, H0=H0)
32+
v8 = VentilationCirc(Zh=8, D0=D0, H0=H0)
33+
v9 = VentilationCirc(Zh=9, D0=D0, H0=H0)
34+
v16 = VentilationCirc(Zh=16, D0=D0, H0=H0)
3335

3436
# Rotor vent matches sym
3537
TP0 = TP.copy()
@@ -81,20 +83,29 @@
8183

8284
# No sym, remove antiper
8385
SC = load(join(DATA_DIR, "Machine", "SCIM_001.json"))
86+
v9 = v9.copy()
87+
v9.H0 = 0.06
88+
v9.D0 = 0.01
8489
SC0 = SC.copy()
8590
SC0.name = SC0.name + "_0"
8691
SC0.rotor.axial_vent = [v9]
8792
test_per_list.append({"machine": SC0, "exp": (1, False, 1, False)})
8893

8994
# Rotor is 4, True => 1, True
9095
SP = load(join(DATA_DIR, "Machine", "SPMSM_001.json"))
96+
v2 = v2.copy()
97+
v2.H0 = 0.018
98+
v2.D0 = 0.005
9199
SP0 = SP.copy()
92100
SP0.name = SP0.name + "_0"
93101
SP0.rotor.axial_vent = [v2]
94102
test_per_list.append({"machine": SP0, "exp": (2, False, 2, False)})
95103

96104
# no antiper, remove sym
97105
SP1 = SP.copy()
106+
v9 = v9.copy()
107+
v9.H0 = 0.018
108+
v9.D0 = 0.005
98109
SP1.name = SP1.name + "_1"
99110
SP1.rotor.axial_vent = [v9]
100111
test_per_list.append({"machine": SP1, "exp": (1, False, 1, False)})
@@ -139,6 +150,9 @@ def test_comp_periodicity(test_dict):
139150

140151
# To run it without pytest
141152
if __name__ == "__main__":
153+
# TP7.plot()
154+
# SC0.plot()
155+
# SP0.plot()
142156
for ii, test_dict in enumerate(test_per_list):
143157
if isinstance(test_dict["machine"], str):
144158
machine_name = test_dict["machine"]

0 commit comments

Comments
 (0)