def setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = MachineIPMSM() test_obj.rotor = LamHole(Rint=45e-3 / 2, Rext=81.5e-3, is_stator=False, is_internal=True, L1=0.9) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM51( Zh=8, W0=0.016, W1=pi / 6, W2=0.004, W3=0.01, W4=0.002, W5=0.01, W6=0.002, W7=0.01, H0=0.01096, H1=0.0015, H2=0.0055, )) test_obj.shaft = Shaft(Drsh=test_obj.rotor.Rint * 2, Lshaft=1.2) test_obj.stator = LamSlotWind(Rint=0.09, Rext=0.12, is_internal=False, is_stator=True, L1=0.9, slot=None) test_obj.frame = Frame(Rint=0.12, Rext=0.12, Lfra=0.7) self.test_obj = test_obj
def test_Lam_Hole_54_plot(self): """Test machine plot hole 54""" plt.close("all") test_obj = MachineIPMSM() test_obj.rotor = LamHole(is_internal=True, Rint=0.1, Rext=0.2, is_stator=False, L1=0.7) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM54(Zh=8, W0=pi / 4, H0=50e-3, H1=10e-3, R1=100e-3)) test_obj.rotor.hole.append( HoleM54(Zh=8, W0=pi / 6, H0=25e-3, H1=10e-3, R1=100e-3)) test_obj.rotor.plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Lam_Hole_s54-Rotor.png")) self.assertEqual(len(fig.axes[0].patches), 18) test_obj.rotor.hole[0].plot() fig = plt.gcf() fig.savefig(join(save_path, "test_Lam_Hole_s54-Rotor hole.png")) self.assertEqual(len(fig.axes[0].patches), 1)
def setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = MachineIPMSM() test_obj.rotor = LamHole(is_internal=True, Rint=0.021, Rext=0.075, is_stator=False, L1=0.7) test_obj.rotor.bore = BoreFlower(N=8, Rarc=0.05, alpha=pi / 8) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM50( Zh=8, W0=50e-3, W1=2e-3, W2=1e-3, W3=1e-3, W4=20.6e-3, H0=17.3e-3, H1=3e-3, H2=0.5e-3, H3=6.8e-3, H4=0, )) test_obj.rotor.axial_vent = list() test_obj.rotor.axial_vent.append( VentilationCirc(Zh=8, Alpha0=0, D0=5e-3, H0=40e-3)) test_obj.rotor.axial_vent.append( VentilationCirc(Zh=8, Alpha0=pi / 8, D0=7e-3, H0=40e-3)) test_obj.shaft = Shaft(Drsh=test_obj.rotor.Rint * 2, Lshaft=1.2) test_obj.stator = LamSlotWind(Rint=0.078, Rext=0.104, is_internal=False, is_stator=True, L1=0.8) test_obj.stator.slot = None test_obj.stator.axial_vent.append( VentilationPolar(Zh=8, H0=0.08, D0=0.01, W1=pi / 8, Alpha0=pi / 8)) test_obj.stator.axial_vent.append( VentilationPolar(Zh=8, H0=0.092, D0=0.01, W1=pi / 8, Alpha0=0)) test_obj.frame = Frame(Rint=0.104, Rext=0.114, Lfra=1) self.test_obj = test_obj
def setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = MachineIPMSM() test_obj.rotor = LamHole( Rint=45e-3 / 2, Rext=81.5e-3, is_stator=False, is_internal=True, L1=0.9 ) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM52(Zh=8, W0=27e-3, W3=16.2e-3, H0=1e-3, H1=5e-3, H2=1e-3) ) test_obj.shaft = Shaft(Drsh=test_obj.rotor.Rint * 2, Lshaft=1.2) test_obj.stator = LamSlotWind( Rint=0.09, Rext=0.12, is_internal=False, is_stator=True, L1=0.9, slot=None ) test_obj.frame = Frame(Rint=0.12, Rext=0.12, Lfra=0.7) self.test_obj = test_obj
def setUp(self): """Run at the begining of every test to setup the machine""" plt.close("all") test_obj = MachineIPMSM() test_obj.rotor = LamHole( is_internal=True, Rint=0.1, Rext=0.2, is_stator=False, L1=0.7 ) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM53( Zh=8, W1=15e-3, W2=10e-3, W3=40e-3, W4=pi / 4, H0=75e-3, H1=5e-3, H2=20e-3, H3=5e-3, ) ) self.test_obj = test_obj
from pyleecan.Classes.LamHole import LamHole from pyleecan.Classes.VentilationCirc import VentilationCirc from pyleecan.Classes.VentilationPolar import VentilationPolar from pyleecan.Classes.HoleM50 import HoleM50 from pyleecan.Classes.Frame import Frame from pyleecan.Classes.Shaft import Shaft # For AlmostEqual DELTA = 1e-4 M_test = list() test_obj = MachineIPMSM() test_obj.rotor = LamHole(is_internal=True, Rint=0.021, Rext=0.075, is_stator=False, L1=0.7, Nrvd=0, Kf1=0.95) test_obj.rotor.hole = list() test_obj.rotor.hole.append( HoleM50( Zh=8, W0=50e-3, W1=2e-3, W2=1e-3, W3=1e-3, W4=20.6e-3, H0=17.3e-3, H1=1.25e-3, H2=0.5e-3,
machine6.stator.winding = WindingDW2L() machine6.rotor = LamSlotMag() machine6.rotor.slot = SlotMPolar() machine6.rotor.slot.magnet = [MagnetType11()] machine6._set_None() # Empty machine machine6.type_machine = 6 machine6.stator.is_stator = True machine6.rotor.is_stator = False machine7 = MachineSIPMSM(init_dict=machine6.as_dict()) machine7.type_machine = 7 machine8 = MachineIPMSM() machine8.stator = LamSlotWind() machine8.stator.winding = WindingDW2L() machine8.rotor = LamHole() machine8.rotor.hole = list() machine8.rotor.hole.append(HoleM50()) machine8._set_None() # Empty machine machine8.type_machine = 8 machine8.stator.is_stator = True machine8.rotor.is_stator = False machine9 = MachineWRSM() machine9.stator = LamSlotWind() machine9.stator.winding = WindingDW2L() machine9.rotor = LamSlotWind() machine9.rotor.winding = WindingCW2LT() machine9._set_None() # Empty machine machine9.type_machine = 9 machine9.stator.is_stator = True