pyleecan.Classes.EEC module¶
Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/EEC
- class EEC(type_skin_effect=1, OP=None, Tsta=20, Trot=20, Xkr_skinS=1, Xke_skinS=1, Xkr_skinR=1, Xke_skinR=1, R1=None, fluxlink=None, init_dict=None, init_str=None)[source]¶
Bases:
FrozenClass
Equivalent Electrical Circuit abstract class
- VERSION = 1¶
- get_machine_from_parent()¶
Get machine object from parent
- comp_R1(R1_ref=None, T_ref=None)¶
Compute the stator phase resistance for the equivalent electrical circuit
- Parameters:
self (EEC) – an EEC object
R1_ref (float) – reference resistance
T_ref (float) – reference temperature
- comp_skin_effect()¶
Compute the skin effect factors (update value in object)
- Parameters:
self (EEC) – An EEC objects
- comp_parameters()¶
Compute and set the parameter attributes of the EEC that are not set.
- Parameters:
self (EEC) – an EEC object
- update_from_ref(LUT_ref)¶
Compute and set the parameter attributes of the EEC from a reference LUT
- solve()¶
Compute the parameters dict for the equivalent electrical circuit
- Parameters:
self (EEC) – an EEC object
- Returns:
out_dict – Dict containing all magnetic quantities that have been calculated in EEC
- Return type:
dict
- solve_PWM(output)¶
Get stator current harmonics due to PWM harmonics
- comp_joule_losses(out_dict, machine)¶
Compute the electrical Joule losses
- comp_fluxlinkage(machine=None, OP=None, Nt_tot=None)¶
Compute flux linkage using magnetic model in self.fluxlink
- 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 type_skin_effect¶
Skin effect for resistance and inductance
- Type:
int
- property OP¶
Operating Point
- Type:
OP
- property Tsta¶
Average stator temperature for operational EEC calculation
- Type:
float
- property Trot¶
Average rotor temperature for operational EEC calculation
- Type:
float
- property Xkr_skinS¶
Skin effect coefficient for resistances at stator side
- Type:
float
- property Xke_skinS¶
Skin effect coefficient for inductances at stator side
- Type:
float
- property Xkr_skinR¶
Skin effect coefficient for resistances at rotor side
- Type:
float
- property Xke_skinR¶
Skin effect coefficient for inductances at rotor side
- Type:
float
- property R1¶
Stator phase resistance
- Type:
float
- property fluxlink¶
Magnetic model for flux linkage calculation
- Type:
Magnetics