Output (class)

Warning : this file has been generated, you shouldn’t edit it

class Output(simu=-1, path_res='', geo=-1, elec=-1, mag=-1, struct=-1, post=-1, init_dict=None)[source]

Bases: pyleecan.Classes.frozen.FrozenClass

Main Output object: gather all the outputs of all the modules

VERSION = 1
get_BH_stator()

Return the B(H) curve of the stator material

Parameters:self (Output) – an Output object
Returns:BH – B(H) values (two colums matrix: H and B(H))
Return type:numpy.ndarray
get_BH_rotor()

Return the B(H) curve of the rotor material

Parameters:self (Output) – an Output object
Returns:BH – B(H) values (two colums matrix: H and B(H))
Return type:numpy.ndarray
get_path_result()

Return the path to the result folder. If there is a name for the simulation, the path leads to a sub-folder of ‘Results’ folder which has the same name. If this sub-folder does not exist, it creates it.

Parameters:self (Output) – an Output object
Returns:res_path – path to the result folder
Return type:str
get_angle_rotor()

Return the angular position of the rotor as a function of time

Parameters:self (Output) – an Output object
Returns:alpha_rotor – angular position of the rotor as a function of time (vector) [rad]
Return type:numpy.ndarray
plot_B_space(j_t0=0, is_deg=True, out_list=[])

Plot the airgap flux as a function of space

Parameters:
  • self (Output) – an Output object
  • j_t0 (int) – Index of the time vector to plot
  • is_deg (bool) – True to plot in degree, False in rad
  • out_list (list) – List of Output object to compare
plot_force_space(j_t0=0, is_deg=True, out_list=[])

Plot the airgap surface forces as a function of space

Parameters:
  • self (Output) – an Output object
  • j_t0 (int) – Index of the time vector to plot
  • is_deg (bool) – True to plot in degree, False in rad
  • out_list (list) – List of Output object to compare
plot_mesh_field(j_t0=0, nodes=None, connectivity=None, field=None, title='Magnetic field amplitude B')

Display field amplitude per element

Parameters:
  • self (Output) – an Output object
  • j_t0 (int) – Index of the time vector to plot
  • nodes (ndarray) – Nodes coordinates (2D)
  • connectivity (ndarray) – Connectivity matrix (3 nodes per element)
  • field (ndarray) – Column vector with the field to be displayed
save(save_path='')

Save the object to the save_path

Parameters:
  • self – A pyleecan object
  • save_path (str) – path to the folder to save the object
as_dict()[source]

Convert this objet in a json seriable dict (can be use in __init__)

simu

Simulation object that generated the Output

path_res

Path to the folder to same the results

geo

Geometry output

elec

Electrical module output

mag

Magnetic module output

struct

Structural module output

post

Post-Processing settings