Skip to content

Magnetism and electromagnetism simulation

Bar Magnet Field Simulation

Glossy bar magnets on a sheet of graph paper, with field lines traced from N to S, a plotting compass that swings to follow the field, iron filings and a strength map. Add a second magnet to explore attraction, repulsion and neutral points, or switch on the Earth's field.

Loading simulation…
Show symbols for

Predict first

Question 1 of 4

A small plotting compass sits on the paper 2 cm beyond the S end of a bar magnet, in line with it. Which way does the N end of the compass needle point?

Try this

  1. 1With the One magnet set-up, drag the compass slowly all the way round the magnet and watch the needle. Where is the compass when its red end points straight back at the magnet?
  2. 2Choose Plotting with a compass from the Set-up menu and switch Field lines off. Press Plot again and again: each press marks where the needle points, then moves the compass on to that mark. Where does your trail of arrows end?
  3. 3Choose Like poles facing (N to N). Under Position, choose Compass and set both sliders to 0 cm to put it on the neutral point, then read the Compass needle and Field strength cards. Then tap magnet 2 and press Flip: what happens to the force arrows and to the neutral point?
  4. 4Choose With the Earth's field. The two neutral points sit either side of the magnet. Tap the magnet and press Turn, and watch where they move as the N pole swings round. When the N pole points south, they lie on the magnet's axis, just beyond the edge of the paper.
  5. 5Press Filings, then drag a magnet to a new spot and let go. Compare the pattern of the filings with the field lines. What can the filings not tell you that the arrows can?

Magnets on a sheet of graph paper

The simulation lays one or two bar magnets on squared paper, with a small plotting compass beside them. Each magnet is painted red at its N pole and blue at its S pole. You can drag anything on the paper with a finger or a mouse, or choose an item under Position and use its sliders. Flip swaps a magnet's two ends, Turn rotates it a quarter of a circle, and Add puts a second magnet on the paper.

What the field lines mean

The lines with arrows are magnetic field lines. Each arrow shows the way a free north pole would be pushed if it were placed there, so outside the magnet every line runs from the N pole round to the S pole. Look at how the lines are spaced. They pack tightly around each pole, where the field is strongest, and fan out as they travel away. Two lines never meet or cross, because at any single point the field can only have one direction.

Turn on Strength colours for a second view of the same idea. The warm colours glow brightest at the poles and fade into cool purple a few centimetres away.

Plotting a field line the lab way

In a school lab you map a field by moving a compass in small steps, marking where the needle points each time. The Plot button copies this method. It marks a small arrow where the N end of the needle reaches, then slides the compass forward so that the other end of the needle sits on that mark. Press it repeatedly and a trail of arrows grows across the paper. Switch the field lines off first and your trail becomes the only record of the field. Iron filings, which you can sprinkle with the Filings button, reveal the whole shape at once but give no direction.

Two magnets together

When two magnets share the paper, their fields add together at every point. Put two N poles face to face and the magnets push apart: the arrows on the stage say repel. Between them is a neutral point, marked with a pulsing cross, where the two fields are equal and opposite. Flip one magnet so that an N pole faces an S pole and the lines stretch across the gap, joining the magnets, while the arrows now say attract. Neutral points can still appear further out, where the far ends of the magnets cancel the near ones.

The Earth's field

The Earth acts like a giant, weak magnet, which is why a lone compass points north. Switching on the Earth's field adds a uniform field of about 19 microtesla pointing up the page, a rough value for the horizontal part of the field in the UK. Close to the magnet its own field wins. Further away the Earth takes over, and neutral points appear where the two fields cancel exactly.

Inside the model

Each magnet is treated as two small opposite poles, set in from its ends by one twelfth of its length. The field is calculated in the flat plane of the paper, and the lines are drawn only outside the magnets, as course diagrams show them. Real field lines carry on through the magnet from S back to N, forming closed loops. The force arrows come from the same pole model. They show which way each magnet is pushed or pulled, but their length is not a measure of the force.

Check your understanding

8 questions

  1. 1.Which way do magnetic field lines point outside a bar magnet?
  2. 2.Where is the magnetic field of a bar magnet strongest?
  3. 3.A plotting compass is placed on the paper near a bar magnet. What does its needle show?
  4. 4.Two bar magnets lie end to end with their N poles facing. What is found at the place between them where their fields cancel?
  5. 5.Why can two magnetic field lines never cross?
  6. 6.What do iron filings sprinkled round a magnet show that a single compass reading does not?
  7. 7.Far from any magnet, a compass needle points north. Why?
  8. 8.A compass on the paper is moved further away from a bar magnet. What happens to the magnet's field at the compass?

For teachers

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

Read more