Simulation of Metallic Sphere in Uniform Magnetic Field

General discussion about Elmer
Tom_B
Posts: 27
Joined: 14 Jun 2023, 12:28
Antispam: Yes

Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Tom_B »

Hi everyone,

I have been working on simulating the behavior of a metallic sphere in a uniform magnetic field and I have encountered some interesting results. I started with a simple case, using a magnetic field with a constant norm. I plotted the results using the "plot over the Line" tool in Paraview, and I would appreciate some feedback on the coherence of the obtained results.

Here is what I observed:
Uni_mag_field.PNG
(156.16 KiB) Not downloaded yet
Mag field with a sphere.PNG
(297.58 KiB) Not downloaded yet
Additionally, I am interested in extending this simulation to include a time-varying magnetic field, such as ||B|| cos(omega * t). I am wondering if the same simulation method can be applied to study the behavior of the metallic sphere under these conditions. Any insights or suggestions on how to approach this time-varying magnetic field scenario would be greatly appreciated.

I have attached the relevant documents for your reference. Please take a look and let me know your thoughts.

Thank you in advance for your assistance!

Best regards,
Attachments
sim.sif
.sif file for a uniform magnetic field
(2.79 KiB) Downloaded 29 times
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by kevinarden »

You have one body, air, in the sif, where is the sphere?
Tom_B
Posts: 27
Joined: 14 Jun 2023, 12:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Tom_B »

Oh!! I totally forgot to include the second one, I've got it attached right here.
Attachments
sim.sif
(3.01 KiB) Downloaded 26 times
Rich_B
Posts: 423
Joined: 24 Aug 2009, 20:18

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Rich_B »

Hello,

Could you share your geometry file?

Thanks, Rich.
Tom_B
Posts: 27
Joined: 14 Jun 2023, 12:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Tom_B »

Hello rich,

I actually managed to create it using the GMSH library in Python! It's a simple setup with a sphere inside a box. I'm not entirely sure if it's the correct approach. I attached the .py file for you to take a look. Feel free to dive in and let me know your thoughts!

Thanks
Attachments
v00.txt
(485 Bytes) Downloaded 27 times
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by kevinarden »

I did a 2D axisymmetric case, with a couple of sets of BCs
2daxi.png
2daxi.png (98.9 KiB) Viewed 679 times
The top one has a open boundary on the right, the bottom one defines the far field on all three sides.

I then did a 3D case.
3dresult.PNG
(160.64 KiB) Not downloaded yet
Question on your geometry, in your mesh creation file the sphere is R = .01 and the box is .2
In the sif file you use scaling = 0.001
Is it the intent for the sphere to be r=1.E-5 and the box to be 2E-4?
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by kevinarden »

I re-did the axisymmetric in Elmer and Femm. The results are close. The results also lines up with the 3D Case in the Y-Direction, if the right boundary is open on the axisymmetric.
elmeraxi.PNG
(116.75 KiB) Not downloaded yet
femmaxi.PNG
(196.37 KiB) Not downloaded yet
3dresult.PNG
(160.64 KiB) Not downloaded yet
Tom_B
Posts: 27
Joined: 14 Jun 2023, 12:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Tom_B »

Hey Kevin,

Really appreciate your swift reply!

I've got to admit, I'm a little lost here. Were you trying to run a simulation of the "sphere in a uniform magnetic field" problem? If you could share the .sif file and your geometry, it'd be super helpful. I'm just beginning to navigate the waters of Elmer (and EM too, it's not really my main area), and your guidance would be a godsend.

Just to see if I'm understanding things right:
  • If I have a magnetic field that's static (meaning it's not varying over time) and the conductivity (sigma) of the metal is quite high, then the magnetic field wouldn't really be affected, right?
  • If we're dealing with a quasi-static magnetic field, would we experience a "shielding effect" that's highly dependent on frequency? My guess is that high frequencies would be reflected, while lower frequencies could find a way to penetrate.
Again, I'm new to this field, so forgive me if I'm a little slow on the uptake. Do you think Elmer could help simulate these scenarios?

Thanks a lot for all your help. It's so great to have a community like this to turn to.

Best wishes,
Tom_B
Posts: 27
Joined: 14 Jun 2023, 12:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by Tom_B »

Question on your geometry, in your mesh creation file the sphere is R = .01 and the box is .2
In the sif file you use scaling = 0.001
Is it the intent for the sphere to be r=1.E-5 and the box to be 2E-4?
==> It was just a mistake. :oops: :oops:
kevinarden
Posts: 2317
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Simulation of Metallic Sphere in Uniform Magnetic Field

Post by kevinarden »

Yes I was trying to do the sphere in a uniform static magnetic field using your geometry. Sphere 0.01 M. The last one I did in inches though because FEMM uses inches by default. The varying magnetic field can be induced using an equation I was going to work on that next. I can share the sifs, and the 2D geo files. The 3D mesh is too large, although could set-up a github depository.

In the 2d case the Variable=Potential is the magnetic flux density.
2dcase.sif
(2.93 KiB) Downloaded 26 times
3dcase.sif
(2.77 KiB) Downloaded 32 times
axisym.geo
(1.09 KiB) Downloaded 26 times
Post Reply