User Tools

Site Tools


simple_current_flow_simulation_in_femm_-_step-by-step_tutorial

Simple CURRENT FLOW simulation in FEMM - step-by-step tutorial

Caution: The current flow solver in FEMM does NOT take into account the magnetic field, hence no AC phenomena such as skin effect are present in the solution, even though arbitrarily high frequency can be assigned to as the excitation.

Step 1 - solver

Open FEMM and start new problem, menu > File > New .

Select Current Flow Problem from the pop-up window (Fig. 1).

Fig. 1. Select problem


Step 2 - problem

Set problem and unit conditions (Fig. 2) from menu > Problem, and choose: Planar, Millimeters, Frequency = 0 Hz, Depth = 10 mm (and leave the rest with default values). If you use the settings as shown in Fig. 2 then you can compare with this tutorial if the calculation is correct.

Fig. 2. Set problem and unit conditions


Step 3 - points

Click on “Nodes” button (Operate on nodes) (Fig. 3-1).

Fig. 3-1. “Nodes” button selected

Press TAB (on keyboard) to manually input a node (point) with coordinates (Fig. 3-2). Enter the following points:

  1. point x = 0, y = 0
  2. point x = 0, y = 1
  3. point x = 2, y = 0
  4. point x = 2, y = 1
  5. point x = 3, y = -0.5
  6. point x = 3, y = 1.5
  7. point x = 5, y = -0.5
  8. point x = 5, y = 1.5

Fig. 3-2. Entering point with coordinates (0,0)

Click on the Zoom extents button (Fig. 3-3), which is the third one (white rectangle with a magnifying glass). (If not sure - hover a mouse over the buttons and see their description in the bottom left of the FEMM window.)

Then click on the Zoom out button once (magnifying glass with a minus).

Fig. 3-3. Zooming buttons, from left: Zoom in, Zoom out, Zoom extents, Zoom to window

If everything is done correctly, the window should look like in Fig. 3-4.

Fig. 3-4. Nodes created


Step 4 - lines

Select the “Line” button (Operate on segments, see also Fig. 3-1). Draw a line between two nodes by clicking on the first point, then on the second point. Draw all lines so that a closed shape is created as in Fig. 4-1.

Fig. 4-1. Closed shape created with straight lines


Step 5 - conductors

The excitation of the problem can be set by means of “Conductors” or “Boundaries”. In this tutorial only conductors will be used, but the process is similar for the boundaries.

To set the current or voltage in conductors go to: menu > Properties > Conductors

Fig. 5-1. Menu for “conductors”

Several currents can be specified and used for separate windings or conductors. A new circuit can be added by Add Property (Fig. 8-2), and filling the value of current in the Conductor Property pop-up window.

(The phase of the current is specified by using complex notation. For example, the value of 0.7071+I*0.7071, means that there is 0.7071 of the real component (0 deg. phase) and +I*0.7071 means the imaginary component (90 deg. phase), so this combination represents a peak current of 1.000 A at 45 deg. phase.)

FEMM appears to require a voltage reference point to be able to solve the problem. The easiest method is to define one “conductor” set to 0 V (Fig. 5-2), and apply the excitation as a voltage or current in the second “conductor (Fig. 5-3). (This can be also achieved by setting up a “boundary” condition with 0 V and assigned to the same edge instead of the “conductor” condition. The results are the same.)

Fig. 5-2. Add 0 V “conductor”

Fig. 5-3. Add 1 A “conductor”

Once the conductors are defined, they can be assigned to a given line or arc in the model. Select the left vertical line in the model by right-click, press Space and choose “In conductor” as the “0V” defined earlier (Fig. 5-4).

Repeat for the right vertical line, but assign the “1 A” conductor to it (Fig. 5-5).

Fig. 5-4. Assign the “0V” conductor to a line

Fig. 5-5. Assign the “1A” conductor to a line


Step 6 - material library

