Error using CoilSolver

Numerical methods and mathematical models of Elmer
virnaco
Posts: 10
Joined: 29 Feb 2024, 03:03
Antispam: Yes

Re: Error using CoilSolver

Post by virnaco »

Hi kevinarden,

Thank you very much for the link! I'm using it to study, however now I am facing another problem.
I'm using FEMM software to compare results with Elmer, in order to better understand the software. I applied 30000A to the FEMM and obtained a current density equal to 150*10^6A/m2 and a flux density equal to 1.45T. However, I am observing flux density of up to 50000A/m2 in Elmer, it is not linear throughout the coil, and flux density is not correct as well (I am using the VTK post processor). The current observed in VTK is ok 30000A.

Could you tell me what I could be doing wrong?
Attachments
CurrentDensity_FEMM.png
(50.48 KiB) Not downloaded yet
CurrentDensity_Elmer.png
(46.37 KiB) Not downloaded yet
case.sif
(4.83 KiB) Downloaded 10 times
virnaco
Posts: 10
Joined: 29 Feb 2024, 03:03
Antispam: Yes

Re: Error using CoilSolver

Post by virnaco »

Sorry, I forgot to attach the FEMM and UNV files.
Attachments
Teste_Indutor.unv
(349.38 KiB) Downloaded 8 times
Indutor2D_FEMM.rar
(1.13 KiB) Downloaded 8 times
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Error using CoilSolver

Post by kevinarden »

There have been several successful comparisons of FEMM and Elmer. However, it is difficult for many reasons. Units are usually a concern, although Elmer is unitless by programming, including constants and material values means units matter. You are also comparing 2D FEMM to 3D Elmer, Elmer usually does values by volume in 3D, whereas in 2d things would be per area.

The last time I did FEMM Elmer comparisons, I felt like the results were acceptable

https://github.com/mrkearden/mag2D3D
virnaco
Posts: 10
Joined: 29 Feb 2024, 03:03
Antispam: Yes

Re: Error using CoilSolver

Post by virnaco »

Hello kevinarden,

Sorry for the delay in responding here again, but I was working on my simulation, following your suggestions. By the way, thanks for the tips!
I'm now unsure how to apply the current value I need to the coil. After reading several posts on this forum, I used body force and component as indicated below:

Body Force 1
Name = "Current"
Current Density 1 = Equals "CoilCurrent e 1"
Current Density 2 = Equals "CoilCurrent e 2"
Current Density 3 = Equals "CoilCurrent e 3"
End

Component 1
Name = String "Coil1"
Coil Type = String "Stranded"
Master Bodies(1) = Integer 2
Desired Current Density = Real 30000
Coil Normal(3) = Real 0. 0. 1.
End

However, I obtained the current value equal to the current density value, which is not correct for my reactor which has a sectional area equal to 2m2.
What is the correct way to do it? I would like to apply 30000A and I would have to check the current density at VTK or Paraview equal to 15000A/m2.

I have attached the SIF file.
Attachments
case.sif
(5.61 KiB) Downloaded 7 times
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Error using CoilSolver

Post by kevinarden »

In the manual page 171 there is a solver flag
Desired Coil Current
https://www.nic.funet.fi/pub/sci/physic ... Manual.pdf
So you could take off the body force and use Desired Coil Current
See test case
https://github.com/ElmerCSC/elmerfem/tr ... oilSolver1
virnaco
Posts: 10
Joined: 29 Feb 2024, 03:03
Antispam: Yes

Re: Error using CoilSolver

Post by virnaco »

Hello Kevinarden,

Thanks for sending the links. I analyzed the test case you sent me and realized that it is a 2D example with analysis of some current variables.
I apologize, as I forgot to inform you that I am trying to simulate a 3D reactor. I want to apply 30000A to the coil and would like to have as a result the variables of magnetic flux density, magnetic flux strength and current density (as the sectional area of my coil is 2m2, the current density should be 15000A/m2).
I tried to simulate following the information you gave me, or at least what I understood. I removed body force and used Desired Coil Current inside the Coil solver.
The result I obtained showed current equal to 14000A and other variables magnetic flux density, magnetic flux strength and current density equal to zero.

Could you please help me try to solve this problem again?
Please find attached the files for this simulation.
Attachments
3D Reactor.zip
(129.08 KiB) Downloaded 8 times
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Error using CoilSolver

Post by kevinarden »

I made these changes
case.sif
(5.39 KiB) Downloaded 11 times
magf.png
magf.png (179.84 KiB) Viewed 370 times
virnaco
Posts: 10
Joined: 29 Feb 2024, 03:03
Antispam: Yes

Re: Error using CoilSolver

Post by virnaco »

Dear Kevinarden,

Thanks again for continuing to help me! I feel like I'm progressing in my learning, but there are still doubts that I would like to resolve.

When I simulated the SIF file you sent me, magnetic flux density, magnetic flux strength values appeared! Which is already an evolution! However, I verified that the current value in the coil is equal to the current density (15000A and 15000A/m2). As the cross section of the coil area is equal to 2m2, the current value should be twice the current density, that is, current should be 30000A and current density should be 15000A/m2. Could it be due to the body force being "Current Density i = Equals "CoilCurrent e i"? How could I get it right?

Another problem I'm seeing is in relation to the magnetic flux density value. Please see in the attached file that the FEMM simulation obtained a much lower value than in Elmer, even though the current is 30000A in FEMM and 15000A in Elmer (due to the problem mentioned above).
Could you please tell me what I'm doing wrong and how I could get it right?

Best regards,
Attachments
Indutor2D_m.zip
FEMM file
(856 Bytes) Downloaded 5 times
Reactor_results.pdf
(277.8 KiB) Downloaded 10 times
kevinarden
Posts: 2316
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Error using CoilSolver

Post by kevinarden »

I may have mixed up the coil and the core in my sif, need to verify the bodies.
Also use the elemental results, the ones ending in e.
Post Reply