|
1 | | -from pyleecan.Functions.load import load |
2 | | -from pyleecan.definitions import DATA_DIR |
3 | | - |
4 | | -from pyleecan.Classes.Simu1 import Simu1 |
5 | | -from pyleecan.Classes.InputCurrent import InputCurrent |
6 | | -from pyleecan.Classes.ImportGenVectLin import ImportGenVectLin |
7 | | -from pyleecan.Classes.ImportMatrixVal import ImportMatrixVal |
8 | | -from pyleecan.Classes.MagFEMM import MagFEMM |
9 | | -from pyleecan.Classes.Output import Output |
10 | | - |
11 | | -from Tests import save_plot_path |
12 | | -from Tests import save_load_path |
| 1 | +import json |
| 2 | +from multiprocessing import cpu_count |
13 | 3 | from os.path import join |
14 | | -from numpy import zeros, ones, pi, array |
15 | 4 |
|
16 | 5 | import matplotlib.pyplot as plt |
17 | | -import json |
18 | 6 | import numpy as np |
19 | 7 | import pytest |
| 8 | +from numpy import array, ones, pi, zeros |
| 9 | +from pyleecan.Classes.ImportGenVectLin import ImportGenVectLin |
| 10 | +from pyleecan.Classes.ImportMatrixVal import ImportMatrixVal |
| 11 | +from pyleecan.Classes.InputCurrent import InputCurrent |
| 12 | +from pyleecan.Classes.MagFEMM import MagFEMM |
| 13 | +from pyleecan.Classes.Output import Output |
| 14 | +from pyleecan.Classes.Simu1 import Simu1 |
| 15 | +from pyleecan.definitions import DATA_DIR |
| 16 | +from pyleecan.Functions.load import load |
| 17 | +from Tests import save_load_path, save_plot_path |
20 | 18 |
|
21 | 19 |
|
22 | 20 | @pytest.mark.long |
@@ -81,37 +79,41 @@ def test_SIPMSM_003(): |
81 | 79 | simu_sym.run() |
82 | 80 |
|
83 | 81 | out.mag.meshsolution.plot_mesh( |
84 | | - save_path=join(save_path, simu.name + "_mesh.png"), is_show_fig=False |
| 82 | + save_path=join(save_plot_path, simu.name + "_mesh.png"), is_show_fig=False |
85 | 83 | ) |
86 | 84 |
|
87 | 85 | out.mag.meshsolution.plot_mesh( |
88 | 86 | group_names="stator core", |
89 | | - save_path=join(save_path, simu.name + "_mesh_stator.png"), |
| 87 | + save_path=join(save_plot_path, simu.name + "_mesh_stator.png"), |
90 | 88 | is_show_fig=False, |
91 | 89 | ) |
92 | 90 |
|
93 | 91 | out.mag.meshsolution.plot_mesh( |
94 | 92 | group_names=["stator core", "/", "airgap", "stator winding"], |
95 | | - save_path=join(save_path, simu.name + "_mesh_stator_interface.png"), |
| 93 | + save_path=join(save_plot_path, simu.name + "_mesh_stator_interface.png"), |
96 | 94 | is_show_fig=False, |
97 | 95 | ) |
98 | 96 |
|
99 | 97 | out.mag.meshsolution.plot_contour( |
100 | 98 | label="\mu", |
101 | | - save_path=join(save_path, simu.name + "_mu.png"), |
| 99 | + save_path=join(save_plot_path, simu.name + "_mu.png"), |
102 | 100 | is_show_fig=False, |
103 | 101 | ) |
104 | 102 | out.mag.meshsolution.plot_contour( |
105 | | - label="B", save_path=join(save_path, simu.name + "_B.png"), is_show_fig=False |
| 103 | + label="B", |
| 104 | + save_path=join(save_plot_path, simu.name + "_B.png"), |
| 105 | + is_show_fig=False, |
106 | 106 | ) |
107 | 107 | out.mag.meshsolution.plot_contour( |
108 | | - label="H", save_path=join(save_path, simu.name + "_H.png"), is_show_fig=False |
| 108 | + label="H", |
| 109 | + save_path=join(save_plot_path, simu.name + "_H.png"), |
| 110 | + is_show_fig=False, |
109 | 111 | ) |
110 | 112 |
|
111 | 113 | out.mag.meshsolution.plot_contour( |
112 | 114 | label="H", |
113 | 115 | group_names="stator core", |
114 | | - save_path=join(save_path, simu.name + "_H_stator.png"), |
| 116 | + save_path=join(save_plot_path, simu.name + "_H_stator.png"), |
115 | 117 | is_show_fig=False, |
116 | 118 | ) |
117 | 119 |
|
|
0 commit comments