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