InputCurrent (class)

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

class InputCurrent(Is=None, Ir=None, angle_rotor=None, rot_dir=None, angle_rotor_initial=0, Tem_av_ref=None, Id_ref=None, Iq_ref=None, felec=None, time=None, angle=None, Nt_tot=2048, Nrev=1, Na_tot=2048, N0=None, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes.Input.Input

Input to skip the electrical module and start with the magnetic one

VERSION = 1
gen_input()

Generate the input for the magnetic module (electrical output)

Parameters

self (InputCurrent) – An InputCurrent object

set_Id_Iq(I0, Phi0)

Set Id_ref and Iq_ref according to I0, Phi0

Parameters
  • self (InputCurrent) – An InputCurrent object

  • I0 (float) – Current amplitude [Arms]

  • Phi0 (float) – Current phase [rad]

set_OP_from_array(OP_matrix, type_OP_matrix=1, index=0)

Extract the Operating Point from an OP_matrix

Parameters
  • self (InputCurrent) – An InputCurrent object

  • OP_matrix (ndarray) – Operating Point matrix (cf VarLoadCurrent)

  • type_OP_matrix (int) – Select which kind of OP_matrix is used 0: (N0,I0,Phi0,T,P), 1:(N0,Id,Iq,T,P)

  • index (int) – To select the line of the OP_matrix to use (default=0)

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 Is

Stator currents as a function of time (each column correspond to one phase) to import

Type

ImportMatrix

property Ir

Rotor currents as a function of time (each column correspond to one phase) to import

Type

ImportMatrix

property angle_rotor

Rotor angular position as a function of time (if None computed according to Nr) to import

Type

Import

property rot_dir

Rotation direction of the rotor 1 trigo, -1 clockwise

Type

float

Min

-1

Max

1

property angle_rotor_initial

Initial angular position of the rotor at t=0

Type

float

property Tem_av_ref

Theorical Average Electromagnetic torque

Type

float

property Id_ref

d-axis current RMS magnitude

Type

float

property Iq_ref

q-axis current RMS magnitude

Type

float

property felec

electrical frequency

Type

float