Solenoid & Electromagnet Simulation

Solenoid & Electromagnet Simulation

What the simulation shows

A full 3D electromagnet built from first principles: a copper-wound solenoid on a cardboard former, connected to a battery by green wire leads, with a cylindrical iron rod sitting to the right waiting to be inserted. Everything in the scene is physically motivated — nothing is decorative.

The solenoid body is 16 copper TorusGeometry turns wound around a dark cylindrical former. The number of visible turns changes live as the N slider moves (4–14). Turn spacing compresses as more turns are added to the same-length coil, so students can directly see what “greater turn density” means. The copper wire glows orange-amber when current flows, with intensity proportional to I.

The magnetic field lines are the teaching centrepiece, built from two distinct families:

External arcs — up to 120 three-dimensional arc arrows arranged on 8–16 planes at 4 radii. Each arrow sits exactly on the parametric tangent to a dipole field line, so they genuinely show the closed-loop path field lines take from N pole to S pole outside the coil. Arrow density scales with N (more turns → more planes shown), making B ∝ N directly visible.

Internal lines — up to 13 straight arrows inside the bore, arranged radially across the cross-section, all pointing uniformly along the solenoid axis. This is the single most important GCSE teaching point about solenoids: the field inside is uniform — same strength and direction everywhere inside the bore.

All arrows flow in the direction of B using animated cone arrowheads that travel along the paths. Reversing the current via “⇄ Reverse Current” flips every arrow simultaneously (both internal and external) because the entire field-line wrapper group is mirrored with scale.z = fieldDir — a single operation that correctly inverts both positions and orientations.

The iron core is a grey metallic cylindrical rod parked to the right with a “Fe” label on the handle end. The student physically drags it leftward into the solenoid. As it enters, three things happen in real time: the field lines shift from cyan to bright green, the B readout chip climbs from the air-core value toward ×200, and the flow speed increases. The teaching panel changes state mid-insertion to show the partial magnetisation, then snaps to the full amplification message. The iron core smoothly ejects if toggled off.

N and S pole end-caps swap colour (red/blue) and swap ends when the current is reversed, demonstrating that the pole identity is set by current direction, not by which end of the coil you look at.

The teaching panel (visible when Labels are on) is a live state machine with four states:

  1. No current → “B = 0. Current is required.”
  2. Core partially inserted → “Field rising to ~X mT as core slides in.”
  3. Core fully inserted → “B ≈ X mT (≈×200 stronger)”
  4. Current flowing, no core → “B ≈ X mT. n = N/L. B ∝ I and B ∝ N.”

The B-I graph (header button) shows air and iron core lines simultaneously with a live dot tracking current state, making the ×200 gradient difference immediately legible.


Suggested Class Activity

“What makes an electromagnet stronger?”

This maps directly to AQA GCSE Physics topic 7.3 (Magnetism and electromagnetism) and is framed as a fair-test investigation — students change one variable at a time and observe the result.

Duration: 30–35 minutes
Level: GCSE Physics / Combined Science Y10–11
Prior knowledge: What a magnetic field is; N and S poles; current as flow of charge


Sequence

1. Hook — observation before explanation (4 min)

Without turning on labels, ask students to look at the simulation at default settings (I = 5A, N = 8, no iron core) and answer:

“Where is the field strongest — inside the coil, or outside near the ends?”

Most will guess near the ends because that is where the N and S poles are. Let them discuss. Then zoom into the bore and note that the internal arrows are equally spaced and parallel — the field inside is uniform. This is counterintuitive and worth dwelling on.

“The field outside gets weaker as you move away. Inside, it stays the same all the way across. Why might that be useful for a real electromagnet?”

2. Predict → test → explain (18 min)

Students work through three fair tests using the simulation. For each, they predict first, then test, then write a GCSE-style conclusion.

Fair Test A — Effect of current

“Predict: if I double the current from 5A to 10A, what happens to B?”

Students slide the current slider and read the B chip (Labels on). Expected result: B doubles. Conclusion prompt:

“The magnetic field strength is _______ proportional to the current. Doubling I from 5A to 10A _______ B from __ to __ mT.”

Fair Test B — Effect of number of turns

“Keep current at 5A. Change N from 4 to 8 to 14. Record B each time.”

N (turns)B (mT)Ratio to N=4
41.0×
8
14

Students should notice B doubles when N doubles — confirming B ∝ N. Explanation prompt:

“More turns packed into the same coil means higher turn density n = N/L. B = μ₀ × n × I, so B ∝ N.”

Fair Test C — Effect of iron core

“With I = 5A and N = 8, drag the iron core into the solenoid. What happens to the field lines and the B value?”

Students observe: field lines turn green, B jumps approximately ×200. The key questions:

a) “What colour were the field lines before the core? What colour are they after? Why do you think the colour changed?” (Visual signal of a different physics regime)

b) “The core is described as ‘soft iron’. What happens when you remove it — does the field stay strong?” (Test by toggling the pill. Answer: no, B drops back immediately. Soft iron demagnetises when removed — distinguishing it from permanent magnets.)

c) “Why does soft iron amplify the field rather than create its own?”

3. Right-hand rule (5 min)

Reverse the current. Ask:

“Which end was N before? Which end is N now?”

Then walk through the right-hand grip rule: wrap the right hand around the coil so the fingers point in the direction of conventional current flow — the thumb points toward the N pole. Students verify this matches the pole cap labels on screen for both directions.

4. Exam question (6 min)

“A student winds 8 turns of wire onto a tube and connects it to a 2A supply. She then increases the current to 6A and also winds 16 turns instead of 8. State what happens to B and explain in terms of n = N/L.” (4 marks)

Model answer: B increases with current — B ∝ I, so tripling I to 6A triples B (1). Increasing turns from 8 to 16 in the same-length coil doubles the turns density n = N/L (1), which doubles B because B = μ₀nI (1). Overall B is increased by a factor of 3 × 2 = 6 (1).


Adaptation notes for ClassAdapt

  • Reduce Motion in the accessibility panel stops the animated field-line flow — useful for students who find the moving arrows distracting while writing
  • The Labels button acts as a scaffold toggle: lower-attaining students can turn it on from the start to see the live B value and teaching panel; others work without it during prediction then check
  • The B-I Graph tab is a strong visual summary for students who need to see both B ∝ I and B ∝ N relationships simultaneously as straight lines through the origin
  • The draggable iron core is a concrete, hands-on interaction for students who struggle with abstract “inserting a core” — the physical drag gesture and live colour change give immediate cause-and-effect feedback
  • For students with motor difficulties, the iron core pill toggle in the controls bar replicates the insertion interaction without requiring a precise drag