Hello all,
I try to use Elmer to calculate force on a plunger in a coil.
I have a closed coil to simplify my study but I can't find a way to used correctly the coilsolver.
I'am on Windows 7 and I use the Elmer compiled version 8.2 found here:
https://sourceforge.net/projects/elmerfem/
I use the coilsolver found here:
viewtopic.php?f=3&t=4086&p=14380&hilit=coil#p14380
I read paragraph 26.3 of the elmer solver manual but unfortunately I can't make it works on Elmer.
On my case.sif, I have 3 domains, air, iron, copper.
I configure magnetic equation with Mgdyn on body 1 and 2 and a current equation on body 3 with MgDyn and
Coilsolver.
I don't understand what to configure in body force for domain 3.
I read forum on fivecoils in which the current source are configured as following:
Current Density 1 = Equals "CoilCurrent e 1"
Current Density 2 = Equals "CoilCurrent e 2"
Current Density 3 = Equals "CoilCurrent e 3"
But where "CoilCurrent e 1" comes from?
I joined to this mail the .sif
I joined also the xml.
Thanks for help.
Regards
Cédric.
Closed coil with core simulation
Closed coil with core simulation
 Attachments

 egproject.xml
 (220.58 KiB) Downloaded 92 times

 case.sif
 (4.09 KiB) Downloaded 91 times

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
I could spend some time working on this but I would need the Elmer Mesh Files.
Kevin
Kevin
Re: Closed coil with core simulation
Hello,
Thanks for your reply.
So I've made two simulation to try to find a solution.
The first one is coil_version1, the same as before with coilsolver.
The second one is an opened coil to have two surfaces on which I can inject current in this case, I use static current solver and it's working but not the magnetic field solver....I think the body force for the magnetic field solver is the problem...I read some post on this subject trying to use current densities ="Equals Volume current 1" or electric potential "electric potential = Equals PotentialA" but in the two case, Av is always equals to zero....
All can be found here:
https://www.transfernow.net/80ksd5s1ulfx
Hope you will succeed to transfer the files and help me.....
Thanks for your support.
Regards.
Thanks for your reply.
So I've made two simulation to try to find a solution.
The first one is coil_version1, the same as before with coilsolver.
The second one is an opened coil to have two surfaces on which I can inject current in this case, I use static current solver and it's working but not the magnetic field solver....I think the body force for the magnetic field solver is the problem...I read some post on this subject trying to use current densities ="Equals Volume current 1" or electric potential "electric potential = Equals PotentialA" but in the two case, Av is always equals to zero....
All can be found here:
https://www.transfernow.net/80ksd5s1ulfx
Hope you will succeed to transfer the files and help me.....
Thanks for your support.
Regards.

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
I was able to transfer the files so I will start taking a look.

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
First thoughts are the mesh is too coarse for meaningful results. Would suggest try to do a 2D case or asymmetric before tackling 3D. You may be interested in this post which extends a magnetic field tutorial to magnetic force and applying the force to a body.
viewtopic.php?f=3&t=6939
viewtopic.php?f=3&t=6939

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
Hello,
Thanks for your reply.
I've tried with a finer mesh same results Av always at 0....
Before trying 3D I've done the same simulation in 2D with Femm which is easier to use and I succeed to get forces but unfortunately my problem is not axisymmetric that's why I try Elmer. My problem is already a simplified problem. What I can't understand is that I've already done 3D thermal simulation with Elmer and all was fine but now with magnetic problem I'm stuck at this point:
 I have resumed the boundaries of my problem which is only made of three very simples parts (air, iron and copper) in the attached picture.
 With these boundaries Statcurrentsolver is doing is job (I suppose...) see result in the attached picture.
 My current is not divergence free so Elmer calculate Jfix but Av is at 0. How to have a divergence free current because I'm obliged to have input and output in the coil? Is the fact that my current is not divergence free that gives Av=0?
 Can Elmer solve this problem ?
I read your posts on magnetic force on a plate but my problem is slightly different as I've current and no magnet, the central part is only made of iron.
Link to the files of my problem:
https://www.transfernow.net/34c775c1vuij
Thanks
Regards.
Thanks for your reply.
I've tried with a finer mesh same results Av always at 0....
Before trying 3D I've done the same simulation in 2D with Femm which is easier to use and I succeed to get forces but unfortunately my problem is not axisymmetric that's why I try Elmer. My problem is already a simplified problem. What I can't understand is that I've already done 3D thermal simulation with Elmer and all was fine but now with magnetic problem I'm stuck at this point:
 I have resumed the boundaries of my problem which is only made of three very simples parts (air, iron and copper) in the attached picture.
 With these boundaries Statcurrentsolver is doing is job (I suppose...) see result in the attached picture.
 My current is not divergence free so Elmer calculate Jfix but Av is at 0. How to have a divergence free current because I'm obliged to have input and output in the coil? Is the fact that my current is not divergence free that gives Av=0?
 Can Elmer solve this problem ?
I read your posts on magnetic force on a plate but my problem is slightly different as I've current and no magnet, the central part is only made of iron.
Link to the files of my problem:
https://www.transfernow.net/34c775c1vuij
Thanks
Regards.
 Attachments

 3D_magnetic_problem.jpg
 (59.93 KiB) Not downloaded yet

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
I looked at one of the examples of far field 3D boundary conditions for magnetism and it was
Boundary Condition 1
Target Boundaries(6) = 17 18 19 20 21 22
Name = "Infinity"
AV {e} 3 = Real 0
AV {e} 2 = Real 0
AV {e} 1 = Real 0
AV {e} = Real 0
End
Boundary Condition 1
Target Boundaries(6) = 17 18 19 20 21 22
Name = "Infinity"
AV {e} 3 = Real 0
AV {e} 2 = Real 0
AV {e} 1 = Real 0
AV {e} = Real 0
End

 Posts: 812
 Joined: 25 Jan 2019, 01:28
 Antispam: Yes
Re: Closed coil with core simulation
With this sif I get a magnetic field force and nodal forces
Re: Closed coil with core simulation
Hello Kevin,
Thank you very much for your help.
My mistake was to think that if AV=0 the solver was not able to find a solution.
I still not understand why AV is nul, I suppose that this is due to my current which is not divergence free so it creates Jfix and solve the problem,
Is this true?
So I've simulated again the file I've sent to you and effectively there is a magnetic field!
The main difference with your simulation is the fact that a have two equations, one for magnetic field in air and iron and another on copper only,
maybe the simulation is faster because in my case the statcurrent solver is only on copper...
Now I will try to close the loop in order to have a simetric field.
I will suppress the statcurrent solver and impose the current density in the loop or try the coilsolver, I will give you feedback asap...
Thanks.
Regards.
Thank you very much for your help.
My mistake was to think that if AV=0 the solver was not able to find a solution.
I still not understand why AV is nul, I suppose that this is due to my current which is not divergence free so it creates Jfix and solve the problem,
Is this true?
So I've simulated again the file I've sent to you and effectively there is a magnetic field!
The main difference with your simulation is the fact that a have two equations, one for magnetic field in air and iron and another on copper only,
maybe the simulation is faster because in my case the statcurrent solver is only on copper...
Now I will try to close the loop in order to have a simetric field.
I will suppress the statcurrent solver and impose the current density in the loop or try the coilsolver, I will give you feedback asap...
Thanks.
Regards.