Magnet (class)

Warning : this file has been generated, you shouldn’t edit it

class Magnet(mat_type=-1, type_magnetization=0, Lmag=0.95, init_dict=None)[source]

Bases: pyleecan.Classes.frozen.FrozenClass

VERSION = 1
comp_angle_opening()

Compute the opening angle of the magnet at the lamination bore radius

Parameters:self (Magnet) – A Magnet object
Returns:alpha_mag – Magnet opening angle [rad]
Return type:float
comp_height()

Compute the height of the Magnet. Caution, the bottom of the Magnet is an Arc

Parameters:self (Magnet) – A Magnet object
Returns:Htot – Height of the Magnet [m]
Return type:float
comp_mass()

Compute the Magnet mass (by analytical computation)

Parameters:self (Magnet) – A Magnet object
Returns:M – Magnet mass [kg]
Return type:float
comp_ratio_opening(p)

Compute the magnet pole arc width to pole width ratio

Parameters:
  • self (Magnet) – A Magnet object
  • p (int) – Pole pair number
Returns:

taum – Ratio magnet pole arc width to pole width []

Return type:

float

comp_surface()

Compute the Magnet total surface (by numerical computation).

Parameters:self (Magnet) – A Magnet object
Returns:S – Magnet total surface [m**2]
Return type:float
comp_volume()

Compute the Magnet volume (by analytical computation)

Parameters:self (Magnet) – A Magnet object
Returns:V – Magnet volume [m**3]
Return type:float
is_outwards()

Return if the magnet is outwards (on an external lamination) or inwards (on an internal lamination)

Parameters:self (Magnet) – A Magnet object
Returns:is_outwards – Direction of the magnet
Return type:bool
Raises:ParentMissingError – Error: The magnet is not inside a Slot
plot(fig=None, display_field=False)

Plot the Magnet in a matplotlib fig

Parameters:
  • self (Magnet) – A Magnet object
  • fig – if None, open a new fig and plot, else add to the current one (Default value = None)
  • display_field (bool) – if true, will display magnetization field arrow (Default value = False)
Returns:

Return type:

None

as_dict()[source]

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

mat_type

The Magnet material

type_magnetization

0 for radial, 1 for parallel, 2 for HallBach []

Type:Permanent magnet magnetization type
Lmag

Magnet axial length