Magnetic Field Around a Wire
This simulation shows the circular magnetic field lines surrounding a straight current-carrying wire, viewed end-on, with adjustable current strength, direction, and a probe point letting you read off the field's magnitude at any distance from the wire.
Interactive simulation
The physics behind this simulation
For an infinite straight wire, the Biot-Savart law gives a magnetic field magnitude that depends only on the current and the distance from the wire:
The field circles around the wire in closed loops, with direction given by the right-hand rule: point your right thumb in the direction of current flow, and your curled fingers show the direction the field circles — counterclockwise when viewed from the direction the current is flowing toward you (current "out of the page"), clockwise when the current flows away from you ("into the page").
Sources
- Biot, J.B., Savart, F. (1820). Annales de Chimie et de Physique, 15, 222–223.
- Griffiths, D.J. (2017). Introduction to Electrodynamics, 4th ed. Cambridge University Press, Ch. 5.