Bar Magnet & Iron Filings
A bar magnet is approximated by two opposite magnetic poles ±qₘ placed at the ends of the bar, so the magnetic field at any point is the sum of two inverse-square contributions B = (μ₀/4π) Σ qₘ r̂/r². A few thousand short line segments — virtual iron filings — are scattered on the page and rotated at every frame to align with the local B direction; their brightness scales with |B|, so dense field regions near the poles glow and the looping closed lines from N to S emerge automatically. The magnet itself can be dragged and rotated to see how the field pattern follows.
Who it's for: Intro magnetism and field-line visualisation; pairs nicely with the magnetic-field and Hall-effect simulators.
Key terms
- bar magnet
- magnetic field lines
- magnetic poles
- iron filings
- field visualisation
- dipole field
How it works
Iron filings on a card make the magnetic field of a **bar magnet** visible. Each filing is a tiny dipole that lines up with the local B; together they trace the **field lines** from N to S. Drag the magnet around — the lines reorganise in real time.
Key equations
Frequently asked questions
- Are real iron filings actually monopoles?
- No. Each filing is itself a tiny induced magnet: it polarises along the local field and then rotates so its own N–S axis lines up with B. The macroscopic effect — segments tracing field-line directions — is what we render here.
- Is the two-pole model accurate far from the magnet?
- Far away the field of any magnet looks like a magnetic dipole, which our two opposite poles reproduce exactly. Up close the model is a useful cartoon but misses the volumetric magnetisation distribution inside a real bar.
- Why are the field lines closed loops?
- ∇·B = 0 means magnetic field lines never start or end in space — they always close on themselves, leaving the north pole, looping through the surrounding region, and re-entering at the south pole.
More from Electricity & Magnetism
Other simulators in this category — or see all 46.
Biot–Savart Law
Infinite wire B ∝ 1/r; ring via segment sum; heatmap + probe.
Electric Dipole Field (2D)
±q on axis: V heatmap, equipotentials, E field lines; formulas.
Ideal Op-Amp (feedback)
Inverting, non-inverting, buffer; sine or DC; optional rail clipping.
Van de Graaff Generator
Belt charges a dome; V = Q/C; stylized spark to ground when V_break is exceeded.
Kirchhoff's Laws (KCL & KVL)
3-node DC: junction divider + optional R∥V; hints, KCL/KVL, solved currents.
Plane EM Wave (vacuum)
E ⊥ B ⊥ k: sin(kz−ωt) fields, Poynting along z; ω = ck (c = 1).