Introduction to FEA with FEMM

Ian Stokes-Rees

TSS (UK) Ltd.

Updated April 11, 2001 by DCM

Preamble

Finite Element Method Magnetics (FEMM) is a freeware software package for 2D FEA of EM systems, including dynamic systems (with fixed frequency field or current variations). It is powerful and simple and therefore makes and excellent starting point for learning FEA. This discussion provides a three part introduction to FEA, using FEMM as the basis.

 

Software Availability

FEMM is a freeware package written by David Meeker. The homepage for the FEMM is located at http://members.aol.com/_ht_a/gmagnetics/. There is a mailing list related to FEMM with a homepage at http://groups.yahoo.com/group/femm

Installation requires Windows 9x/NT/2000 and approximately 4 megs of hard drive space. Computation time is reasonable for most problems even on older Pentium systems. Number of elements is not limited, although the number of elements used affects the computation time. Finally, the 2D model to be analyzed can be designed in a CAD program and imported to FEMM in DXF format, but only 2D lines, arcs, and points will be translated.

 

Basic Introduction: Example 1

This will take you through a step by step process to analyze a block of iron sitting in a magnetic field. The following sections will develop some additional concepts. Users should first refer to the FEMM user’s manual regarding the general interface (i.e. keyboard and mouse controls).

  1. Create model
  2. Select "nodes" from the tool bar (this is the farthest button on the left with a small black box: ) and place 4 nodes for the corner of a box (at, for example, (0,0), (0,1.5), (1.5,0) and (1.5,1.5) ). Then, create 4 nodes for the corners of a smaller box inside the large box (at, for instance, (0.5,0.5), (1,1), (0.5,1) and (1,0.5) ). One can place nodes either by moving the mouse pointer to the desired location and pressing the left mouse button, or by pressing the <TAB> key and manually entering the point coordinates via a popup dialog.

    Select "lines" from the tool bar (second button from the left with a blue line: ). To select a node to be the endpoint of a line, click near the desired endpoint with the left mouse button. By selecting the nodes for the larger box in sequence, one obtains lines between each of the nodes and result in a large connected box surrounding the 4 internal nodes. Repeat the process for the internal nodes to create a small box inside a large box.

  3. Add materials to the model
  4. Select "Properties|Materials Library" off of the main menu. In the "Materials in Library" drop box that appears, select "Air" then click on "Add selected material to model". Repeat for "Pure Iron". Click on "OK".

  5. Define materials for each region
  6. Now click on "Block Labels" (the tool bar button with green circles ), and place a block label in the inner box and one in the outer box. Like node points, block labels can be placed either by a click on the left mouse button, or via the <TAB> dialog.

    NOTE: If snap-to-grid is enabled then it may be difficult to place the block label in the empty space. If this is the case, disable snap-to-grid by de-selecting the tool bar button with the point and arrow.

    Right click on the block label node for the outer box so that the node turns red, denoting that it is selected. Press space to "open" the selected block label. A dialog will pop up containing the properties assigned to the selected label. Set the "Block type" to "Air", and enter "0.1" for the "side length". The side length parameter defines a constraint on the largest possible elements size allowed in the associated section. The mesher attempts to fill the region with nearly equilateral triangles in which the sides are approximately the same length as the specified "Side Length" parameter. The default side length is 0, which denotes that the mesher is free to pick its own element size (which usually results in a somewhat coarse mesh). Repeat the same for the inner block label node and set the "Block type" to "Pure Iron".

  7. Create Boundary Conditions
  8. Select "Properties|Boundary" from the menu bar, then click on the "Add Property" button. Replace the name "New Boundary" with "Magnetic Field Source", and enter "1" (one) for the A_0 parameter. Make sure the other fields are all zero, and the BC Type (Boundary Condition type) is set to "Prescribed A". This means you have just defined a boundary condition of 1 Wb/m, but you have yet to assign this condition to a particular part of the model.

    Repeat the above process but instead name the new boundary condition "Zero" which is a zero magnetic flux plane, and set A_0 to "0" (zero).

    Select "lines" from the toolbar then right click on the left side of the large box. When it turns red you have selected it. Now press space bar and the "Segment Properties" window will appear. From the top drop box change the segment type from "<None>" to "Magnetic Field Source". Repeat this process for the right side of the outer box, but set the segment type to "Zero".

  9. Set Problem Characteristics
  10. Select "Problem" from the menu bar and make sure the frequency is set to zero, the problem type is planar, and the length unit is set to meters. You may also add a comment to the file.

  11. Generate Mesh and Run FEA
  12. Now save the file and click on the toolbar button with yellow mesh: . This action generates a triangluar 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 element length defined in the properties of each object. Once the mesh has been generated, click on the button with the crank and gear to run the FEA algorithm over your model.

    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 few seconds. There is no confirmation for when the calculations are complete, the status window just disappears when the processing is finished.

  13. Display Results

