David Meeker

dmeeker@ieee.org

revised December 14, 2013

Finite Element Method Magnetics (FEMM) is a finite element package for solving 2D planar and axisymmetric problems in low frequency magnetics and electrostatics. The current version of the program program runs under runs under Windows 2000, XP, Windows 7 and Windows 8. The program has also been tested running in Wine on Linux machines. The program can be obtained via the FEMM home page at http://www.femm.info.

The package is composed of an interactive shell encompassing graphical pre- and postprocessing; a mesh generator; and various solvers. A powerful scripting language, Lua 4.0, is integrated with the program. Lua allows users to create batch runs, describe geometries parametrically, perform optimizations, etc. Lua is also integrated into every edit box in the program so that formulas can be entered in lieu of numerical values, if desired. (Detailed information on Lua is available from http://www.lua.org/manual/4.0/) There is no hard limit on problem size—maximum problem size is limited by the amount of available memory. Users commonly perform simulations with as many as a million elements, though simulations with tens of thousands of elements are typical.

The purpose of this document is to present a step-by-step tutorial to help new users get "up and running" with FEMM. In this document, the solution for the field of an air-cored coil is considered. Although the objective of the tutorial is for the reader to build the model on their own, the completed

This will take you through a step-by-step process to analyze the magnetic field of an aircored solenoid sitting in open space. The coil to be analyzed is pictured in Figure 1. The coil has an inner diameter of 1 inch; an outer diameter of 3 inches; and an axial length of 2 inches. The coil is built out of 1000 turns of 18 AWG copper wire. For the purposes of this example, we will consider the case in which a steady current of 1 Amp is flowing through the wire.

In FEMM, one models a slice of the axisymmetric problem. By convention, the

Figure 1: Air-cored coil to be analyzed in first example.

Run the FEMM application by selecting

Select

The first task is to tell the program what sort of problem is to be solved. To do this, select

Switch Nodes mode by pressing the

Select the

Now click on the

Select

Select

Right click on the block label node in the air region outside the coil. The block label will turn red, denoting that it is selected. Press

Select and open the block label node inside the coil region. However, set this

This example is an “open boundary” problem. That is, one would like to solve for the field of the coil in an unbounded space, unaffected by a nearby computational boundary. However, the finite element method always requires that problems be solved on a bounded domain. To approximate an unbounded domain, click on the

Figure 2: Open Boundary Builder wizard.

It is generally sufficient to simply accept the suggested boundary parameters by hitting

The completed geometry looks as in Figure 3. The multi-layer structure is built automatically after OK is pressed on the Open Boundary Builder, and it provides all necessary boundary conditions for the problem.

Figure 3: Completed coil model, ready to be analyzed.

Now save the file and click on the toolbar button with yellow mesh: . This action generates a triangular mesh for your problem. If the mesh spacing seems to fine or too coarse you can select block labels or line segments and adjust the

Processing status information will be displayed. If the progress bars do not seem to be moving then you should probably cancel the calculation. This can occur if insufficient boundary conditions have been specified. For this particular problem, the calculations should be completed within a second. There is no confirmation for when the calculations are complete, the status window just disappears when the processing is finished.

Click on the glasses icon to view the analysis results. A post-processor window will appear. The post-processor window will allow you to extract many different sorts of information from the solution.

Just like the pre-processor, the post-processor window has a set of different editing modes:

Figure 4: Display of field values at the point (0,0).

With FEMM, it is straightforward to determine the inductance and resistance of the coil as seen from the coil's terminals. Press the button to display the resulting attributes of each

Figure 5: Circuit Property results dialog.

Since the problem is linear and there is only one current, the Flux/Current result can be unambiguously interpreted as the coil's inductance (

FEMM can also plot values of the field along a user-defined contour. Here, we will plot the flux density along the centerline of the coil. Switch to Contour mode by pressing the Contour Mode toolbar button. You can now define a contour along which flux will be plotted. There are three ways to add points to a contour:

1. Left Mouse Button Click adds the nearest input node to the contour;

2. Right Mouse Button Click adds the current mouse pointer position to the contour;

3. <TAB> Key displays a point entry dialog that allows you to enter in the coordinates of a point to be added to the contour.

Here, method 1 can be used. Click near the node points at (0,4), (0,0), and (0,-4) with the left mouse button, adding the points in the above order. Then, press the

Figure 6: Plot of flux density along the axis of the coil.

By default, when the program is first installed, only a black-and-white graph of flux lines is displayed. Flux density can be plotted as a color density plot, if you so desire. To make a color density plot of flux, click on the rainbow-shaded toolbar button to generate a color flux density plot. When the dialog box comes up, select the

Figure 7: Color flux density plot of solution.

You have now completed your first model of a magnetic problem with FEMM. From this basic introduction, you have been exposed to the following concepts:

• How to draw a model using nodes, segments, arc, and block labels;

• How to add material to your model and how to assign them to regions;

• How to define a boundary for your model;

• How to analyze a problem;

• How to inspect local field values;

• How to plot field values along a line;

• How to compute inductance and resistance;

• How to display color flux density plots.

Hopefully, this tutorial has presented you with enough of the basics of FEMM so that you can explore more complicated problems without getting sidetracked by the mechanics of how a problem is drawn and analyzed.