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

# Re: [femm] Re: Lua sample of line integral

- To: femm@yahoogroups.com
- Subject: Re: [femm] Re: Lua sample of line integral
- From: dcm3c@aol.com
- Date: Fri, 17 Aug 2001 15:02:23 EDT

    In a message dated 8/16/01 10:36:49 PM Eastern Daylight Time,
    jim271@hotmail.com writes:

    > Hello Dave,
    >
    > Thank you for explaining that detail about the Lorentz force. I've
    > only been using it with a simple coil-plunger combination, so I was
    > lucky :-)
    >
    > One problem I've had with the stress tensor around a contour is
    > having to use a high mesh density in the region where the contour is
    > drawn. If I want a very small air gap, this requires a very large
    > number of meshes and long execution time.
    >
    > I'm wondering if by using the volume integral for coenergy and taking
    > the derivative, you actually get more accurate results (compared to
    > the stress tensor) with relatively few meshes in the narrow air gap,
    > as long as the mesh density is much smaller than the plunger step
    > size? That is, since there is no contour in the air gap, is the mesh
    > density critical there?
    >
    Yes, coenergy can be a good way to go when you have really narrow air gaps.
    Mesh density isn't quite so critical in this case, but it doesn't hurt to go
    with a fairly dense mesh anyhow. There are accuracy issues with
    differentiating coenergy, too--they are just different than with stress
    tensor. The problem that you get into with coenergy is that if the move is
    too small, the change in coenergy between moves gets lost in the overall
    accuracy of the coenergy calculation. The purpose of my "mesh density finer
    than the movement step size" suggestion is to try and avoid this problem.

    Anyhow, I've attached a lua example of a solenoid actuator with a constant
    current density in the coil that evaluates coenergy over a range of positions.

    > Also, how do you keep data from one iteration of the lua script to
    > pass on to the next iteration so it can calculate the derivative?
    >

    When I have done this before, I just wrote coenergy directly to a file and
    then used another program (e.g. Mathematica) to fit a curve through the
    datapoints. I then took the derivative of the interpolation to get force.
    I've included a Mathematica worksheet and a pdf printout of that worksheet
    that shows how I do it.

    As far as getting information from one iteration to the next, or from the
    preprocessor to the postprocessor, perhaps the easiest way to do this is via
    the use of a temporary file. I have used a temporary file in this example to
    send the current plunger position to the postprocessor so that it can write
    this piece of info to the output file. (This is sort of a cooked example,
    because I probably could have written this directly to the output file from
    the preprocessor, but what the heck...)

    Dave.
    --
    David Meeker
    <A HREF="http://members.aol.com/_ht_a/dcm3c";>http://members.aol.com/_ht_a/dcm3c</A>

    --part1_16.10e4f05d.28aec43f_alt_boundary
    Content-Type: text/html; charset="US-ASCII"
    Content-Transfer-Encoding: 7bit

    <HTML><FONT FACE=arial,helvetica><FONT SIZE=2>In a message dated 8/16/01 10:36:49 PM Eastern Daylight Time,
    <BR>jim271@hotmail.com writes:
    <BR>
    <BR>
    <BR><BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">Hello Dave,
    <BR>
    <BR>Thank you for explaining that detail about the Lorentz force. I've
    <BR>only been using it with a simple coil-plunger combination, so I was
    <BR>lucky :-)
    <BR>
    <BR>One problem I've had with the stress tensor around a contour is
    <BR>having to use a high mesh density in the region where the contour is
    <BR>drawn. If I want a very small air gap, this requires a very large
    <BR>number of meshes and long execution time.
    <BR>
    <BR>I'm wondering if by using the volume integral for coenergy and taking
    <BR>the derivative, you actually get more accurate results (compared to
    <BR>the stress tensor) with relatively few meshes in the narrow air gap,
    <BR>as long as the mesh density is much smaller than the plunger step
    <BR>size? &nbsp;That is, since there is no contour in the air gap, is the mesh
    <BR>density critical there?
    <BR></FONT><FONT COLOR="#000000" SIZE=3 FAMILY="SANSSERIF" FACE="Arial" LANG="0"></BLOCKQUOTE>
    <BR>Yes, coenergy can be a good way to go when you have really narrow air gaps.
    <BR>Mesh density isn't <I>quite</I> so critical in this case, but it doesn't hurt to go
    <BR>with a fairly dense mesh anyhow. &nbsp;There are accuracy issues with
    <BR>differentiating coenergy, too--they are just different than with stress
    <BR>tensor. &nbsp;The problem that you get into with coenergy is that if the move is
    <BR>too small, the change in coenergy between moves gets lost in the overall
    <BR>accuracy of the coenergy calculation. &nbsp;The purpose of my "mesh density finer
    <BR>than the movement step size" suggestion is to try and avoid this problem.</FONT><FONT COLOR="#000000" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">
    <BR>
    <BR>Anyhow, I've attached a lua example of a solenoid actuator with a constant
    <BR>current density in the coil that evaluates coenergy over a range of positions.
    <BR></FONT><FONT COLOR="#000000" SIZE=3 FAMILY="SANSSERIF" FACE="Arial" LANG="0">
    <BR></FONT><FONT COLOR="#000000" SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0"><BLOCKQUOTE TYPE=CITE style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">Also, how do you keep data from one iteration of the lua script to
    <BR>pass on to the next iteration so it can calculate the derivative?
    <BR></BLOCKQUOTE>
    <BR>
    <BR>When I have done this before, I just wrote coenergy directly to a file and
    <BR>then used another program (e.g. Mathematica) to fit a curve through the
    <BR>datapoints. &nbsp;I then took the derivative of the interpolation to get force. &nbsp;
    <BR>I've included a Mathematica worksheet and a pdf printout of that worksheet
    <BR>that shows how I do it.
    <BR>
    <BR>As far as getting information from one iteration to the next, or from the
    <BR>preprocessor to the postprocessor, perhaps the easiest way to do this is via
    <BR>the use of a temporary file. &nbsp;I have used a temporary file in this example to
    <BR>send the current plunger position to the postprocessor so that it can write
    <BR>this piece of info to the output file. (This is sort of a cooked example,
    <BR>because I probably could have written this directly to the output file from
    <BR>the preprocessor, but what the heck...) &nbsp;
    <BR>
    <BR>Dave.
    <BR>--
    <BR>David Meeker
    <BR><A HREF="http://members.aol.com/_ht_a/dcm3c";>http://members.aol.com/_ht_a/dcm3c</A></FONT></HTML>

    --part1_16.10e4f05d.28aec43f_alt_boundary--

Attachment: `magn2-lua.zip`
Description: Zip archive

- Follow-Ups:
  - Re: Lua sample of line integral
    - From: jim271@hotmail.com

- Prev by Date: Re: Lua sample of line integral
- Next by Date: RE: [femm] Femme-lua (batch processing)
- Previous by thread: Re: Lua sample of line integral
- Next by thread: Re: Lua sample of line integral
- Index(es):
  - Date
  - Thread