SMagnet module

class SMagnet(machine, matlib=[], is_stator=False)[source]

Bases: pyleecan.GUI.Dialog.DMachineSetup.SMagnet.Ui_SMagnet.Ui_SMagnet, PyQt5.QtWidgets.QDialog

Step to set the magnet (and slot) for SPMSM/SIPMSM

saveNeeded
step_name = 'Magnet'
set_slot_pitch()[source]

Update the slot pitch text

Parameters:self (SMagnet) – A SMagnet object
emit_save()[source]

Emit the saveNeeded signal for the DMachineSetup

set_type_gui(index)[source]

Change the GUI to the correct Magnet widget

Parameters:
  • self (SMagnet) – A SMagnet object
  • index (int) – Index of the Magnet type to use
set_type_obj(index)[source]

Set the type of magnet (update only the object)

Parameters:
  • self (SMagnet) – A SMagnet object
  • index (int) – Index of the Magnet type to use
set_type(index)[source]

Signal to set the type of magnet (update both the object and the gui)

Parameters:
  • self (SMagnet) – A SMagnet object
  • index (int) – Index of the Magnet type to use
s_plot()[source]

Plot the current machine

Parameters:self (SMagnet) – A SMagnet object
check()[source]

Check that the current machine have all the needed field set

Parameters:self (SMagnet) – A SMagnet object
Returns:error – Error message (return None if no error)
Return type:str
s_set_type_magnetization(index)[source]

Signal to update the value of type_magnetization according to the combobox

Parameters:
  • self (SMagnet) – A SMagnet object
  • index (int) – Current index of the combobox