Difference between Circuit and MagnetoDynamics currents

Numerical methods and mathematical models of Elmer
Post Reply
mr_monkey
Posts: 17
Joined: 20 Jan 2023, 18:41
Antispam: Yes

Difference between Circuit and MagnetoDynamics currents

Post by mr_monkey »

Hi,

I am trying to calculate currents induced in individual conductors in an electric motor (similar to this forum post).

But I am getting a mismatch between the Component currents calculated by the CircuitsAndDynamics solver and the currents I calculate by integrating `current density e` over the conductor bodies.

The Component currents look somewhat reasonable and add up to the total current I put into the model:
component_currents.png
component_currents.png (78.79 KiB) Viewed 267 times
The currents calculated by integration are different and oscillate wildy:
fea_currents.png
fea_currents.png (89.73 KiB) Viewed 267 times
I have tried this on a simplified case with just a few conductors and no other parts of the motor and the currents calculated by both different methods were the same.

Are there maybe any convergence settings that need tweaking? Or is there something more fundamentally wrong with my model setup.

I have attached the case setup in the zip file. Any input would be much appreciated.
Attachments
ac_loss_elmer.zip
(791.15 KiB) Downloaded 9 times
mr_monkey
Posts: 17
Joined: 20 Jan 2023, 18:41
Antispam: Yes

Re: Difference between Circuit and MagnetoDynamics currents

Post by mr_monkey »

This is a diagram of the circuit:
circuit.png
(368.18 KiB) Not downloaded yet
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Difference between Circuit and MagnetoDynamics currents

Post by raback »

Hi

Wow, what a circuit! Do you have some tool for building it?

pdf2 is not the most stable time-integration scheme. Maybe you can try 1st order.

-Peter
mr_monkey
Posts: 17
Joined: 20 Jan 2023, 18:41
Antispam: Yes

Re: Difference between Circuit and MagnetoDynamics currents

Post by mr_monkey »

raback wrote: 06 Feb 2024, 18:54 Wow, what a circuit! Do you have some tool for building it?
I have used elmer_circuitbuilder to create the circuit. It is fairly straightforward using that. Just requires modifying the circuits.definition file afterwards to put the time varying currents in.

Plotting the circuit was done using pydot, which uses graphviz as a backend. Again, that's pretty straightforward once the circuit has been created.
raback wrote: 06 Feb 2024, 18:54 pdf2 is not the most stable time-integration scheme. Maybe you can try 1st order.
Well, that was an easy fix. The currents are matching after changing the timestepping order to 1. Thanks a lot.
raback
Site Admin
Posts: 4832
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Difference between Circuit and MagnetoDynamics currents

Post by raback »

Hi, Maybe you can share the improved comparison as well. -Peter
mr_monkey
Posts: 17
Joined: 20 Jan 2023, 18:41
Antispam: Yes

Re: Difference between Circuit and MagnetoDynamics currents

Post by mr_monkey »

Sure, it is a bit tricky to visualise, since there's so many lines and no visible difference anymore, but I gave it a shot:

Individual currents (Left: Circuit Components, Right: FEA surface integral):
currents_comparison.png
(341.42 KiB) Not downloaded yet
Sum of all currents:
currents_sum_comparison.png
currents_sum_comparison.png (34.23 KiB) Viewed 196 times
vencels
Posts: 66
Joined: 20 Sep 2016, 17:05
Antispam: Yes
Location: Latvia
Contact:

Re: Difference between Circuit and MagnetoDynamics currents

Post by vencels »

Hi,
It looks that we are having the same problem
https://www.elmerfem.org/forum/viewtopic.php?t=8238

How do you excite your coils - voltage or current?
mr_monkey
Posts: 17
Joined: 20 Jan 2023, 18:41
Antispam: Yes

Re: Difference between Circuit and MagnetoDynamics currents

Post by mr_monkey »

vencels wrote: 12 Feb 2024, 14:25 How do you excite your coils - voltage or current?
My coils are current excited. I haven't tried voltage excitation.

My problem was fixed by switching

Code: Select all

BDF Order
from 2 to 1. Have you tried using BDF with order 1 for your case?
vencels
Posts: 66
Joined: 20 Sep 2016, 17:05
Antispam: Yes
Location: Latvia
Contact:

Re: Difference between Circuit and MagnetoDynamics currents

Post by vencels »

This does not make a difference in my case. Changing time-stepping schemes worked for cases with lower frequency, but this high-freq still has these oscillations. Making smaller timesteps seems to make things even words.
Screenshot_1.png
Screenshot_1.png (108.09 KiB) Viewed 175 times
Post Reply