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
Simulation of the force between two magnets
Re: Simulation of the force between two magnets
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
- Jan
Re: Simulation of the force between two magnets
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:
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
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:
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
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Simulation of the force between two magnets
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
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
Re: Simulation of the force between two magnets
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:
Could anything else be the problem?
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:
Could anything else be the problem?
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Simulation of the force between two magnets
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.
Make sure your mesh actually has 3 bodies.
Re: Simulation of the force between two magnets
Are you sure about this? When I generate the mesh using gmsh with the given .geo file, I get three bodies:
-
- Posts: 2237
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Simulation of the force between two magnets
Yours is correct. Not sure why mine didn't.
-
- Site Admin
- Posts: 4812
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Simulation of the force between two magnets
Hi
Still problems? Could you treat the problem in terms of vector potential setting "AV {e} = 0.0" at the symmetry BCs.
-Peter
Still problems? Could you treat the problem in terms of vector potential setting "AV {e} = 0.0" at the symmetry BCs.
-Peter
Re: Simulation of the force between two magnets
Peter,
I ran your case that was posted on 30 Jan 2020. It works, just like you stated. However, for 3D my meshing workflow usually involves tets, not hex like in your mesh. When I ran the model using tets and gradient adaptive mesh refinement my "zeros" for magnetic force are on the order of 10^-3 - 10^-4 no matter what options for the solver I use (even quadratic approx). Can you please give me some pointers for what characteristics the tets should have for accurate results? Thanks.
Regards,
Joe
I ran your case that was posted on 30 Jan 2020. It works, just like you stated. However, for 3D my meshing workflow usually involves tets, not hex like in your mesh. When I ran the model using tets and gradient adaptive mesh refinement my "zeros" for magnetic force are on the order of 10^-3 - 10^-4 no matter what options for the solver I use (even quadratic approx). Can you please give me some pointers for what characteristics the tets should have for accurate results? Thanks.
Regards,
Joe