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_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_slot_10(self): """Check that you can generate the 3D mesh of Slot 10 """ # SetUp stator = LamSlotWind( Rint=0.1325, Rext=0.2, Nrvd=0, L1=0.35, Kf1=0.95, is_internal=False, is_stator=True, ) stator.slot = SlotW10(Zs=36, H0=1e-3, H1=1.5e-3, H2=30e-3, W0=12e-3, W1=14e-3, W2=12e-3) gen_3D_mesh( lamination=stator, save_path=join(save_path, "Lamination.msh"), mesh_size=5e-3, Nlayer=20, )
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 setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = LamSlotWind( Rint=92.5e-3, Rext=0.2, is_internal=True, is_stator=True, L1=0.95, Nrvd=1, Wrvd=0.05, ) test_obj.slot = SlotW16(Zs=6, W0=2 * pi / 60, W3=30e-3, H0=10e-3, H2=70e-3, R1=15e-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 self.test_obj = test_obj
def setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = LamSlotWind( Rint=92.5e-3, Rext=0.2, is_internal=True, is_stator=True, L1=0.95, Nrvd=1, Wrvd=0.05, ) test_obj.slot = SlotW16(Zs=6, W0=2 * pi / 60, W3=30e-3, H0=10e-3, H2=70e-3, R1=15e-3) self.test_obj = test_obj
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)
from pyleecan.Tests.Validation.Material.M400_50A import M400_50A from pyleecan.Tests.Validation.Material.Magnet3 import Magnet3 from pyleecan.Tests.Validation.Material.Copper1 import Copper1 # Stator setup stator = LamSlotWind(Rint=0.116, Rext=0.2, Nrvd=0, L1=0.4, Kf1=1, is_internal=False, is_stator=True) stator.slot = SlotW22(Zs=12, H0=4e-3, H2=25e-3, W0=0.6 * 12 * pi / 180, W2=12 * pi / 180) stator.winding = WindingDW1L(qs=3, Lewout=15e-3, p=1, Ntcoil=12, Npcpp=1, Nslot_shift_wind=0) stator.winding.conductor = CondType11( Nwppc_tan=1, Nwppc_rad=1, Wwire=2e-3, Hwire=2e-3, Wins_wire=1e-6,
# Stator setup stator = LamSlotWind( Rint=80.95e-3, Rext=134.62e-3, Nrvd=0, L1=0.08382, Kf1=0.95, is_internal=False, is_stator=True, ) stator.slot = SlotW11(Zs=48, H0=1e-3, H1=0, H2=0.0333, W0=0.00193, W1=0.005, W2=0.008, R1=0.004) stator.winding = WindingDW1L(qs=3, Lewout=0, p=4, Ntcoil=9, Npcpp=1, Nslot_shift_wind=2, is_reverse_wind=True) stator.winding.conductor = CondType11( Nwppc_tan=1, Nwppc_rad=1, Wwire=0.000912,
from pyleecan.Tests.Validation.Material.Copper1 import Copper1 from pyleecan.Tests.Validation.Material.M400_50A import M400_50A # Stator setup stator = LamSlotWind(Rint=0.1325, Rext=0.2, Nrvd=0, L1=0.35, Kf1=0.95, is_internal=False, is_stator=True) stator.slot = SlotW10(Zs=36, H0=1e-3, H1=1.5e-3, H2=30e-3, W0=12e-3, W1=14e-3, W2=12e-3) stator.winding = WindingDW2L(qs=3, Lewout=15e-3, p=3, coil_pitch=5, Ntcoil=7, Npcpp=2) stator.winding.conductor = CondType11(Nwppc_tan=1, Nwppc_rad=1, Wwire=10e-3, Hwire=2e-3, Wins_wire=0,
from pyleecan.Tests.Validation.Material.Copper1 import Copper1 # Stator setup stator = LamSlotWind(Rint=0.05, Rext=0.078, Nrvd=0, L1=0.035, Kf1=0.95, is_internal=True, is_stator=True) stator.slot = SlotW23( Zs=27, H0=0.0015, H1=0.002, H2=0.015, W0=0.006, W3=0.005, H1_is_rad=False, is_cstt_tooth=True, ) stator.winding = WindingCW2LT(qs=3, Lewout=15e-3, p=9, Ntcoil=57, Npcpp=3, Nslot_shift_wind=0) stator.winding.conductor = CondType12(Nwppc=1, Wwire=0.0007, Wins_wire=1e-6, Kwoh=0.5)
from pyleecan.Classes.SlotW21 import SlotW21 from pyleecan.Tests.Validation.Material.Copper1 import Copper1 from pyleecan.Tests.Validation.Material.M400_50A import M400_50A # Stator setup stator = LamSlotWind(Rint=0.061, Rext=0.1, Nrvd=0, L1=0.2, Kf1=1, is_internal=False, is_stator=True) stator.slot = SlotW22(Zs=36, H0=0.002, H2=0.022, W0=0.0523598775598, W2=0.0872664625997) stator.winding = WindingDW1L(qs=3, Lewout=0, p=2, Ntcoil=15, Npcpp=1, coil_pitch=9) stator.winding.conductor = CondType12(Nwppc=1, Wwire=0.0005, Wins_wire=1e-06, Kwoh=0) # Rotor setup rotor = LamSquirrelCage(
# Stator setup stator = LamSlotWind( Rint=0.0411, Rext=0.0675, Nrvd=0, L1=0.101, Kf1=0.96, is_internal=False, is_stator=True, ) stator.slot = SlotW11( Zs=24, H0=0.00075, H1=0.4363323129985824, H1_is_rad=True, H2=0.015, W0=0.00268, W1=0.006828, W2=0.009, ) stator.winding = WindingDW1L(qs=3, Lewout=15e-3, p=2, Ntcoil=30, Npcpp=1, coil_pitch=6) stator.winding.conductor = CondType12(Nwppc=1, Wwire=0.001, Kwoh=0.5, Wins_wire=1e-6)
mm = 1e-3 # Millimeter # Stator setup stator = LamSlotWind( Rint=160.4 * mm / 2, Rext=221.0 * mm / 2, Nrvd=0, L1=70 * mm, Kf1=1, is_internal=False, is_stator=True, ) stator.slot = SlotW21(Zs=48, H0=1.0 * mm, H1=0.5 * mm, H2=14.5 * mm, W0=2.0 * mm, W1=5 * mm, W2=7 * mm) stator.winding = WindingDW1L( qs=3, # number of phases Lewout=10 * mm, # staight length of conductor outside lamination before EW-bend p=4, # number of pole pairs Ntcoil=2, # number of turns per coil Npcpp=1, # number of parallel circuits per phase Nslot_shift_wind=0, # ) stator.winding.conductor = CondType12( Wwire=1.0 * mm, # single wire without isolation Wins_wire=0.1 * mm, # single wire isolation thickness
from pyleecan.Classes.Material import Material from pyleecan.Tests.Validation.Material.M400_50A import M400_50A from pyleecan.Tests.Validation.Material.Magnet_prius import Magnet_prius from pyleecan.Tests.Validation.Material.Copper1 import Copper1 # Stator setup stator = LamSlotWind( Rint=80.95e-3, Rext=134.62e-3, Nrvd=0, L1=0.08382, Kf1=0.95, is_internal=False, is_stator=True, ) stator.slot = None stator.winding = None # Rotor setup rotor = LamHole( Rext=80.2e-3, Rint=55.32e-3, L1=0.08382, Kf1=0.95, is_internal=True, is_stator=False, Nrvd=0, ) rotor.hole = [ HoleM50( Zh=8,
from pyleecan.Classes.LamSlotMag import LamSlotMag from pyleecan.Classes.SlotMPolar import SlotMPolar from pyleecan.Classes.MagnetType11 import MagnetType11 from pyleecan.Classes.Shaft import Shaft from pyleecan.Tests.Validation.Material.M400_50A import M400_50A from pyleecan.Tests.Validation.Material.Magnet1 import Magnet1 from pyleecan.Tests.Validation.Material.Copper1 import Copper1 # Stator setup stator = LamSlotWind( Rint=0.026, Rext=0.048, Nrvd=0, L1=0.09, Kf1=0.96, is_internal=False, is_stator=True ) stator.slot = SlotW22(Zs=6, H0=0.002, H2=0.01, W0=0.44, W2=0.628) stator.winding = WindingCW1L(qs=3, Lewout=0.015, p=2, Ntcoil=42, Npcpp=1) stator.winding.conductor = CondType12( Nwppc=1, Wwire=0.0011283792, Wins_wire=1e-6, Kwoh=0.5 ) # Rotor setup rotor = LamSlotMag( Rext=0.025, Rint=0.005, L1=0.09, Kf1=0.95, is_internal=True, is_stator=False, Nrvd=0 ) rotor.slot = SlotMPolar(Zs=4, W3=0, W0=1.3351769, H0=0.007) rotor.slot.magnet = [MagnetType11(Wmag=1.3351769, Hmag=0.007)] shaft = Shaft(Lshaft=0.442, Drsh=0.01) frame = None