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

Re: grad(H^2) plot



--- In femm@xxxxxxxxxxxxxxx, "mbe_pondro" <mbe_pondro@xxxx> wrote:
> 
> Hello femm group,
> 
> I'm working on magnetic separator and I need to plot 
> "grad(H^2)" . Is there a way to do it with lua scripting. I tried a 
> finite difference approach using getpointvalue() on a set of 
> predefined points but there was too many curve distorsion due to 
> derivation error. I'm searching for a way to get more smooth and 
> precise curve. 
> Any help would be appreciated.
> 
> 
> Mbe.

It sounds like what you are looking for is equivalent to finding
gradients in the magnetic field energy density, which is muo*(H.H)/2
in a region filled with air (and muo is meant to represent the
permeability of free space). The way that B and H are interpolated in
femm, the gradient of energy density isn't continuous across element
boundaries.

The most expedient solution for you would probably be to evaluate the
magnetic field energy on a regularly spaced grid (see
http://groups.yahoo.com/group/femm/files/scripting/grid.zip as sort of
a template for how to do this). The grid spacing ought to be much
bigger than the size of an individual element, yet small enough so
that numerical derivatives taken using datapoints on the grid are
meaningful--this could imply a pretty fine finite element mesh in the
region of interest if good results are to be obtained. Then, use
finite differencing to get values of the gradient of energy at each
node point. You could then interpolate between the nodal values of
the gradient in a relatively straightforward way.

Dave.