Eomys / pyleecan

Electrical engineering open-source software providing a user-friendly, unified, flexible simulation framework for the multiphysic design and optimization of electrical machines and drives
https://www.pyleecan.org
Apache License 2.0
152 stars 127 forks source link

[BC] FEMM periodicity #301

Open RaphaelPile opened 3 years ago

RaphaelPile commented 3 years ago

Hello everyone,

I have found a bug related to FEMM periodicity thanks to the test "test_FEMM_periodicity". It is particularly obvious on the tangential component of the AGSF (see image below), but it is also existing on the tangential component of the magnetic flux density. It looks like the issue appears when no periodicity is considered. I am going to investigate this and put my findings for the record, so people working on new Magnetic models might avoid similar issues.

image

I could think of several possibilities:

If you have other ideas in mind, feel free to propose them.

Best regards,

Raphaël

RaphaelPile commented 3 years ago

Update:

The test itself is now working, but there is still a strange behaviour when running test_FEMM_periodicity_angle in test_FEMM_periodicity.py.

If I set Nt_tot = 2*9 in InputCurrent, everything work correctly except the torque: FEMM_periodicity_angle_Tem_time

The problem disappears if I set Nt_tot = 4*9 : FEMM_periodicity_angle_Tem_time

Since the time periodicity is desactivated in this unit test I have really no idea of the problem.