P. 1
octavefemm

octavefemm

|Views: 437|Likes:
Published by abdo-dz

More info:

Published by: abdo-dz on Mar 06, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/21/2014

pdf

text

original

Sections

  • 1 Introduction
  • 2 Installation and Startup
  • 4.1 Object Add/Remove Commands
  • 4.2 Geometry Selection Commands
  • 4.3 Object Labeling Commands
  • 4.4 Problem Commands
  • 4.5 Mesh Commands
  • 4.6 Editing Commands
  • 4.7 Zoom Commands
  • 4.8 View Commands
  • 4.9 Object Properties
  • 4.10 Miscellaneous
  • 5.1 Data Extraction Commands
  • 5.2 Selection Commands
  • 5.3 Zoom Commands
  • 5.4 View Commands
  • 5.5 Miscellaneous
  • 6.1 Object Add/Remove Commands
  • 6.2 Geometry Selection Commands
  • 6.3 Object Labeling Commands
  • 6.4 Problem Commands
  • 6.5 Mesh Commands
  • 6.6 Editing Commands
  • 6.7 Zoom Commands
  • 6.8 View Commands
  • 6.9 Object Properties
  • 6.10 Miscellaneous
  • 7.1 Data Extraction Commands
  • 7.2 Selection Commands
  • 7.3 Zoom Commands
  • 7.4 View Commands
  • 7.5 Miscellaneous
  • 8.1 Object Add/Remove Commands
  • 8.2 Geometry Selection Commands
  • 8.3 Object Labeling Commands
  • 8.4 Problem Commands
  • 8.5 Mesh Commands
  • 8.6 Editing Commands
  • 8.7 Zoom Commands
  • 8.8 View Commands
  • 8.9 Object Properties
  • 8.10 Miscellaneous
  • 9.1 Data Extraction Commands
  • 9.2 Selection Commands
  • 9.3 Zoom Commands
  • 9.4 View Commands
  • 9.5 Miscellaneous
  • 10.1 Object Add/Remove Commands
  • 10.2 Geometry Selection Commands
  • 10.3 Object Labeling Commands
  • 10.4 Problem Commands
  • 10.5 Mesh Commands
  • 10.6 Editing Commands
  • 10.7 Zoom Commands
  • 10.8 View Commands
  • 10.9 Object Properties
  • 10.10 Miscellaneous
  • 11.1 Data Extraction Commands
  • 11.2 Selection Commands
  • 11.3 Zoom Commands
  • 11.4 View Commands
  • 11.5 Miscellaneous

Finite Element Method Magnetics: OctaveFEMM

Version 1.2 User’s Manual
October 2, 2006

David Meeker dmeeker@ieee.org http://femm.foster-miller.com c 2006

1 Introduction
OctaveFEMM is a Matlab toolbox that allows for the operation of Finite Element Method Magnetics (FEMM) via a set of Matlab functions. The toolbox works with Octave, a Matlab clone. Since Octave does not support ActiveX, the toolbox use an alternative interprocess communication scheme based on temporary files for passing messages between Octave and FEMM. This toolbox can also run in Matlab using Matlab’s built-in support of ActiveX. The use and functionality of the toolbox is essentially identical under either Matlab or Octave. The only difference is speed– Matlab’s ActiveX interface is noticeably faster than the file-based interprocess communications method used when running with Matlab. When OctaveFEMM starts up a FEMM process, the usual FEMM user interface is displayed and is fully functional. The user then has the choice of accomplishing modeling and analysis tasks either exclusively through functions implemented by the toolbox, or by a combination of manual and programmatic operations – whichever is easiest for the task at hand. The syntax of the OctaveFEMM toolbox closely mirrors that of FEMM’s existing Lua scripting language interface associated with FEMM v4.2. However, there are some differences between the Lua functions and the analogous Octave/Matlab implementations: • All strings are enclosed in single quotes, rather than double quotes as in Lua. • Functions in Lua that have no arguments require a set of empty parentheses after the function name (e.g. mi analyze()). In Octave or Matlab, no parentheses should be used needed (e.g. mi analyze with the OctaveFEMM toolbox). • Several commands have also been added to OctaveFEMM that have no analog in Lua. These commands streamline the drawing of new geometries with the OctaveFEMM toolbox, as well is the collection of data from solutions. Perhaps the most remarkable difference between Lua and OctaveFEMM, however, is due to the matrix-oriented nature of Octave/Matlab. In just about any OctaveFEMM function in which it would be desiable to enter an array of points such that multiple copies of an operation are performed, OctaveFEMM will correctly interpret the input perform the requested operation on every element in the array. In addition, for any function in which the coordinates of a point are required, that point can be specified as an array with two elements instead of specifying each element separately. In functions that require the specification of multiple points, those points can be entered as an array of two-element arrays.

2 Installation and Startup
The OctaveFEMM distribution is automatically installed with FEMM 4.2 in the mfiles subdirectory. The absolute directory is typically c:\Program Files\femm42\mfiles. To use OctaveFEMM with Matlab, c:\Program Files\femm42\mfiles must be added to the Matlab search path. This can be accomplished via Matlab’s interactive pathtool command. For use with Octave, you need to add the OctaveFEMM Toolbox to Octave’s search path. This can be done permanently by either adding to or creating the .octaverc file that octave runs when it starts up. For example, in the Octave 2.1.50 release, Octave looks for .octaverc in the directory: 2

