OutMag (class)

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Output/OutMag

class OutMag(Time=None, Angle=None, B=None, Tem=None, Tem_av=None, Tem_rip_norm=None, Tem_rip_pp=None, Phi_wind_stator=None, Phi_wind=None, emf=None, meshsolution=-1, logger_name='Pyleecan.Magnetics', internal=None, Rag=None, init_dict=None, init_str=None)[source]

Bases: pyleecan.Classes._frozen.FrozenClass

Gather the magnetic module outputs

VERSION = 1
store(out_dict, axes_dict)

Store the standard outputs of Magnetics that are temporarily in out_dict as arrays into OutMag as Data object

Parameters
  • self (OutMag) – the OutMag object to update

  • out_dict (dict) – Dict containing all magnetic quantities that have been calculated in comp_flux_airgap

  • axes_dict ({Data}) – Dict of axes used for magnetic calculation

clean(clean_level=1)

Clean Magnetics standard outputs depending on cleaning level

Parameters
  • self (OutMag) – the OutMag object to update

  • clean_level (int) – Value to indicate which fields to clean in OutMag (default=1/min=0/max=4)

comp_emf()

Compute the Electromotive force [V]

Parameters

self (OutMag) – an OutMag object

get_demag(Hmax, group_name=None)

Get the surface area of the magnets that exceed a given field strenght H

Parameters
  • Hmax (float) – demagnetization field strenght

  • group_name (str) – optional name of the group, default group is ‘rotor magnets’

Returns

  • area (float) – surface area that exceed the max. field strength

  • area_ref (float) – total magnets surface area as a reference

  • indices (list) – list of cells indices that exceed the max. field strength

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

Magnetic time Data object

Type

SciDataTool.Classes.DataND.Data

property Angle

Magnetic position Data object

Type

SciDataTool.Classes.DataND.Data

property B

Airgap flux density VectorField object

Type

SciDataTool.Classes.VectorField.VectorField

property Tem

Electromagnetic torque DataTime object

Type

SciDataTool.Classes.DataND.DataND

property Tem_av

Average Electromagnetic torque

Type

float

property Tem_rip_norm

Peak to Peak Torque ripple normalized according to average torque (None if average torque=0)

Type

float

property Tem_rip_pp

Peak to Peak Torque ripple

Type

float

property Phi_wind_stator

Stator winding flux DataTime object

Type

SciDataTool.Classes.DataTime.DataTime

property Phi_wind

Dict of lamination winding fluxlinkage DataTime objects

Type

{SciDataTool.Classes.DataTime.DataTime}

property emf

Electromotive force DataTime object

Type

SciDataTool.Classes.DataTime.DataTime

property meshsolution

FEA software mesh and solution

Type

MeshSolution

property logger_name

Name of the logger to use

Type

str

property internal

OutInternal object containg outputs related to a specific model

Type

OutInternal

property Rag

Radius value for air-gap computation

Type

float