Input (class)

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

class Input(time=None, angle=None, Nt_tot=2048, Nrev=1, Na_tot=2048, N0=None, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes._frozen.FrozenClass

Starting data of the simulation

VERSION = 1
gen_input()

Generate the input for the electrical module (time/space discretization)

Parameters

self (Input) – An Input object

comp_axes(machine, N0=None)

Compute simulation axes, i.e. space DataObject including (anti)-periodicity and time DataObject including (anti)-periodicity and accounting for rotating speed and number of revolutions

Parameters
  • self (Input) – an Input object

  • machine (Machine) – a Machine object

  • N0 (float) – rotating speed [rpm]

Returns

  • Time (DataLinspace) – Time axis including (anti)-periodicity and accounting for rotating speed and number of revolutions

  • Angle (DataLinspace) – Angle axis including (anti)-periodicity

comp_felec()

Compute the electrical frequency

Parameters

felec (float) – Electrical frequency [Hz]

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 time

Electrical time vector (no symmetry) to import

Type

ImportMatrix

property angle

Electrical position vector (no symmetry) to import

Type

ImportMatrix

property Nt_tot

Time discretization

Type

int

Min

1

property Nrev

Number of rotor revolution (to compute the final time)

Type

float

Min

0

property Na_tot

Angular discretization

Type

int

Min

1

property N0

Rotor speed

Type

float