Skip to content

Commit c44a4ef

Browse files
committed
Merge branch 'master' of https://github.com/Eomys/pyleecan
2 parents 69d9159 + 28e25f3 commit c44a4ef

File tree

88 files changed

+446
-572
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+446
-572
lines changed

Tests/Functions/test_gmsh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414

1515
@pytest.mark.GMSH
16+
@pytest.mark.long
1617
def test_slot_10():
1718
"""Check generation of the 3D mesh of Slot 10 with gmsh"""
1819
if isinstance(gen_3D_mesh, ImportError):

Tests/Methods/Slot/test_SlotW10_meth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_build_geometry_wind(self):
217217
point_ref = (Z7 + Ztan1 + Ztan2 + Z6) / 4
218218

219219
surface = SurfLine(
220-
line_list=curve_list, point_ref=point_ref, label="WindS_R0_T0_S0"
220+
line_list=curve_list, point_ref=point_ref, label="Wind_Stator_R0_T0_S0"
221221
)
222222
expected.append(surface)
223223

@@ -229,7 +229,7 @@ def test_build_geometry_wind(self):
229229
curve_list.append(Segment(Ztan2, Ztan1))
230230
point_ref = (Z4 + Ztan1 + Ztan2 + Z5) / 4
231231
surface = SurfLine(
232-
line_list=curve_list, point_ref=point_ref, label="WindS_R0_T1_S0"
232+
line_list=curve_list, point_ref=point_ref, label="Wind_Stator_R0_T1_S0"
233233
)
234234
expected.append(surface)
235235

Tests/Methods/Slot/test_SlotW21_meth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def test_build_geometry_wind(self):
209209
curve_list.append(Segment(Z4, Z3))
210210
point_ref = (Z3 + Ztan1 + Ztan2 + Z4) / 4
211211
surface = SurfLine(
212-
line_list=curve_list, point_ref=point_ref, label="WindS_R0_T0_S0"
212+
line_list=curve_list, point_ref=point_ref, label="Wind_Stator_R0_T0_S0"
213213
)
214214
expected.append(surface)
215215

@@ -221,7 +221,7 @@ def test_build_geometry_wind(self):
221221
curve_list.append(Segment(Ztan2, Ztan1))
222222
point_ref = (Z5 + Ztan1 + Ztan2 + Z6) / 4
223223
surface = SurfLine(
224-
line_list=curve_list, point_ref=point_ref, label="WindS_R0_T1_S0"
224+
line_list=curve_list, point_ref=point_ref, label="Wind_Stator_R0_T1_S0"
225225
)
226226
expected.append(surface)
227227

Tests/Plot/test_ICEM_2020.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def test_FEMM_sym():
9090

9191

9292
@pytest.mark.GMSH
93+
@pytest.mark.long
9394
def test_gmsh_mesh_dict():
9495
"""Figure 10: Generate a 3D mesh with Gmsh by setting the
9596
number of element on each lines
@@ -149,8 +150,10 @@ def test_gmsh_mesh_dict():
149150

150151

151152
@pytest.mark.GMSH
153+
@pytest.mark.long
152154
def test_SlotMulti_sym():
153-
"""Figure 11: Generate a 3D mesh with GMSH for a lamination
155+
"""Figure 11: Genera
156+
te a 3D mesh with GMSH for a lamination
154157
with several slot types and notches
155158
"""
156159

Tests/Validation/Simulation/test_E_IPMSM_FL_002.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def test_E_IPMSM_FL_002():
5151
simu.run()
5252

5353
# Definition of the magnetic simulation (FEMM)
54-
simu2.mag = MagFEMM(type_BH_stator=0, type_BH_rotor=0, is_periodicity_a=True,)
54+
simu2.mag = MagFEMM(
55+
type_BH_stator=0,
56+
type_BH_rotor=0,
57+
is_periodicity_a=True,
58+
)
5559

5660
out2 = Output(simu=simu2)
5761
simu2.run()

Tests/Validation/Simulation/test_FM_MT_SynRM_FL_001_.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ def test_Magnetic_AGSF():
6464
)
6565

6666
# Definition of the magnetic simulation (1/2 symmetry)
67-
simu.mag = MagFEMM(type_BH_stator=0, type_BH_rotor=0, is_periodicity_a=True,)
67+
simu.mag = MagFEMM(
68+
type_BH_stator=0,
69+
type_BH_rotor=0,
70+
is_periodicity_a=True,
71+
)
6872

6973
# Definition of the magnetic simulation (no symmetry)
7074
simu.force = ForceMT(is_periodicity_a=True)

Tests/Validation/Simulation/test_IPMSM_torque_current_angle.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ def test_OP():
2626
simu = Simu1(name="tuto_Id_Iq", machine=IPMSM_A)
2727

