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

# Re: [femm] Problems with simple LUA script

- To: femm@yahoogroups.com
- Subject: Re: [femm] Problems with simple LUA script
- From: "Prem Kumar C" <prem@bhelrnd.co.in>
- Date: Fri, 10 Oct 2003 15:24:47 +0530
- References: <bm4gq4+lrtv@eGroups.com>

     Hi tdaniyar :

    I checked your code.
    In your lua file,

    Replace : addmaterial("Air")
    with : addmaterial("Air",1,1,0,0,0,0,0,0,1,0)

    It works ! I've checked it .

    Prem Kumar, C

    tdaniyar wrote:

    > Hi,
    > I've got a problem "Couldn't solve the problem" during running LUA
    > Script which is given below. Any idea why it happens? I am using
    > FEMM3.3 under Windows 2000.
    >
    > -- Start
    > newdocument()
    >
    > -- variables
    > meshSize = 0.4
    > r_border_mm = 15
    > r_wire_mm = 1
    >
    > -- help variables
    > current = 5
    > r_border_m = r_border_mm/1000
    >
    > -- problem defenition
    > probdef(0, "millimeters", "axi", 1e-8, 0)
    >
    > -- materials
    >
    > addmaterial("Air")
    > -- please, correct wrap in this line!
    > addboundprop("MixedBorder",
    > 0,0,0,0,0,0,1/(4*3.14159*0.000001*r_border_m),0,2)
    > addmaterial("Superconductor", 1, 1,0, current,0,58,0,0,1,0)
    >
    > -- create border with air inside
    > addnode(0,0)
    > addnode(0, -r_border_mm)
    > addnode(0, r_border_mm)
    > addsegment(0, 0, 0, r_border_mm)
    > addsegment(0, 0, 0, -r_border_mm)
    > addarc(0, -r_border_mm,0, r_border_mm,180,1)
    > addblocklabel(1,0)
    > selectlabel(1,1)
    > setblockprop("Air", 0, meshSize, "", 0, 0)
    > clearselected()
    > selectarcsegment(r_border_mm, 0)
    > setarcsegmentprop(10,"MixedBorder",0,0)
    > clearselected()
    >
    > -- define wire section function
    > function wire(x,y)
    > addnode(x+r_wire_mm,y)
    > addnode(x-r_wire_mm,y)
    > addarc(x+r_wire_mm, y, x-r_wire_mm, y, 180, 10)
    > addarc(x-r_wire_mm, y, x+r_wire_mm, y, 180, 10)
    > addblocklabel(x,y)
    > selectlabel(x,y)
    > setblockprop("Superconductor", 0, meshSize, "", 0, 0)
    > clearselected()
    > end
    >
    > wire(10,0)
    >
    > --- finish macro
    > savefemmfile("try.fem")
    > createmesh()
    >
    > analyse(0)
    >
    > -- End
    >
    >
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

    --------------452D2AB85DB79BDB9CFAEBD3
    Content-Type: text/html; charset=us-ascii
    Content-Transfer-Encoding: 7bit

    <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
    <html>

    <blockquote>Hi tdaniyar :
    <p>I checked your code.
    <br>In your lua file,
    <p>Replace :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addmaterial("Air")
    <br>with&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <b>addmaterial("Air",1,1,0,0,0,0,0,0,1,0)</b>
    <p>It&nbsp; works !&nbsp;&nbsp;&nbsp; I've checked it .
    <p>Prem Kumar, C</blockquote>

    <p><br>tdaniyar wrote:
    <blockquote TYPE=CITE>Hi,
    <br>I've got a problem "Couldn't solve the problem" during running LUA
    <br>Script which is given below. Any idea why it happens? I am using
    <br>FEMM3.3 under Windows 2000.
    <p>-- Start
    <br>newdocument()
    <p>-- variables
    <br>meshSize = 0.4
    <br>r_border_mm = 15
    <br>r_wire_mm&nbsp;&nbsp; = 1
    <p>-- help variables
    <br>current = 5
    <br>r_border_m = r_border_mm/1000
    <p>-- problem defenition
    <br>probdef(0, "millimeters", "axi", 1e-8, 0)
    <p>-- materials
    <p>addmaterial("Air")
    <br>-- please, correct wrap in this line!
    <br>addboundprop("MixedBorder",
    <br>0,0,0,0,0,0,1/(4*3.14159*0.000001*r_border_m),0,2)
    <br>addmaterial("Superconductor", 1, 1,0, current,0,58,0,0,1,0)
    <p>-- create border with air inside
    <br>addnode(0,0)
    <br>addnode(0, -r_border_mm)
    <br>addnode(0, r_border_mm)
    <br>addsegment(0, 0, 0, r_border_mm)
    <br>addsegment(0, 0, 0, -r_border_mm)
    <br>addarc(0, -r_border_mm,0, r_border_mm,180,1)
    <br>addblocklabel(1,0)
    <br>selectlabel(1,1)
    <br>setblockprop("Air", 0, meshSize, "", 0, 0)
    <br>clearselected()
    <br>selectarcsegment(r_border_mm, 0)
    <br>setarcsegmentprop(10,"MixedBorder",0,0)
    <br>clearselected()
    <p>-- define wire section function
    <br>function wire(x,y)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addnode(x+r_wire_mm,y)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addnode(x-r_wire_mm,y)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addarc(x+r_wire_mm, y, x-r_wire_mm,
    y, 180, 10)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addarc(x-r_wire_mm, y, x+r_wire_mm,
    y, 180, 10)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; addblocklabel(x,y)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; selectlabel(x,y)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setblockprop("Superconductor",
    0, meshSize, "", 0, 0)
    <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clearselected()
    <br>end
    <p>wire(10,0)
    <p>--- finish macro
    <br>savefemmfile("try.fem")
    <br>createmesh()
    <p>analyse(0)
    <p>-- End
    <p>------------------------ Yahoo! Groups Sponsor ---------------------~-->
    <br>Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
    <br>Printer at MyInks.com. Free s/h on orders $50 or more to the US &amp;
    Canada.
    <br><a href="http://www.c1tracking.com/l.asp?cid=5511";>http://www.c1tracking.com/l.asp?cid=5511</a>
    <br><a href="http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PMYolB/TM";>http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PMYolB/TM</a>
    <br>---------------------------------------------------------------------~->
    <br>&nbsp;
    <br>&nbsp;
    <p>Your use of Yahoo! Groups is subject to <a href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/</a></blockquote>
    </html>

    --------------452D2AB85DB79BDB9CFAEBD3--

    begin:vcard
    n:Kumar;C.Prem Kumar
    tel;cell:+91 94400 49277
    tel;fax:+91 40 2377 6320
    tel;home:+91 40 2775 1195
    tel;work:+91 40 2388 2347
    x-mozilla-html:FALSE
    org:Electromagnetics Group;BHEL Corp.R&D Division
    adr:;;Vikasnagar P.O,;Hyderabad;Andhra Pradesh;500 093;India
    version:2.1
    email;internet:prem@bhelrnd.co.in
    title:Deputy General Manager
    x-mozilla-cpt:;5040
    fn:C.Prem Kumar
    end:vcard

- References:
  - Problems with simple LUA script
    - From: "tdaniyar" <tdaniyar@yahoo.com>

- Prev by Date: Problems with simple LUA script
- Next by Date: [FEMM] Mailing list moved
- Previous by thread: Problems with simple LUA script
- Next by thread: [FEMM] Mailing list moved
- Index(es):
  - Date
  - Thread