This is an old revision of the document!
This page shows a step-by-step tutorial of a very simple magnetic simulation.
Other tutorials:
| Helpful page? Support Encyclopedia Magnetica. All we need is $0.25 per month? Come on… |
Open FEMM and start new problem, menu > File > New .
Select Magnetics problem' from the pop-up window (Fig. 2-1).
Set problem and unit conditions (Fig. 3-1) from menu > Problem, and choose: Planar, Millimeters, Frequency = 50 Hz, Depth = 10 mm (the rest leave 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
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:
x = 0, y = 0x = 1, y = 0x = -2, y = -2x = -2, y = 2x = 2, y = -2x = 2, y = 2x = -3, y = -3x = -3, y = 3x = 3, y = -3x = 3, y = 3
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 botoom 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.
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 “frame” is created as in Fig. 4-1.
Fig. 4-1. Frame is created with straight lines
Select the “Arc” button (Operate on arc segments) (see also Fig. 3-1).
The arcs are always drawn in anti-clickwise direction. So to draw a bottom arc as shown in Fig. 5-1 the points have to be clicked in the sequence “1” then “2”. To draw the top arc click “2” then “1”.
Fig. 5-1. Bottom arc from 1 to 2, top arc from 2 to 1
The inner circle consists of nodes and arcs. These can be copied separately, but also can be copied as one object, which can be done by executing the following sequence (Fig. 6-1):
Horizontal shift = 4If all was executed correctly the geometry should look like in Fig. 6-2.
Save the file: menu > File > Save
To set the current in conductors or circuits go to: menu > Properties > Circuits
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 Circuit 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 only solves with current as the input variable. It is not possible to set voltage. If the voltage needs to be used then some iterative calculations are required (especially with non-linear materials). External calculations are required. See an example here: https://www.femm.info/wiki/MyTransformer
Fig. 8-2. Add current / circuit
FEMM contains a library / database of materials, which can be used in the model, Fig. 9-1.
Fig. 9-1. Acessing Materials Library
The library window has two parts. On the left (“database” in Fig. 8-2), there are all the available materials as provided by FEMM. New materials can be added ot 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. 9-2. Database (left) and model (right), drag-and-drop
FEM equations require boundary conditions to be solved. They act as a reference point. Many different conditions can be specified, but for a simple magnetics simulation it is typically most useful to use the built-in “open boundary” feature. This boundary simulates an infinitely large volume (hence “open”), even though it can be positioned quite close to the simulated objects.
This “open boundary” method (Fig. 10-1) should be done only afer all other geometry was created, because it can automatically set the right size of the boundary, suitably larger thatn the rest of the model. If this is the case then nothing needs to be changed in the pop-up window, and all the default values can be accepted with “OK”.
Fig. 10-1. Create open boundary automatically
After accepting there will be many cirles created automatically, Fig. 10-2. There will be some block names appearing in the circles (as shown by the red arrows). These should be ignored, because they are needed for correct operation of the boundary.
Fig. 10-2. Open boundary created
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 represtents a “block”, and each such block has to have the material specified for it. This is done by using the gren icon Operate on block labels, Fig. 11-1.
After selecting the option click somewhere (anywhere) inside of each block, as shown in Fig. 11-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 keboard).
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. 11-2.
In the window, use the drop down list to select material type or “Block type”. For example, Air is chosen for the point in Fig. 11-2. If the material is passive (no current flowing, not a magnet), then nothing more needs to be configured. Press OK to accept.
The drop down list will also contain the u1, u2, u3… materials for the open boundary. These should be ignored.
Notes:
Fig. 11-2. Configure block labels
If the given block has some imposed current flowing through then it is also set in the same window. Fig. 11-3 and Fig. 11-4 show how to set current in the circular wires. FEMM uses the approach of “positive turns” and “negative turns” for the same current. So just one current needs to be defined and the values have to be assigned as shown in the figures.
The frame core is configured as “Pure iron” in the final model, Fig. 11-4.
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. 12-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 12239 nodes. Grey mesh lines denote regions that have no block label. |
It is necessary to define ALL block labels.
Fig. 12-1. Mesh (automatically generated)
Analysis is executed by clicking the “cranked cog” icon (red arrow in Fig. 13-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 dissapears the results can be viewed by clicking the “glasses” button (black arrow).
For all-linear models the calculation finishes in one step. For non-linear models it takes many iterations. For highly non-linear models (e.g. with deep saturation) or with large very dense mesh, the calculatiations can take very long time.
If there are errors in the model or material data the solution might not converge. If the computation time is exessive typically there is a problem somewhere in the model (block labels, double labels, wrong boundary, etc.)