Sources
Tap a source to change it.
Strength
View
Magnetic field of wires, coils and magnets
In 1820 Hans Christian Ørsted switched on a current and saw a compass needle beside the wire swing round: electricity makes magnetism. Repeat his experiment here and go further. Put wires, coils, solenoids and bar magnets on the card and see their magnetic field as field lines, iron filings or a grid of compasses whose needles swing and settle. Every number is worked out from the Biot–Savart law in real units, so you can measure the field with the probe and check it against the textbook formulas. Pick an example, or build your own: drag a wire, coil or magnet to move it, or off the picture to remove it, and add new ones under the picture. Tap a source to select it, then reverse its current, turn it or delete it. Drag the probe compass, or tap anywhere, to measure the field there: the tiles show the field B and its direction, the textbook formula for the selected source and the value computed at the same place, or the force on a wire. Press Play to switch the current on with every compass pointing north and watch the needles swing round and settle; switch the current off and on, or move a source, to set them swinging again. Back and Step move by a tenth of a second, Reset turns the needles north again. Turn on the iron filings or the field strength map under View. With Sound on the probe hums higher in a stronger field; Record films it with the sound.
How it works
- Pick an example, such as a straight wire, a current loop, Helmholtz coils, a solenoid or a bar magnet. Drag a source to move it, or drag it off the picture to remove it; add wires, coils and magnets under the picture.
- Tap a source to select it, then reverse its current, turn it by 90° or delete it. Set the current, the number of turns, the coil's size, the magnet's strength and Earth's field under Strength.
- Drag the probe compass, or tap anywhere, to measure the field B there. The tiles compare the textbook formula for the selected source with the value worked out at the same place, or show the force on a wire.
- Press Play to switch the current on and watch the compass needles swing round and settle. Under View, turn on the iron filings or the field strength map.
Ørsted's experiment and the field of a wire
A current in a straight wire makes a magnetic field that runs round the wire in circles, and its strength falls with the distance: B = μ₀I / 2πr, with μ₀ = 4π × 10⁻⁷ T m/A. Curl the fingers of your right hand round the wire with the thumb along the current, and they point along the field. A wire carrying 10 A makes 100 µT at 2 cm, about twice Earth's field, which is why Ørsted's compass swung. In the example with Earth's field the two cancel at one point, where a compass needle has nothing to point to.
Loops, coils and solenoids
Bend the wire into a loop and the fields of all its parts add up in the middle: B = μ₀NI / 2R at the centre of a coil of N turns and radius R. Far away a loop's field falls with the cube of the distance, like that of a small bar magnet. Stack many turns into a long solenoid and the field inside becomes nearly uniform, B = μ₀NI / L, while outside it is weak. The app's solenoid of 200 turns, 20 cm long, carrying 2 A has 2.41 mT at its centre, a little less than the 2.51 mT of an endless solenoid, because its ends are not far away: it is only about three times as long as it is wide.
Helmholtz coils
Two equal coils on one axis, as far apart as their radius, give a field that is remarkably even in the space between them: (4/5)^(3/2) μ₀NI / R ≈ 0.716 μ₀NI / R in the middle, 1.12 mT for the example's coils of 100 turns, 8 cm in radius, carrying 1 A. Laboratories use them to cancel Earth's field or to calibrate magnetometers. Reverse the current in one coil and the fields cancel in the middle instead, growing steadily on either side: the anti-Helmholtz pair is the magnetic trap of cold-atom experiments.
Bar magnets and iron filings
André-Marie Ampère guessed that a magnet owes its field to tiny currents circling inside it; today we know they are the spins of electrons. A bar magnet magnetised along its length has the same field as a solenoid of the same shape, so the app works it out that way from its remanence Bᵣ, about 0.4 T for a ceramic magnet and 1.2 T for an alnico or neodymium one. Outside the magnet the field lines run from its north pole round to its south pole, and inside they carry on from south to north, so every line is closed. Iron filings sprinkled on a card turn into little magnets and line up along the field, which is how Michael Faraday first drew these lines.
Frequently asked questions
What is a tesla?
The tesla (T) is the unit of magnetic flux density B: a field of 1 T pushes on a wire 1 m long carrying 1 A with a force of 1 N. It is a large unit. Earth's field is 25 to 65 microtesla (µT), a fridge magnet a few millitesla (mT) at its surface, a strong neodymium magnet about half a tesla at its face and a hospital MRI scanner 1.5 or 3 T. The older unit, the gauss, is 10⁻⁴ T. The app writes every value with the prefix that fits it, from nT to T.
Which way does the field go round a wire?
Point the thumb of your right hand along the current and curl your fingers: they show the direction of the field. In the picture ⊙ is a current coming towards you, and its field runs anticlockwise; ⊗ is a current going away from you, and its field runs clockwise. The arrows on the field lines and the north ends of the compass needles (red) show the same direction.
Why are magnetic field lines always closed?
Because there are no magnetic charges: no north pole has ever been found without a south pole. So the field lines cannot start or end anywhere, unlike electric field lines, which begin on positive charges and end on negative ones. Round a wire they are circles; through a coil or a solenoid they come out of one end and go round to the other; and through a bar magnet they carry on inside from the south pole to the north pole. In the language of Maxwell's equations, the divergence of B is zero.
Why do the compass needles swing before they settle?
A compass needle is a small magnet that the field turns until it lies along the field, its north end pointing the way the field points. Like a pendulum it has inertia, so it overshoots and swings back and forth, and friction slowly damps the swings. In a stronger field the needle swings faster. Press Play to switch the current on with every needle pointing north, as Earth's field would leave them, and watch them turn to the new field, just as Ørsted saw in 1820.
Do parallel currents attract each other?
Yes. Each wire sits in the field of the other, and a current in a magnetic field feels a force F = I L × B. Currents in the same direction attract, opposite currents repel, with a force per metre of μ₀I₁I₂ / 2πd. The example's wires, 12 cm apart with 10 A each, pull on each other with 167 µN per metre, shown as green arrows. From 1948 to 2019 the ampere was defined by this force: 2 × 10⁻⁷ N per metre between two wires 1 m apart, each carrying 1 A.
Can I use the picture?
Yes. Save gives a PNG at the size you choose, and the pencil opens the picture in the PictorX photo editor with the field strength map, the iron filings, the field lines, the compasses, each kind of source, the probe and the labels on layers of their own, and the example's name as editable text. In the editor itself it is under Apps ▸ Science ▸ Physics ▸ Magnetic Field, where you pick the example or type the sources and set the strengths. Everything runs in your browser.
Magnetic Field: how do I record a video?
Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device. Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner. The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF. For the sound, choose the app's own sounds or one of three music tracks: calm, bright or beat.
Ready to try it?
Open PictorX in your browser — no install, no credit card required to start.
Go to Editor