# Magnetic Field of a Bar Magnet

## Main Question or Discussion Point

So I'm making a simulation to help me understand electromagnetics.
Basically I have a stationary bar magnet, along with a moving electron.
Each frame the electron has a force applied to it via the Lorentz force law, F = q(E+v cross B).
Now E = 0, but how do I calculate B?

The Biot-Savart law relates to currents, but a bar magnet doesn't have any current.

Cheers

Related Classical Physics News on Phys.org
A bar magnet is like many tiny current loops. However the treatment is actually easier if you use the magnetic scalar potential (which works as long as the electron doesn't go through the current loop).

For a bar magnet with a constant magnetization parallel to the magnet you can calculate the magnetic scalar potential by assuming that there is a constant magnetic density m spread over both the pole surfaces. Each magnetic density bit contributes
$$\mathrm{d}V_m=\frac{m\mathrm{d}A}{4\pi r}$$
(where dA is a surface element) to the scalar magnetic potential. The magnetic field from this potential - once you have summed over both pole surfaces - is
$$\vec{H}=\frac{\vec{B}}{\mu_0\mu_r}=-\nabla V_m$$

Last edited: