Skip to content

Magnetism and electromagnetism simulation

Field Around a Wire and Solenoid Simulation

A vertical wire through a card with eight plotting compasses and iron filings, a glossy coil whose field lines are worked out exactly, an electromagnet that picks up paperclips, a steel core that stays magnetised, and a relay that switches a motor.

Loading simulation…
Show symbols for

Predict first

Question 1 of 4

A vertical wire passes through a horizontal card, and you look down on the card from above. The current flows up the wire, towards you (⊙). Which way do the magnetic field lines go round the wire?

Try this

  1. 1In the Straight wire set-up, note which way the arrows on the circles travel round the wire. Press Reverse and watch all eight compass needles swing. Did the spacing of the circles change, or only their direction?
  2. 2Press Filings, then press More I a few times. Where do the filings line up most neatly? Press Reverse once more: why does the filings pattern stay exactly the same?
  3. 3Press Earth. Drag one compass out towards a corner of the card and watch it turn to point more nearly up the card (north). Then look for the neutral point marker: why would a compass placed there have nothing to line up with?
  4. 4Choose Solenoid and read the N pole card. Look at the graph under the stage: over what part of the coil is the field flat? Then choose Soft iron under Core and compare the two lines on the graph.
  5. 5Choose Electromagnet, pick Soft iron under Core and press Record. Change the current one step, record again, then try the turns. Finally choose Steel, set the current and the turns to their largest values, and press Switch to turn the current off. What does the steel keep hold of?

Four set-ups

Under Set-up you can switch between four views of the magnetic effect of a current. Straight wire puts you above a horizontal card with a vertical copper wire through its centre. Solenoid shows a coil from the side, sliced along its axis so the field inside is visible. Electromagnet stands the same coil on end over a dish of paperclips, and Relay uses an electromagnet to work a switch.

Looking down on a wire

Seen from above, the wire is a copper dot with a symbol on it. A small dot means the current is heading up towards you; a cross means it is heading down, away from you. The picture in the corner of the card shows the real arrangement, so you can link the flat view to the three-dimensional apparatus.

Round the wire, the field lines form rings with the wire at their middle. Their arrows follow the right-hand grip rule: with your thumb along the current, your curled fingers show the way the field goes round. Each gap between two neighbouring circles holds the same amount of field, so the circles spread out as the field fades away from the wire. More current packs in more circles. For a long wire the strength is

B=μ0I2πrB = \frac{\mu_0 I}{2 \pi r}

which goes beyond GCSE and IGCSE, and the graph under the stage plots it against the distance rr.

Eight plotting compasses start in a ring. Drag any of them, or choose one in the panel and use its distance and direction sliders. Their needles swing and settle along the field. Iron filings give the whole pattern in one go but cannot show which way it points. The Earth button adds a steady field of about 19 microtesla pointing up the card, a rough value for the horizontal part of the Earth's field in the UK, so distant compasses turn northwards and a neutral point appears where the two fields cancel.

Inside and around a solenoid

Every line in the solenoid view is a true field line, traced step by step. Inside the coil the lines are crowded and almost parallel, showing a strong, uniform field. They leave one end, sweep round the outside like the field of a bar magnet, and re-enter at the other end. The N label sits where they come out. Look straight at that end and the current would be going round anticlockwise. The graph of field strength along the axis is nearly flat in the middle, drops to about half at each end and fades outside. Its dashed line marks the value for a very long coil, μ0nI\mu_0 n I.

Electromagnets, soft iron and steel

An iron core turns the coil into an electromagnet. The coil magnetises the iron, which adds a far bigger field of its own. In the Electromagnet set-up the clips jump up to the tip of the core, and Record writes the turns, current, core and clip count into a results table, as you would in the practical. With only air inside, even the strongest setting holds no clips. Soft iron lets go of everything once the current stops. Steel keeps part of its magnetism and goes on holding some clips, because it has become a permanent magnet. Demagnetise passes an alternating current that dies away to nothing, flipping the steel back and forth more weakly each time until no magnetism is left.

How the model works

The winding is treated as a smooth sheet of current, and its field is calculated exactly with elliptic integrals. A core is modelled as evenly magnetised, with a strength that rises with the coil's field and levels off as the iron saturates. The number of clips held is a model linked to the field at the tip, not a measured value.

Check your understanding

7 questions

  1. 1.A wire carries current into the page (shown by a cross). Which way do its field lines go, as you look at the page?
  2. 2.How does the field of a long straight wire change as you move away from it?
  3. 3.What is the magnetic field like inside a long solenoid carrying a current?
  4. 4.Which change would make an electromagnet weaker?
  5. 5.Why is the core of an electromagnet made of soft iron rather than steel?
  6. 6.What job does a relay do?
  7. 7.Outside a solenoid, which way do the magnetic field lines point?

For teachers

Embed it in your site or open it full-screen for the projector.

Read more