2828
# Definition of the magnetic simulation (FEMM with symmetry and sliding band)
29-
simu.mag = MagFEMM(is_periodicity_a=True, Kgeo_fineness=1,)
29+
simu.mag = MagFEMM(
30+
is_periodicity_a=True,
31+
Kgeo_fineness=1,
32+
)
3033
# Run only Magnetic module
3134
simu.elec = None
3235
simu.force = None

Tests/Validation/Simulation/test_import_FEMM_file.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ def test_import_FEMM_file():
4747
simu.input.N0 = 3000 # Rotor speed [rpm]
4848

4949
# Definition of the magnetic simulation
50-
simu.mag = MagFEMM(type_BH_stator=2, type_BH_rotor=2, is_periodicity_a=True,)
50+
simu.mag = MagFEMM(
51+
type_BH_stator=2,
52+
type_BH_rotor=2,
53+
is_periodicity_a=True,
54+
)
5155
out = simu.run()
5256

5357
# Second simulation, importing femm file and FEMM_dict

pyleecan/Classes/CellMat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(
101101
nb_cell=0,
102102
nb_pt_per_cell=0,
103103
indice=[],
104-
interpolation=None,
104+
interpolation=-1,
105105
init_dict=None,
106106
init_str=None,
107107
):

pyleecan/Classes/Class_Dict.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@
342342
"name": "interpolation",
343343
"type": "Interpolation",
344344
"unit": "",
345-
"value": null
345+
"value": -1
346346
}
347347
]
348348
},
@@ -3573,7 +3573,8 @@
35733573
"comp_length_ring",
35743574
"plot",
35753575
"comp_number_phase_eq",
3576-
"comp_periodicity"
3576+
"comp_periodicity",
3577+
"comp_surface_ring"
35773578
],
35783579
"mother": "LamSlotWind",
35793580
"name": "LamSquirrelCage",
@@ -3823,7 +3824,8 @@
38233824
"get_material_list",
38243825
"get_polar_eq",
38253826
"plot",
3826-
"plot_anim_rotor"
3827+
"plot_anim_rotor",
3828+
"get_lam_list"
38273829
],
38283830
"mother": "",
38293831
"name": "Machine",
@@ -3923,8 +3925,7 @@
39233925
"is_internal": false,
39243926
"methods": [
39253927
"check",
3926-
"get_machine_type",
3927-
"get_lam_list"
3928+
"get_machine_type"
39283929
],
39293930
"mother": "MachineAsync",
39303931
"name": "MachineDFIM",
@@ -3963,8 +3964,7 @@
39633964
"is_internal": false,
39643965
"methods": [
39653966
"check",
3966-
"get_machine_type",
3967-
"get_lam_list"
3967+
"get_machine_type"
39683968
],
39693969
"mother": "MachineSync",
39703970
"name": "MachineIPMSM",
@@ -4023,7 +4023,6 @@
40234023
"is_internal": false,
40244024
"methods": [
40254025
"check",
4026-
"get_lam_list",
40274026
"get_machine_type"
40284027
],
40294028
"mother": "MachineSync",
@@ -4063,7 +4062,6 @@
40634062
"is_internal": false,
40644063
"methods": [
40654064
"check",
4066-
"get_lam_list",
40674065
"get_machine_type"
40684066
],
40694067
"mother": "MachineSync",
@@ -4103,7 +4101,6 @@
41034101
"is_internal": false,
41044102
"methods": [
41054103
"check",
4106-
"get_lam_list",
41074104
"get_machine_type"
41084105
],
41094106
"mother": "MachineSync",
@@ -4168,7 +4165,6 @@
41684165
"is_internal": false,
41694166
"methods": [
41704167
"build_geometry",
4171-
"get_lam_list",
41724168
"plot",
41734169
"is_synchronous"
41744170
],
@@ -4209,7 +4205,6 @@
42094205
"is_internal": false,
42104206
"methods": [
42114207
"check",
4212-
"get_lam_list",
42134208
"get_machine_type"
42144209
],
42154210
"mother": "MachineSync",
@@ -7223,7 +7218,8 @@
72237218
"jacobian",
72247219
"grad_shape_function",
72257220
"get_real_point",
7226-
"get_ref_point"
7221+
"get_ref_point",
7222+
"is_inside"
72277223
],
72287224
"mother": "RefCell",
72297225
"name": "RefTriangle3",
@@ -7560,7 +7556,8 @@
75607556
"get_surface_tooth",
75617557
"is_outwards",
75627558
"plot",
7563-
"comp_width_opening"
7559+
"comp_width_opening",
7560+
"get_name_lam"
75647561
],
75657562
"mother": "",
75667563
"name": "Slot",

0 commit comments

Comments
 (0)