def __init__(self, lamination=None): """Initialize the GUI according to conductor Parameters ---------- self : PCondType12 A PCondType12 widget lamination : Lamination current lamination to edit """ # Build the interface according to the .ui file QWidget.__init__(self) self.setupUi(self) # Set FloatEdit unit self.lf_Wwire.unit = "m" self.lf_Wins_wire.unit = "m" self.lf_Wins_cond.unit = "m" self.u = gui_option.unit # Set unit name (m ou mm) wid_list = [self.unit_Wwire, self.unit_Wins_cond, self.unit_Wins_wire] for wid in wid_list: wid.setText(self.u.get_m_name()) # Fill the fields with the machine values (if they're filled) self.lam = lamination self.cond = self.lam.winding.conductor # Make sure that isinstance(cond, CondType12) if self.cond is None or not isinstance(self.cond, CondType12): self.cond = CondType12() self.cond._set_None() if self.cond.Nwppc is None: self.cond.Nwppc = 1 # Default value self.si_Nwpc1.setValue(self.cond.Nwppc) self.lf_Wwire.setValue(self.cond.Wwire) if self.cond.Wins_wire is None: self.cond.Wins_wire = 0 # Default value self.lf_Wins_wire.setValue(self.cond.Wins_wire) if self.cond.Wins_cond is None: self.cond.Wins_cond = 0 # Default value self.lf_Wins_cond.setValue(self.cond.Wins_cond) # Display the conductor main output self.w_out.comp_output() # Connect the signal/slot self.si_Nwpc1.editingFinished.connect(self.set_Nwppc) self.lf_Wwire.editingFinished.connect(self.set_Wwire) self.lf_Wins_wire.editingFinished.connect(self.set_Wins_wire) self.lf_Wins_cond.editingFinished.connect(self.set_Wins_cond)
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 Wins_cond=1.3 * mm, # winding coil isolation Nwppc=1, # number of strands in parallel per coil Kwoh=1, ) # Rotor setup rotor = LamHole(Rint=59 * mm / 2, Rext=158 * mm / 2, is_internal=True, is_stator=False, L1=stator.L1) rotor.hole = list() rotor.hole.append( HoleM50( Zh=8, W0=43.4 * mm,
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) # Rotor setup rotor = LamSlotMag( Rext=0.085, Rint=0.082, L1=0.035, Kf1=0.95, is_internal=False, is_stator=False, Nrvd=0, ) rotor.slot = SlotMPolar(Zs=18, W3=0, W0=0.23529412, H0=0) rotor.slot.magnet = [MagnetType11(Wmag=0.23529412, Hmag=0.002)] shaft = None