FEATool Multiphysics  v1.10
Finite Element Analysis Toolbox
Magnetic Field Around a Horseshoe Magnet

Example of simulation and visualization of the two-dimensional static magnetic potential field around a u-shaped permanent magnet.

Tutorial

This model is available as an automated tutorial by selecting Model Examples and Tutorials... > Electromagnetics > Magnetic Field Around a Permanent Magnet from the File menu. Or alternatively, follow the step-by-step instructions below.

  1. To start a new model click the New Model toolbar button, or select New Model... from the File menu.
  2. Select the Magnetostatics physics mode from the Select Physics drop-down menu.

    permanent_magnet1_02_50.png
  3. Press OK to finish the physics mode selection.

Start by creating two circles centered at (0, 0) and with radius 0.05, and 0.0025, respectively.

  1. Select Circle from the Geometry menu.
  2. Enter 0.05 into the radius edit field.
  3. Press OK to finish and close the dialog box.
  4. Select Circle from the Geometry menu.
  5. Enter 0.025 into the radius edit field.
  6. Press OK to finish and close the dialog box.

    permanent_magnet1_09_50.png
  7. Create three rectangles with dimensions according to the table below
x_minx_maxy_miny_max
-0.06-0.050.025-0.15
0.06-0.0250.050.15
000-0.2
0.060.060.060.2
  1. Subtract rectangle R1 and the smaller circle C2 from C1 using the formula C1 - C2 - R1 in the Combine Objects... option of the Geometry menu.

    permanent_magnet1_11_50.png
  2. Press OK to finish and close the dialog box.

Lastly, create a larger circle for the surrounding domain.

  1. Select Circle from the Geometry menu.
  2. Enter 0 0.03 into the center edit field.
  3. Enter 0.2 into the radius edit field.
  4. Press OK to finish and close the dialog box.

    permanent_magnet1_16_50.png
  5. Switch to Grid mode by clicking on the corresponding Mode Toolbar button.

    permanent_magnet1_17_50.png
  6. Press the Equation mode button to switch from grid mode to physics and equation/subdomain specification mode. In the Equation Settings dialog box that automatically opens, prescribe opposing magnetization of the magnet ends by setting the Magnetization, My coefficient to 1 and -1 in subdomains 1 and 2, respectively. Leave the the magnet curve and outer domain with zero magnetization.

    permanent_magnet1_18_50.png
    permanent_magnet1_19_50.png
  7. Switch to Boundary mode by clicking on the corresponding Mode Toolbar button.

In Boundary mode, set or leave all the boundary conditions to the default Magnetic insulation/antisymmetry selection.

permanent_magnet1_20_50.png
  1. Now that the problem is fully specified, press the Solve Mode Toolbar button to switch to solve mode. Then press the = Tool button to call the solver with the default solver settings.
  2. Switch to Solve mode by clicking on the corresponding Mode Toolbar button.
  3. After the problem has been solved, FEATool automatically changes to Postprocessing mode and plots the Magnetic potential, Az. Contours and arrow plots of the magnetic field can be selected by using the the Postprocessing Settings dialog box.

    permanent_magnet1_23_50.png
    permanent_magnet1_24_50.png

The magnetic field lines can clearly be seen going from one magnet end to the other.

  1. To verify the solution, choose the Subdomain Integration... option in the Post menu, and integrate the Magnetic potential, Az and Magnetic field over all subdomains, the integrals should result in values around -7.1e-11 and 0.005, respectively.

    permanent_magnet1_25_50.png

The magnetic field around a permanent magnet electromagnetics model has now been completed and can be saved as a binary (.fea) model file, or exported as a programmable MATLAB m-script text file, or GUI script (.fes) file.