Skip to content

Magnetic Force Report

mufem calculates the force with the Maxwell stress tensor \(\overline{\overline{T}}\) [Pa]:

\[ \overline{\overline{T}} = \mathbf{B} \otimes \mathbf{H} - \frac{1}{2} \left( \mathbf{B} \cdot \mathbf{H} \right) \overline{\overline{I}} , \]

where

  • \(\overline{\overline{T}}\) — Maxwell stress tensor [Pa],
  • \(\mathbf{B}\) — magnetic flux density [T],
  • \(\mathbf{H}\) — magnetic field [A/m].

Here \(\otimes\) denotes the outer (dyadic) product, \(\left( \mathbf{B} \otimes \mathbf{H} \right)_{ij} = B_i H_j\), and \(\overline{\overline{I}}\) is the identity tensor.

To get the force \(\mathbf{F}\) [N], integrate over a surface \(S\) that encloses the body of interest:

\[ \mathbf{F} = \int_S \overline{\overline{T}} \cdot \mathbf{n} \, dS, \]

where \(\mathbf{n}\) is the outward unit normal and \(S\) a closed surface in the surrounding air.

In practice mufem evaluates the surface integral as a volume integral of the stress tensor over the layer of mesh elements next to the selected body.

Force from the Maxwell stress on the layer around the body
Figure 1: mufem integrates the traction $\overline{\overline{T}}\cdot\mathbf{n}$ over the air layer that encloses the body to give the net force $\mathbf{F}$. Any surface $S$ in that layer yields the same result.


Note

The surrounding region must be force-free. The elements next to the selected body form the layer that mufem integrates the stress tensor over. They must carry no body force: the region must be non-conductive (no eddy currents, so no \(\mathbf{J}\times\mathbf{B}\) force) and have vacuum permeability (\(\mu = \mu_0\), no magnetization force). Surround the body with at least one layer of air/vacuum elements. Do not place the body directly against another magnetic or conductive region, or the reported force will be wrong.

Usage

from mufem.electromagnetics.timedomainmagnetic import MagneticForceReport

magnet_force_report = MagneticForceReport(
    name="Magnet Force",
    marker="Magnet" @ Vol,
)

magnet_force = magnet_force_report.evaluate()
print(f"Magnet force: {magnet_force}")

The evaluate() method returns the force vector [N] that acts on the body. The marker selects the body that mufem sums the force over.

Note

Sign change. Versions before v0.5.28 returned the force with the opposite sign. From v0.5.28, a positive component is the force that pushes the body in the positive direction of that axis. This agrees with the Magnetic Torque Report. If your scripts changed the sign of the result, remove that change.

When to use this

  • Permanent-magnet machines — cogging force on a stator, axial / radial force on a rotor magnet.
  • Solenoid actuators and relays — pull-in force vs. plunger position.
  • Magnetic bearings and levitation — supporting force vs. air-gap and bias current.
  • Magnetic separators — force on a target body in a graded field.
  • Crash / drop studies of magnets — instantaneous force on a magnet during transient excitation.