[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] coenergy vs. stress tensor calculations of magnetic force



James Rabchuk wrote:
Hi, I've written before about making a simulation of a levitation device with diamagnetic materials in FEMM. I was interested in determing the equilibrium position of the levitating magnet by calculating the force for a number of positions between the diamagnetic plates. 
 
Following the advice of the FEMM manual, I used the coenergy method for calculating the field energy, and then looking for the force from that. But what I found was that the Coenergy displayed no observable trend with height of the magnet. On a lark, I tried the same simulation and calculated the Force from the stress tensor, using a fixed contour. Surprisingly, I got very believable results that showed the stable and unstable equilibrium points for the levitating magnet quite nicely. I was content with that, but I'm still intrigued why the coenergy method doesn't seem to be working in this case. We tried moving the outer boundary to increase the area for the problem. I tried increasing the mesh density in the region where the force on the magnet is being calculated. But none of those things seems to be able to get the coenergy method to provide meaningful results. I might be tempted to say that my stress tensor calculations are just misleading, but they mirror so nicely the behavior of the actual system that I find that hard to believe.
 
Would anybody be willing to take a look at the simulation I've put together and make some suggestions as to where the coenergy calculation might be messing up, or where I could improve the model to get the "right" behavior?
 

It may be hard to get adequate resolution to get good results by coenergy here.  Just looking at some relative numbers, the change in energy over the entire stroke that is implied by the stress tensor results would be rought 0.0025 N * 0.00345 m =8.625e-6 Joules.  To be able to differentiate numerically and get reasonable results, we might need a couple of orders of magnitude more accuracy (at least), say down to 8.625e-8 J. On the other hand, the energy that is evaluated is in the neighborhood of 0.425 Joules.  That means that we'd need to determine the energy accurate to about 1 part in 5,000,000 to get a good result from coenergy. Although you used an extremely fine mesh around the body to be levitated (fine enough to actually discern this sort of variation), the mesh structure outside this finely meshed zone restructures itself when the body moves.  The restructuring of larger blocks leads to errors in the energy that are  larger than the variations that are to be detected.

It may possible to get OK results from the stress tensor here.  The program is doing the "right" things as far as computing integrals, it's just hard to get the sort of resolution that you are after. You could run some sanity checks by replacing the diamagnetic material with air and comparing the force between the magnets to the forces that you'd compute analytically between on-axis dipoles.  It might be worth experimenting around to see how much the force results are effected by different mesh densities in the blocks that have a coarser mesh.  It also might be interesting to see how a different boundary condition (e.g. asymptotic boundary condition) effects the forces, since the forces depend strongly on the simulation of the far field of the bigger permanent magnet.

If you have enough time/energy to do some custom coding, it might be interesting to hack together a boundary element or volume integral model of this geometry. Several aspects of this problem suggest that would lend itself to an integral equation approach (e.g. "open" configuration, linear materials, simple geometry).  You could formulate these problems so that you'd solve directly for the magnetization (is this the right word for diamagnetics?) in the diamagnetic material, possibly making a problem that is a bit better conditioned for your purposes.

Dave.
-- 
David Meeker
dmeeker@xxxxxxxx
http://femm.berlios.de/dmeeker