EMFW Exp 5
EMFW Exp 5
Aim:
To simulate the magnetic field of a permanent magnet using FEMM magnetics simulation software
(or COMSOL Multiphysics).
Software Required:
1. Finite Element Method Magnetics (FEMM) Simulation Software.
Theory:
In free space, the magnetic flux density B is related to the magnetic field intensity H according to
B = o H (1)
where o is a constant known as the permeability of free space. The constant is in Henrys meter (H/m)
and has the value of o =4 10−7 H/m . The magnetic flux through a surface S is given by
= B dS (2)
S
where the magnetic flux Ψ is in webers (Wb) and the magnetic flux density is in webers per square
meter (Wb/m2) or teslas (T).
A magnetic flux line is a path to which B is tangential at every point on the line. It is a line along which
the needle of a magnetic compass will orient itself if placed in the presence of a magnetic field. For
example, the magnetic flux lines due to a straight long wire are shown in Figure 5.1.
Fig. 5.1: Magnetic flux lines due to a straight wire with current coming out of the page.
26
Fig. 5.2: Flux leaving a closed surface due to (a) isolated electric charge (b) magnetic charge
The direction of B is taken as that indicated as “north” by the needle of the magnetic compass. Notice
that each flux line is closed and has no beginning or end. Though Figure 5.1 is for a straight, current-
carrying conductor, it is generally true that magnetic flux lines are closed and do not cross each other
regardless of the current distribution. In an electrostatic field, the flux passing through a closed surface
is the same as the charge enclosed; that is,
elec = D dS = Q
S
(3)
Thus, it is possible to have an isolated electric charge as shown in Figure 5.2(a), which also reveals that
electric flux lines are not necessarily closed. Unlike electric flux lines, magnetic flux lines always close
upon themselves as in Figure 5.2(b). This is because ‘it is not possible to have isolated magnetic poles
(or magnetic charges)’. For example, if we desire to have an isolated magnetic pole by dividing a
magnetic bar successively into two, we end up with pieces each having north and south poles as
illustrated in Figure 5.3. We find it impossible to separate the north pole from the south pole. Thus
the total flux through a closed surface in a magnetic field must be zero; that is,
mag = B dS = 0
S
(4)
This equation is referred to as the law of conservation of magnetic flux or Gauss’s law for
magnetostatic fields. Although the magnetostatic field is not conservative, magnetic flux is conserved.
By applying the divergence theorem to eq. (4), we obtain
B dS = Bdv = 0
S v
Or B = 0 . (5)
27
This equation shows that magnetostatic fields have no sources or sinks and suggests that magnetic
field lines are always continuous.
Example Geometry: This example will consider a bar magnet 2 inches long, 1/2 inches wide, and 1/4
inches thick, magnetized through the thickness dimension. The magnet material is N42->the "N"
denoting a Neodymium-Iron-Boron (NdFeB) material and the "42" denoting a nominal energy product
of 42 MGOe. The magnet is pictured in Figure 5.4. In the picture, the top side of the magnet is a "N"
pole and the bottom side of the magnet (which you can't actually see from this view) is the "S" pole
face.
Procedure:
1. Install FEMM Simulation Software.
2. Define Material Properties (in case material is not available in the library)
3. Create Model Geometry.
4. Assign Material to the geometry domains.
5. Define Boundary Conditions.
6. Observe the Results/Plots.
Not every possible magnet material model is pre-defined in FEMM. However, the material
model of most permanent magnets can be defined by knowing two quantities:
FEMM has a selection of built-in NdFeB materials, but the materials library is not
comprehensive. If you want to model a class that is not in the library, you can build
you own magnet model in the materials library. A pretty good assumption is that the
relative permeability of the magnet is 1.05 (just a touch higher than the magnetic
permeability of air). You can then specify the coercivity as:
Hc =155319 A/m * sqrt(BHmax/MGOe)
So, for example if an N42 magnet were being modeled, the coercivity would be: Hc =
155319 A/m * sqrt(42) = 1006582 A/m. For example, the material definition for N42
would be as pictured in Figure 5.5.
28
Fig. 5.5: Definition of N42 in the FEMM Material Properties Dialog.
CREATE GEOMETRY
Draw the geometry pictured below in Figure 5.6.(use TAB key to place nodes)
This geometry represents a cross-section of the magnet and some air surrounding the
magnet. There is a block label inside the magnet and a second in the air around the
magnet. First, open the properties of the block label inside the magnet by selecting
it with a left mouse click and pressing <SPACE>. The block property dialog, like
shown in Figure 5.7.
29
Fig. 5.7: Block Properties dialog.
First, select the previously defined N42 material off of the "Block type" drop list.
When a material with a non-zero coercivity is selected (i.e. a material that is a
permanent magnet), the "Magnetization Direction" box becomes enabled. It is this box
that you use to define the orientation of the magnetism in the permanent magnet. The
angle is chosen as depicted in Figure 5. The Magnetization Direction is an angle in
units of degrees. The angle is measured from the X-axis. FEMM draws a green arrow
representing the magnetization vector, and the arrow points to the North pole of the
magnet. In Figure 5.8, the results of selecting a 90 degree angle are shown. NNN and
SSS are superimposed on the drawing to denote the North and South poles of the magnet,
respectively. Similarly, if the magnetization angle were selected to be 0, the arrow
would point to the right; 180 for an arrow to the left, and 270 for an arrow pointing
down.
The block label outside the magnet can be set to "Air" with a relative magnetic
permeability of 1. In versions 11Oct2012 and later, the program will pick an adequate
mesh density for you; otherwise, you should unclick the "Let Triangle choose Mesh
Size" box and manually select a reasonable mesh size like, in this case, 0.025".
BOUNDARY CONDITIONS
It's often a good idea to use "Open Boundary Conditions" that make the simulation
act as if the analysis were performed on an unbounded domain, rather than a small
finite element domain. To do this, click on the concentric circles icon on the toolbar
30
to bring up the "Open Boundary Builder" dialog. Fill out the desired radius of the
region (here 1 unit) and the center of the region (here {0,0)). The filled-out dialog
is shown in Figure 5.9. When you click "OK", the program generates a multi-layer
"external region" that has the same impedance as unbounded space, even though the
domain is finite.
Results:
Push the "turn the crank" toolbar button to analyze the solution. When the solver finishes, push the
"glasses" toolbar button to view the solution. The solution should look like Figure 5.10 (at least, when
flux density plots are turned on).
31
Alternate (with COMSOL Multiphysics)
• Choose Magnetic Fields no Current Physics with stationary solver.
• Create the Magnet Geometry enclosing the magnet with Air Sphere.
• Define materials for Air and the magnet (AC/DC-> hard materials->Choose NdFeB
N42 material)
• Choose Magnetic Flux conservation boundary condition. Provide the desired axis of
magnetization.
• Observer the output magnetic field with arrow volume over a cut plane.
32
References:
1. Mathew N. O. Sadiku, “Principles of Electromagnetics”, 4th Edition, Oxford University Press Inc,
2009.
2. https://www.femm.info/wiki/Download
3. https://www.femm.info/wiki/PermanentMagnetExample
33