示例#1
0
    def test_init_Cond22(self):
        self.test_obj.rotor = LamSquirrelCage(Hscr=0.21, Lscr=0.22)
        self.test_obj.rotor.slot = SlotW22(H0=0.001, H2=0.01, W0=0.1, W2=0.2)
        self.test_obj.rotor.winding.Lewout = 0.23
        self.test_obj.rotor.ring_mat.name = "test2"
        self.test_obj.rotor.winding.conductor = CondType22()
        self.test_obj.rotor.winding.conductor.cond_mat.name = "test3"
        self.widget = SBar(machine=self.test_obj,
                           matlib=self.matlib,
                           is_stator=False)

        self.assertEqual(self.widget.lf_Hscr.value(), 0.21)
        self.assertEqual(self.widget.lf_Lscr.value(), 0.22)
        self.assertEqual(self.widget.lf_Lewout.value(), 0.23)
        self.assertEqual(self.widget.w_mat.c_mat_type.currentIndex(), 1)
        self.assertEqual(self.widget.w_mat.c_mat_type.currentText(), "test2")
        self.assertIs(type(self.widget.w_bar), PCondType22)
        self.assertEqual(self.widget.c_bar_type.currentIndex(), 1)
        self.assertEqual(self.widget.c_bar_type.currentText(), "Die cast bar")
        self.assertEqual(self.widget.w_bar.w_mat.c_mat_type.currentIndex(), 2)
        self.assertEqual(self.widget.w_bar.w_mat.c_mat_type.currentText(),
                         "test3")
        # Check output txt
        self.assertEqual(self.widget.w_bar.w_out.out_Sbar.text(),
                         "Sbar: 0.002088 m²")
        self.assertEqual(self.widget.w_bar.w_out.out_Sslot.text(),
                         "Sslot: 0.002088 m²")
        self.assertEqual(self.widget.w_bar.w_out.out_ratio.text(),
                         "Sbar / Sslot: 100 %")
示例#2
0
    def setUp(self):
        """Run at the begining of every test to setup the gui"""
        self.test_obj = MachineSCIM()
        self.test_obj.rotor = LamSquirrelCage(Hscr=0.11, Lscr=0.12)
        self.test_obj.rotor.slot = SlotW22(H0=0.001, H2=0.01, W0=0.1, W2=0.2)
        self.test_obj.rotor.winding.Lewout = 0.13
        self.test_obj.rotor.ring_mat.name = "test3"
        self.test_obj.rotor.winding.conductor = CondType21(Hbar=0.014,
                                                           Wbar=0.015)
        self.test_obj.rotor.winding.conductor.cond_mat.name = "test1"

        self.matlib = list()
        self.matlib.append(Material(name="test1"))
        self.matlib[-1].elec.rho = 0.31
        self.matlib.append(Material(name="test2"))
        self.matlib[-1].elec.rho = 0.32
        self.matlib.append(Material(name="test3"))
        self.matlib[-1].elec.rho = 0.33

        self.widget = SBar(machine=self.test_obj,
                           matlib=self.matlib,
                           is_stator=False)
示例#3
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(
    Rext=0.06,
    Rint=0,
    L1=0.2,
    Kf1=1,
    is_internal=True,
    is_stator=False,
    Hscr=0.1,
    Lscr=0.1,
    Nrvd=0,
)

rotor.slot = SlotW22(Zs=28,
                     H0=0.002,
                     H2=0.02,
                     W0=0.067369709127,
                     W2=0.112224670903)
rotor.winding = WindingSC(Ntcoil=1, qs=28, Lewout=0, Npcpp=1)
rotor.winding.conductor = CondType21(Hbar=0.02, Wbar=0.01, Wins=0)

shaft = None
示例#4
0
                             Ntcoil=7,
                             Npcpp=2)

stator.winding.conductor = CondType11(Nwppc_tan=1,
                                      Nwppc_rad=1,
                                      Wwire=10e-3,
                                      Hwire=2e-3,
                                      Wins_wire=0,
                                      type_winding_shape=0)
# Rotor setup
rotor = LamSquirrelCage(
    Rext=0.131,
    Rint=45e-3,
    L1=0.35,
    Kf1=0.95,
    is_internal=True,
    is_stator=False,
    Hscr=20e-3,
    Lscr=15e-3,
    Nrvd=0,
)
rotor.axial_vent = [VentilationCirc(Zh=8, D0=20e-3, H0=70e-3, Alpha0=0)]

rotor.slot = SlotW21(Zs=28,
                     H0=3e-3,
                     W0=3e-3,
                     H1=0,
                     H2=20e-3,
                     W1=13e-3,
                     W2=10e-3)
rotor.winding = WindingSC(Ntcoil=1, qs=28, Lewout=17e-3, Npcpp=1)
示例#5
0
# Steps needed to setup a LamSquirrelCage
LSC_step = [SLamParam, SWSlot, SBar]
# Steps needed to setup a LamHole
LH_step = [SLamParam, SMHoleMag]
# Steps needed to setup a LamSlot
LS_step = [SLamParam, SWSlot]
# Steps needed to setup a LamSlotMag
LSM_step = [SLamParam, SMagnet]
# Steps to start the design of a machine with 2 laminations
S_step = [SMachineType, SMachineDimension]

# Defaut machine for initialization
machine1 = MachineSCIM()
machine1.stator = LamSlotWind()
machine1.stator.winding = WindingDW2L()
machine1.rotor = LamSquirrelCage()
machine1.rotor.winding = WindingSC()
machine1._set_None()  # Empty machine
machine1.type_machine = 1
machine1.stator.is_stator = True
machine1.rotor.is_stator = False

machine4 = MachineDFIM()
machine4.stator = LamSlotWind()
machine4.stator.winding = WindingDW2L()
machine4.rotor = LamSlotWind()
machine4.rotor.winding = WindingDW2L()
machine4._set_None()  # Empty machine
machine4.type_machine = 4
machine4.stator.is_stator = True
machine4.rotor.is_stator = False