Simulation of the force between two magnets

Numerical methods and mathematical models of Elmer
mika
Posts: 155
Joined: 15 Sep 2009, 07:44

Re: Simulation of the force between two magnets

Post by mika » 28 Apr 2020, 10:53

In the 3D case the source is defined as "Magnetization 1 = Real 9.55e5". Should it be "Magnetization 3 = Real 9.55e5" in order to have the same case (the magnetization vector aligned with the axis)?

-- Mika

JanHoek
Posts: 15
Joined: 13 Jan 2020, 14:06
Antispam: Yes

Re: Simulation of the force between two magnets

Post by JanHoek » 01 May 2020, 10:49

Thank you Mika, you are correct. I was using some different models which had different orientations, it does gives the expected result right now. Sorry for the silly mistake.

- Jan

JanHoek
Posts: 15
Joined: 13 Jan 2020, 14:06
Antispam: Yes

Re: Simulation of the force between two magnets

Post by JanHoek » 11 May 2020, 17:44

Hi everyone,

For further verification of the magnetic force implementation in Elmer, I am now trying to add symmetry planes to the model, simulating a quarter of the 3D case. For the symmetry, I am using that the magnetic flux density normal to the plane of symmetry is equal to zero. This also means that the magnetic field intensity in that direction is zero, which gives me the symmetry condition: Magnetic Field Strength n = Real 0. Here is the case file, the .grd file for the structured mesh and the .geo file for the unstructured mesh:
case.sif
(3.85 KiB) Downloaded 19 times
3D_20.grd
(877 Bytes) Downloaded 19 times
TwoMagnets.geo
(911 Bytes) Downloaded 20 times
If I compare to the 3D cases I have simulated, which all give the expected results, the model with symmetry does not give the expected result. Mesh refinement also does not give a solution closer to the expected solution. I think it could be the case that I am missing a symmetry condition, however I am not sure about this. Does anyone know what the correct symmetry condition should be, or what else the problem could be?

- Jan

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of the force between two magnets

Post by kevinarden » 11 May 2020, 23:21

I don't think you can say
Magnetic Field Strength n = Real 0
in the sif file
It needs to be
Magnetic Field Strength 1 = Real 0
or
Magnetic Field Strength 2 = Real 0
or
Magnetic Field Strength 3 = Real 0

depending on whether your need direction 1, 2, or 3 or you could use a combination of the above with more than one entry
such as
Magnetic Field Strength 2 = Real 0
Magnetic Field Strength 3 = Real 0

JanHoek
Posts: 15
Joined: 13 Jan 2020, 14:06
Antispam: Yes

Re: Simulation of the force between two magnets

Post by JanHoek » 12 May 2020, 10:58

Thank you Kevin for your response!

When I use that condition with the direction normal to the boundaries (so direction 1 for boundaries 3, 13 and 15 and direction 2 for boundaries 5, 12 and 14), it gives the same result. Here is the case file with the alteration you suggested:
case.sif
(3.95 KiB) Downloaded 19 times
Could anything else be the problem?

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of the force between two magnets

Post by kevinarden » 12 May 2020, 12:29

When I generated the mesh from the geo file both the upper magnet and the air came out as body 1. The mesh.element file only had 2 bodies.
Make sure your mesh actually has 3 bodies.

JanHoek
Posts: 15
Joined: 13 Jan 2020, 14:06
Antispam: Yes

Re: Simulation of the force between two magnets

Post by JanHoek » 12 May 2020, 12:58

Are you sure about this? When I generate the mesh using gmsh with the given .geo file, I get three bodies:
Elmer_bodies.png
(93.33 KiB) Not downloaded yet
TwoMagnets.geo
(911 Bytes) Downloaded 28 times
mesh.elements
(19.45 KiB) Downloaded 28 times

kevinarden
Posts: 641
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of the force between two magnets

Post by kevinarden » 12 May 2020, 13:55

Yours is correct. Not sure why mine didn't.

raback
Site Admin
Posts: 3697
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Simulation of the force between two magnets

Post by raback » 13 May 2020, 11:16

Hi

Still problems? Could you treat the problem in terms of vector potential setting "AV {e} = 0.0" at the symmetry BCs.

-Peter

Post Reply