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

# passing values between Lua scripts

- To: femm@yahoogroups.com
- Subject: passing values between Lua scripts
- From: "r_dingo" <rd@labyrinth.net.au>
- Date: Fri, 09 May 2003 09:19:05 -0000
- User-agent: eGroups-EW/0.82

    Hi
    A question about combining pre- & post-processor scripts.
    I don't know much yet about Lua, but when we use a FOR loop in a pre-
    processor script to invoke a post-processor script, I think these are
    separate instances of Lua and don't share data. Is that correct?

    For instance, assume you move a block incrementally in a pre-
    processor FOR loop, then find the force on the block in a post-
    processor script. You can keep track of the block's position in the
    pre script and print it to file. You can also print the force on the
    block at the current position while in the post-processor file.
    However, to create a list of force vs. position as the iteration
    continues, you have to keep opening & closing the file as you shuttle
    between the pre- & post-processor scripts, because they don't share
    variables: is that correct? It seems very messy.

    It would be better if the post-processor script could query the
    position of the block, then write the position and corresponding
    force at the same time. I can't see how to do this. Looking
    throught manual.pdf, I can't find a command which queries the current
    position of a given point. Selectnode doesn't seem to be appropriate
    (in general) because it is a proximity command (therefore when the
    block moves away from the reference point, the command will start
    selecting the wrong node). Secondly, even if a particular node or
    segment could be selected, it seems you can set its properties but
    not query them. Is this correct? Is there a better way?

    Thanks
    Ross

- Follow-Ups:
  - Re: [femm] passing values between Lua scripts
    - From: Keith Gregory <k.gregory@lboro.ac.uk>

- Prev by Date: RE: [femm] SRM Inductance plot at constant current
- Next by Date: Lua script
- Previous by thread: Re: [femm] Re: boundary condition and torque calculation
- Next by thread: Re: [femm] passing values between Lua scripts
- Index(es):
  - Date
  - Thread