Slot (class)

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Slot/Slot

class Slot(Zs=36, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes._frozen.FrozenClass

Generic class for slot (abstract)

VERSION = 1
build_geometry_active(Nrad, Ntan, is_simplified=False, alpha=0, delta=0)

Split the slot active area in several zone This method assume that the active area is centered on X axis and symetrical Otherwise a dedicated build_geometry_active method must be provided

Parameters
  • self (Slot) – A Slot object

  • Nrad (int) – Number of radial layer

  • Ntan (int) – Number of tangentiel layer

  • is_simplified (bool) – boolean to specify if coincident lines are considered as one or different lines (Default value = False)

  • alpha (float) – Angle for rotation (Default value = 0) [rad]

  • delta (Complex) – complex for translation (Default value = 0)

Returns

List of surface delimiting the active zone

Return type

surf_list

build_geometry_half_tooth(is_top=False, alpha=0, delta=0)

Build the geometry of a Half Tooth

Parameters
  • self (LamSlot) – a LamSlot object

  • is_top (bool) – To select the part of the tooth (X>0 or X <0)

  • alpha (float) – Angle for rotation [rad]

  • delta (complex) – Complex value for translation

Returns

surf_list – list of surfaces needed to draw the half tooth including slot base

Return type

list

check()

Check that the Slot object is correct

Parameters

self (Slot) – A Slot object

Returns

Return type

None

comp_angle_active_eq()

Compute the equivalent angle of the active part of the slot (Ideal polar shape with the same surface and height)

Parameters

self (Slot) – A Slot object

Returns

alpha – Average angle of the slot [rad]

Return type

float

comp_angle_opening()

Compute the average opening angle of the Slot

Parameters

self (Slot) – A Slot object

Returns

alpha – Average opening angle of the slot [rad]

Return type

float

comp_height(Ndisc=200)

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

Parameters
  • self (Slot) – A Slot object

  • Ndisc (int) – Number of point to discretize the lines

Returns

Htot – Height of the slot [m]

Return type

float

comp_height_active(Ndisc=200)

Compute the height of the active area

Parameters
  • self (Slot) – A Slot object

  • Ndisc (int) – Number of point to discretize the lines

Returns

Hwind – Height of the active area [m]

Return type

float

comp_height_opening(Ndisc=200)

Compute the height of the opening area (Hslot - Hactive)

Parameters
  • self (Slot) – A Slot object

  • Ndisc (int) – Number of point to discretize the lines

Returns

Hwind – Height of the opening area [m]

Return type

float

comp_radius()

Compute the radius of the min and max circle that contains the slot

Parameters

self (Slot) – A Slot object

Returns

(Rmin,Rmax) – Radius of the circle that contains the slot [m]

Return type

tuple

comp_radius_mid_active()

Compute the radius at the middle of the active part of the slot

Parameters

self (Slot) – A Slot object

Returns

Rmw – Mid active radius [m]

Return type

float

comp_surface(Ndisc=200)

Compute the Slot total surface (by numerical computation). Caution, the bottom of the Slot is an Arc

Parameters
  • self (Slot) – A Slot object

  • Ndisc (int) – Number of point to discretize the lines

Returns

S – Slot total surface [m**2]

Return type

float

comp_surface_active(Ndisc=200)

Compute the Slot active surface (by numerical computation). Caution, the bottom of the Slot is an Arc

Parameters
  • self (Slot) – A Slot object

  • Ndisc (int) – Number of point to discretize the lines

Returns

S – Slot total surface [m**2]

Return type

float

comp_width_opening()

Compute the average opening width of the Slot

Parameters

self (Slot) – A Slot object

Returns

W0 – Average opening width of the slot [m]

Return type

float

get_is_stator()

Return True if the parent lamination is stator and False if is a rotor

Parameters

self (Slot) – A Slot object

Returns

is_stator – True if the Lamination is a stator and False if not

Return type

bool

get_name_lam()

Return the name of the parent lamination

Parameters

self (Slot) – A Slot object

Returns

name – The name of the parent lamination

Return type

string

get_Rbo()

Return the parent lamination bore radius

Parameters

self (Slot) – A Slot object

Returns

Rbo – The parent lamination bore radius [m]

Return type

float

get_surface()

Returns the surface delimiting the slot

Parameters

self (Slot) – A Slot object

Returns

surface – A SurfLine object representing the slot

Return type

SurfLine

get_surface_tooth()

Returns the surface delimiting the tooth (including yoke part)

Parameters

self (Slot) – A Slot object

Returns

surface – A SurfLine object representing the slot

Return type

SurfLine

is_outwards()

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

Parameters

self (Slot) – A Slot object

Returns

is_outwards – True if the Lamination is not internal and false if not

Return type

bool

plot(fig=None, ax=None)

Plot the Slot in a matplotlib fig

Parameters
  • self (Slot) – A Slot object

  • fig – if None, open a new fig and plot, else add to the current one (Default value = None)

Returns

Return type

None

plot_active(wind_mat=None, fig=None, is_bar=False, is_show_fig=True, enforced_default_color=None, alpha=0, delta=0)

Plot the active area of the lamination according to the wind_mat

Parameters
  • self (Slot) – A Slot object

  • wind_mat (numpy.ndarray) – A matrix [Nrad,Ntan,Zs,qs] representing the active (Default value = None)

  • fig – if None, open a new fig and plot, else add to the current one (Default value = None)

  • is_bar (bool) – To adapt the legend text for squirrel cage bar (Default value = False)

  • is_show_fig (bool) – To call show at the end of the method

  • enforced_default_color (str) – If not None enforce the active color (when wind_mat is None)

  • alpha (float) – Angle for rotation (Default value = 0) [rad]

  • delta (Complex) – complex for translation (Default value = 0)

Returns

Return type

None

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(**kwargs)

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

compare(other, name='self')[source]

Compare two objects and return list of differences

as_dict(**kwargs)[source]

Convert this object in a json serializable dict (can be use in __init__). Optional keyword input parameter is for internal use only and may prevent json serializability.

property Zs

slot number

Type

int

Min

0

Max

1000