Hi all,
I am simulating an axi-symmetric system, containing a permanent ring-shaped magnet. First, I modelled it as 2D cartesian, which seemed to do the job. Then, when switching to axi-symmetric, the results became unrealistic.
I have now isolated the problem in a simple case (see MagnetVacuum.sif). It consists of a permanent magnet in vacuum, magnetized along the y-axis, once cartesian (infinitely long beam) and once axi-symmetric (ring-shaped). The only changes I made to the SIF file going to axi-symmetric, are the selection of the coordinate system and the removal of the BC on the y-axis boundary (leftmost edge).
In the cartesian case, the vector potential and contour lines look fine. I would expect to see something similar in the axi-symmetric case, but here the resulting vector potential exhibits a maximum near the middle of the magnet's cross section, which is obviously not correct. Outside the magnet material (vacuum), the vector potential is low and nearly constant. Moreover, the range of values is about 200 times larger than in the cartesian case.
Choosing “cylindric symmetric” doesn't solve the problem. Am I using the wrong solver?
I'm running Elmer Solver 8.4 on Ubuntu 16.04 LTS.
Any idea?
Eric
Permanent ring-magnet: axi-symmetric
Re: Permanent ring-magnet: axi-symmetric
Hi,
I have never done magnetic simulations myself, but I would not expect the Mgdyn2D solver to work in 3D - you might want to check in the models manual.
HTH,
Matthias
I have never done magnetic simulations myself, but I would not expect the Mgdyn2D solver to work in 3D - you might want to check in the models manual.
HTH,
Matthias
Re: Permanent ring-magnet: axi-symmetric
Hi Matthias,
Thank you for your fast reply.
I had a another look at the Models Manual, and unless I'm mistaken, MagnetoDynamics2D really is the solver to be used here. In the introduction, it says:
"This module may be used to solve a version of the Maxwell equations in the 2D (and axially symmetric) special cases when the unknown is the z-component (or φ-component) of the vector potential."
Probably, there is more to it than changing the coordinate system and modifying the boundary conditions. Unfortunately, I didn't find a similar case on the forum for comparison.
Thanks,
Eric
Thank you for your fast reply.
I had a another look at the Models Manual, and unless I'm mistaken, MagnetoDynamics2D really is the solver to be used here. In the introduction, it says:
"This module may be used to solve a version of the Maxwell equations in the 2D (and axially symmetric) special cases when the unknown is the z-component (or φ-component) of the vector potential."
Probably, there is more to it than changing the coordinate system and modifying the boundary conditions. Unfortunately, I didn't find a similar case on the forum for comparison.
Thanks,
Eric
Re: Permanent ring-magnet: axi-symmetric
Hi,
After inspecting the solver code it unfortunately seems to me that the magnetization source is not treated correctly in the case of axial symmetry. Would it be possible for you to share also the mesh files so that we could try to make a fix more quickly?
Best regards,
Mika
After inspecting the solver code it unfortunately seems to me that the magnetization source is not treated correctly in the case of axial symmetry. Would it be possible for you to share also the mesh files so that we could try to make a fix more quickly?
Best regards,
Mika
Re: Permanent ring-magnet: axi-symmetric
I found that with a low value for the magnet's relative permeability (e.g. 1.06), the difference between cartesian and axi-symmetric disappears.
Re: Permanent ring-magnet: axi-symmetric
Hi Mika,
Here are the mesh files. Thanks,
Eric
Here are the mesh files. Thanks,
Eric
Re: Permanent ring-magnet: axi-symmetric
Hi,
The devel version of the Elmer code repository has now been updated as an attempt to fix this. In addition to correcting the magnetization vector in the case of axial symmetry, the sign of the magnetization vector is now as documented in the Elmer Models Manual. That is, the RHS source now is curl M, while the previous implementation had -curl M. Therefore the result for the simulation in the Cartesian coordinates is also expected to change unless the sign of the magnetization vector is changed in the sif file.
I need to mention that, due to the present implementation of the magnetization, I still see a potential risk that an incorrect edge effect may happen is some cases. The solver employs integration by parts to transform the RHS inner product (curl M,v) to the form (M,curl v) + boundary terms. The boundary terms are assumed to vanish (this happens if the potential or the tangential trace M x n of the magnetization vanishes on the boundary) as they are not assembled into the linear system. In your setup the boundary terms indeed vanish, so the updated code should give a consistent approximation.
-- Mika
The devel version of the Elmer code repository has now been updated as an attempt to fix this. In addition to correcting the magnetization vector in the case of axial symmetry, the sign of the magnetization vector is now as documented in the Elmer Models Manual. That is, the RHS source now is curl M, while the previous implementation had -curl M. Therefore the result for the simulation in the Cartesian coordinates is also expected to change unless the sign of the magnetization vector is changed in the sif file.
I need to mention that, due to the present implementation of the magnetization, I still see a potential risk that an incorrect edge effect may happen is some cases. The solver employs integration by parts to transform the RHS inner product (curl M,v) to the form (M,curl v) + boundary terms. The boundary terms are assumed to vanish (this happens if the potential or the tangential trace M x n of the magnetization vanishes on the boundary) as they are not assembled into the linear system. In your setup the boundary terms indeed vanish, so the updated code should give a consistent approximation.
-- Mika
Re: Permanent ring-magnet: axi-symmetric
Many thanks!
Eric
Eric