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

# Problems with simple LUA script

- To: femm@yahoogroups.com
- Subject: Problems with simple LUA script
- From: "tdaniyar" <tdaniyar@yahoo.com>
- Date: Thu, 09 Oct 2003 20:35:16 -0000
- User-agent: eGroups-EW/0.82

    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

- Follow-Ups:
  - Re: [femm] Problems with simple LUA script
    - From: "Prem Kumar C" <prem@bhelrnd.co.in>

- Prev by Date: Change of address for FEMM website
- Next by Date: Re: [femm] Problems with simple LUA script
- Previous by thread: Change of address for FEMM website
- Next by thread: Re: [femm] Problems with simple LUA script
- Index(es):
  - Date
  - Thread