C:\Program Files\GNU Octave 2.1.50\octave_files To insert OctaveFEMM into the search path, one can create the .octaverc file and add the line: LOADPATH = [ ’/cygdrive/c/progra˜1/femm42/mfiles//’, LOADPATH ]; to add the directory containing the OctaveFEMM commands to the Octave search path. Next, you need to may need to edit the command used to invoke FEMM, especially if you have installed FEMM in a directory that is not the default one. Edit c:\Program Files\femm42\mfiles\openfemm.m to make sure that OctaveFEMM is pointing to the right FEMM executable. The temporary files defined in this directory should also be located in the same directory as the FEMM executable, so you may need to edit those definitions as well. To start an OctaveFEMM session, use the openfemm function. This function starts up a FEMM process to which OctaveFEMM calls are sent. When done with OctaveFEMM, the FEMM process can be shut down via the closefemm function. A number of examples that use OctaveFEMM to analyze various problems are included in the directory cd c:\Program Files\femm42\examples

3 Common Command Set
There are a number of FEMM-specific Octave that are not associated with any particular problem type. These functions manipulate the appearance of the main window and other top-level components like the Lua console and Point Properties output window. • clearconsole Clears the output window of the Lua console. • newdocument(doctype) Creates a new preprocessor document and opens up a new preprocessor window. Specify doctype to be 0 for a magnetics problem, 1 for an electrostatics problem, 2 for a heat flow problem, or 3 for a current flow problem. Alternative syntax for this function is create(doctype) • hideconsole Hides the floating Lua console window. • hidepointprops Hides the floating FEMM Properties display window. • messagebox(’message’) displays the ’message’ string to the screen in a pop-up message box. • opendocument(’filename’) Opens a document specified by filename. • print(item1,item2,...) This is standard Lua “print” command directed to the output of the Lua console window. Any number of comma-separated items can be printed at once via the print command. • prompt(’message’) This function allows a FEMM script to prompt a user for input. When this command is used, a dialog box pops up with the ’message’ string on the title bar of the dialog box. The user can enter in a single line of input via the dialog box. Prompt returns the user’s input to Octave and parses it using Octave’s eval command. 3

• showconsole Displays the floating Lua console window. • showpointprops Displays the floating FEMM Properties display window. • main minimize minimizes the main FEMM window. • main maximize maximizes the main FEMM window. • main restore restores the main FEMM window from a minimized or maximized state. • main resize(width,height) resizes the main FEMM window client area to width × height.

4 Magnetics Preprocessor Command Set
A number of different commands are available in the preprocessor.

4.1 Object Add/Remove Commands
• mi addnode(x,y) Add a new node at x,y • mi addsegment(x1,y1,x2,y2) Add a new line segment from node closest to (x1,y1) to node closest to (x2,y2) • mi addblocklabel(x,y) Add a new block label at (x,y) • mi addarc(x1,y1,x2,y2,angle,maxseg) Add a new arc segment from the nearest node to (x1,y1) to the nearest node to (x2,y2) with angle ‘angle’ divided into ‘maxseg’ segments. • mi drawline(x1,y1,x2,y2) Adds nodes at (x1,y1) and (x2,y2) and adds a line between the nodes. • mi drawpolyline([x1,y1;x2,y2’...]) Adds nodes at each of the specified points and connects them with segments. • mi drawpolygon([x1,y1;x2,y2’...]) Adds nodes at each of the specified points and connects them with segments to form a closed contour. • mi drawarc(x1,y1,x2,y2,angle,maxseg) Adds nodes at (x1,y1) and (x2,y2) and adds an arc of the specified angle and discretization connecting the nodes. • mi drawrectangle(x1,y1,x2,y2) Adds nodes at the corners of a rectangle defined by the points (x1,y1) and (x2,y2), then adds segments connecting the corners of the rectangle. • mi deleteselected Delete all selected objects. • mi deleteselectednodes Delete selected nodes. • mi deleteselectedlabels Delete selected block labels. 4

• mi deleteselectedsegments Delete selected segments. • mi deleteselectedarcsegments Delete selects arcs.

4.2 Geometry Selection Commands
• mi clearselected Clear all selected nodes, blocks, segments and arc segments. • mi selectsegment(x,y) Select the line segment closest to (x,y) • mi selectnode(x,y) Select the node closest to (x,y). Returns the coordinates of the selected node. • mi selectlabel(x,y) Select the label closet to (x,y). Returns the coordinates of the selected label. • mi selectarcsegment(x,y) Select the arc segment closest to (x,y) • mi selectgroup(n) Select the nth group of nodes, segments, arc segments and blocklabels. This function will clear all previously selected elements and leave the editmode in 4 (group)

4.3 Object Labeling Commands
• mi setnodeprop(’propname’,groupno) Set the selected nodes to have the nodal property ’propname’ and group number groupno. • mi setblockprop(’blockname’, automesh, meshsize, ’incircuit’, magdir, group, turns) Set the selected block labels to have the properties: – Block property ’blockname’. – automesh: 0 = mesher defers to mesh size constraint defined in meshsize, 1 = mesher automatically chooses the mesh density. – meshsize: size constraint on the mesh in the block marked by this label. – Block is a member of the circuit named ’incircuit’ – The magnetization is directed along an angle in measured in degrees denoted by the parameter magdir – A member of group number group – The number of turns associated with this label is denoted by turns. • mi setsegmentprop(’propname’, elementsize, automesh, hide, group) Set the selected segments to have: – Boundary property ’propname’ – Local element size along segment no greater than elementsize – automesh: 0 = mesher defers to the element constraint defined by elementsize, 1 = mesher automatically chooses mesh size along the selected segments 5

• mi setfocus(’documentname’) Switches the magnetics input file upon which commands are to act. entering 1E-8 requires the RMS of the residual to be less than 10−8 . hide. ’meters’. For example. this command can be used to switch between files so that the mutiple files can be operated upon programmatically. For a minimized window. representing the depth of the problem in the into-the-page direction for 2-D planar problems. • mi loadsolution loads and displays the solution corresponding to the current geometry. Set freq to the desired frequency in Hertz. ’documentname’ should contain the name of the desired document as it appears on the window’s title bar.5 Mesh Commands • mi createmesh runs triangle to create a mesh. • mi analyze(flag) runs the magnetics solver. 1 == hidden in post processor – A member of group number group 4. and ’micrometers’. either specify no value for flag or specify 0. ’millimeters’. flag should be set to 1. The sixth parameter represents the minimum angle constraint sent to the mesh generator – 30 degrees is the usual choice for this parameter. A fifth parameter. group) Set the selected arc segments to: – Meshed with elements that span at most maxsegdeg degrees per element – Boundary property ’propname’ – hide: 0 = not hidden in post-processor. The precision parameter dictates the precision required by the solver. Valid ’units’ entries are ’inches’.depth.– hide: 0 = not hidden in post-processor. 4. Specify the depth to be zero for axisymmetric problems. Note that this is not a necessary precursor of performing an analysis. If more than one magnetics input file is being edited at a time.4 Problem Commands • mi probdef(freq. 6 . or to ’axi’ for an axisymmetric problem. • mi showmesh shows the mesh. as mi analyze will make sure the mesh is up to date before running an analysis. The units parameter specifies the units used for measuring length in the problem domain.precision. • mi saveas(’filename’) saves the file with name ’filename’. ’propname’.type.minangle) changes the problem definition.units. For a visible window. ’centimeters’. The number of elements in the mesh is pushed back onto the lua stack. The flag parameter controls whether the solver window is visible or minimized. ’mils’. Set the parameter problemtype to ’planar’ for a 2-D planar problem. 1 == hidden in post processor – A member of group number group • mi setarcsegmentprop(maxsegdeg.

copies.shiftangle) – bx. by. 1 – lines (segments). angle. by. angle is measured in degrees. 3 – arc segments. 2 –block labels. – copies – number of copies to be produced from the selected objects. • mi moverotate2(bx.r)turnsacornerlocatedat(x. – copies – number of copies to be produced from the selected objects. copies. – copies – number of copies to be produced from the selected objects. 4. • mi moverotate(bx. 4.dy – distance by which the selected objects are shifted. dy.y.6 Editing Commands • mi copyrotate(bx. 4. by – base point for rotation – shiftangle – angle in degrees by which the selected objects are rotated.shiftangle.by. 7 .dy – distance by which the selected objects are incrementally shifted. – editaction 0 –nodes.group • mi copytranslate(dx. copies ) – bx. – editaction 0 –nodes. 2 –block labels. by – base point for rotation – shiftangle – angle in degrees by which the selected objects are rotated.by.group • mi createradius(x. editaction ) – bx. editaction) – bx. angle is measured in degrees.dy – distance by which the selected objects are incrementally shifted. • mi copyrotate2(bx. angle.group • mi movetranslate(dx. 1 – lines (segments). by – base point for rotation – angle – angle by which the selected objects are incrementally shifted to make each copy. 3 – arc segments.y)intoacurveofradiusr. – copies – number of copies to be produced from the selected objects. 1 – lines (segments). – editaction 0 –nodes. by – base point for rotation – angle – angle by which the selected objects are incrementally shifted to make each copy. 3 – arc segments. copies) – dx. editaction) – dx. dy.dy) – dx.• mi purgemesh clears the mesh out of both the screen and memory. 4. • mi copytranslate2(dx. 2 –block labels.

selected group This command will affect all subsequent uses of the other editing commands.editaction) mirror the selected objects about a line passing through the points (x1. 2 –block labels.x2. 4. • mi zoomout zooms out by a factor of 50%. 1 – lines (segments). – editaction 0 –nodes. by – base point for scaling – scalefactor – a multiplier that determines how much the selected objects are scaled – editaction 0 –nodes. 8 .y1.group • mi mirror(x1. 4.y1) and (x2.block labels – ’group’ .arc segments – ’blocks’ . 1 – lines (segments). 4. if they are used WITHOUT the editaction parameter.scalefactor) – bx. • mi mirror2(x1.y2.• mi movetranslate2(dx.x2.y2) Set the display area to be from the bottom left corner specified by (x1. by – base point for scaling – scalefactor – a multiplier that determines how much the selected objects are scaled • mi scale2(bx. 3 – arc segments.7 Zoom Commands • mi zoomnatural zooms to a “natural” view with sensible extents.y2).x2.y2) mirror the selected objects about a line passing through the points (x1.by.scalefactor. • mi zoom(x1. 2 –block labels.line segments – ’arcsegments’ .editaction) – bx.y1. 2 for block labels.dy – distance by which the selected objects are shifted.y1) and (x2.editaction) – dx. Valid editaction entries are 0 for nodes.y2).dy.group • mi scale(bx. and 4 for groups.y1. 3 for arc segments. 3 – arc segments.by.nodes – ’segments’ .y2).y1) to the top right corner specified by (x2. 1 for lines (segments). • mi seteditmode(editmode) Sets the current editmode to: – ’nodes’ . • mi zoomin zoom in by a factor of 200%.

9 Object Properties • mi addmaterial(’matname’. – J Applied source current density in Amps/mm2. H c. and the type parameter is set to ’cart’ for cartesian coordinates or ’polar’ for polar coordinates. The density parameter specifies the space between grid points. – Cduct Electrical conductivity of the material in MS/m. • mi resize(width. nstr. • mi restore restores the active magnetics input view from a minimized or maximized state. lam fill. 4. – Lam d Lamination thickness in millimeters. – Phi hmax Hysteresis lag angle in degrees. used for nonlinear BH curves. Lam d. setting flag to ’off’ turns off snap to grid.4. iron completely fills the volume) – Lamtype Set to ∗ ∗ ∗ ∗ 0 – Not laminated or laminated in plane 1 – laminated x or r 2 – laminated y or z 3 – magnet wire 9 . • mi_setgrid(density. dwire) adds a new material with called ’matname’ with the material properties: – mu x Relative permeability in the x. Phi hmax. by default. – Lam fill Fraction of the volume occupied per lamination that is actually filled with iron (Note that this parameter defaults to 1 in the femm preprocessor dialog box because. J. • mi refreshview Redraws the current view.or r-direction. • mi_grid_snap(’flag’) Setting flag to ’on’ turns on snap to grid. mu x. Cduct. • mi maximize maximizes the active magnetics input view. • mi_hidegrid Hide the grid points points.or z-direction.’type’) Change the grid spacing. • mi minimize minimizes the active magnetics input view.8 View Commands • mi_showgrid Show the grid points. Phi hx. LamType. Phi hy. – H c Permanent magnet coercivity in Amps/Meter. – mu y Relative permeability in the y.height) resizes the active magnetics input window client area to width × height. mu y.

Set BdryFormat to 1 and all other parameters to zero. set BdryFormat to 3 and set all other parameters to zero. • mi addboundprop(’propname’.h) Adds a B-H data point the the material specified by the string ’blockname’. Mu. – nstr Number of strands in the wire build. The point to be added has a flux density of b in units of Teslas and a field intensity of h in units of Amps/Meter. Set the unused parameter pairs to 0. – dwire Diameter of each of the wire’s constituent strand in millimeters. Should be 1 for Magnet or Square wire. • mi addpointprop(’pointpropname’. – Phi hy Hysteresis lag in degrees in the y-direction for linear problems. • mi addcircprop(’circuitname’.a. A2. i. set the Mu to the desired relative permeability and Sig to the desired conductivity in MS/m.b. – To obtain a “Mixed” type boundary condition. set C1 and C0 as required and BdryFormat to 2. circuittype) adds a new circuit property with name ’circuitname’ with a prescribed current. – For an “Anti-Perodic” boundary condition. 10 . • mi addbhpoint(’blockname’. set BdryFormat to 4 and set all other parameters to zero. Set all other parameters to zero. – For a “Small Skin Depth” type boundary condtion. set BdryFormat to 5 set all other parameters to zero.j) adds a new point property of name ’pointpropname’ with either a specified potential a in units Webers/Meter or a point current j in units of Amps. set the A0. A0. A2 and Phi parameters as required. Set all other parameters to zero. BdryFormat) adds a new boundary property with name ’propname’ – For a “Prescribed A” type boundary condition. Sig. c1. c0. Phi.∗ 4 – plain stranded wire ∗ 5 – Litz wire ∗ 6 – square wire – Phi hx Hysteresis lag in degrees in the x-direction for linear problems. A1. The circuittype parameter is 0 for a parallel-connected circuit and 1 for a series-connected circuit. – For a “Periodic” boundary condition. Note that not all properties need be defined – properties that aren’t defined are assigned default values. A1. • mi clearbhpoints(’blockname’) Clears all B-H data points associatied with the material specified by ’blockname’. – For a “Strategic dual image” boundary.

The BC to be modified is specified by ’BdryName’. The last number is the value to be applied to the specified property. MS/m Lamination thickness. degrees Hysteresis lag in y-direction for linear problems. • mi deleteboundprop(’propname’) deletes the boundary property named ’propname’. 2=parallel to y Hysteresis lag in x-direction for linear problems. The last number is the value to be applied to the specified property. Amps/Meter Source current density. 1 = parallel to x. The next parameter is the number of the property to be set. The next parameter is the number of the property to be set.• mi deletematerial(’materialname’) deletes the material named ’materialname’. The various properties that can be modified are listed below: 11 .value) This function allows for modification of a boundary property. • mi deletecircuit(’circuitname’) deletes the circuit named circuitname. The various properties that can be modified are listed below: propnum 0 1 2 3 4 5 6 7 8 9 10 11 Symbol BlockName µx µy Hc J σ dlam φhmax LamFill LamType φhx φhy Description Name of the material x (or r) direction relative permeability y (or z) direction relative permeability Coercivity. MA/m2 Electrical conductivity. degrees • mi_modifyboundprop(’BdryName’.g.value) This function allows for modification of a material’s properties without redefining the entire material (e. • mi deletepointprop(’pointpropname’) deletes the point property named ’pointpropname’ • mi_modifymaterial(’BlockName’.propnum. so that current can be modified from run to run). degrees Iron fill fraction 0 = None/In plane. The material to be modified is specified by ’BlockName’. mm Hysteresis lag angle for nonlinear problems.propnum.

value) This function allows for modification of a circuit property. The various properties that can be modified are listed below: propnum 0 1 2 Symbol PointName A J Description Name of the point property Nodal potential.i) sets the current in the circuit specified by ’CircName’ to i. 4. The point property to be modified is specified by ’PointName’. 1 = Series • mi setcurrent(’CircName’.propnum. The circuit property to be modified is specified by ’CircName’.propnum 0 1 2 3 4 5 6 7 8 9 Symbol BdryName A0 A1 A2 φ µ σ c0 c1 BdryFormat Description Name of boundary property Prescribed A parameter Prescribed A parameter Prescribed A parameter Prescribed A phase Small skin depth relative permeability Small skin depth conductivity.10 Miscellaneous • mi savebitmap(’filename’) saves a bitmapped screenshot of the current view to the file specified by ’filename’. MS/m Mixed BC parameter Mixed BC parameter Type of boundary condition: 0 = Prescribed A 1 = Small skin depth 2 = Mixed 3 = Strategic Dual Image 4 = Periodic 5 = Antiperiodic • mi_modifypointprop(’PointName’.propnum. The last number is the value to be applied to the specified property. The next parameter is the number of the property to be set. Amps • mi_modifycircprop(’CircName’. The next parameter is the number of the property to be set. Weber/Meter Nodal current. The last number is the value to be applied to the specified property. 12 . The various properties that can be modified are listed below: propnum 0 1 2 Symbol CircName i CircType Description Name of the circuit property Total current 0 = Parallel.value) This function allows for modification of a point property.

To hide the block label names. the permeability varies as a function of distance from the origin of the external region. • mi readdxf(’filename’) This function imports a dxf file specified by ’filename’. and the Ri parameter is the radius of the inner region (i. the region of interest). These parameters are necessary to define the permeability variation in the external region. • mi defineouterspace(Zo.n total H. • mi detachouterspace undefines all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. The first value is the result of the integral calculation. • mi attachouterspace marks all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation.1 Data Extraction Commands • mo lineintegral(type) Calculate the line integral for the defined contour type 0 1 2 3 4 5 name B. 5. • mi refreshview Redraws the current view.n)ˆ2 values 3 2× r/x force values 4 2× y/z force - Returns typically two values. This integral can return up to four 13 .n)ˆ2 values 2 avg B.t surface area DC r/x force DC torque total (B. The Zo parameter is the z-location of the origin of the outer region.• mi savemetafile(’filename’) saves a metafile screenshot of the current view to the file specified by ’filename’.n)ˆ2 values 1 total B. the parameter should be set to 1. The only exception is integral 3.Ro. the Ro parameter is the radius of the outer region. To display the names. 5 Magnetics Post Processor Command Set There are a number of scripting commands designed to operate in the postprocessing environment.n avg H. which evaluates Maxwell’s stress tensor.Ri) defines an axisymmetric external region to be used in conjuction with the Kelvin Transformation method of modeling unbounded problems. and the second value is the average of the quantity of interest over the contour. flag should be 0. In the exterior region.t Contour length Stress Tensor Force Stress Tensor Torque (B.e.n H.t DC y/z force 2× torque avg (B. • mi shownames(flag) This function allow the user to display or hide the block label names on screen. • mi close Closes current magnetics preprocessor document and destroys magnetics preprocessor window.

moment of inertia / density) • mo getpointvalues(x.e.results. The function returns an array whose contents are. For force and torque results. in order: 14 . the 2× results are only relevant for problems where ω = 0.y) Get the values associated with the point at (x. • mo blockintegral(type) Calculate a block integral for the selected blocks Type 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Definition A·J A Magnetic field energy Hysteresis and/or lamination losses Resistive losses Block cross-section area Total losses Total current Integral of Bx (or Br ) over block Integral of By (or Bz ) over block Block volume x (or r) part of steady-state Lorentz force y (or z) part of steady-state Lorentz force x (or r) part of 2× Lorentz force y (or z) part of 2× Lorentz force Steady-state Lorentz torque 2× component of Lorentz torque Magnetic field coenergy x (or r) part of steady-state weighted stress tensor force y (or z) part of steady-state weighted stress tensor force x (or r) part of 2× weighted stress tensor force y (or z) part of 2× weighted stress tensor force Steady-state weighted stress tensor torque 2× component of weighted stress tensor torque R2 (i.y).

y) Gets the conductivity associated with the point at (x. the reported potential is vector potential A.y). • mo getj(x. the average fraction of the volume filled with conductor) associated with the point at (x. The return value is a list with two element representing µx and µy for planar problems and µr and µz for axisymmetric problems.e.y) Get the magnetic field intensity associated with the point at (x. For axisymmetric problems.y).y). 15 . • mo getconductivity(x. • mo getfill(x. • mo getenergydensity(x. Bz if axisymmetric conductivity σ stored energy density Hx if planar.y).y) Get the electric current density associated with the point at (x. • mo geta(x. Hz if axisymmetric eddy current density source current density µx if planar. • mo getmu(x. • mo getph(x. The return value is a list with two element representing Hx and Hy for planar problems and Hr and Hz for axisymmetric problems. Br if axisymmetric By if planar. • mo getpe(x.y) Get the hysteresis/laminated eddy current loss density associated with the point at (x. The return value is a list with two element representing Bx and By for planar problems and Br and Bz for axisymmetric problems.y) Get the relative magnetic permeability associated with the point at (x.y).y).y) Get the magnetic flux density associated with the point at (x. • mo geth(x.y).y).y) Gets the magnetic field energy density associated with the point at (x. For planar problems.y) Get the potential associated with the point at (x. µr if axisymmetric µy if planar.y).y).Symbol A B1 B2 Sig E H1 H2 Je Js Mu1 Mu2 Pe Ph ff Definition Potential A or flux φ Bx if planar.y) Get the winding factor (i. µz if axisymmetric Power density dissipated through ohmic losses Power density dissipated by hysteresis Winding fill factor The following series of functions retrieves smaller subsets of these results. • mo getb(x. 2πrA is reported. Hr if axisymmetric Hy if planar.y) Get the ohmic loss density associated with the point at (x.

200.0) • mo_getprobleminfo Returns info on problem description.Filename.txt’. the Filename parameter is specified. the command is instead interpreted as a command to write the data to disk to the specfied file name. the command is interpreted as a request to plot the requested plot type to the screen. If.FileFormat) Allows Octave access to FEMM’s X-Y plot routines. Six values are returned by the function. in addition. In order.emf’) To write data instead of a plot to disk. rather than display it to make a graphical plot. the command would be of the form: mo_makeplot(2.200) If this plot were to be written to disk as a metafile. if one wanted to plot B · n to the screen with 200 points evaluated to make the graph. the plot is instead written to disk to the specified file name as an extended metafile. the command would be: mo makeplot(2. these parameters are: 16 .NumPoints. If only PlotType or only PlotType and NumPoints are specified. If the FileFormat parameter is also.200. Valid entries for PlotType are: PlotType 0 1 2 3 4 5 6 7 8 Valid file formats are FileFormat 0 1 2 Definition Multi-column text with legend Multi-column text with no legend Mathematica-style formatting Definition Potential |B| B·n B·t |H| H ·n H ·t Jeddy Jsource + Jeddy For example. Properties are returned for the circuit property named ’circuit’.’c:\temp\myfile.’c:\temp\myfile. the command would be: mo_makeplot(2. Returns two values: Return value Definition 1 problem type 2 frequency in Hz • mo_getcircuitproperties(’circuit’) Used primarily to obtain impedance information associated with circuit properties.• mo_makeplot(PlotType.

y2). If there are less than two points defined in the contour. – flux Circuit’s flux linkage 5. • mo bendcontour(angle. • mo_zoomin Zoom in one level. all blocks are selected.y) Select the block that contains point (x. If no number is specified (i. • mo_zoomout Zoom out one level.y).2 Selection Commands • mo seteditmode(mode) Sets the mode of the postprocessor to point.y1. • mo selectpoint(x. If this is the first point then it starts a contour.y1) and upper right corner (x2. this command is ignored.y). – volts Voltage drop across the circuit in the circuit. • mo clearcontour Clear a prevously defined contour • mo clearblock Clear block selection 5. 17 . The arc is actually composed of many straight lines. The mo selectpoint command has the same functionality as the left-button-click contour point selection when the program is running in interactive mode. and ’area’.e. mo groupselectblock ). contour. The mo addcontour command has the same functionality as a right-button-click contour point addition when the program is running in interactive mode.x2. Valid entries for mode are ’point’.– current Current carried by the circuit. • mo groupselectblock(n) Selects all of the blocks that are labeled by block labels that are members of group n.y).y) Adds a contour point at the closest input point to (x. a contour is added that traces along the arcsegment.anglestep) Replaces the straight line formed by the last two points in the contour by an arc that spans angle degrees.y) Adds a contour point at (x. each of which is constrained to span no more than anglestep degrees. or area mode. ’contour’. • mo zoom(x1. The anglestep parameter must be greater than zero. if there are existing points the contour runs from the previous point to this point. • mo selectblock(x.3 Zoom Commands • mo_zoomnatural Zoom to the natural boundaries of the geometry. If the selected point and a previous selected points lie at the ends of an arcsegment.y2) Zoom to the window defined by lower left corner (x1. • mo addcontour(x. The angle parameter can take on values from -180 to 180 degrees.

• mo_grid_snap(’flag’) Setting flag to ’on’ turns on snap to grid. • mo_hidepoints Hide the node points from the input geometry. • mo_showdensityplot(legend. Valid entries are ’mag’.upper_B. and ’jimag’ for magnitude.lower_A. • mo smooth(’flag’) This function controls whether or not smoothing is applied to the B and H fields. • mo_showpoints Show the node points from the input geometry. – upper_B Sets the upper display limit for the density plot. Setting flag equal to ’on’ turns on smoothing.4 View Commands • mo_showmesh Show the mesh.gscale. which are naturally piece-wise constant over each element. and the type parameter is set to ’cart’ for cartesian coordinates or ’polar’ for polar coordinates. – upper_A Upper limit for A contours.’type’) Change the grid spacing. real component. and setting flag to ’off’ turns off smoothing. • mo_showgrid Show the grid points. real component.type) shows the A contour plot with options: – numcontours Number of A equipotential lines to be plotted. The density parameter specifies the space between grid points.lower_B. respectively. • mo_setgrid(density.upper_A. • mo_showcontourplot(numcontours. ’jreal’. setting flag to ’off’ turns off snap to grid. • mo_hidegrid Hide the grid points points. respectively.5. – gscale Set to 0 for a colour density plot or 1 for a grey scale density plot. • mo_hidedensityplot hides the flux density plot. ’real’. and imaginary component of B. • mo_hidecontourplot Hides the contour plot. and imaginary component of J. – type Type of density plot to display. – lower_B Sets the lower display limit for the density plot. and ’imag’ for magnitude. • mo_hidemesh Hide the mesh. – lower_A Lower limit for A contours. 18 . current density can be displayed by specifying ’jmag’. Alternatively.type) Shows the flux density plot with options: – legend Set to 0 to hide the plot legend or 1 to show the plot legend.

5. • mo savebitmap(’filename’) saves a bitmapped screen shot of the current view to the file specified by ’filename’.y2. • mo savemetafile(’filename’) saves a metafile screenshot of the current view to the file specified by ’filename’. • mo maximize maximizes the active magnetics output view. the parameter should be set to 1.y) Add a new block label at (x.y1. or ’both’ to show either the real.y1) to node closest to (x2.y2) • ei addblocklabel(x. 6.y2) Add a new line segment from node closest to (x1. To hide the block label names.5 Miscellaneous • mo close Closes the current post-processor instance. To display the names. flag should be 0.y1) to the nearest node to (x2. • mo shownames(flag) This function allow the user to display or hide the block label names on screen.maxseg) Add a new arc segment from the nearest node to (x1. • mo reload Reloads the solution from disk. • mo minimize minimizes the active magnetics output view. • mo refreshview Redraws the current view.angle.y) • ei addarc(x1.x2.y1. 6 Electrostatics Preprocessor Command Set A number of different commands are available in the preprocessor. • mo restore restores the active magnetics output view from a minimized or maximized state. Two naming conventions can be used: one which separates words in the command names by underscores.y2) with angle ‘angle’ divided into ‘maxseg’ segments. • mo resize(width.x2. 19 .– type Choice of ’real’. ’imag’.y) Add a new node at x.1 Object Add/Remove Commands • ei addnode(x.y • ei addsegment(x1. imaginary of both real and imaginary components of A. and one that eliminates the underscores.height) resizes the active magnetics output window client area to width × height.

x2.y1.maxseg) Adds nodes at (x1. Returns the coordinates of the selected label.y) Select the node closest to (x.y2’. • ei selectarcsegment(x. • ei selectlabel(x. Returns the coordinates of the selected node.]) Adds nodes at each of the specified points and connects them with segments. • ei deleteselectedarcsegments Delete selects arcs..y2) and adds an arc of the specified angle and discretization connecting the nodes.y1.y) Select the arc segment closest to (x.y1.groupno. then adds segments connecting the corners of the rectangle.y2).y2.y1. blocks. • ei deleteselectedsegments Delete selected segments.y). ’inconductor’) Set the selected nodes to have the nodal property ’propname’ and group number groupno. segments and arc segments.y1) and (x2.x2. • ei drawpolyline([x1.y) • ei selectgroup(n) Select the nth group of nodes. This function will clear all previously selected elements and leave the edit mode in 4 (group) 6.x2.y1) and (x2..y2’.x2.3 Object Labeling Commands • ei setnodeprop(’propname’. • ei deleteselected Delete all selected objects.angle. 6.y2) Adds nodes at (x1. • ei drawrectangle(x1.. segments.y) Select the label closet to (x.y)..y1) and (x2.y2) Adds nodes at the corners of a rectangle defined by the points (x1. arc segments and block labels.y1.y2) and adds a line between the nodes. • ei deleteselectedlabels Delete selected block labels.• ei drawline(x1. 20 . this parameter can be set to ’<None>’. • ei selectsegment(x.2 Geometry Selection Commands • ei clearselected Clear all selected nodes.y) Select the line segment closest to (x.y) • ei selectnode(x.]) Adds nodes at each of the specified points and connects them with segments to form a closed contour. If the node doesn’t belong to a named conductor. • ei drawpolygon([x1. The ’inconductor’ string specifies which conductor the node belongs to.x2. • ei drawarc(x1. • ei deleteselectednodes Delete selected nodes.

type. Valid ’units’ entries are ’inches’. elmsize.precision.minangle) changes the problem definition. meshsize: size constraint on the mesh in the block marked by this label. ’meters. A member of group number group • ei setsegmentprop(’name’. The precision parameter dictates the precision required by the solver.4 Problem Commands • ei probdef(units. For example. Set problemtype to ’planar’ for a 2-D planar problem. ’centimeters’. 6. 1 == hidden in post processor A member of group number group A member of the conductor specified by the string ’inconductor’. If the segment is not part of a conductor. The units parameter specifies the units used for measuring length in the problem domain. If the segment is not part of a conductor. group) Set the selected block labels to have the properties: Block property ’blockname’. The fourth parameter represents the depth of the problem in the into-the-page direction for 2-D planar problems–just enter 0 as a placeholder for axisymmetric problems. and ’micrometers’. 21 . hide. ’millimeters’. automesh: 0 = mesher defers to mesh size constraint defined in meshsize. this parameter can be specified as ’<None>’. automesh. entering 1. ’mils’.E-8 requires the RMS of the residual to be less than 10−8 . ’inconductor’) Set the selected arc segments to: Meshed with elements that span at most maxsegdeg degrees per element Boundary property ’propname’ hide: 0 = not hidden in post-processor. or to ’axi’ for an axisymmetric problem. automesh. • ei setarcsegmentprop(maxsegdeg. ’propname’. meshsize. ’inconductor’) Set the select segments to have: Boundary property ’name’ Local element size along segment no greater than elmsize automesh: 0 = mesher defers to the element constraint defined by elementsize. The sixth parameter represents the minimum angle constraint sent to the mesh generator (usually 30 degrees).• ei setblockprop(’blockname’. group. 1 = mesher automatically chooses the mesh density. hide. this parameter can be specified as ’<None>’. group. 1 = mesher automatically chooses mesh size along the selected segments hide: 0 = not hidden in post-processor. 1 == hidden in post processor A member of group number group A member of the conductor specified by the string ’inconductor’.depth.

by. • ei purgemesh clears the mesh out of both the screen and memory. – editaction 0 –nodes.6 Editing Commands • ei copyrotate(bx. 22 . as ei analyze will make sure the mesh is up to date before running an analysis. • ei setfocus(’documentname’) Switches the electrostatics input file upon which commands are to act. The flag parameter controls whether the solver window is visible or minimized. The number of elements in the mesh is pushed back onto the lua stack. 6. 3 – arc segments. angle is measured in degrees. Note that this is not a necessary precursor of performing an analysis. 2 –block labels. – copies – number of copies to be produced from the selected objects. by. by – base point for rotation – angle – angle by which the selected objects are incrementally shifted to make each copy. For a visible window. angle.dy – distance by which the selected objects are incrementally shifted. • ei saveas(’filename’) saves the file with name ’filename’. angle is measured in degrees. copies. 6. • ei copyrotate2(bx. – copies – number of copies to be produced from the selected objects.5 Mesh Commands • ei createmesh runs triangle to create a mesh. 4. angle. copies) – dx.• ei analyze(flag) runs the electrostatics solver. by – base point for rotation – angle – angle by which the selected objects are incrementally shifted to make each copy. 1 – lines (segments). flag should be set to 1. – copies – number of copies to be produced from the selected objects.group • ei copytranslate(dx. For a minimized window. editaction ) – bx. ’documentname’ should contain the name of the desired document as it appears on the window’s title bar. dy. copies ) – bx. If more than one electrostatics input file is being edited at a time. this command can be used to switch between files so that the mutiple files can be operated upon programmatically. either specify no value for flag or specify 0. • ei showmesh toggles the flag that shows or hides the mesh. • ei loadsolution loads and displays the solution corresponding to the current geometry.

by. 4. and 4 for groups.editaction) mirror the selected objects about a line passing through the points (x1.y.r)turnsacornerlocatedat(x.dy – distance by which the selected objects are incrementally shifted.y2).group • ei movetranslate(dx. 4.y1.shiftangle.by.editaction) – dx.dy) – dx. 3 for arc segments.y2. 3 – arc segments.dy – distance by which the selected objects are shifted.dy – distance by which the selected objects are shifted.group • ei mirror(x1.by. 2 for block labels. Valid editaction entries are 0 for nodes.y1. – editaction 0 –nodes. 3 – arc segments.dy. • ei movetranslate2(dx. 3 – arc segments. 2 –block labels.editaction) – bx.scalefactor) – bx.scalefactor.y2). editaction) – bx. copies. 1 – lines (segments). 1 – lines (segments). • ei moverotate(bx.x2. by – base point for rotation – shiftangle – angle in degrees by which the selected objects are rotated.• ei copytranslate2(dx. 4.by. – editaction 0 –nodes.y1) and (x2. 4. dy.y)intoacurveofradiusr. by – base point for scaling – scalefactor – a multiplier that determines how much the selected objects are scaled • ei scale2(bx. • ei moverotate2(bx.group • ei createradius(x.y2) mirror the selected objects about a line passing through the points (x1.group • ei scale(bx. 1 for lines (segments). • ei mirror2(x1. 1 – lines (segments).x2. 2 –block labels. editaction) – dx.y1) and (x2. 1 – lines (segments). • ei seteditmode(editmode) Sets the current editmode to: 23 . 3 – arc segments. by – base point for rotation – shiftangle – angle in degrees by which the selected objects are rotated. 2 –block labels. – copies – number of copies to be produced from the selected objects. by – base point for scaling – scalefactor – a multiplier that determines how much the selected objects are scaled – editaction 0 –nodes. – editaction 0 –nodes. 2 –block labels.shiftangle) – bx.

setting flag to ’off’turns off snap to grid. and the type parameter is set to ’cart’ for Cartesian coordinates or ’polar’ for polar coordinates. if they are used WITHOUT the editaction parameter. 6. • ei refreshview Redraws the current view. • ei gridsnap(’flag’) Setting flag to ”on” turns on snap to grid.’type’) Change the grid spacing. • ei minimize minimizes the active electrostatics input view. • ei hidegrid Hide the grid points points.y2) Set the display area to be from the bottom left corner specified by (x1. • ei maximize maximizes the active electrostatics input view. • ei setgrid(density. • ei zoom(x1.height) resizes the active electrostatics input window client area to width × height. • ei zoomin zoom in by a factor of 200%.x2. 6. • ei restore restores the active electrostatics input view from a minimized or maximized state.block labels – ’group’ .8 View Commands • ei showgrid Show the grid points.– ’nodes’ .selected group This command will affect all subsequent uses of the other editing commands.y1.y2).y1) to the top right corner specified by (x2.7 Zoom Commands • ei zoomnatural zooms to a “natural” view with sensible extents.nodes – ’segments’ . • ei resize(width. • ei zoomout zooms out by a factor of 50%.arc segments – ’blocks’ .line segments – ’arcsegments’ . 24 . The density parameter specifies the space between grid points.

Set all other parameters to zero. set BdryFormat to 4 set all other parameters to zero. Vc. For an “Anti-Perodic” boundary condition.6. • ei addboundprop(’boundname’. • ei addconductorprop(’conductorname’. Set the unused property to zero. The last number is the value to be applied to the specified property. • ei deletematerial(’materialname’) deletes the material named ’materialname’.9 Object Properties • ei addmaterial(’matname’.propnum. The next parameter is the number of the property to be set. set the Vs parameter to the desired voltage and all other parameters to zero. ex. • ei deleteboundprop(’boundname’) deletes the boundary property named ’boundname’.or r-direction. BdryFormat) adds a new boundary property with name ’boundname’ For a “Fixed Voltage” type boundary condition. For a “Periodic” boundary condition. • ei deletepointprop(’pointname’) deletes the point property named ’pointname’ • ei modifymaterial(’BlockName’. so that current can be modified from run to run).Vp. The material to be modified is specified by ’BlockName’. qs. The various properties that can be modified are listed below: 25 .qp) adds a new point property of name ’pointname’ with either a specified potential Vp a point charge density qp in units of C/m.value) This function allows for modification of a material’s properties without redefining the entire material (e. To obtain a “Mixed” type boundary condition. • ei deleteconductor(’conductorname’) deletes the conductor named conductorname. qv) adds a new material with called ’matname’ with the material properties: ex Relative permittivity in the x. ey. Vs. qc. set BdryFormat to 3 and set all other parameters to zero. c1. conductortype) adds a new conductor property with name ’conductorname’ with either a prescribed voltage or a prescribed total charge. set qs to the desired charge density in C/m2 and set BdryFormat to 2. ey Relative permittivity in the y. c0. set C1 and C0 as required and BdryFormat to 1.g. qv Volume charge density in units of C/m3 • ei addpointprop(’pointname’. The conductortype parameter is 0 for prescribed charge and 1 for prescribed voltage. To obtain a prescribes surface charge density. .or z-direction.

The last number is the value to be applied to the specified property.propnum.propnum. The last number is the value to be applied to the specified property. The point property to be modified is specified by ’PointName’. The next parameter is the number of the property to be set. 1 = Prescribed voltage 26 . The various properties that can be modified are listed below: propnum 0 1 2 3 4 5 Symbol BdryName Vs qs c0 c1 BdryFormat Description Name of boundary property Fixed Voltage Prescribed charge density Mixed BC parameter Mixed BC parameter Type of boundary condition: 0 = Prescribed V 1 = Mixed 2 = Surface charge density 3 = Periodic 4 = Antiperiodic • ei modifypointprop(’PointName’. The various properties that can be modified are listed below: propnum Symbol Description 0 ConductorName Name of the conductor property 1 Vc Conductor voltage 2 qc Total conductor charge 3 ConductorType 0 = Prescribed charge. The last number is the value to be applied to the specified property.propnum 0 1 2 3 Symbol BlockName ex ey qs Description Name of the material x (or r) direction relative permittivity y (or z) direction relative permittivity Volume charge • ei modifyboundprop(’BdryName’. The BC to be modified is specified by ’BdryName’. The conductor property to be modified is specified by ’ConductorName’. The various properties that can be modified are listed below: propnum Symbol Description 0 PointName Name of the point property Vp Prescribed nodal voltage 1 2 qp Point charge density in C/m • ei modifyconductorprop(’ConductorName’.propnum.value) This function allows for modification of a point property. The next parameter is the number of the property to be set.value) This function allows for modification of a boundary property.value) This function allows for modification of a conductor property. The next parameter is the number of the property to be set.

Ro. The Zo parameter is the z-location of the origin of the outer region. To display the names. the region of interest). and the Ri parameter is the radius of the inner region (i.e. 7 Electrostatics Post Processor Command Set There are a number of scripting commands designed to operate in the postprocessor. these commands can be used with either the underscore naming or with the no-underscore naming convention.6. As with the preprocessor commands.10 Miscellaneous • ei savebitmap(’filename’) saves a bitmapped screenshot of the current view to the file specified by ’filename’. • ei detachouterspace undefines all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation.1 Data Extraction Commands • eo lineintegral(type) Calculates the line integral for the defined contour type 0 1 2 3 4 Integral E ·t D·n Contour length Force from stress tensor Torque from stress tensor 27 . • ei readdxf(’filename’) This function imports a dxf file specified by ’filename’. 7. • ei defineouterspace(Zo. • ei close closes the preprocessor window and destroys the current document. • ei savemetafile(’filename’) saves a metafile screenshot of the current view to the file specified by ’filename’.Ri) defines an axisymmetric external region to be used in conjuction with the Kelvin Transformation method of modeling unbounded problems. flag should be 0. the parameter should be set to 1. • ei refreshview Redraws the current view. • ei attachouterspace marks all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. In the exterior region. the Ro parameter is the radius of the outer region. • ei shownames(flag) This function allow the user to display or hide the block label names on screen. These parameters are necessary to define the permeability variation in the external region. the permeability varies as a function of distance from the origin of the external region. To hide the block label names.

y) Gets the voltage associated with the point at (x.direction component of electric field intensity y.or z. 28 .direction component of displacement x.y) Gets the electric flux density associated with the point at (x.or r. The function returns an array of results whose elements represent: Symbol V Dx Dy Ex Ey ex ey nrg Definition Voltage x.or z. • eo getd(x. • eo getperm(x. the function returns an array with two elements is returned representing components in the x and y or r and z directions. an array with two elements is returned representing force in the x and y or r and z directions.This integral a single result for field intensity. • eo blockintegral(type) Calculates a block integral for the selected blocks type 0 1 2 3 4 5 6 Integral Stored Energy Block Cross-section Block Volume Average D over the block Average E over the block Weighted Stress Tensor Force Weighted Stress Tensor Torque This integral a single result for energy. volume and torque. • eo getpointvalues(x.direction component of permittivity electric field energy density • eo getv(x.y).y).or z.y). For force.y). • eo getenergydensity(x. • eo gete(x. flux density. The return value is a list with two element representing Ex and Ey for planar problems and Er and Ez for axisymmetric problems.direction component of electric field intensity x. The return value is a list with two element representing εx and εy for planar problems and εr and εz for axisymmetric problems.direction component of permittivity y.direction component of displacement y.y).or r.y) Gets the electric field intensity associated with the point at (x.y) Gets the electric field energy density associated with the point at (x. D and E. and torque. contour length.or r.y) Gets the values associated with the point at (x.y) Gets the electric permittivity associated with the point at (x. y). For force. The return value is a list with two element representing Dx and Dy for planar problems and Dr and Dz for axisymmetric problems.

txt’.Filename. • eo selectblock(x.emf’) To write data instead of a plot to disk. If only PlotType or only PlotType and NumPoints are specified.NumPoints. Valid entries for PlotType are: PlotType 0 1 2 3 4 5 6 Definition V (Voltage) |D| (Magnitude of flux density) D . Two values are returned: The voltage of the specified conductor. the command would be of the form: eo makeplot(0. rather than display it to make a graphical plot. the Filename parameter is specified.• eo makeplot(PlotType. n (Normal flux density) D . Valid entries for mode are ’point’. 29 . Returns two values: the Problem type (0 for planar and 1 for axisymmetric) and the depth assumed for planar problems in units of meters.FileFormat) Allows Octave to access to the X-Y plot routines. the command is instead interpreted as a command to write the data to disk to the specfied file name.’c:temp.’c:temp. in addition. and the charge carried on the specified conductor. n (Normal field intensity) E . t (Tangential flux density) |E| (Magnitude of field intensity) E . the plot is instead written to disk to the specified file name as an extended metafile.y). If the FileFormat parameter is also.200. 7. or area mode. ’contour’.200) If this plot were to be written to disk as a metafile. and ’area’.2 Selection Commands • eo seteditmode(mode) Sets the mode of the postprocessor to point.y) Select the block that contains point (x. the command would be: eo makeplot(0. the command is interpreted as a request to plot the requested plot type to the screen. • eo getconductorproperties(’conductor’) Properties are returned for the conductor property named ’conductor’. t (Tangential field intensity) Valid file formats are: FileFormat Definition 0 Multi-column text with legend 1 Multi-column text with no legend 2 Mathematica-style formatting For example. If.200. contour.0) • eo getprobleminfo Returns info on problem description. the command would be: eo makeplot(0. if one wanted to plot V to the screen with 200 points evaluated to make the graph.

• eo groupselectblock(n) Selects all of the blocks that are labeled by block labels that are members of group n. rather than regions (i.y).y1) and upper right corner (x2. a contour is added that traces along the arcsegment. The eo addcontour command has the same functionality as a right-button-click contour point addition when the program is running in interactive mode.x2. if there are existing points the contour runs from the previous point to this point.y2) Zoom to the window defined by lower left corner (x1. this command is ignored.y) Adds a contour point at the closest input point to (x. • eo selectconductor(’name’) Selects all nodes. • eo showpoints Show the node points from the input geometry. The arc is actually composed of many straight lines. If there are less than two points defined in the contour. If the selected point and a previous selected points lie at the ends of an arcsegment.y) Adds a contour point at (x. • eo hidemesh Hide the mesh. segments. • eo zoomin Zoom in one level.e. where the conductors are points or surfaces.y2). eo groupselectblock). and arc segments that are part of the conductor specified by the string (’name’).3 Zoom Commands • eo zoomnatural Zoom to the natural boundaries of the geometry. • eo selectpoint(x. all blocks are selected.y). 7. • eo clearcontour Clear a prevously defined contour • eo clearblock Clear block selection 7.y1. • eo bendcontour(angle. This command is used to select conductors for the purposes of the “weighted stress tensor” force and torque integrals. each of which is constrained to span no more than anglestep degrees. The anglestep parameter must be greater than zero. • eo zoom(x1. The selectpoint command has the same functionality as the left-button-click contour point selection when the program is running in interactive mode. The angle parameter can take on values from -180 to 180 degrees.4 View Commands • eo showmesh Show the mesh. 30 . If this is the first point then it starts a contour. can’t be selected with eo selectblock). • eo addcontour(x. • eo zoomout Zoom out one level.anglestep) Replaces the straight line formed by the last two points in the contour by an arc that spans angle degrees.e. If no number is specified (i.

lower V Lower limit for contours. and 2 for field intensity E. • eo smooth(’flag’) This function controls whether or not smoothing is applied to the D and E fields which are naturally piece-wise constant over each element. If the scale is set to 1. • eo minimize minimizes the active electrostatics output view. The density parameter specifies the space between grid points. • eo setgrid(density. • eo hidedensityplot hides the flux density plot. Setting flag equal to ’on’ turns on smoothing. upper D Sets the upper display limit for the density plot.upper D. the length of the vectors are chosen so that the highest flux density corresponds to a vector that is the same length as the current grid size setting. 1 plots the magnitude of D. • eo showdensityplot(legend.gscale. upper V Upper limit for contours.lower D. and setting flag to ’off’ turns off smoothing. • eo showgrid Show the grid points.’type’) Change the grid spacing. • eo maximize maximizes the active electrostatics output view. The scalefactor determines the relative length of the vectors. lower D Sets the lower display limit for the density plot. and the type parameter is set to ’cart’ for Cartesian coordinates or ’polar’ for polar coordinates. gscale Set to 0 for a colour density plot or 1 for a grey scale density plot. eo gridsnap(’flag’) Setting flag to ”on” turns on snap to grid. The parameters taken are the type of plot. which should be set to 0 for no vector plot.scalefactor) controls the display of vectors denoting the field strength and direction. 1 for flux density D. setting flag to ’off’ turns off snap to grid. • eo hidegrid Hide the grid points points.type) Shows the flux density plot with options: legend Set to 0 to hide the plot legend or 1 to show the plot legend.• eo hidepoints Hide the node points from the input geometry.lower V. type Sets the type of density plot. and 2 plots the magnitude of E • eo hidecontourplot Hides the contour plot. • eo showcontourplot(numcontours.upper V) shows the V contour plot with options: numcontours Number of equipotential lines to be plotted. 31 . • eo showvectorplot(type. A value of 0 plots voltage.

32 . • eo resize(width. 8 Heat Flow Preprocessor Lua Command Set A number of different commands are available in the preprocessor. • eo savemetafile(’filename’) saves a metafile screenshot of the current view to the file specified by ’filename’.y1) to the nearest node to (x2. To display the names.x2.y • hi addsegment(x1. • eo shownames(flag) This function allow the user to display or hide the block label names on screen.y) • hi addarc(x1.y) Add a new block label at (x.y2.maxseg) Add a new arc segment from the nearest node to (x1.y2) with angle ‘angle’ divided into ‘maxseg’ segments.y2) • hi addblocklabel(x. Two naming conventions can be used: one which separates words in the command names by underscores. 7. the parameter should be set to 1.• eo restore restores the active electrostatics output view from a minimized or maximized state. • eo reload Reloads the solution from disk.5 Miscellaneous • eo close close the current postprocessor window.y) Add a new node at x. To hide the block label names.height) resizes the active electrostatics output window client area to width × height. 8. • hi deleteselectedlabels Delete selected block labels. • hi deleteselectednodes Delete selected nodes.y1. • hi deleteselected Delete all selected objects. • eo savebitmap(’filename’) saves a bitmapped screen shot of the current view to the file specified by ’filename’.y2) Add a new line segment from node closest to (x1.y1) to node closest to (x2.1 Object Add/Remove Commands • hi addnode(x.x2. and one that eliminates the underscores.y1. • eo refreshview Redraws the current view.angle. flag should be 0.

"inconductor") Set the select segments to have: Boundary property "propname" Local element size along segment no greater than elementsize automesh: 0 = mesher defers to the element constraint defined by elementsize. The "inconductor" string specifies which conductor the node belongs to.• hi deleteselectedsegments Delete selected segments.y) Select the label closet to (x. automesh: 0 = mesher defers to mesh size constraint defined in meshsize.2 Geometry Selection Commands • hi clearselected() Clear all selected nodes. Returns the coordinates of the selected node.y) • hi selectnode(x. "inconductor") Set the selected nodes to have the nodal property "propname" and group number groupno. automesh. This function will clear all previously selected elements and leave the edit mode in 4 (group) 8. arc segments and block labels. Returns the coordinates of the selected label. elementsize. • hi setblockprop("blockname". • hi selectarcsegment(x. blocks.y). meshsize. If the node doesn’t belong to a named conductor. this parameter can be set to "<None>". group.y). • hi selectlabel(x. 1 = mesher automatically chooses the mesh density.3 Object Labeling Commands • hi setnodeprop("propname".y) Select the arc segment closest to (x.groupno.y) Select the node closest to (x.y) • hi selectgroup(n) Select the nth group of nodes. segments. 1 == hidden in post processor A member of group number group 33 . automesh.y) Select the line segment closest to (x. group) Set the selected block labels to have the properties: Block property "blockname". meshsize: size constraint on the mesh in the block marked by this label. A member of group number group • hi setsegmentprop("propname". • hi selectsegment(x. 1 = mesher automatically chooses mesh size along the selected segments hide: 0 = not hidden in post-processor. hide. • hi deleteselectedarcsegments Delete selects arcs. 8. segments and arc segments.

either specify no value for flag or specify 0. • hi analyze(flag) runs hsolv to solve the problem. For a visible window. The flag parameter controls whether the hsolve window is visible or minimized. If the segment is not part of a conductor. entering 1. "inconductor") Set the selected arc segments to: Meshed with elements that span at most maxsegdeg degrees per element Boundary property "propname" hide: 0 = not hidden in post-processor. • hi setarcsegmentprop(maxsegdeg. 1 == hidden in post processor A member of group number group A member of the conductor specified by the string "inconductor". For example. "propname". "millimeters".A member of the conductor specified by the string "inconductor". For a minimized window. The number of elements in the mesh is pushed back onto the lua stack.5 Mesh Commands • hi createmesh() runs triangle to create a mesh.(minangle)) changes the problem definition. • hi setfocus(‘‘documentname’’) Switches the heat flow input file upon which Lua commands are to act. hide. Note that this is not a necessary precursor of performing an analysis. The units parameter specifies the units used for measuring length in the problem domain. as hi analyze() will make sure the mesh is up to date before running an analysis.4 Problem Commands • hi probdef(units. If the segment is not part of a conductor. c:\\temp\\myfile.feh 8. A fourth parameter. • hi saveas("filename") saves the file with name "filename".precision.type. A sixth parameter represents the minimum angle constraint sent to the mesh generator. The precision parameter dictates the precision required by the solver. this command can be used to switch between files so that the mutiple files can be operated upon programmatically via Lua. • hi loadsolution() loads and displays the solution corresponding to the current geometry. 8. Set problemtype to "planar" for a 2-D planar problem. group. 34 . Note if you use a path you must use two backslashes e. "meters.E-8 requires the RMS of the residual to be less than 10−8 . "centimeters". Valid "units" entries are "inches". or to "axi" for an axisymmetric problem. this parameter can be specified as "<None>". documentname should contain the name of the desired document as it appears on the window’s title bar. can also be specified for planar problems. If more than one heat flow input file is being edited at a time. this parameter can be specified as "<None>". flag should be set to 1.(depth).g. and "micrometers". "mils". representing the depth of the problem in the into-thepage direction for 2-D planar problems.

y2.group • hi movetranslate(dx. 3 – arc segments. 2 –block labels.r)turnsacornerlocatedat(x. 4.y1. 1 – lines (segments). 4. 4. copies.6 Editing Commands • hi copyrotate(bx. 8. 3 – arc segments.dy – distance by which the selected objects are incrementally shifted.dy.(editaction)) mirror the selected objects about a line passing through the points (x1. editaction 0 –nodes. copies – number of copies to be produced from the selected objects.(editaction)) bx. by. 2 –block labels.group • hi copytranslate(dx. 2 –block labels.shiftangle (editaction)) bx. • hi seteditmode(editmode) Sets the current editmode to: "nodes" – nodes "segments" . • hi moverotate(bx. by – base point for rotation shiftangle – angle in degrees by which the selected objects are rotated. by – base point for scaling scalefactor – a multiplier that determines how much the selected objects are scaled editaction 0 –nodes. 1 for lines (segments). editaction 0 –nodes.group • hi mirror(x1. (editaction)) dx. and 4 for groups. 1 – lines (segments). angle is measured in degrees.y. 2 –block labels.y)intoacurveofradiusr. 1 – lines (segments). editaction 0 –nodes. 1 – lines (segments). 2 for block labels.by. Valid editaction entries are 0 for nodes. 4. copies – number of copies to be produced from the selected objects. dy.group • mi createradius(x. 3 – arc segments. • hi purgemesh() clears the mesh out of both the screen and memory.• hi showmesh() toggles the flag that shows or hides the mesh. 3 for arc segments. angle.line segments 35 .y2). 3 – arc segments.(editaction)) dx. 3 – arc segments.y1) and (x2. 4.by.x2. 1 – lines (segments).group • hi scale(bx. (editaction) ) bx. copies. by – base point for rotation angle – angle by which the selected objects are incrementally shifted to make each copy.scalefactor. editaction 0 –nodes.dy – distance by which the selected objects are shifted. 2 –block labels.

y2) Set the display area to be from the bottom left corner specified by (x1.y1) to the top right corner specified by (x2. • hi refreshview() Redraws the current view.y1.8 View Commands • hi showgrid() Show the grid points. • hi resize(width. 8.7 Zoom Commands • hi zoomnatural() zooms to a “natural” view with sensible extents. setting flag to ”off”turns off snap to grid. • hi zoomin() zoom in by a factor of 200%. • hi zoom(x1.arc segments "blocks" . • hi hidegrid() Hide the grid points points. • hi restore() restores the active heat flow input view from a minimized or maximized state."type") Change the grid spacing. and the type parameter is set to "cart" for Cartesian coordinates or "polar" for polar coordinates. • hi zoomout() zooms out by a factor of 50%. 36 .selected group This command will affect all subsequent uses of the other editing commands.height) resizes the active heat flow input window client area to width × height. 8. if they are used WITHOUT the editaction parameter. • hi setgrid(density. • hi minimize() minimizes the active heat flow input view. The density parameter specifies the space between grid points. • hi gridsnap("flag") Setting flag to ”on” turns on snap to grid.x2. • hi maximize() maximizes the active heat flow input view.block labels "group" .y2)."arcsegments" .

Tp. • hi deleteconductor("conductorname") deletes the conductor named conductorname. set BdryFormat to 4 and set all other parameters to zero. . The material to be modified is specified by "BlockName". Tc. qs. set BdryFormat to 5 set all other parameters to zero. kx. • hi addconductorprop("conductorname". • hi deletepointprop("pointpropname") deletes the point property named "pointpropname" • hi modifymaterial("BlockName". conductortype) adds a new conductor property with name "conductorname" with either a prescribed temperature or a prescribed total heat flux. BdryFormat. – To obtain a convection boundary condition. The conductortype parameter is 0 for prescribed heat flux and 1 for prescribed temperature. beta) adds a new boundary property with name "boundpropname". ky Thermal conductivity in the y. Set the unused property to zero. The next parameter is the number of the property to be set. ky.8. – To obtain a “Heat Flux” type boundary condition. so that current can be modified from run to run). Tinf. qv) adds a new material with called "materialname" with the material properties: kx Thermal conductivity in the x. h.or r-direction. – For a “Fixed Temperature” type boundary condition. – For a Radiation boundary condition.9 Object Properties • hi addmaterial("materialname". Tset.value) This function allows for modification of a material’s properties without redefining the entire material (e. set the Tset parameter to the desired temperature and all other parameters to zero. • hi deleteboundprop("boundpropname") deletes the boundary property named "boundpropname".or z-direction. set qs to be the heat flux density and BdryFormat to 1. qv Volume heat generation density in units of W/m3 • hi addpointprop("pointpropname".propnum. • hi addboundprop("boundpropname".qp) adds a new point property of name "pointpropname" with either a specified temperature Tp or a point heat generation density qp in units of W/m. – For an “Anti-Perodic” boundary condition. – For a “Periodic” boundary condition. qc. Set all other parameters to zero. • hi deletematerial("materialname") deletes the material named "materialname". set h to the desired heat transfer coefficient and Tinf to the desired external temperature and set BdryFormat to 2.g. The last number is the value to 37 . set beta equal to the desired emissivity and Tinf to the desired external temperature and set BdryFormat to 3.

The last number is the value to be applied to the specified property. The next parameter is the number of the property to be set. The point property to be modified is specified by "PointName". The various properties that can be modified are listed below: 38 .value) This function allows for modification of a point property. The conductor property to be modified is specified by "ConductorName". The last number is the value to be applied to the specified property. The next parameter is the number of the property to be set.be applied below: propnum 0 1 2 3 to the specified property.propnum.propnum. The BC to be modified is specified by "BdryName". The various properties that can be modified are listed below: propnum Symbol Description 0 PointName Name of the point property 1 Tp Prescribed nodal temperature 2 qp Point heat generation in W/m • hi modifyconductorprop("ConductorName". The various properties that can be modified are listed below: propnum Symbol Description 0 BdryName Name of boundary property 1 BdryFormat Type of boundary condition: 0 = Prescribed temperature 1 = Heat Flux 2 = Convection 3 = Radiation 4 = Periodic 5 = Antiperiodic 2 Tset Fixed Temperature 3 qs Prescribed heat flux density Tinf External temperature 4 5 h Heat transfer coefficient 6 beta Emissivity • hi modifypointprop("PointName". The last number is the value to be applied to the specified property.propnum.value) This function allows for modification of a conductor property. The various properties that can be modified are listed Symbol BlockName kx ky qs Description Name of the material x (or r) direction thermal conductivity y (or z) direction thermal conductivity Volume heat generation • hi modifyboundprop("BdryName".value) This function allows for modification of a boundary property. The next parameter is the number of the property to be set.

39 . temperature curve for the material specified by "materialname". the parameter should be set to 1. To display the names. • hi savemetafile("filename") saves a metafile screenshot of the current view to the file specified by "filename".e.propnum 0 1 2 3 Symbol ConductorName Tc qc ConductorType Description Name of the conductor property Conductor temperature Total conductor heat flux 0 = Prescribed heat flow. the permeability varies as a function of distance from the origin of the external region. the region of interest).k) adds the point (T.Ri) defines an axisymmetric external region to be used in conjuction with the Kelvin Transformation method of modeling unbounded problems. • hi close() closes the preprocessor window and destroys the current document. • hi cleartkpoints("materialname") erases all of the thermal conductivity points that have been defined for the material named "materialname". • hi readdxf("filename") This function imports a dxf file specified by "filename".k) to the thermal conductivity vs. the Ro parameter is the radius of the outer region. • hi detachouterspace() undefines all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. These parameters are necessary to define the permeability variation in the external region. • hi shownames(flag) This function allow the user to display or hide the block label names on screen.Ro. subject to the printf-type formatting explained previously for the hi saveas command. and the Ri parameter is the radius of the inner region (i. The Zo parameter is the z-location of the origin of the outer region. In the exterior region. subject to the printf-type formatting explained previously for the hi saveas command. 8. • hi refreshview() Redraws the current view. 1 = Prescribed temperature • hi addtkpoint("materialname". • hi defineouterspace(Zo. • hi attachouterspace() marks all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. To hide the block label names.T. flag should be 0.10 Miscellaneous • hi savebitmap("filename") saves a bitmapped screenshot of the current view to the file specified by "filename".

: Ftot.or z. e.NumPoints.direction component of temperature gradient kx x. 40 .or z.Y) Get the values associated with the point at x.or r.Filename. As with the preprocessor commands.1 Data Extraction Commands • ho lineintegral(type) Calculate the line integral for the defined contour type 0 1 2 3 Integral Temperature difference (G · t) Heat flux through the contour (F · n) Contour length Average Temperature This integral returns either 1 or 2 values.or z. the command is interpreted as a request to plot the requested plot type to the screen. in addition. If only PlotType or only PlotType and NumPoints are specified.: Gx.direction component of heat flux density Fy y. Favg = ho lineintegral(2) • ho blockintegral(type) Calculate a block integral for the selected blocks type 0 1 2 3 4 Integral Average T over the block Block Cross-section Block Volume Average F over the block Average G over the block Returns one or two floating point values as results.direction component of temperature gradient Gy y.direction component of thermal conductivity ky y.9 Heat Flow Post Processor Command Set There are a number of Lua scripting commands designed to operate in the postprocessor. in order.0) use T. these commands can be used with either the underscore naming or with the no-underscore naming convention.direction component of thermal conductivity Example: To catch all values at (0.ky= ho getpointvalues(0.y The return values.Gy.g. 9.01.Gx.kx.Fx. depending on the integral type.g. If.FileFormat) Allows Lua access to the X-Y plot routines. are: Symbol Definition V Temperature Fx x.or r.0) • ho makeplot(PlotType. e.01.direction component of heat flux density Gx x. Gy = ho blockintegral(4) • ho getpointvalues(X.or r.Fy.

Valid entries for PlotType are: PlotType 0 1 2 3 4 5 6 Definition V (Temperature) |D| (Magnitude of heat flux density) D . or area mode. if one wanted to plot V to the screen with 200 points evaluated to make the graph. Two values are returned: The temperature of the specified conductor. 41 . all blocks are selected."c:temp. • ho groupselectblock(n) Selects all of the blocks that are labeled by block labels that are members of group n. n (Normal field intensity) E . the command is instead interpreted as a command to write the data to disk to the specfied file name. t (Tangential field intensity) Valid file formats are: FileFormat Definition 0 Multi-column text with legend 1 Multi-column text with no legend 2 Mathematica-style formatting For example.emf") To write data instead of a plot to disk.the Filename parameter is specified.200) If this plot were to be written to disk as a metafile. Returns two values: the Problem type (0 for planar and 1 for axisymmetric) and the depth assumed for planar problems in units of meters. • ho getconductorproperties("conductor") Properties are returned for the conductor property named ”conductor”. rather than display it to make a graphical plot. 9.0) • ho getprobleminfo() Returns info on problem description. contour. ho groupselectblock()). If the FileFormat parameter is also."c:temp. the plot is instead written to disk to the specified file name as an extended metafile.txt".y). t (Tangential heat flux density) |E| (Magnitude of field intensity) E .2 Selection Commands • ho seteditmode(mode) Sets the mode of the postprocessor to point. and "area".200.200. and the total heat flux through the specified conductor. "contour". the command would be: ho makeplot(0. If no number is specified (i. n (Normal heat flux density) D . • ho selectblock(x.y) Select the block that contains point (x.e. the command would be: ho makeplot(0. the command would be of the form: ho makeplot(0. Valid entries for mode are "point".

rather than regions (i. and arc segments that are part of the conductor specified by the string ("name"). this command is ignored. If the selected point and a previous selected points lie at the ends of an arcsegment. If this is the first point then it starts a contour. 9. The arc is actually composed of many straight lines. This command is used to select conductors for the purposes of the “weighted stress tensor” force and torque integrals.x2. • ho zoom(x1.y) Adds a contour point at the closest input point to (x. The anglestep parameter must be greater than zero.y2).• ho selectconductor("name") Selects all nodes. If there are less than two points defined in the contour. • ho zoomin() Zoom in one level. • ho hidemesh() Hide the mesh. segments. • ho zoomout() Zoom out one level.y).y) Adds a contour point at (x. each of which is constrained to span no more than anglestep degrees.3 Zoom Commands • ho zoomnatural() Zoom to the natural boundaries of the geometry. The selectpoint command has the same functionality as the left-button-click contour point selection when the program is running in interactive mode.y1) and upper right corner (x2.y1. • ho bendcontour(angle.e. • ho addcontour(x. The ho addcontour command has the same functionality as a right-button-click contour point addition when the program is running in interactive mode. The angle parameter can take on values from -180 to 180 degrees.y). where the conductors are points or surfaces. if there are existing points the contour runs from the previous point to this point. • ho hidepoints() Hide the node points from the input geometry.anglestep) Replaces the straight line formed by the last two points in the contour by an arc that spans angle degrees. • ho clearcontour() Clear a prevously defined contour • ho clearblock() Clear block selection 9. 42 . • ho selectpoint(x. • ho showpoints() Show the node points from the input geometry. can’t be selected with ho selectblock).4 View Commands • ho showmesh() Show the mesh.y2) Zoom to the window defined by lower left corner (x1. a contour is added that traces along the arcsegment.

• ho showgrid() Show the grid points.scalefactor) controls the display of vectors denoting the field strength and direction. setting flag to ”off” turns off snap to grid. and the type parameter is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.upper V) shows the V contour plot with options: numcontours Number of equipotential lines to be plotted. The scalefactor determines the relative length of the vectors."type") Change the grid spacing. 1 plots the magnitude of F. and 2 plots the magnitude of G • ho hidecontourplot() Hides the contour plot. • ho showdensityplot(legend. • ho showcontourplot(numcontours.upper. upper Sets the upper display limit for the density plot. the length of the vectors are chosen so that the highest flux density corresponds to a vector that is the same length as the current grid size setting. If the scale is set to 1. • ho hidedensityplot() hides the heat flux density plot.g. 43 . • ho minimize() minimizes the active heat flow input view. show contour plot(-1) • ho showvectorplot(type. lower V Lower limit for contours. • ho maximize() maximizes the active heat flow input view.lower. which should be set to 0 for no vector plot. • ho hidegrid() Hide the grid points points. ho gridsnap("flag") Setting flag to ”on” turns on snap to grid. 1 for heat flux density F. and setting flag to "off" turns off smoothing. The parameters taken are the type of plot. and 2 for temperature gradient G. A value of 0 plots temperature. e. type Sets the type of density plot.gscale. upper V Upper limit for contours. lower Sets the lower display limit for the density plot.type) Shows the heat flux density plot with options: legend Set to 0 to hide the plot legend or 1 to show the plot legend.• ho smooth("flag") This function controls whether or not smoothing is applied to the F and G fields which are naturally piece-wise constant over each element. gscale Set to 0 for a colour density plot or 1 for a grey scale density plot. Setting flag equal to "on" turns on smoothing.lower V. If ho numcontours is -1 all parameters are ignored and default values are used. • ho setgrid(density. The density parameter specifies the space between grid points.

10 Current Flow Preprocessor Lua Command Set A number of different commands are available in the preprocessor.g.5 Miscellaneous • ho close() close the current postprocessor window.y2) • ci addblocklabel(x. • ho resize(width.x2. • ho refreshview() Redraws the current view. file names like c:\program files\stuff) you must enclose the file name in (extra) quotes by using a \" sequence.bmp").y2. and one that eliminates the underscores.y2) with angle ‘angle’ divided into ‘maxseg’ segments.height) resizes the active heat flow input window client area to width × height. the parameter should be set to 1.maxseg) Add a new arc segment from the nearest node to (x1. "c:\\temp\\myfile.y) Add a new block label at (x.y1.y • ci addsegment(x1. • ho reload() Reloads the solution from disk. 44 .y1.1 Object Add/Remove Commands • ci addnode(x. • ho shownames(flag) This function allow the user to display or hide the block label names on screen.• ho restore() restores the active heat flow input view from a minimized or maximized state.y) • ci addarc(x1.angle. If the file name contains a space (e. 10. flag should be 0.y1) to the nearest node to (x2. • ci deleteselected Delete all selected objects.bmp\"") • ho savemetafile("filename") saves a metafile screenshot of the current view to the file specified by "filename". To display the names. To hide the block label names. For example: ho savebitmap("\"c:\\temp\\screenshot. • ho savebitmap("filename") saves a bitmapped screen shot of the current view to the file specified by "filename".y1) to node closest to (x2. Note that if you use a path you must use two backslashes (e. 9. subject to the printf-type formatting explained previously for the savebitmap command.x2.g.y2) Add a new line segment from node closest to (x1.y) Add a new node at x. Two naming conventions can be used: one which separates words in the command names by underscores.

This function will clear all previously selected elements and leave the edit mode in 4 (group) 10. • ci deleteselectedsegments Delete selected segments. 1 = mesher automatically chooses mesh size along the selected segments 45 . group.• ci deleteselectednodes Delete selected nodes. Returns the coordinates of the selected label. The "inconductor" string specifies which conductor the node belongs to. automesh: 0 = mesher defers to mesh size constraint defined in meshsize. meshsize. "inconductor") Set the selected nodes to have the nodal property "propname" and group number groupno. • ci selectarcsegment(x.y). • ci selectlabel(x. • ci setblockprop("blockname".3 Object Labeling Commands • ci setnodeprop("propname".y) Select the node closest to (x. • ci selectsegment(x. A member of group number group • ci setsegmentprop("propname". 10. If the node doesn’t belong to a named conductor.y) Select the arc segment closest to (x. • ci deleteselectedarcsegments Delete selects arcs.y) Select the label closet to (x.y) Select the line segment closest to (x. automesh.y).y) • ci selectgroup(n) Select the nth group of nodes. "inconductor". segments. meshsize: size constraint on the mesh in the block marked by this label. this parameter can be set to "<None>". hide. group) Set the selected block labels to have the properties: Block property "blockname". automesh.2 Geometry Selection Commands • ci clearselected() Clear all selected nodes. 1 = mesher automatically chooses the mesh density. blocks. Returns the coordinates of the selected node. • ci deleteselectedlabels Delete selected block labels.groupno.y) • ci selectnode(x. elementsize. arc segments and block labels. segments and arc segments.) Set the select segments to have: Boundary property "propname" Local element size along segment no greater than elementsize automesh: 0 = mesher defers to the element constraint defined by elementsize.

Note if you use a path you must use two backslashes e. 1 == hidden in post processor A member of group number group A member of the conductor specified by the string "inconductor". For example. The precision parameter dictates the precision required by the solver.(minangle)) changes the problem definition. this parameter can be specified as "<None>". Valid "units" entries are "inches". or to "axi" for an axisymmetric problem. 10. this parameter can be specified as "<None>".type. "inconductor") Set the selected arc segments to: Meshed with elements that span at most maxsegdeg degrees per element Boundary property "propname" hide: 0 = not hidden in post-processor. flag should be set to 1. group. "propname". this command can be used to switch between files so that the mutiple files can be operated upon programmatically via Lua.(depth). The units parameter specifies the units used for measuring length in the problem domain.hide: 0 = not hidden in post-processor. c:\\temp\\myfemmfile. For a minimized window. hide. either specify no value for flag or specify 0. If the segment is not part of a conductor. A sixth parameter represents the minimum angle constraint sent to the mesh generator. 1 == hidden in post processor A member of group number group A member of the conductor specified by the string "inconductor". "centimeters".E-8 requires the RMS of the residual to be less than 10−8 . A fourth parameter.g.4 Problem Commands • ci probdef(units. • ci analyze(flag) runs belasolv to solve the problem. representing the depth of the problem in the into-the-page direction for 2-D planar problems.fee 46 . Set problemtype to "planar" for a 2-D planar problem. entering 1. can also be specified for planar problems.precision. The flag parameter controls whether the Belasolve window is visible or minimized. The frequency parameter specifies the frequency in Hz at which the analysis ois to be performed. • ci setarcsegmentprop(maxsegdeg. • ci loadsolution() loads and displays the solution corresponding to the current geometry. "mils". "meters. • ci setfocus("documentname") Switches the electrostatics input file upon which Lua commands are to act. For a visible window. documentname should contain the name of the desired document as it appears on the window’s title bar. If the segment is not part of a conductor. and "micrometers".frequency. If more than one electrostatics input file is being edited at a time. "millimeters". • ci saveas("filename") saves the file with name "filename".

3 – arc segments.group • ci scale(bx. • ci purgemesh() clears the mesh out of both the screen and memory.group • ci copytranslate(dx. 1 – lines (segments).group • ci movetranslate(dx. and 4 for groups. 1 – lines (segments). • ci moverotate(bx. 4. Valid editaction entries are 0 for nodes. editaction 0 –nodes. editaction 0 –nodes. 3 for arc segments. angle is measured in degrees. editaction 0 –nodes. 1 – lines (segments).(editaction)) mirror the selected objects about a line passing through the points (x1.5 Mesh Commands • ci createmesh() runs triangle to create a mesh.shiftangle (editaction)) bx.by. 47 .y)intoacurveofradiusr.10. 4. • ci showmesh() toggles the flag that shows or hides the mesh. copies. The number of elements in the mesh is pushed back onto the lua stack.by. by.y1. copies.y2. 2 –block labels. 2 –block labels. 3 – arc segments.group • ci mirror(x1.scalefactor. Note that this is not a necessary precursor of performing an analysis. editaction 0 –nodes. by – base point for scaling scalefactor – a multiplier that determines how much the selected objects are scaled editaction 0 –nodes. 1 – lines (segments). (editaction)) dx. 3 – arc segments. 4. 1 for lines (segments).y2). by – base point for rotation angle – angle by which the selected objects are incrementally shifted to make each copy.y1) and (x2.dy – distance by which the selected objects are incrementally shifted.y. 2 –block labels. copies – number of copies to be produced from the selected objects.x2. 2 –block labels. 4. copies – number of copies to be produced from the selected objects. 2 for block labels.(editaction)) dx. dy.dy – distance by which the selected objects are shifted.dy. 3 – arc segments. 4. 1 – lines (segments).group • mi createradius(x.6 Editing Commands • ci copyrotate(bx. angle. by – base point for rotation shiftangle – angle in degrees by which the selected objects are rotated. 2 –block labels. 10.(editaction)) bx. as ci analyze() will make sure the mesh is up to date before running an analysis. 3 – arc segments.r)turnsacornerlocatedat(x. (editaction) ) bx.

arc segments "blocks" . • ci zoomin() zoom in by a factor of 200%.selected group This command will affect all subsequent uses of the other editing commands.height) resizes the active magnetics input window client area to width × height."type") Change the grid spacing. • ci setgrid(density. 48 . • ci resize(width. • ci minimize() minimizes the active magnetics input view. • ci maximize() maximizes the active magnetics input view.8 View Commands • ci showgrid() Show the grid points. • ci refreshview() Redraws the current view. • ci zoom(x1. if they are used WITHOUT the editaction parameter. • ci restore() restores the active magnetics input view from a minimized or maximized state. • ci hidegrid() Hide the grid points points.y2). • ci gridsnap("flag") Setting flag to ”on” turns on snap to grid. 10. and the type parameter is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.block labels "group" . The density parameter specifies the space between grid points. 10.line segments "arcsegments" .x2.• ci seteditmode(editmode) Sets the current editmode to: "nodes" – nodes "segments" .y1) to the top right corner specified by (x2. setting flag to ”off”turns off snap to grid. • ci zoomout() zooms out by a factor of 50%.7 Zoom Commands • ci zoomnatural() zooms to a “natural” view with sensible extents.y2) Set the display area to be from the bottom left corner specified by (x1.y1.

• ci deletematerial("materialname") deletes the material named "materialname". ox. • ci deleteboundprop("boundpropname") deletes the boundary property named "boundpropname".propnum. • ci addconductorprop("conductorname". • ci deleteconductor("conductorname") deletes the conductor named conductorname.Vp. c0. The material to be modified is specified by "BlockName".or r-direction. js. lty) adds a new material with called "materialname" with the material properties: ox Electrical conductivity in the x. lty Dielectric loss tangent in the y. BdryFormat) adds a new boundary property with name "boundpropname" For a “Fixed Voltage” type boundary condition.or z-direction. set BdryFormat to 3 and set all other parameters to zero. c1. The next parameter is the number of the property to be set. To obtain a “Mixed” type boundary condition. For a “Periodic” boundary condition.or r-direction in units of S/m. Set the unused property to zero. Vc. so that current can be modified from run to run).9 Object Properties • ci addmaterial("materialname".or r-direction. jc. ey. ex. set C1 and C0 as required and BdryFormat to 1. set js to the desired current density in A/m2 and set BdryFormat to 2. Set all other parameters to zero.10. ltx Dielectric loss tangent in the x.or z-direction. ex Relative permittivity in the x.or z-direction in units of S/m. • ci deletepointprop("pointpropname") deletes the point property named "pointpropname" • ci modifymaterial("BlockName".value) This function allows for modification of a material’s properties without redefining the entire material (e. oy Electrical conductivity in the y. ey Relative permittivity in the y. ltx. set the Vs parameter to the desired voltage and all other parameters to zero. set BdryFormat to 4 set all other parameters to zero. The last number is the value to 49 . Vs. The conductortype parameter is 0 for prescribed current and 1 for prescribed voltage. oy. For an “Anti-Perodic” boundary condition.jp) adds a new point property of name "pointpropname" with either a specified potential Vp a point current density jp in units of A/m.g. • ci addboundprop("boundpropname". • ci addpointprop("pointpropname". To obtain a prescribes surface current density. conductortype) adds a new conductor property with name "conductorname" with either a prescribed voltage or a prescribed total current.

The various properties that can be modified are listed Symbol BlockName ox oy ex ey ltx lty Description Name of the material x (or r) direction conductivity y (or z) direction conductivity x (or r) direction relative permittivity y (or z) direction relative permittivity x (or r) direction dielectric loss tangent y (or z) direction dielectric loss tangent • ci modifyboundprop("BdryName". The conductor property to be modified is specified by "ConductorName".value) This function allows for modification of a conductor property.propnum. The next parameter is the number of the property to be set.be applied below: propnum 0 1 2 3 4 5 6 to the specified property. The various properties that can be modified are listed below: propnum Symbol Description 0 PointName Name of the point property 1 Vp Prescribed nodal voltage 2 jp Point current density in A/m • ci modifyconductorprop("ConductorName". The point property to be modified is specified by "PointName". The various properties that can be modified are listed below: 50 . The last number is the value to be applied to the specified property.value) This function allows for modification of a boundary property. The last number is the value to be applied to the specified property. The BC to be modified is specified by "BdryName". The next parameter is the number of the property to be set. The last number is the value to be applied to the specified property. The next parameter is the number of the property to be set.value) This function allows for modification of a point property. The various properties that can be modified are listed below: propnum 0 1 2 3 4 5 Symbol BdryName Vs js c0 c1 BdryFormat Description Name of boundary property Fixed Voltage Prescribed current density Mixed BC parameter Mixed BC parameter Type of boundary condition: 0 = Prescribed V 1 = Mixed 2 = Surface current density 3 = Periodic 4 = Antiperiodic • ci modifypointprop("PointName".propnum.propnum.

• ci close() closes the preprocessor window and destroys the current document. • ci shownames(flag) This function allow the user to display or hide the block label names on screen. • ci readdxf("filename") This function imports a dxf file specified by "filename". these commands can be used with either the underscore naming or with the no-underscore naming convention. • ci refreshview() Redraws the current view. • ci savemetafile("filename") saves a metafile screenshot of the current view to the file specified by "filename". the parameter should be set to 1. As with the preprocessor commands. flag should be 0.propnum 0 1 2 3 Symbol ConductorName Vc jc ConductorType Description Name of the conductor property Conductor voltage Total conductor current 0 = Prescribed current. subject to the printf-type formatting explained previously for the ci saveas command. 11 Current Flow Post Processor Command Set There are a number of Lua scripting commands designed to operate in the postprocessor.10 Miscellaneous • ci savebitmap("filename") saves a bitmapped screenshot of the current view to the file specified by "filename". 1 = Prescribed voltage 10.Ro. The Zo parameter is the z-location of the origin of the outer region.e. To hide the block label names. • ci attachouterspace() marks all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. In the exterior region. 51 . subject to the printf-type formatting explained previously for the ci saveas command. the Ro parameter is the radius of the outer region. These parameters are necessary to define the permeability variation in the external region. To display the names.Ri) defines an axisymmetric external region to be used in conjuction with the Kelvin Transformation method of modeling unbounded problems. the region of interest). • ci detachouterspace() undefines all selected block labels as members of the external region used for modeling unbounded axisymmetric problems via the Kelvin Transformation. • ci defineouterspace(Zo. the permeability varies as a function of distance from the origin of the external region. and the Ri parameter is the radius of the inner region (i.

2x frequency component Weighted Stress Tensor torque. e. • co getpointvalues(X. DC component Weighted Stress Tensor torque.Y) Get the values associated with the point at x. : Fx. Fy = co lineintegral(4) • co blockintegral(type) Calculate a block integral for the selected blocks type 0 1 2 3 4 5 6 7 8 9 10 11 Integral Real Power Reactive Power Apparent Power Time-Average Stored Energy Block cross-section area Block volume x (or r) direction Weighted Stress Tensor force. depending on the integral type.11.g. 2x frequency component y (or z) direction Weighted Stress Tensor force. as necessary. DC component x (or r) direction Weighted Stress Tensor force. 2x frequency component Returns a value that can be complex.1 Data Extraction Commands • co lineintegral(type) Calculate the line integral for the defined contour type 0 1 2 3 4 5 Integral E ·t J·n Contour length Average voltage over contour Force from stress tensor Torque from stress tensor This integral returns either 1 or 2 values. DC component y (or z) direction Weighted Stress Tensor force. in order.y The return values. are: 52 .

the command is instead interpreted as a command to write the data to disk to the specfied file name.or z.or r.direction component of permittivity x.or r. rather than display it to make a graphical plot. If the FileFormat parameter is also.Filename.direction component of permittivity y.direction component of conduction current density • co makeplot(PlotType.or z. n (Normal displacement current density) Jd .direction component of permittivity x.FileFormat) Allows Lua access to the X-Y plot routines.direction component of current density x. the Filename parameter is specified. n (Normal current density) J . n (Normal conduction current density) Jc .direction component of electric field intensity x. the plot is instead written to disk to the specified file name as an extended metafile. t (Tangential displacement current density) Valid file formats are: FileFormat Definition 0 Multi-column text with legend 1 Multi-column text with no legend 2 Mathematica-style formatting For example. if one wanted to plot V to the screen with 200 points evaluated to make the 53 .or z.direction component of AC conductivity y. the command is interpreted as a request to plot the requested plot type to the screen.or z.direction component of conduction current density y.or r. t (Tangential current density) |E| (Magnitude of field intensity) E . in addition. t (Tangential conduction current density) |Jd| (Magnitude of displacement current density) Jd . If only PlotType or only PlotType and NumPoints are specified. t (Tangential field intensity) |Jc| (Magnitude of conduction current density) Jc .or r.Symbol V Jx Jy Kx Ky Ex Ey ex ey Jdx Jdy ox oy Jcx Jcy Definition Voltage x. Valid entries for PlotType are: PlotType 0 1 2 3 4 5 6 7 8 9 10 11 12 Definition V (Voltage) |J| (Magnitude of current density) J .direction component of current density y.direction component of electric field intensity y.direction component of permittivity y. If.or z.or r.or r.or z.or z.direction component of displacement current density x. n (Normal field intensity) E .direction component of displacement current density y.or r.direction component of AC conductivity x.NumPoints.

200. The angle parameter can take on values from -180 to 180 degrees.graph. Returns three values: Return value 1 2 3 Definition problem type frequency in Hz depth assumed for planar problems in meters.e. all blocks are selected.y).anglestep) Replaces the straight line formed by the last two points in the contour by an arc that spans angle degrees. This command is used to select conductors for the purposes of the “weighted stress tensor” force and torque integrals. the command would be: co makeplot(0. If this is the first point then it starts a contour. 54 . where the conductors are points or surfaces.y). "contour". Two values are returned: The voltage of the specified conductor.0) • co getprobleminfo() Returns info on problem description. contour. can’t be selected with co selectblock). • co selectblock(x.200) If this plot were to be written to disk as a metafile. segments. the command would be: co makeplot(0. The co addcontour command has the same functionality as a right-button-click contour point addition when the program is running in interactive mode.txt". 11.emf") To write data instead of a plot to disk. each of which is constrained to span no more than anglestep degrees. • co selectconductor("name") Selects all nodes.e. If there are less than two points defined in the contour. and arc segments that are part of the conductor specified by the string ("name")."c:temp.y) Select the block that contains point (x. or area mode. If no number is specified (i. and "area". • co groupselectblock(n) Selects all of the blocks that are labeled by block labels that are members of group n. the command would be of the form: co makeplot(0. this command is ignored."c:temp. if there are existing points the contour runs from the previous point to this point. rather than regions (i. Valid entries for mode are "point".200. • co addcontour(x. The anglestep parameter must be greater than zero. The arc is actually composed of many straight lines. • co getconductorproperties("conductor") Properties are returned for the conductor property named ”conductor”. co groupselectblock()). and the current on the specified conductor.y) Adds a contour point at (x.2 Selection Commands • co seteditmode(mode) Sets the mode of the postprocessor to point. • co bendcontour(angle.

The density parameter specifies the space between grid points.y1) and upper right corner (x2. co gridsnap("flag") Setting flag to ”on” turns on snap to grid. If the selected point and a previous selected points lie at the ends of an arcsegment.3 Zoom Commands • co zoomnatural() Zoom to the natural boundaries of the geometry. • co clearcontour() Clear a prevously defined contour • co clearblock() Clear block selection 11. setting flag to ”off” turns off snap to grid. 11.y) Adds a contour point at the closest input point to (x. • co showpoints() Show the node points from the input geometry.x2. • co zoomin() Zoom in one level. Setting flag equal to "on" turns on smoothing. and setting flag to "off" turns off smoothing. • co zoom(x1. 55 ."type") Change the grid spacing. and the type parameter is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.• co selectpoint(x. a contour is added that traces along the arcsegment.y). • co zoomout() Zoom out one level. • co setgrid(density.4 View Commands • co showmesh() Show the mesh. • co showgrid() Show the grid points. • co hidegrid() Hide the grid points points. • co smooth("flag") This function controls whether or not smoothing is applied to the D and E fields which are naturally piece-wise constant over each element. • co hidedensityplot() hides the current density plot.y2) Zoom to the window defined by lower left corner (x1. The selectpoint command has the same functionality as the left-button-click contour point selection when the program is running in interactive mode.y2). • co hidemesh() Hide the mesh.y1. • co hidepoints() Hide the node points from the input geometry.

lower V.upper V). denoting the real part of voltage. upper V Upper limit for contours.type) Shows the current density plot with options: legend Set to 0 to hide the plot legend or 1 to show the plot legend. type the type of contour plot to be rendered. The type parameter can take on the following values: type 0 1 2 3 4 5 6 Description No vector plot Re(J) Re(E) The scalefactor determines the relative length of the vectors. lower Sets the lower display limit for the density plot. e.g. or "both". or both components of voltage. Im(J) Im(E) Re(J) and Im(J) Re(E) and Im(E) 56 . gscale Set to 0 for a colour density plot or 1 for a grey scale density plot. "imag". show contour plot(-1) The type can take on the values of "real".lower.• co showdensityplot(legend. If co numcontours is -1 all parameters are ignored and default values are used.upper.gscale. Specific choices for the type of density plot include: type 0 1 2 3 4 5 6 7 8 Description |V | |Re(V )| |Im(V )| |J| |Re(J)| |Im(J)| |E| |Re(E)| |Im(E)| • co hidecontourplot() Hides the contour plot. lower V Lower limit for contours. • co showvectorplot(type. • co showcontourplot(numcontours. upper Sets the upper display limit for the density plot.scalefactor) controls the display of vectors denoting the field strength and direction. type Sets the type of density plot. the imaginary part of voltage.type shows the V contour plot with options: numcontours Number of equipotential lines to be plotted.

11. subject to the printf-type formatting explained previously for the savebitmap command. • co shownames(flag) This function allow the user to display or hide the block label names on screen. the parameter should be set to 1. • co reload() Reloads the solution from disk. • co restore() restores the active magnetics input view from a minimized or maximized state. To hide the block label names. For example: co savebitmap("\"c:\\temp\\screenshot. • co refreshview() Redraws the current view. the length of the vectors are chosen so that the highest field magnitude corresponds to a vector that is the same length as the current grid size setting. 57 . flag should be 0.If the scale is set to 1. file names like c:\program files\stuff) you must enclose the file name in (extra) quotes by using a \" sequence. • co minimize() minimizes the active magnetics input view. "c:\\temp\\myfile.5 Miscellaneous • co close() close the current postprocessor window. Note that if you use a path you must use two backslashes (e. • co maximize() maximizes the active magnetics input view.bmp").bmp\"") • co savemetafile("filename") saves a metafile screenshot of the current view to the file specified by "filename". If the file name contains a space (e.g. • co resize(width. • co savebitmap("filename") saves a bitmapped screen shot of the current view to the file specified by "filename".height) resizes the active magnetics input window client area to width × height.g. To display the names.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->