Click on the glasses icon to start FEMMView. In femmview, you can click on the purple shaded button to generate a colour field intensity plot. When the dialog box comes up, select the "Show flux density" box, and accept the other default values. Click on "OK".

From this basic introduction you should have gained the following principles:

Here is a copy of my version of this demo file: demo1.fem

 

Additional Concepts in FEMM: Example 2

You will now create a model of a current carrying coil wire in an axisymmetric system with a better boundary condition. Imagine a 5 cm radius cylinder with a 1cm copper wire wound around it. We are going to model the field produced by this single turn of the coil using a better approximation of an infinite boundary condition (i.e. ideally, the field only equals zero at infinity).

  1. First set the "Problem" properties to 0 Hz, axisymmetric, and units of centimeters. In this case, the vertical axis is the radial axis of the problem (or imagine it as a line of symmetry).
  2. Change the "Grid Size" to 1, meaning each dot represents 1cm, and select snap-to-grid by pushing in the toolbar icon. Snap-to-grid allows points and block labels to be placed exactly on grid points using clicks of the left mouse button.
  3. Find the r = 0 z = 0 point (the system origin). This may require zooming out. Place a node at the origin.
  4. Place a nodes at (r,z) = (0,30), (0,-30), and (5,0), (6,0) (refer to the left side of the status bar at the bottom of the screen for a read-out of the current mouse pointer position).
  5. Connect lines between (0,0) and (0,30) and (0,-30). This is the axis of rotation for this axisymmetric problem.
  6. Select the arc toolbar button . Select the (0,-30) point (bottom point), then select the (0,+30) point (top point). When the dialog box comes up, enter "180" for "Arc Angle". Arcs are drawn counter clockwise, so this will draw the right side arc between the two points and the arc will cover 180 degrees (half a circle).
  7. Now select the (5,0) point followed by the (6,0) point, and enter "180" for "Arc Angle". Repeat in the opposite order to complete the top half of the circle.
  8. Zoom in on the circle section by selecting "Zoom" then "Window" and draw a box around the circle.
  9. Deselect "snap-to-grid" and place a block label (green node) inside the circle, and one outside the circle.
  10. Add "Air" and "Copper" to the model materials using the "Properties-Materials Library" dialog box from the menu bar.
  11. Select "Properties" then "Materials" from the menu bar and modify Copper. Change the "J_re, MA/m^2" box from "0" to "60", which corresponds to 60,000,000 amps per square meter current density, or approximately 5000A along a 1cm diameter wire.
  12. Select the block label inside the circle by right clicking with the mouse near the green node. Change the "Block type" to Copper, and the "Side length" to 0.1 (since 0.1 of 1cm (remember base units are cm) equals 1mm, this is mesh size). Do the same for the outer block label node but assign it to "Air" and "Side length" to 1 (0.1 is too fine a scale for such a large region).
  13. Click on the blank page toolbar button . This button causes the view to zoom out so that the whole page is visible.
  14. Select "Properties|Boundary" and then "Add Property". Rename your new boundary "Infinite Estimate" and change the "BC Type" to "Mixed". Given that the system under analysis is close to the center of an arc (usually either a full or half circle), "c0 coefficient" can be set to 1/(4p r*10-7) where r is the radius of the arc. In this case, r = 0.3m (30cm), so c0 = 2652582. All the other values should be zero (including c1 coefficient).
  15. Select the half circle by right clicking on or near it (the "Arc" toolbar button must also be depressed). Press space and assign "Infinite Estimate" to "Boundary cond.".
  16. Now generate the mesh, perform the calculation, and activate FEMMView to display the magnetic field produced by the current in the wire.

Note that the vertical side of the semi-circle boundary (along the radial axis) does not have any boundary condition assigned--a zero potential boundary condition is defined to the axis of rotation in axisymmetric problems by default. Also note how the magnetic field lines radiate through the outer arc boundary as if heading to infinity. This is due to the use of an impedance boundary conditon on the outer boundary, which closely mimics the behavior of the coil in unbounded free space. More information on so-called "open" boundary conditions is available in the FEMM User Manual appendices. For comparison purposes, define a boundary condition with "Prescribed A" and set the A_x coefficients to zero. Name this "Zero" and change the arc properties from "Infinite Estimate" to "Zero" and compare the results. With a "Zero" outer boundary, no field crosses the outer boundary.

Two remaining areas have not been covered in this tutorial. They are bulk models of laminates and permanent magnets. Both are well covered in the FEMM User Manual Appendices.

Here is a copy of my version of this demo file: demo2.fem