MagnetType12 (class)

File generated according to Generator/ClassesRef/Machine/MagnetType12.csv WARNING! All changes made in this file will be lost!

class MagnetType12(Wmag=0.002, Hmag=0.001, mat_type=-1, type_magnetization=0, Lmag=0.95, init_dict=None)[source]

Bases: pyleecan.Classes.MagnetFlat.MagnetFlat

single magnet with rectangular base and polar top

VERSION = 1
IS_FLAT_BOT = 1
IS_FLAT_TOP = 0
build_geometry(alpha=0, delta=0, is_simplified=False)

Compute the curve (Segment, Arc1) needed to plot the Magnet. The list represents a closed surface. The ending point of a curve is always the starting point of the next curve in the list

Parameters:
  • self – A MagnetType12 object
  • alpha (float) – Angle for rotation [rad]
  • delta (complex) – Complex value for translation
  • is_simplified (bool) – True to avoid line superposition
Returns:

surf_list – list of surfaces needed to draw the magnet

Return type:

list

comp_height()

Compute the height of the magnet

Parameters:self (MagnetType12) – A MagnetType12 object
Returns:Hmag – The magnet’s height [m]
Return type:float
comp_surface()

Compute the Magnet surface (by numerical computation)

Parameters:self (MagnetType12) – A MagnetType12 object
Returns:S – Magnet surface [m**2]
Return type:float
save(save_path='')

Save the object to the save_path

Parameters:
  • self – A pyleecan object
  • save_path (str) – path to the folder to save the object
get_logger()

Get the object logger or its parent’s one

Parameters:obj – A pyleecan object
Returns:logger – Pyleecan object dedicated logger
Return type:logging.Logger
as_dict()[source]

Convert this objet in a json seriable dict (can be use in __init__)

Wmag

magnet bottom width [m]

Hmag

magnet radial height [m]