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

# Re: [femm] lua script

- To: femm@yahoogroups.com
- Subject: Re: [femm] lua script
- From: David Meeker <dmeeker@ieee.org>
- Date: Thu, 17 Oct 2002 23:39:35 -0400
- References: <20021016092400.9023.qmail@web20910.mail.yahoo.com>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826

mohamed karakache wrote:

> `Hello
> First i want to know if lua script is avaialabe for
> free download (i think i must have it to work with
> femm)`

The lua scripting language is compiled in with the preprocessor and postprocessor--there's nothing additional to download to run the lua stuff.

> `
> Second,really i have not understood how lua script
> work with femm,if i want for example to rotate the
> rotor or change the slot current for a machine
> How can i do (open lua script then...)
> thx very much
> `

Generally, you can load a new lua script using the "Open Lua Script" selection off of the file menu of the pre- or post-processor.
There is also an interactive console window. It is hidden by default, but you can display it by selecting View|Lua Console in the pre- or post-processor. You can run a script that is on disk with the dofile command from the console window, e.g.:
dofile("c:\\temp\\junk.lua")
One of the scripts that I sent along to you just defined a command called SetCurrent which allows you to set the magnitude of the 3-phase current in the stator. To run it, you'd load the script via "Open Lua Script" and then enter:
SetCurrent(1.1)
to set the current to, for example, 1.1 A in amplitude, in the lua console window and press "Evaluate".
`> Excuse me david but i have another question ,why do
> you specify group for each element in each model
> (group1,2,..)?is there any logic in this numerotation.
I had defined all of the pieces of the rotor to be in group 1 and all of the pieces in the stator (with the exception of the block labels in the slots) to be in group 2. Block labels that define phases A, B, and C were labeled groups 11, 12, and 13 respectively.
The point of grouping the rotor parts together is that the entire rotor can be selected with one command and rotated with a second command. The point of grouping the block labels associated with each phase together is that then all parts of a phase can be selected with a single command, e.g. for taking the flux linkage integral.
You don't have to put things into groups, but it can make manipulating a model programmatically a whole lot easier.
`
Dave.
--
David Meeker

- References:
  - lua script
    - From: mohamed karakache <mkarakdz@yahoo.fr>

- Prev by Date: Re: [femm] some questions with lua
- Next by Date: DXF Import
- Previous by thread: lua script
- Next by thread: Lua script
- Index(es):
  - Date
  - Thread