pyleecan.Classes.OPslip module

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

class OPslip(I0_ref=None, IPhi0_ref=None, slip_ref=0, U0_ref=None, UPhi0_ref=None, N0=None, felec=None, Tem_av_ref=None, Pem_av_ref=None, Pem_av_in=None, efficiency=None, init_dict=None, init_str=None)[source]

Bases: OP

Operating Point defined with slip, I0

VERSION = 1
get_Id_Iq()

Return Id and Iq

Parameters:

self (OPslip) – An OPslip object

Returns:

I_dict – Dict with key “Id”, “Iq”

Return type:

dict

get_felec(p=None)

Returns the electrical frequency

Parameters:
  • self (OPslip) – An OPslip object

  • p (int) – pole pair number

Returns:

felec – Electrical Frequency [Hz]

Return type:

float

get_N0(p=None)

Returns the Rotor speed

Parameters:
  • self (OPslip) – An OPslip object

  • p (int) – pole pair number

Returns:

N0 – Rotor speed [rpm]

Return type:

float

get_Ud_Uq()

Return Ud and Uq

Parameters:

self (OPslip) – An OPslip object

Returns:

U_dict – Dict with key “Ud”, “Uq”

Return type:

dict

set_Id_Iq(Id, Iq)

Set the value for Id and Iq

Parameters:
  • self (OPdq) – An OPdq object

  • Id (float) – Id value to set [Arms]

  • Iq (float) – Iq value to set [Arms]

get_I0_Phi0()

Return I0 and Phi0

Parameters:

self (OPslip) – An OPslip object

Returns:

I_dict – Dict with key “I0”, “Phi0”

Return type:

dict

get_slip()

Returns the Rotor mechanical slip

Parameters:

self (OPslip) – An OPslip object

Returns:

slip – Rotor mechanical slip

Return type:

float

set_I0_Phi0(I0, Phi0)

Set the value for I0 and IPhi0

Parameters:
  • self (OPslip) – An OPslip object

  • I0 (float) – I0 value to set [Arms]

  • Phi0 (float) – IPhi0 value to set [rad]

set_Ud_Uq(Ud, Uq)

Set the value for Ud and Uq

Parameters:
  • self (OPdq) – An OPdq object

  • Ud (float) – Ud value to set [Arms]

  • Uq (float) – Uq value to set [Arms]

get_U0_UPhi0()

Return U0 and UPhi0

Parameters:

self (OPdq) – An OPdq object

Returns:

U_dict – Dict with key “U0”, “UPhi0”

Return type:

dict

set_U0_UPhi0(U0, UPhi0)

Set the value for I0 and IPhi0

Parameters:
  • self (OPslip) – An OPslip object

  • U0 (float) – U0 value to set [Arms]

  • UPhi0 (float) – UPhi0 value to set [rad]

save(save_path='', is_folder=False, type_handle_old=2, type_compression=0)

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 (json only)

  • type_handle_old (int) – How to handle old file in folder mode (0:Nothing, 1:Delete, 2:Move to “Backup” folder)

  • type_compression (int) – Available only for json, 0: no compression, 1: gzip

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', ignore_list=None, is_add_value=False)[source]

Compare two objects and return list of differences

as_dict(type_handle_ndarray=0, keep_function=False, **kwargs)[source]

Convert this object in a json serializable dict (can be use in __init__). type_handle_ndarray: int

How to handle ndarray (0: tolist, 1: copy, 2: nothing)

keep_functionbool

True to keep the function object, else return str

Optional keyword input parameter is for internal use only and may prevent json serializability.

copy()[source]

Creates a deepcopy of the object

property I0_ref

Current rms value

Type:

float

property IPhi0_ref

Current phase

Type:

float

property slip_ref

Rotor mechanical slip

Type:

float

property U0_ref

stator voltage (phase to neutral)

Type:

float

property UPhi0_ref

Voltage phase

Type:

float