FEMM contains a library / database of materials, which can be used in the model, Fig. 6-1.

Fig. 6-1. Accessing Materials Library

The library window has two parts. On the left (“database” in Fig. 6-2), there are all the available materials as provided by FEMM. New materials can be added to it if needed.

The part on the right is for all the materials which will be accessible within the given model. Simply use the mouse to drag-and-drop method to drag the given material from the left to the right sub-window.

Fig. 6-2. Database (left) and model (right), drag-and-drop


Step 7 - block labels

Every part in the model must have a material data assigned to it, so FEMM know how to solve it. Each area completely surrounded by blue lines or arcs represents a “block”, and each such block has to have the material specified for it. This is done by using the green icon Operate on block labels, Fig. 7-1.

After selecting the option click somewhere (anywhere) inside a block, as shown in Fig. 7-1. A green point called <None> will appear with each click. To remove it, just right-click on it (to select it, changes colour to red) and press Delete (on keyboard).

Then each green point has to be configured. Right-click on a given point and press Space (on keyboard). Alternatively, after selecting (it turns to red) use: menu > Operation > Open selected. A pop-up window will appear, Fig. 7-1.

In the pop-up window, use the drop down list to select material type or “Block type”. For example, “Copper” is chosen for the point in Fig. 7-1. Press OK to accept - the point name will change to “Copper”.

Fig. 7-1. Accessing Materials Library

Step 8 - mesh

Before meshing - save the file! A very large mesh can sometimes cause problems, so it is a good idea to save before meshing.

For simple models it is sufficient to use the automatic settings of mesh. Just click on the “mesh” button, Fig. 8-1. If all materials were assigned to all blocks then the pop-up message states just the number of nodes of the mesh, meaning that all is correct.

If some block label was left undefined then this message will say something like:

Created mesh with 2518 nodes.
Grey mesh lines denote regions that have no block label.

It is necessary to define ALL block labels.

If everything is correct (regarding the labels and mesh) then the message will look like this:

and the model is ready to be solved.

Created mesh with 2518 nodes.

Fig. 8-1. Mesh (automatically generated)


Step 9 - analyse / solve

Analysis is executed by clicking the “cranked cog” icon (red arrow in Fig. 9-1). A pop-up window appears which shows the progress of calculations. Just wait until it finishes. No message is shown if all finishes correctly.

As soon as the small window disappears the results can be viewed by clicking the “glasses” button (black arrow).

If there are errors in the model or material data the solution might not converge. If the computation time is excessive typically there is a problem somewhere in the model (block labels, double labels, wrong boundary, etc.)

Fig. 9-1. Analyse / solve


Step 10 - results

Clicking the button (glasses icon) shown by the black arrow in Fig. 9-1 opens a new window (post-processing), with the results of the simulation loaded. Depending on the configuration of FEMM there could be lines or colours, or no lines and no colours.

The type of data can be selected by using the “lines” or “rainbow” buttons, Fig. 10-1.

These two options can be accessed also through: menu > View > Contour plot and menu > View > Density plot.

Fig. 10-1. Results window, with colour map, no field lines

Clicking the “rainbow” button shows the small window, which which the type of variable can be selected: Voltage V, Current density J, or Electric field E. Limits are scaled automatically between the min. and max. value present in the model, but they can be adjusted manually as needed. In Fig. 10-1 the limits for the current density |J| were set from 0 to 1e6 A/m2 and as can be seen the current density in the narrower part is twice as high as in the wider part, so the solution is correct.


Step 11 - that's it!

And that's all - now you can run a simple FEMM current flow simulation!

Download the FEMM file used in this tutorial
current_flow_tutorial.FEC (packed as ZIP) (1kB)
Helpful page? Support Encyclopedia Magnetica.

All we need is $0.25 per month? Come on… ;-)
simple_current_flow_simulation_in_femm_-_step-by-step_tutorial.txt · Last modified: 2022/06/01 11:36 by stanzurek