I need to calculate the magnetic field along a straight line in proximity of an array of 6 magnets. I used the tutorial files "magnets" included in Gmsh and I slightly modified the file in order to describe the position of the magnets in my desired configuration. enter image description here I set the mesh size with a rather small value:

Mesh size at infinity: 0.01; Mesh size on magnets: 0.001

and I use the "H" formulation. However, the resulting calculated magnetic field is very "fuzzy" as you can see in the figure below. Different colors are different components of the magnetic field. This fuzziness is clearly not physical and has a numeric origin. Am I missing something?

enter image description here

TL/DR: How can I improve the accuracy of the numerical calculation and avoid numerical noise when calculating the magnetic field of an array of magnets?

  • 1
    $\begingroup$ What happens if you decrease the mesh size? $\endgroup$ Nov 20, 2020 at 17:54
  • $\begingroup$ The original tutorial has a mesh size of 0.05 and 0.005 and I decreased already the mesh size to 0.01 and 0.001. I did a lot of trial and error. Decreasing more means that I get out of memory (I have a 64 GB RAM laptop). I need some guidance. $\endgroup$
    – sintetico
    Nov 21, 2020 at 7:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.