Last week I received the type of tech-help inquiry that accounts for 83% of strokes among software developers. A user reported that results from our 3D code did not agree with numbers he obtained from one of those free magnet calculators that you find on the Internet. Given the choice of believing a finite-element, multi-processor program costing several thousand dollars or a free Web app, which would you choose? Why the app of course! After all, it’s on the Internet!
I wanted to put the issue to rest and to check out some of the calculators, so I set out to resolve the discrepancy. The first step was to add a filter. The user had expended several hours on the problem and, like many tech help requesters, wanted to share the agony. According, he sent a large collection of spreadsheets, Powerpoint files and Magnum scripts. I negotiated things down to the following test problem:
» A magnet in free space has a square cross section (3.5 mm x 3.5 mm), a height of 1.3 mm and a remanence field Br = 0.92 T. The magnetization direction is along the height direction. What is the flux density B at a position 2.5 mm above the magnet (i.e., along the magnetization direction).
The user reported a value 47 mT with an on-line calculator and 37 mT with Magnum.
To begin, here’s a link to an app from IBSMagnet that handles the on-axis fields of circular or rectangular magnets:
Figure 1 shows the setup and the returned value of 47 mT at the test point.
As a crosscheck, I found a second calculator from MS-Schramberg at
For this one, you enter one of their materials and it supplies Br. The choice SmCo5 143/143 had Br = 0.92 T. Figure 2 shows the returned value as 44.29 mT.
I set up my own Magnum calculation rather than employ the user’s setup. For the simple geometry, it took only a few minutes to generate a solution. Here’s a link to a zip archive containing the input files CalcTest.min, CalcTest.gin and CalcTest.scr: CalcTest.zip. Defining the mesh is the critical step. Here is the GLOBAL section from CalcTest.MIN:
GLOBAL XMesh -10.0 -3.0 0.50 -3.0 3.0 0.25 3.0 10.0 0.50 End YMesh -10.0 -3.0 0.50 -3.0 3.0 0.25 3.0 10.0 0.50 End ZMesh -10.0 -3.0 0.50 -3.0 -0.65 0.20 -0.65 0.65 0.10 0.65 3.0 0.20 3.0 10.0 0.50 End RegName( 1): Air RegName( 2): Magnet END
Besides good resolution for the problem, the mesh has two noteworthy properties:
- The solution volume is much larger than the magnet and the measurement point to approximate the free-space condition. Variable resolution is used to speed the calculation.
- The element divisions of the foundation mesh are set up to correspond exactly with the faces of the magnet. In this way, the magnet has precisely the desired volume, even without surface fitting.
The analysis script CalcTest.SCR calls for a calculation at a point on the symmetry axis 2.5 mm from the magnet surface, [0.00 mm, 0.00 mm, 3.15 mm]. The Magnum value is 45.07443 mT, consistent with the online calculators.
There’s no documentation of the methods used by the calculators, but here’s my guess. For the purpose of field calculations, modern magnetic materials like SmCo and NdFe have a wondrous property: the domains are firmly locked along the magnetization direction and are unaffected by other magnets and coils in the vicinity. Therefore, surfaces normal to the magnetization direction carry a uniform surface current density J = Br/μ0. With a known distribution of current, the on-axis flux density can be determined from a simple Biot-Savart integral. For example, a circular disk magnet looks like a finite-length solenoid. The calculation involves a summation over differential current density elements and the accuracy depends on the number of terms. Hence, the small difference between the two calculators.
Finally, I want to emphasize why a code like Magnum costs a lot more than a free calculator. Magnum calculates flux density at all locations (not just the axis), handles assemblies of multiple permanent magnets of any shape and can include the effect of iron (saturated or unsaturated), all with accuracy approaching 1 part in 10^6.
 Contact us : firstname.lastname@example.org.
 Field Precision home page: www.fieldp.com.