Hole (class)¶
Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Slot/Hole
-
class
Hole
(Zh=36, mat_void=-1, init_dict=None, init_str=None)[source]¶ Bases:
pyleecan.Classes._frozen.FrozenClass
Holes for lamination (abstract)
-
VERSION
= 1¶
-
comp_radius
()¶ Compute the radius of the min and max circle that contains the hole
- Parameters
self (Hole) – A Hole object
- Returns
(Rmin,Rmax) – Radius of the circle that contains the hole
- Return type
tuple
-
comp_surface
()¶ Compute the Hole total surface (by numerical computation).
- Parameters
self (Hole) – A Hole object
- Returns
S – Slot total surface [m**2]
- Return type
float
-
get_is_stator
()¶ Return True if the parent lamination is stator and False if is a rotor
- Parameters
self (Hole) – A Hole object
- Returns
is_stator – True if the Lamination is a stator and False if not
- Return type
bool
-
get_Rbo
()¶ Return the parent lamination bore radius
- Parameters
self (Hole) – A Hole object
- Returns
Rbo – The parent lamination bore radius [m]
- Return type
float
-
get_Rext
()¶ Return the parent lamination exterior radius
- Parameters
self (Hole) – A Hole object
- Returns
Rext – The parent lamination exterior radius [m]
- Return type
float
-
has_magnet
()¶ Return if the Hole has magnets
- Parameters
self (Hole) – A Hole object
- Returns
has_magnet – False
- Return type
bool
-
plot
(fig=None, display_magnet=True, is_show_fig=True)¶ Plot the Hole in a matplotlib fig
- Parameters
self (Hole) – A Hole object
fig – if None, open a new fig and plot, else add to the current one (Default value = None)
display_magnet (bool) – if True, plot the magnet inside the hole, if there is any (Default value = True)
- Returns
- Return type
None
-
comp_height
()¶ Compute the height of the Hole (Rmax-Rmin)
- Parameters
self (Hole) – A Hole object
- Returns
H – Height of the hole
- Return type
float
-
get_magnet_by_id
(index)¶ Return the magnet at the corresponding index returns None is the magnet is None Raise error if the hole doesn’t have a magnet for the corresponding index
-
set_magnet_by_id
(index, magnet)¶ Set the magnet at the corresponding index Raise error if the hole doesn’t have a magnet for the corresponding index
-
get_magnet_dict
()¶ Return a dictionnary with all the magnets of the Hole
- Parameters
self (Hole) – A Hole object
- Returns
magnet_dict – Dictionnary of magnet (key = magnet_X, value= Magnet or None)
- Return type
{Magnet}
-
convert_to_UD
()¶ Convert the hole to HoleUD
-
save
(save_path='', is_folder=False)¶ Save the object to the save_path
- Parameters
self – A pyleecan object
save_path (str) – path to the folder to save the object
is_folder (bool) – to split the object in different files: separate simulation machine and materials
-
copy
()¶ Return a copy of the class
-
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
-
property
Zh
¶ Number of Hole around the circumference
- Type
int
- Min
0
- Max
1000
-
property
mat_void
¶ Material of the void part of the hole (Air in general)
- Type
Material
-