Page 1 of 2

magnetic field of a permanent magnet in 3D

Posted: 24 Nov 2020, 08:55
by emmy.t
I'm trying to simulate the magnetic field of a permanent magnet in 3D.
I used elmerGUI tutorial 8: Magnetostatics-Magnetic field resulting from a permanent magnet as a reference, and tried to apply in 3D, but it doesn't work and couldn't see magnetic field in paraview.
if you find some mistakes or have tips, please let me know.

thank you.

Re: magnetic field of a permanent magnet in 3D

Posted: 24 Nov 2020, 12:53
by raback
Hi

At least it would be advisable to solve the postprocessing fields after the vector potential is computed. I.e. change order of solvers 1 and 2.

-Peter

Re: magnetic field of a permanent magnet in 3D

Posted: 24 Nov 2020, 13:38
by kevinarden
In log text it says Equation 2 is not used in any body, the body enteries use Equation 1

In the sif

Equation 1
Name = "Equation 3"
Active Solvers(1) = 2
End

Equation 2
Name = "Equation 5"
Active Solvers(1) = 1
End

There should only be 1 equation, with both solvers being active.

Equation 1
Name = "Equation 3"
Active Solvers(2) = 1 2
End

If you built this in the GUI only add one equation, go to each tab for the solvers and active each one.

Re: magnetic field of a permanent magnet in 3D

Posted: 25 Nov 2020, 05:34
by emmy.t
Thank you, Peter and Kevin.

I changed a little, there is one equation with active two solvers, and checked the order of these solvers. However the result hasn't changed, still I get zero magnetic field in the entire model.

In the tutorial 8, set boundary condition "farfield" to the outer circle.
how should I set boundary condition in this model?

Re: magnetic field of a permanent magnet in 3D

Posted: 25 Nov 2020, 11:10
by raback
Hi

The best you can set for farfield is have the vector potential be zero. The vector potential is only defined at the direction of the edges so funnily you cannot define the vector potential for a sphere in the normal direction at all. Hence there is easily not a similar BC as for 2D.

-Peter

Re: magnetic field of a permanent magnet in 3D

Posted: 25 Nov 2020, 12:39
by kevinarden
This has worked for me in 3D

Boundary Condition 1
Target Boundaries(1) = 2
Name = "FarField"
AV {e} = 0.0
End

Re: magnetic field of a permanent magnet in 3D

Posted: 30 Nov 2020, 09:20
by emmy.t
tried some changes of target boundaries and then the BC (AV=0.0) worked.
Thank you.

And the result I got looks like magnetic fields are canceled just between magnets. nothing effected to air region.
2020-11-30 151304.png
(489.1 KiB) Not downloaded yet
I expected the result should be like this.
BarMagnetFieldFRONT.png
BarMagnetFieldFRONT.png (10.04 KiB) Viewed 5587 times

Re: magnetic field of a permanent magnet in 3D

Posted: 30 Nov 2020, 13:59
by kevinarden
field.png
(209.4 KiB) Not downloaded yet
I normally use the stream tracer function in Paraview to make that plot
glyphs.png
(208.47 KiB) Not downloaded yet

Re: magnetic field of a permanent magnet in 3D

Posted: 03 Dec 2020, 07:38
by emmy.t
I mean arrows in the air region are not aligned and have almost zero magnetic field strength.

Re: magnetic field of a permanent magnet in 3D

Posted: 03 Dec 2020, 14:57
by kevinarden
It certainly looks better in 2d
2dglyphs.png
(648.47 KiB) Not downloaded yet
Your air field my not be large enough relative to the magnet.

a 2d and 3d case compared here
https://github.com/mrkearden/magforce