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 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
test_obj.rotor.hole[0].magnet_0.Lmag = 0.3 test_obj.rotor.hole[0].magnet_1.Lmag = 0.5 test_obj.rotor.hole[0].magnet_0.mat_type.struct.rho = 1000 test_obj.rotor.hole[0].magnet_1.mat_type.struct.rho = 1000 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.rotor.mat_type.struct.rho = 7600 test_obj.shaft = Shaft(Drsh=test_obj.rotor.Rint * 2, Lshaft=1.2) test_obj.shaft.mat_type.struct.rho = 5000 test_obj.stator = LamSlotWind(Rint=0.078, Rext=0.104, is_internal=False, is_stator=True, L1=0.8, Nrvd=0, Kf1=0.95) test_obj.stator.slot = None test_obj.stator.winding = 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.stator.mat_type.struct.rho = 8000 test_obj.frame = Frame(Rint=0.104, Rext=0.114, Lfra=1) test_obj.frame.mat_type.struct.rho = 4000 M_test.append({ "test_obj": test_obj,
machine6 = MachineSIPMSM() machine6.stator = LamSlotWind() 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
I_1 = ImportMatrixVal(value=zeros((100, 2))) I_2 = ImportMatrixVal(value=zeros((100, 3))) I_3 = ImportMatrixVal(value=zeros((2, 100))) I_4 = ImportMatrixVal(value=zeros((100))) angle_rotor_wrong = ImportMatrixVal(value=zeros((10, 2))) angle_rotor_wrong2 = ImportMatrixVal(value=zeros((102))) angle_rotor = ImportMatrixVal(value=zeros((100))) Nr_wrong = ImportMatrixVal(value=zeros((10, 2))) Nr_wrong2 = ImportMatrixVal(value=zeros((102))) Nr = ImportMatrixVal(value=zeros((100))) # Winding stator only M1 = MachineIPMSM() M1.stator = LamSlotWind() M1.stator.winding = WindingDW1L() M1.stator.winding.qs = 3 # Machine without 'comp_initial_angle' method M2 = MachineDFIM() M2.stator = LamSlotWind() M2.stator.winding.qs = 3 M2.rotor.winding = None # Wrong time test_obj = Simulation() test_obj.input = InCurrentDQ(time=None) InCurrentDQ_Error_test.append({ "test_obj": test_obj, "exp": "ERROR: InCurrentDQ.time missing"