Escolar Documentos
Profissional Documentos
Cultura Documentos
nb
MathFEMM 1.20
The Mathematica interface to FEMM 4.2
David Meeker
dmeeker@ieee.org
January 26, 2006
Common Commands
OpenFEMM
usage.nb
NewDocument doctype creates a new preprocessor document and opens up a new preprocessor window
in FEMM. 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. Alternate form is Create doctype
OpenDocument "filename"
ShowPointProps
HidePointProps
ShowConsole
HideConsole
MessageBox "string"
Prompt "string" displays a pop up dialog with the message "string" displayed on it
with an edit box. The return value of the funciton is the contents of the edit box.
MLPut "string"
MLGet
receives data from FEMM via MathLink. The data
is always in the form of a list, but the number of elements in the list
is variable. The items in the list could be either numbers or strings
AWG awg
MathFEMM`IEC
IEC MathFEMM`Private`iec_ : 7.95916 MathFEMM`Private`exp 0.115197 MathFEMM`Private`iec
usage.nb
EIDeleteConductor "conductorname"
EIDeleteMaterial "materialname"
EIDeletePointProp "pointpropname"
x,y .
usage.nb
x2,y2 and
Equivalent forms are:
EIDrawPolygon
x1,y2 ,..., xn,yn
adds new node points at
every listed point and then draws a closed figure that connects the points
EIDrawPolyLine
x1,y2 ,..., xn,yn
draws a multi segment line by adding each
of the points in the list and then adding segments that join the listed points.
EIDrawRectangle x1,y1,x2,y2 adds nodes at x1,y1 , x1,y2 , x2,
y2 and
x2,y1 and joins them with new segments. Equivalent forms are:
EIDrawRectangle x1,y1 , x2,y2
EIDrawRectangle
x1,y1 , x2,y2
EICreateRadius x,y,z turns a corner located at
An equivalent form is: EICreateRadius x,y ,z
x,y
x,y .
EISelectGroup n selects the nth group of nodes, segments, arc segments and block labels. This
function will clear all previously selected elements and leave the edit mode in 4 group
EISelectLabel x,y selects the block label closest to
EISelectLabel x,y
EISelectNode x,y selects the node closest to
EISelectNode x,y
x,y .
x,y .
x,y .
usage.nb
EIDeleteSelectedArcSegments
EIDeleteSelectedLabels
EIDeleteSelectedNodes
EIDeleteSelectedSegments
EIClearSelected
usage.nb
group
group
View Manipulation
EISetGrid density,"type" changes the grid spacing. The density
parameter specifies the space between grid points, and the "type" parameter
is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.
EIShowGrid
EIHideGrid
EIShowMesh
EIPurgeMesh
usage.nb
EIShowNames
EIHideNames
stops the names of the
materials associated with each block label from being displayed
EISnapGridOn
EISnapGridOff
EIZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
EIZoom x1,y1 , x2,y2
EIZoom
x1,y1 , x2,y2
EIZoomIn
EIZoomNatural
EIZoomOut
Problem Commands
EIAnalyze flag
runs the electrostatics solver. The flag parameter controls whether the solver
window is visible or minimized. For a visible window, either specify no value for flag
or specify 0. For a minimized window, flag should be set to 1. An equivalent form is:
EIAnalyse flag
EIClose
EICreateMesh
runs triangle to create a mesh. Note that this
is not a necessary precursor of performing an analysis, as EIAnalyze
will make sure the mesh is up to date before running an analysis.
EILoadSolution
usage.nb
adds a new
with the material properties:
r direction.
z direction.
units of J m^3
usage.nb
HIDeleteConductor "conductorname"
HIDeleteMaterial "materialname"
HIDeletePointProp "pointpropname"
x,y .
usage.nb
10
x2,y2 and
Equivalent forms are:
HIDrawPolygon
x1,y2 ,..., xn,yn
adds new node points at
every listed point and then draws a closed figure that connects the points
HIDrawPolyLine
x1,y2 ,..., xn,yn
draws a multi segment line by adding each
of the points in the list and then adding segments that join the listed points.
HIDrawRectangle x1,y1,x2,y2 adds nodes at x1,y1 , x1,y2 , x2,
y2 and
x2,y1 and joins them with new segments. Equivalent forms are:
HIDrawRectangle x1,y1 , x2,y2
HIDrawRectangle
x1,y1 , x2,y2
EICreateRadius x,y,z turns a corner located at
An equivalent form is: EICreateRadius x,y ,z
x,y
x,y .
HISelectGroup n selects the nth group of nodes, segments, arc segments and block labels. This
function will clear all previously selected elements and leave the edit mode in 4 group
HISelectLabel x,y selects the block label closest to
HISelectLabel x,y
HISelectNode x,y selects the node closest to
HISelectNode x,y
x,y .
x,y .
x,y .
usage.nb
11
HISetBlockProp "blockname",automesh,meshsize,
groupno sets 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
. groupno: make selected members of specified group number
HISetNodeProp "propname",groupno,"inconductor" sets the selected
nodes to have the nodal property "propname" and group number groupno.
The "inconductor" string specifies which conductor the node belongs to. If the
node doesn t belong to a named conductor, this parameter can be set to " None ".
HISetSegmentProp "propname",elementsize,automesh,
hide,groupno,"inconductor" sets 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, 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 groupno
A member of the conductor specified by the string "inconductor". If the
segment is not part of a conductor, this parameter can be specified as " None ".
HIDeleteSelected
HIDeleteSelectedArcSegments
HIDeleteSelectedLabels
HIDeleteSelectedNodes
HIDeleteSelectedSegments
HIClearSelected
usage.nb
12
group
group
View Manipulation
HISetGrid density,"type" changes the grid spacing. The density
parameter specifies the space between grid points, and the "type" parameter
is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.
HIShowGrid
HIHideGrid
HIShowMesh
HIPurgeMesh
HIShowNames
HIHideNames
stops the names of the
materials associated with each block label from being displayed
HISnapGridOn
HISnapGridOff
HIZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
HIZoom x1,y1 , x2,y2
HIZoom
x1,y1 , x2,y2
usage.nb
13
HIZoomIn
HIZoomNatural
HIZoomOut
HIGetView
grabs the current heat flow input view and returns a bitmapped
graphics object. This object can subsequently be displayed using the Show
command
Problem Commands
HIAnalyze flag
runs the heat flow solver. The flag parameter controls whether the solver
window is visible or minimized. For a visible window, either specify no value for flag
or specify 0. For a minimized window, flag should be set to 1. An equivalent form is:
HIAnalyse flag
HIClose
usage.nb
14
HISetFocus "documentname" switches the heat flow input file upon which
scripting commands are to act. If more than one heat flow 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 . "documentname" should
contain the name of the desired document as it appears on the window s title bar.
usage.nb
15
CIDeleteConductor "conductorname"
CIDeleteMaterial "materialname"
CIDeletePointProp "pointpropname"
x,y .
usage.nb
16
x2,y2 and
Equivalent forms are:
CIDrawPolygon
x1,y2 ,..., xn,yn
adds new node points at
every listed point and then draws a closed figure that connects the points
CIDrawPolyLine
x1,y2 ,..., xn,yn
draws a multi segment line by adding each
of the points in the list and then adding segments that join the listed points.
CIDrawRectangle x1,y1,x2,y2 adds nodes at x1,y1 , x1,y2 , x2,
x2,y1 and joins them with new segments. Equivalent forms are:
y2 and
CIDrawRectangle x1,y1 , x2,y2
CIDrawRectangle
x1,y1 , x2,y2
CICreateRadius x,y,z turns a corner located at
An equivalent form is: CICreateRadius x,y ,z
x,y
x,y .
CISelectGroup n selects the nth group of nodes, segments, arc segments and block labels. This
function will clear all previously selected elements and leave the edit mode in 4 group
CISelectLabel x,y selects the block label closest to
CISelectLabel x,y
CISelectNode x,y selects the node closest to
CISelectNode x,y
x,y .
x,y .
x,y .
usage.nb
17
CISetBlockProp "blockname",automesh,meshsize,
groupno sets 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
. groupno: make selected members of specified group number
CISetNodeProp "propname",groupno,"inconductor" sets the selected
nodes to have the nodal property "propname" and group number groupno.
The "inconductor" string specifies which conductor the node belongs to. If the
node doesn t belong to a named conductor, this parameter can be set to " None ".
CISetSegmentProp "propname",elementsize,automesh,
hide,groupno,"inconductor" sets 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, 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 groupno
A member of the conductor specified by the string "inconductor". If the
segment is not part of a conductor, this parameter can be specified as " None ".
CIDeleteSelected
CIDeleteSelectedArcSegments
CIDeleteSelectedLabels
CIDeleteSelectedNodes
CIDeleteSelectedSegments
CIClearSelected
usage.nb
18
group
group
View Manipulation
CISetGrid density,"type" changes the grid spacing. The density
parameter specifies the space between grid points, and the "type" parameter
is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.
CIShowGrid
CIHideGrid
CIShowMesh
CIPurgeMesh
CIShowNames
CIHideNames
stops the names of the
materials associated with each block label from being displayed
CISnapGridOn
CISnapGridOff
CIZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
CIZoom x1,y1 , x2,y2
CIZoom
x1,y1 , x2,y2
usage.nb
19
CIZoomIn
CIZoomNatural
CIZoomOut
CIGetView
object.
Problem Commands
CIAnalyze flag
runs the current solver. The flag parameter controls whether the solver window
is visible or minimized. For a visible window, either specify no value for flag or
specify 0. For a minimized window, flag should be set to 1. An equivalent form is:
CIAnalyse flag
CIClose
usage.nb
20
usage.nb
21
usage.nb
22
MIDeleteMaterial "materialname"
MIDeletePointProp "pointpropname"
x,y .
x2,y2 and
Equivalent forms are:
MIDrawPolygon
x1,y2 ,..., xn,yn
adds new node points at
every listed point and then draws a closed figure that connects the points
MIDrawPolyLine
x1,y2 ,..., xn,yn
draws a multi segment line by adding each
of the points in the list and then adding segments that join the listed points.
MIDrawRectangle x1,y1,x2,y2 adds nodes at x1,y1 , x1,y2 , x2,
y2 and
x2,y1 and joins them with new segments. Equivalent forms are:
MIDrawRectangle x1,y1 , x2,y2
MIDrawRectangle
x1,y1 , x2,y2
usage.nb
23
x,y
x,y .
MISelectGroup n selects the nth group of nodes, segments, arc segments and block labels. This
function will clear all previously selected elements and leave the edit mode in 4 group
MISelectLabel x,y selects the block label closest to
MISelectLabel x,y
MISelectNode x,y selects the node closest to
MISelectNode x,y
x,y .
x,y .
x,y .
MIDeleteSelectedArcSegments
MIDeleteSelectedLabels
MIDeleteSelectedNodes
MIDeleteSelectedSegments
MIClearSelected
usage.nb
24
Move/Copy/Scale
MICopyRotate bx,by,angle,copies, editaction
bx, by base point for rotation
angle angle by which the selected objects are
incrementally shifted to make each copy. This angle is measured in degrees.
copies number of copies to be produced from the selected objects
editaction 0 nodes, 1 segments, 2 block labels, 3 arcs, 4 group
An equivalent form is:
MICopyRotate bx,by ,angle,copies, editaction
MICopyTranslate dx,dy,copies, editaction
dx,dy represents the distance by
which the selected objects are to be incrementally shifted.
copies specifies the number of copoies to be produced from the selected objects
editaction 0 nodes, 1 segments, 2 block labels, 3 arcs, 4 group
An equivalent form is:
MICopyTranslate dx,dy ,copies, editaction
MIMirror x1,y1,x2,y2, editaction
mirrors the selected objects about a line passing through the
points x1,y1 and x2,y2 . Valid editaction entries are 0 for nodes, 1 for lines
segments , 2 for block labels, 3 for arc segments, and 4 for groups. Equivalent forms are:
MIMirror x1,y1 , x2,y2 , editaction
MIMirror
x1,y1 , x2,y2 , editaction
MIMoveRotate bx,by,shiftangle, editaction
bx, by base point for rotation
shiftangle angle in degrees by which the selected objects are rotated.
editaction 0 nodes, 1 lines segments , 2 block labels, 3 arc segments, 4
An equivalent form is:
MIMoveRotate bx,by ,shiftangle, editaction
MIMoveTranslate dx,dy, editaction
dx,dy distance by which the selected objects are shifted.
editaction 0 nodes, 1 lines segments , 2 block labels, 3 arc segments, 4
An equivalent form is:
MIMoveTranslate dx,dy , editaction
group
group
usage.nb
25
View Manipulation
MISetGrid density,"type" changes the grid spacing. The density
parameter specifies the space between grid points, and the "type" parameter
is set to "cart" for Cartesian coordinates or "polar" for polar coordinates.
MIShowGrid
MIHideGrid
MIShowMesh
MIPurgeMesh
MIShowNames
MIHideNames
stops the names of the
materials associated with each block label from being displayed
MISnapGridOn
MISnapGridOff
MIZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
MIZoom x1,y1 , x2,y2
MIZoom
x1,y1 , x2,y2
MIZoomIn
MIZoomNatural
MIZoomOut
MIGetView
grabs the current electrostatics input view and returns a bitmapped
graphics object. This object can subsequently be displayed using the Show
command
Problem Commands
MIAnalyze flag
runs the magnetics solver. The flag parameter controls whether the solver
window is visible or minimized. For a visible window, either specify no value for flag
or specify 0. For a minimized window, flag should be set to 1. An equivalent form is:
MIAnalyse flag
MIClose
MICreateMesh
runs triangle to create a mesh. Note that this
is not a necessary precursor of performing an analysis, as MIAnalyze
will make sure the mesh is up to date before running an analysis.
MILoadSolution
usage.nb
26
usage.nb
27
EOClearContour
x,y .
usage.nb
28
Field Values
EOGetPointValues x,y returns the various field values
associated with the point at x,y . The return values, in order, are:
V Voltage
Dx x or r direction component of displacement
Dy y or z direction component of displacement
Ex x or r direction component of electric field intensity
Ey y or z direction component of electric field intensity
ex x or r direction component of permittivity
ey y or z direction component of permittivity
nrg electric field energy density
An equivalent form is:
EOGetPointValues x,y
EOGetV x,y returns the voltage at point
EOGetV x,y
View Manipulation
EOShowContourPlot numcontours,lowerV,upperV shows the V contour plot with options:
numcontours Number of equipotential lines to be plotted.
upperV Upper limit for contours.
lowerV Lower limit for contours.
If numcontours is 1 all parameters are ignored and default values are used
EOHideContourPlot
EOShowDensityPlot legend,gscale,type,upperD,lowerD
Shows the flux density plot with options:
legend Set to 0 to hide the plot legend or 1 to show the plot legend.
gscale Set to 0 for a colour density plot or 1 for a grey scale density plot.
upperD Sets the upper display limit for the density plot.
lowerD Sets the lower display limit for the density plot.
type Sets the type of density plot. A value of 0
plots voltage, 1 plots the magnitude of D, and 2 plots the magnitude of E
EOHideDensityPlot
usage.nb
29
EOShowGrid
EOHideGrid
hides the grid points from view in the electrostatics output window
EOShowMesh
EOHideMesh
hides the finite element mesh from in the electrostatics output view
EOShowNames
EOHideNames
hides material names associated
with block labels from view in the electrostatics output window
EOShowPoints
EOHidePoints
inhibits the display of input node points in the electrostatics output window
EOSmoothOn
turns on smoothing of the D and E fields. The D and E fields
are then displayed using a linear interpolation of the field from nodal values
EOSmoothOff
turns off smoothing of the D and E fields. The D and E fields
are then displayed using values that are piecewise constant over each element.
EOSnapGridOn
EOSnapGridOff
EOZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
EOZoom x1,y1 , x2,y2
EOZoom
x1,y1 , x2,y2
EOZoomIn
EOZoomNatural
EOZoomOut
EORefreshView
EOGetView
grabs the current electrostatics output view and returns a bitmapped
graphics object. This object can subsequently be displayed using the Show
command
Miscellaneous
EOClose
EOGetProblemInfo
returns a list with two values: the Problem Type 0 for planar and
1 for axisymmetric and the depth assumed for planar problems in units of meters.
EOReload
usage.nb
30
x,y .
usage.nb
31
HOMakePlot PlotType,NumPoints,Filename,FileFormat
This function allows programmatic access to FEMM's X Y plot routines. If only PlotType
or only PlotType and NumPoints are specified, the command is interpreted as a
request to plot the requested plot type to the screen. If, in addition, the Filename
parameter is specified, the plot is instead written to disk to the specified file
name as an extended metafile. If the FileFormat parameter is also, the command is
instead interpreted as a command to write the data to disk to the specfied file name,
rather than display it to make a graphical plot. Valid entries for PlotType are:
0 T temperature
1
F
Magnitude of heat flux density
2 F . n Normal heat flux density
3 F . t Tangential heat flux density
4
G
Magnitude of field intensity
5 G . n Normal temperature gradient
6 G . t Tangential temperature gradient
HOGetConductorProperties "conductor" returns properties for the conductor
property named "conductor". A list with two values is returned: The temperature
of the specified conductor, and the total heat flux from the specified conductor.
Field Values
HOGetPointValues x,y returns the various field values
associated with the point at x,y . The return values, in order, are:
T temperature
Fx x or r direction component of heat flux density
Fy y or z direction component of heat flux density
Gx x or r direction component of temperature gradient
Gy y or z direction component of temperature gradient
Kx x or r direction component of thermal conductivity
Ky y or z direction component of thermal conductivity
An equivalent form is:
HOGetPointValues x,y
HOGetT x,y returns the temperature at point
HOGetT x,y
View Manipulation
HOShowContourPlot numcontours,lowerV,upperV shows the V contour plot with options:
numcontours Number of equipotential lines to be plotted.
upperV Upper limit for contours.
lowerV Lower limit for contours.
If numcontours is 1 all parameters are ignored and default values are used
HOHideContourPlot
usage.nb
32
HOShowDensityPlot legend,gscale,type,upperD,lowerD
Shows the flux density plot with options:
legend Set to 0 to hide the plot legend or 1 to show the plot legend.
gscale Set to 0 for a colour density plot or 1 for a grey scale density plot.
upperD Sets the upper display limit for the density plot.
lowerD Sets the lower display limit for the density plot.
type Sets the type of density plot. A value of 0 plots
temperature, 1 plots the magnitude of D, and 2 plots the magnitude of E
HOHideDensityPlot
HOHideGrid
hides the grid points from view in the heat flow output window
HOShowMesh
HOHideMesh
hides the finite element mesh from in the heat flow output view
HOShowNames
HOHidePoints
inhibits the display of input node points in the heat flow output window
HOSmoothOn
turns on smoothing of the D and E fields. The D and E fields
are then displayed using a linear interpolation of the field from nodal values
HOSmoothOff
turns off smoothing of the D and E fields. The D and E fields
are then displayed using values that are piecewise constant over each element.
HOSnapGridOn
HOSnapGridOff
HOZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
HOZoom x1,y1 , x2,y2
HOZoom
x1,y1 , x2,y2
HOZoomIn
HOZoomNatural
HOZoomOut
HORefreshView
HOGetView
grabs the current heat flow output view and returns a bitmapped
graphics object. This object can subsequently be displayed using the Show
Miscellaneous
HOClose
command
usage.nb
33
HOGetProblemInfo
returns a list with two values: the Problem Type 0 for planar and
1 for axisymmetric and the depth assumed for planar problems in units of meters.
HOReload
x,y .
usage.nb
34
usage.nb
35
Field Values
COGetPointValues x,y returns the various field values
associated with the point at x,y . The return values, in order, are:
V
& Voltage
Jx & x or r direction component of current density
Jy & y or z direction component of current density
Kx & x or r direction component of AC conductivity
Ky & y or z direction component of AC conductivity
Ex & x or r direction component of electric field intensity
Ey & y or z direction component of electric field intensity
ex & x or r direction component of permittivity
ey & y or z direction component of permittivity
Jdx & x or r direction component of displacement current density
Jdy & y or z direction component of displacement current density
ox & x or r direction component of permittivity
oy & y or z direction component of permittivity
Jcx & x or r direction component of conduction current density
Jcy & y or z direction component of conduction current density
An equivalent form is:
COGetPointValues x,y
COGetV x,y returns the voltage at point
COGetV x,y
View Manipulation
COShowContourPlot numcontours,lowerV,upperV shows the V contour plot with options:
numcontours Number of equipotential lines to be plotted.
upperV Upper limit for contours.
lowerV Lower limit for contours.
If numcontours is 1 all parameters are ignored and default values are used
COHideContourPlot
usage.nb
36
COShowDensityPlot legend,gscale,type,upper,lower
Shows the flux density plot with options:
legend Set to 0 to hide the plot legend or 1 to show the plot legend.
gscale Set to 0 for a colour density plot or 1 for a grey scale density plot.
upper Sets the upper display limit for the density plot.
lower Sets the lower display limit for the density plot.
type Sets the type of density plot. Plot types include:
0
V
1
Re V
2
Im V
3
J
4
Re J
5
Im J
6
E
7
Re E
8
Im E
COHideDensityPlot
COHideGrid
hides the grid points from view in the current output window
COShowMesh
COHideMesh
hides the finite element mesh from in the current output view
COShowNames
COHideNames
hides material names associated
with block labels from view in the current output window
COShowPoints
COHidePoints
inhibits the display of input node points in the current output window
COSmoothOn
turns on smoothing of the D and E fields. The D and E fields
are then displayed using a linear interpolation of the field from nodal values
COSmoothOff
turns off smoothing of the D and E fields. The D and E fields
are then displayed using values that are piecewise constant over each element.
COSnapGridOn
COSnapGridOff
COZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
COZoom x1,y1 , x2,y2
COZoom
x1,y1 , x2,y2
COZoomIn
COZoomNatural
COZoomOut
CORefreshView
usage.nb
37
COGetView
object.
Miscellaneous
COClose
COGetProblemInfo
returns a list with two values: the Problem Type 0 for planar and
1 for axisymmetric and the depth assumed for planar problems in units of meters.
COReload
x,y .
usage.nb
38
selected blocks.
type specifications are:
force
force
MOLineIntegral type calculates the line integral for the defined contour.
The following types of line integral and the return values are as follows:
0 total B.n, average B.n over the contour
1 total H.t, average H.t over the contour
2 Contour length, surface area
3 Stress Tensor Force: DC r x force, DC y z force, 2X r x force, 2X y z force
4 Stress Tensor Torque: DC torque, 2X torque
5 total B.n ^2, average B.n ^2
Typically returns two possibly complex values as
results. However, the Stress Tensor Force integral returns four values.
MOMakePlot PlotType,NumPoints,Filename,FileFormat
This function allows programmatic access to FEMM's X Y plot routines. If only PlotType
or only PlotType and NumPoints are specified, the command is interpreted as a
request to plot the requested plot type to the screen. If, in addition, the Filename
parameter is specified, the plot is instead written to disk to the specified file
name as an extended metafile. If the FileFormat parameter is also, the command is
instead interpreted as a command to write the data to disk to the specfied file name,
rather than display it to make a graphical plot. Valid entries for PlotType are:
0 Potential
1
B
2 B n
3 B t
4
H
5 H n
6 H t
7 Jeddy
8 Jsource Jeddy
usage.nb
39
Field Values
MOGetPointValues x,y get the field values at
x,y . The function returns a list of values which represent:
A vector potential A, flux 2 Pi r A if axisymmetric
B1 Bx if planar, Br if axisymmetric
B2 By if planar, Bz if axisymmetric
Sig conductivity
E stored energy density
H1 Hx if planar, Hr if axisymmetric
H2 Hy if planar, Hz if axisymmetric
Je Eddy current contribution to current density
Js Source current contribution to current density
Mu1 mux if planar, mur if axisymmetric
Mu2 muy if planar, muz if axisymmetric
Pe Power density dissipated through ohmic losses
Ph Power density dissipated by hysteresis
ff Winding fill factor
MOGetA x,y returns the vector potential, A, for 2D planar
problems, and it returns flux, 2 Pi r A, for axisymmetric problems.
The return value is possbly complex valued. An equivalent form is:
MOGetA x,y
MOGetB x,y returns a list with two elements containing
the magnetic flux density at point x,y . An equivalent form is:
MOGetB x,y
MOGetH x,y returns a list with two elements containing
the magnetic field intensity at point x,y . An equivalent form is:
MOGetB x,y
MOGetJ x,y returns the electric current density at point
MOGetJ x,y
ohmic
usage.nb
40
View Manipulation
MOShowContourPlot numcontours,lowerA,upperA,type shows the A contour plot with options:
numcontours Number of A equipotential lines to be plotted.
upperA Upper limit for A contours.
lowerA Lower limit for A contours.
type Choice of "real", "imag", or "both" to show
either the real, imaginary of both real and imaginary components of A.
If numcontours is 1, all parameters are ignored and default values are used
MOHideContourPlot
MOShowDensityPlot legend,gscale,upperB,lowerB,type
shows the flux density plot with the options:
legend Set to 0 to hide the plot legend or 1 to show the plot legend.
gscale Set to 0 for a colour density plot or 1 for a grey scaledensity plot.
upperB Sets the upper display limit for the density plot.
lowerB Sets the lower display limit for the density plot.
type Type of density plot to display. Valid entries are "mag", "real",
and "imag" for magnitude, real component, and imaginary component of B, respectively.
Alternatively, current density can be displayed by specifying "jmag", "jreal",
and "jimag" for magnitude, real component, and imaginary component of J, respectively.
If legend is set to 1 all parameters are ignored and default values are used
MOHideDensityPlot
MOHideGrid
hides the grid points from view in the electrostatics output window
MOShowMesh
MOHideMesh
hides the finite element mesh from in the electrostatics output view
MOShowNames
MOHideNames
hides material names associated
with block labels from view in the electrostatics output window
MOShowPoints
MOHidePoints
inhibits the display of input node points in the electrostatics output window
MOSmoothOn
turns on smoothing of the D and E fields. The D and E fields
are then displayed using a linear interpolation of the field from nodal values
MOSmoothOff
turns off smoothing of the D and E fields. The D and E fields
are then displayed using values that are piecewise constant over each element.
MOSnapGridOn
MOSnapGridOff
usage.nb
41
MOZoom x1,y1,x2,y2 Set the display area to be from the bottom left corner specified
by x1,y1 to the top right corner specified by x2,y2 . Equivalent forms are:
MOZoom x1,y1 , x2,y2
MOZoom
x1,y1 , x2,y2
MOZoomIn
MOZoomNatural
MOZoomOut
MORefreshView
MOGetView
grabs the current electrostatics output view and returns a bitmapped
graphics object. This object can subsequently be displayed using the Show
command
Miscellaneous
MOClose
MOGetProblemInfo
returns a list of two values: the problem
type 0 for planar, 1 for axisymmetric and the analysis frequency in Hz.
MOReload