pyleecan.Classes.OPdq module

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

class OPdq(Id_ref=None, Iq_ref=None, Ud_ref=None, Uq_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 in DQH frame

VERSION = 1
get_Id_Iq()

Return Id and Iq

Parameters:

self (OPdq) – An OPdq object

Returns:

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

Return type:

dict

get_felec(p=None)

Returns the electrical frequency

Parameters:
  • self (OPdq) – An OPdq object

  • p (int) – pole pair number

Returns:

felec – Electrical Frequency [Hz]

Return type:

float

get_N0(p=None)

Returns the Rotor speed

Parameters:
  • self (OPdq) – An OPdq object

  • p (int) – pole pair number

Returns:

N0 – Rotor speed [rpm]

Return type:

float

get_slip()

Returns the Rotor mechanical slip

Parameters:

self (OPdq) – An OPdq object

Returns:

slip – Rotor mechanical slip (0 for synchronous machines)

Return type:

float

get_Ud_Uq()

Return Ud and Uq

Parameters:

self (OPdq) – An OPdq 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 (OPdq) – An OPdq object

Returns:

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

Return type:

dict

set_Ud_Uq(Ud, Uq)

Set the value for Ud and Uq

Parameters:
  • self (OPdq) – An OPdq object

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

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

set_I0_Phi0(I0, Phi0)

Set the value for I0 and IPhi0

Parameters:
  • self (OPdq) – An OPdq object

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

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

get_U0_UPhi0()

Return U0 and UPhi0 :param self: An OPdq object :type self: OPdq

Returns:

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

Return type:

dict

set_U0_UPhi0(U0, UPhi0)

Set the value for U0 and UPhi0 :param self: An OPdq object :type self: OPdq :param U0: U0 value to set [Arms] :type U0: float :param UPhi0: UPhi0 value to set [rad] :type UPhi0: float

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 Id_ref

d-axis current rms value

Type:

float

property Iq_ref

q-axis current rms value

Type:

float

property Ud_ref

d-axis voltage rms value

Type:

float

property Uq_ref

q-axis voltage rms value

Type:

float