Magnus Olsson
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
4 years ago
Oct 22, 2020, 10:13 a.m. EDT
Dear Nadav,
Boundary integration of the Maxwell surface stress tensor will often give rather modest accuracy, especially when applied directly on a permanent magnet as the H and B fields directly outside a magnet are dominated by the magnet's own field. However, the force arises by the perturbation to that dominant field by the comparatively smaller field of the other magnet. This becomes more obvious when the "other magnet" is just a piece of passive iron like in the first attached modell. The solution in that case is to compute the force on the piece with the smallest "own field". As the perturbation field near the magnet scales as the inverse fourth power of the magnet-iron distance, it is quite easy to envision a situation when computing the force directly on the magnet is virtually impossible within double precision numerics.
Another numerical issue is that integrating the Maxwell stresses on a magnet-air boundary requires the evaluation of the fields in the air and single-sided extrapolation to the boundary (gradients are typically computed inside elements - not on element boundaries). This results in extrapolation errors. A partial cure is to go for higher order elements with better extrapolation power. It is also worth noting that Magnetic Fields (vector potential) often is more accurate than Magnetic Fields, No Currents (scalar potential) as the normal (B and H) fields then result from tangential derivatives (computed directly on the boundary) of the vector potential and hence suffer less from extrapolation errors.
Other approaches is to introduce fictive boundaries or control volumes in the air on the outside of the object and integrate on such a boundary or in the resulting air volume (eggshell method). Or one may use sensitivity/energy/coenergy based methods (virtual work method).
When it comes to the Axial Magnetic Bearing example, the special case of dZ=0 should result in zero axial force on the magnets. From what I have written above it should be clear that finite elements and the Maxwell Stress method on boundaries does neither guarantee zero force, nor perfectly balancing forces on the magnets unless the mesh is perfectly symmetric. However, when looking at the model in its context, that is exploring the forces as a function of dZ, it is clear that the discrepancies are small in a relative sense. In the attached version of the model, I compute the forces using both the scalar and vector potential formulations and the latter seems a bit more accurate. As can be seen in 1D Plot Group 6, the deviations from zero axial forces for dZ=0 are small in a relative sense.
Accurate numerical magnetic (and electric) force calculations are unfortunately very difficult to automate and it usually requires both an understanding of the numerical method and some experimentation to gain confidence in the results.
-------------------
Magnus
Dear Nadav,
Boundary integration of the Maxwell surface stress tensor will often give rather modest accuracy, especially when applied directly on a permanent magnet as the H and B fields directly outside a magnet are dominated by the magnet's own field. However, the force arises by the perturbation to that dominant field by the comparatively smaller field of the other magnet. This becomes more obvious when the "other magnet" is just a piece of passive iron like in the first attached modell. The solution in that case is to compute the force on the piece with the smallest "own field". As the perturbation field near the magnet scales as the inverse fourth power of the magnet-iron distance, it is quite easy to envision a situation when computing the force directly on the magnet is virtually impossible within double precision numerics.
Another numerical issue is that integrating the Maxwell stresses on a magnet-air boundary requires the evaluation of the fields in the air and single-sided extrapolation to the boundary (gradients are typically computed inside elements - not on element boundaries). This results in extrapolation errors. A partial cure is to go for higher order elements with better extrapolation power. It is also worth noting that Magnetic Fields (vector potential) often is more accurate than Magnetic Fields, No Currents (scalar potential) as the normal (B and H) fields then result from tangential derivatives (computed directly on the boundary) of the vector potential and hence suffer less from extrapolation errors.
Other approaches is to introduce fictive boundaries or control volumes in the air on the outside of the object and integrate on such a boundary or in the resulting air volume (eggshell method). Or one may use sensitivity/energy/coenergy based methods (virtual work method).
When it comes to the Axial Magnetic Bearing example, the special case of dZ=0 should result in zero axial force on the magnets. From what I have written above it should be clear that finite elements and the Maxwell Stress method on boundaries does neither guarantee zero force, nor perfectly balancing forces on the magnets unless the mesh is perfectly symmetric. However, when looking at the model in its context, that is exploring the forces as a function of dZ, it is clear that the discrepancies are small in a relative sense. In the attached version of the model, I compute the forces using both the scalar and vector potential formulations and the latter seems a bit more accurate. As can be seen in 1D Plot Group 6, the deviations from zero axial forces for dZ=0 are small in a relative sense.
Accurate numerical magnetic (and electric) force calculations are unfortunately very difficult to automate and it usually requires both an understanding of the numerical method and some experimentation to gain confidence in the results.