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

# Re: [femm] [How can I use "sine function" in lua script?]

- To: femm@yahoogroups.com
- Subject: Re: [femm] [How can I use "sine function" in lua script?]
- From: TomSutrina@aol.com
- Date: Tue, 17 Jun 2003 06:47:39 EDT

Here is a small piece of a program I wrote to draw astator and a rotor. The problem I ran into at the end is in setting the boundary conditions. There is a round off error that cause the boundaries to not be recognized. I wrote the program to loop through the drawing program for a section. In the end I had to copy and rotate the points and lines on the boundary to obtain usable boundaries.
-- draw rotor
n24x = RIr
n24y = 0
addnode(n24x,n24y) -- inside right boundary of rotor
n25x = RIr * cos(a_total)
n25y = RIr * sin(a_total)
addnode(n25x,n25y) -- inside left boundary of rotor
addarc(n24x,n24y,n25x,n25y,a_total,.85) -- rotor inner radius
nRx = RIr * cos(a_total/2) --add boundry
nRy = RIr * sin(a_total/2)
selectarcsegment(nRx,nRy)
setarcsegmentprop(1,"radii",0,Sgrp) -- boundry inside of rotor ID
clearselected()

- Prev by Date: Re: [femm] Re: [Still Error ocurred.. :-( ]
- Next by Date: Re: [femm] transient analysis
- Previous by thread: Re: [femm] Re: [Still Error ocurred.. :-( ]
- Next by thread: grad(H^2) plot
- Index(es):
  - Date
  - Thread