[Magnetostatic] different results for 2D and 3D calculation

The graphical user interface of Elmer
Post Reply
Markus_eyP
Posts: 5
Joined: 14 Apr 2020, 17:52
Antispam: Yes

[Magnetostatic] different results for 2D and 3D calculation

Post by Markus_eyP »

Hello,
I'm struggling with another problem in the calculation of the magnetic flux density of two magnets. They have the same size with an edge length of 2mm and both magnets are aligned parallel on the x-axis with a distance of 1.8mm. Interestingly I got a different result for the flux in the 3D- compared to the 2D-calculation. So in the center of between the magnets I got ~400 mT for 2D-calculation and only ~260 mT for 3D. What I'm doing wrong? Attached are the geometry and sif-file.

Thanks
Markus
Attachments
flatpak2D.geo
(1.58 KiB) Downloaded 265 times
case.sif
(2.87 KiB) Downloaded 296 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by kevinarden »

In the 2D problem the magnetization is in the X direction, in the 3D problem it is in the Z direction. When I change the 3D to Magnetization 1 =

they both have the same answer.
Markus_eyP
Posts: 5
Joined: 14 Apr 2020, 17:52
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by Markus_eyP »

I recalculated everything and I'm still observing differences, same values as in previous posting. I'm interested in the flux density applied in y- or z- direction (perpendicular to the axes connecting the magnets). So I took "Magnetization 1" for the 2D problem (y-directionaccording to ParaView) and "Magnetization2/3" for the 3D problem (y-/z-direction ParaView). For the 2D problem I got values close to those calculated by another program (FEMM).
Attachments
flatpak.zip
(295.38 KiB) Downloaded 275 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by kevinarden »

I used a different approach for the 2D and got the same answer as yours, Looking at 3D.
my2d.png
(114.12 KiB) Not downloaded yet
mycase2D.sif
(2.88 KiB) Downloaded 284 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by kevinarden »

magflux.png
(104.88 KiB) Not downloaded yet
magforce.png
(206.27 KiB) Not downloaded yet
sif_files.zip
(2.19 KiB) Downloaded 312 times
The 2D and 3D results are similar, The 2D mesh is much finer, and the results always improve with a finer mesh. Going to a finer mesh in 3D is difficult.
Kevin
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by raback »

Thanx Kevin, verification is vital. Indeed it is difficult to have same resolution in 2D and 3D. Helps if you access to larger computers. Elmer scales pretty well on these problems.

-Peter
Markus_eyP
Posts: 5
Joined: 14 Apr 2020, 17:52
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by Markus_eyP »

Thanks Kevin for your calculations, I used your sif-files (slightly adapted) for the calculations now. I'm still struggling with the problem. Attached are pictures (from ParaView) with additionally plotted lines through the center of the two magnets. The scale for the magnetic flux density Magnitude shows more or less the same maximum values ( 1.1T for 2D vs. 4.7T for 3D). Although it's quite different from you values. I finer mesh for 3D does not improve the result (mesh file size increased from ~60 MB to 4.6 GB refining the mesh two times more). From the line plots I get a value of ~400 mT in the center between the two magnets, which is not the same for 3D calculation (magnetization in z-direction) with 260 mT. Furthermore I expected a different shape for the flux in x-direction, similar to that one of the 2D calculation and with a value of 260 mT in the minimum.

Markus
Attachments
magnets.zip
(420.46 KiB) Downloaded 281 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: [Magnetostatic] different results for 2D and 3D calculation

Post by kevinarden »

A difference may be that my solid mesh is cubes not tetrahedrons. In general I get better results with cube elements.

It may be possible to use higher order elements using P elements.

I also made the thickness of the magnet in the Z direction 1 in the 3D. It is not defined in the 2D so I assume it is 1. If there is anything based on volume in 3D then it would be comparable to area in 2D if the thickness is 1.
Post Reply