SMagnet module

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

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

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

saveNeeded = <PySide2.QtCore.Signal object>
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

static check(lamination)[source]

Check that the current machine have all the needed field set

Parameters

lamination (Lamination) – Lamination to check

Returns

error – Error message (return None if no error)

Return type

str

staticMetaObject = <PySide2.QtCore.QMetaObject object>
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