Lenz's law: induced emf and current direction in JavaScript
Lenz's law says an induced current flows in the direction that opposes the change in flux that causes it. The minus sign in Faraday's law is exactly that. Here is the calculation in code. (I build PractiSci, where Lenz's law is a free virtual lab.)
Induced emf
For N turns, e = −N dΦ/dt. For a uniform change, the magnitude is N × ΔΦ / Δt.
const emf = (N, dPhi, dt) => -N * dPhi / dt;
console.log(emf(200, 0.01 - 0.05, 0.2)); // 40 V (positive: flux is falling)
Current and heat
With coil resistance 20 Ω:
const I = 40 / 20, P = I * I * 20;
console.log(I, P); // 2 A, 80 W
That 80 W comes from the work done moving the magnet against the opposing force, which is conservation of energy.
Which way does the current flow?
const direction = (fluxChange) =>
fluxChange > 0 ? "induced field opposes the original" : "induced field supports the original";
console.log(direction(+1)); // pushing a magnet in
Push a north pole towards a coil: flux increases, so the near face becomes a north pole and the current is anticlockwise seen from that side.
FAQ
Why the negative sign?
It encodes energy conservation. Without it, induced currents would reinforce the change and create energy from nothing.
Does Lenz's law need a closed loop?
The current needs one; the induced emf exists either way.
Where can I try it?
The free Lenz's law lab lets you move the magnet. The electromagnetic induction guide has the theory.
Comments
Join the discussionNo comments yet. Be the first to comment.