def test_type_wind_DW2L(self): """Test Winding matrix plot for type_winding DW2L""" plt.close("all") test_obj = LamSlotWind(Rint=0.5, Rext=0.9, is_internal=False) test_obj.slot = SlotW21(Zs=36, H0=20e-3, H1=0, H1_is_rad=False, H2=0.2, W0=30e-3, W1=0.06, W2=0.06) test_obj.winding = WindingDW2L(p=3, qs=3, coil_pitch=5) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_DW2L_lam.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_DW2L_wind.png")) test_obj.slot.Zs = 24 test_obj.winding = WindingDW2L(p=1, qs=3, coil_pitch=10) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_DW2L_lam2.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_DW2L_wind2.png"))
def test_type_wind_CW1L(self): """Test Winding matrix plot for type_winding CW1L""" plt.close("all") # Artificial winding for test purpose test_obj = LamSlotWind(Rint=0.5, Rext=0.9, is_internal=False) test_obj.slot = SlotW21(Zs=36, H0=20e-3, H1=0, H1_is_rad=False, H2=0.2, W0=30e-3, W1=0.06, W2=0.06) test_obj.winding = WindingCW1L(p=3, qs=3) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW1L_lam.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW1L_wind.png")) test_obj.slot.Zs = 20 test_obj.winding.qs = 5 test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW1L_lam2.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW1L_wind2.png"))
def test_type_wind_CW2LR(self): """Test Winding matrix plot for type_winding CW2LR""" plt.close("all") test_obj = LamSlotWind(Rint=0.5, Rext=0.9, is_internal=False) test_obj.slot = SlotW21(Zs=12, H0=20e-3, H1=0, H1_is_rad=False, H2=0.2, W0=30e-3, W1=0.06, W2=0.06) test_obj.winding = WindingCW2LR(p=5, qs=3) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LR_lam.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LR_wind.png")) test_obj.slot.Zs = 36 test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LR_lam2.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LR_wind2.png"))
def test_Lam_Wind_15_wind_22(self): """Test machine plot with Slot 15 and winding rad=2, tan=2 """ print("\nTest plot Slot 15 rad=2, tan=2") plt.close("all") test_obj = LamSlotWind( Rint=92.5e-3, Rext=0.2, is_internal=False, is_stator=True, L1=0.95, Nrvd=1, Wrvd=0.05, ) test_obj.slot = SlotW15(Zs=6, W0=10e-3, W3=30e-3, H0=5e-3, H1=20e-3, H2=50e-3, R1=15e-3, R2=10e-3) test_obj.winding = WindingUD(user_wind_mat=wind_mat, qs=4, p=4, Lewout=60e-3) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Lam_Wind_s15.png")) # 2 for lam + Zs*4 for wind self.assertEqual(len(fig.axes[0].patches), 26)
def test_type_wind_CW2LT(self): """Test Winding matrix plot for type_winding CW2LT""" plt.close("all") test_obj = LamSlotWind(Rint=0.5, Rext=0.9, is_internal=False) test_obj.slot = SlotW22(Zs=6, H0=20e-3, H2=0.2, W0=pi / 10, W2=pi / 6) test_obj.winding = WindingCW2LT(p=2, qs=3) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LT_lam.png")) test_obj.plot_winding() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LT_wind.png")) test_obj.slot = SlotW22(Zs=12, H0=20e-3, H2=0.2, W0=pi / 12, W2=pi / 8) test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LT_lam_ms=0,25.png")) test_obj.winding.p = 4 test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Wind_CW2LT_lam_p=4.png"))
def test_Lam_Wind_15_wind_22(self): """Test machine plot with Slot 15 and winding rad=2, tan=2 """ print("\nTest plot Slot 15") plt.close("all") test_obj = LamSlotWind( Rint=92.5e-3, Rext=0.2, is_internal=False, is_stator=True, L1=0.95, Nrvd=1, Wrvd=0.05, ) test_obj.slot = SlotW15(Zs=6, W0=10e-3, W3=30e-3, H0=5e-3, H1=20e-3, H2=50e-3, R1=15e-3, R2=10e-3) test_obj.winding = WindingUD(user_wind_mat=wind_mat, qs=4, p=4, Lewout=60e-3) test_obj.mat_type.name = "Param" test_obj.mat_type.magnetics = MatLamination(Wlam=0.5e-3) BH = BHCurveParam(Bmax=1.5, mur_0=8585, mur_1=21.79, a=0.25575) test_obj.mat_type.magnetics.BH_curve = BH test_obj.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Lam_Wind_s15.png")) # 2 for lam + Zs*4 for wind self.assertEqual(len(fig.axes[0].patches), 26)