pyleecan.Classes.LossFEMM module¶
Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/LossFEMM
- class LossFEMM(is_get_meshsolution=False, Tsta=20, Trot=20, type_skin_effect=1, Cp=None, model_index=- 1, model_list=- 1, logger_name='Pyleecan.Loss', model_dict=None, init_dict=None, init_str=None)[source]¶
Bases:
Loss
Loss module dedicated to FEMM developed in https://www.femm.info/wiki/SPMLoss
- VERSION = 1¶
- run()¶
Run the LossFEMM module
- comp_axes(output)¶
Compute the axes required in LossFEMM module
- comp_loss(output, axes_dict)¶
Computing the losses in electrical machines
- Parameters:
output (Output) – an Output object with magnetic quantities previously computed
axes_dict ({axes}) – A dict of axes
- Returns:
out_dict – Dict of output loss and loss density
- Return type:
dict
- comp_loss_density_core(group, coeff_dict)¶
Calculate loss density in iron core given by group “stator core” or “rotor core” assuming power density is given by a Steinmetz model
Pcore = Ph + Pe = k_hy * f^alpha_f * B^alpha_B + k_ed * f^2 * B^2
- Parameters:
self (LossFEMM) – a LossFEMM object
group (str) – Name of part in which to calculate core losses
coeff_dict (dict) – Dict containing coefficient A, B, C, a, b, c to calculate overall losses such as P = A * felec^a + B * felec^b + C * felec^c
- Returns:
Pcore_density (ndarray) – Core loss density function of frequency and elements [W/m3]
freqs (ndarray) – frequency vector [Hz]
- comp_loss_density_joule(group)¶
Calculate joule losses in stator windings
- Parameters:
self (LossFEMM) – a LossFEMM object
group (str) – Name of part in which to calculate joule losses
coeff_dict (dict) – Dict containing coefficient A and B to calculate overall losses such as P = sum(A*f^2 + B*f) + C
- Returns:
Pjoule_density (ndarray) – Joule loss density function of frequency and elements [W/m3]
freqs (ndarray) – frequency vector [Hz]
- comp_loss_density_magnet(group, coeff_dict)¶
Calculate eddy-current losses in rotor permanent magnets assuming power density is given by (cf. https://www.femm.info/wiki/SPMLoss):
Pmag = Jm^2/sigma_m with Jm = -sigma_m*1j*2pi*f*Az + Jc where Jc=<Jm> on the magnet surface
- Parameters:
self (LossFEMM) – a LossFEMM object
group (str) – Name of part in which to calculate magnet losses
- Returns:
Pmagnet_density (ndarray) – Magnet loss density function of frequency and elements [W/m3]
freqs (ndarray) – frequency vector [Hz]
coeff_dict (dict) – Dict containing coefficient A and B to calculate overall losses such as P = sum(A*f + B*f^2)
- 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.
- property is_get_meshsolution¶
True to save loss density map as meshsolution
- Type:
bool
- property Tsta¶
Average stator temperature for Electrical calculation
- Type:
float
- property Trot¶
Average rotor temperature for Electrical calculation
- Type:
float
- property type_skin_effect¶
Skin effect for resistance calculation
- Type:
int
- property Cp¶
proximity loss coefficients
- Type:
float