Sub topic 11
Using Ampere's law: long wire, solenoid and toroid
This chapter assumes you know Ampere's circuital law, ∮ B·dl = μ₀ I_enclosed. It also assumes you are comfortable with the right-hand rules, with basic integration, and with the field of a straight wire from the Biot-Savart law. Here we apply the law to three standard shapes. NEET asks for the resulting formulas and for their directions and limits.
When Ampere's law is useful
Ampere's law is always true, but it only gives B easily when symmetry lets you pull B out of the integral. You need a path (an Amperian loop) where one of two things holds on each piece of the path:
- B is parallel to dl and has constant magnitude, so B·dl = B dl.
- B is perpendicular to dl, or B is zero, so the piece contributes nothing.
The steps are the same every time:
- Use the symmetry to decide the direction of B.
- Choose an Amperian loop that follows B where B is nonzero.
- Evaluate ∮ B·dl.
- Count the current that passes through the surface bounded by the loop. Use the right-hand rule for the sign.
- Solve for B.
Long straight wire
A long straight wire carries current I. By symmetry, the field lines are circles centred on the wire, and B has the same magnitude at every point on a circle of radius r.
Take the Amperian loop as a circle of radius r around the wire. B is tangent to the loop everywhere, so
∮ B·dl = B (2πr) = μ₀ I
which gives
B = μ₀ I / (2π r)
This matches the Biot-Savart result for an infinite wire. The direction follows the right-hand grip rule: point the thumb along the current, and the fingers curl in the direction of B.
Inside a thick wire
For a solid cylindrical wire of radius a carrying a uniform current I, the answer depends on where you are.
- Outside (r ≥ a): the loop encloses all of I, so B = μ₀ I / (2π r).
- Inside (r < a): the current density is uniform, so the loop encloses only the fraction πr²/πa² of the current. Then I_enclosed = I r²/a², and
B (2πr) = μ₀ I r²/a²
B = μ₀ I r / (2π a²)
So B grows linearly from zero at the axis to a maximum μ₀ I / (2π a) at the surface, then falls as 1/r outside.
import math
mu0 = 4 * math.pi * 1e-7 # T m / A
def b_thick_wire(current, radius, r):
if r < radius:
return mu0 * current * r / (2 * math.pi * radius ** 2)
return mu0 * current / (2 * math.pi * r)
a = 0.01 # wire radius, m
for r in (0.0, 0.005, 0.01, 0.02, 0.04):
print(r, b_thick_wire(10, a, r))At r = a the two expressions give the same value, which is a quick check on your algebra.
Solenoid
A solenoid is a long helical coil. Let it have n turns per unit length and carry current I.
What the field looks like
For a long, tightly wound solenoid, the field inside is nearly uniform and parallel to the axis. The field outside is very small and is taken as zero in the ideal case. The direction inside is given by a second right-hand rule: curl the fingers along the current in the turns, and the thumb points along B.
Applying the law
Take a rectangular Amperian loop abcd with side ab of length L inside the solenoid, parallel to the axis. Side cd lies outside, where B ≈ 0. Sides bc and da are perpendicular to the axis.
- Along ab: B·dl = B L.
- Along bc and da: B is perpendicular to dl inside, and B is zero outside, so these give nothing.
- Along cd: B ≈ 0.
So ∮ B·dl = B L. The loop encloses nL turns, each carrying I, so I_enclosed = n L I. Therefore
B = μ₀ n I
This does not depend on the position inside or on the solenoid's radius. If the solenoid has N turns over length l, then n = N/l.
At the ends
At the centre of one end of a long solenoid, the field is about half the value in the middle:
B_end = μ₀ n I / 2
If a solenoid is filled with a material of relative permeability μᵣ, the field becomes B = μ₀ μᵣ n I. A soft iron core raises B by a large factor, which is why electromagnets use one.
import math
mu0 = 4 * math.pi * 1e-7
def b_solenoid(turns, length, current):
n = turns / length
return mu0 * n * current
# 500 turns on a 25 cm long solenoid, 2 A
print(b_solenoid(500, 0.25, 2.0)) # centre: about 5.03e-3 T
print(b_solenoid(500, 0.25, 2.0) / 2) # end: about 2.5e-3 TToroid
A toroid is a solenoid bent into a ring, like a doughnut. Let it have N turns in total, current I, and a mean radius r (the radius of the circle through the middle of the winding).
By symmetry, B lines inside the winding are circles centred on the toroid's axis. Take the Amperian loop as a circle of radius r inside the winding.
- B is tangent to the loop, so ∮ B·dl = B (2πr).
- The loop passes through N turns, each carrying I in the same sense, so I_enclosed = N I.
B (2πr) = μ₀ N I
B = μ₀ N I / (2π r)
If n = N/(2πr) is the turns per unit length along the mean circle, this becomes B = μ₀ n I, the same form as the solenoid.
Outside and in the hollow
Now choose two other loops.
- A circle in the hollow centre of the ring (smaller than the winding) encloses no current, so B = 0.
- A circle outside the whole toroid encloses N turns going one way and N turns coming back the other way. Each turn passes through the loop's surface twice in opposite directions, so the net current is zero and B = 0.
So the field of an ideal toroid is confined entirely to the space inside the winding. Unlike a straight solenoid, it has no end effects.
import math
mu0 = 4 * math.pi * 1e-7
def b_toroid(turns, current, r):
return mu0 * turns * current / (2 * math.pi * r)
# 1000 turns, 1.5 A, mean radius 10 cm
print(b_toroid(1000, 1.5, 0.10)) # about 3e-3 TComparing the three results
| System | Loop used | B | Where B is zero |
|---|---|---|---|
| Long straight wire | Circle of radius r | μ₀ I / (2π r) | Never (falls off, but not to zero) |
| Thick wire, inside | Circle of radius r < a | μ₀ I r / (2π a²) | On the axis |
| Ideal solenoid | Rectangle along the axis | μ₀ n I inside | Outside |
| Toroid | Circle of mean radius r | μ₀ N I / (2π r) inside the winding | Hollow centre and outside |
Common errors
- Using the wrong enclosed current. For a thick wire, a loop inside the wire encloses only part of I. For a toroid, count N, not 1, for loops inside the winding.
- Forgetting that the solenoid result is an ideal limit. It needs length much greater than radius. Near the ends the field drops to about half.
- Mixing n and N. In B = μ₀ n I, n is turns per metre. If the question gives total turns and length, divide first.
- Applying the toroid formula outside the winding. The field there is zero, not μ₀ N I / (2π r).
- Getting the direction wrong. Use the grip rule for straight wires. Use the curled-fingers rule for coils.
- Using the law where symmetry is missing. For a finite wire or a single loop, the integral can't be simplified, so use Biot-Savart.
Worked NEET-style problem
A toroid has 2000 turns and a mean radius of 20 cm. It carries 0.5 A. Find B inside the winding, and compare it with the field at the centre of a solenoid of the same current whose turns per unit length equal the toroid's.
Turns per unit length along the mean circle:
n = N / (2πr) = 2000 / (2π × 0.20) ≈ 1592 turns/m
B = μ₀ n I = 4π × 10⁻⁷ × 1592 × 0.5 ≈ 1.0 × 10⁻³ T
The solenoid with the same n and I has the same B, about 1.0 × 10⁻³ T. This is the reason the toroid and solenoid formulas look alike.
Exercise
A long solenoid has 800 turns on a length of 40 cm and carries 3 A. (a) Find B at the centre. (b) Find B at the centre of one end. (c) A long straight wire carries the same current, 3 A. At what distance from the wire is B equal to the answer in (a)?
Show answer
(a) n = 800 / 0.40 = 2000 turns/m. B = μ₀ n I = 4π × 10⁻⁷ × 2000 × 3 ≈ 7.5 × 10⁻³ T. (b) At the end, B is half of this, about 3.8 × 10⁻³ T. (c) Set μ₀ I / (2π r) = 7.5 × 10⁻³ T. Then r = μ₀ I / (2π B) = (2 × 10⁻⁷ × 3) / (7.5 × 10⁻³) = 8 × 10⁻⁵ m, which is 0.08 mm.
Exercise
A solid cylindrical wire of radius 2 mm carries a uniform current of 6 A. Find B at r = 1 mm and at r = 4 mm from the axis.
Show answer
At r = 1 mm (inside): B = μ₀ I r / (2π a²) = (2 × 10⁻⁷ × 6 × 1 × 10⁻³) / (4 × 10⁻⁶) = 3 × 10⁻⁴ T. At r = 4 mm (outside): B = μ₀ I / (2π r) = (2 × 10⁻⁷ × 6) / (4 × 10⁻³) = 3 × 10⁻⁴ T. Both are 3 × 10⁻⁴ T, by coincidence of these values: the inside point is at half the radius, where the field is half its surface value, and the outside point is at twice the radius, where it is also half.
Exercise
Why is the magnetic field outside an ideal toroid zero, even though current flows in the winding?
Show answer
A circular Amperian loop outside the toroid is crossed by each turn twice, once going in each direction. The net enclosed current is zero, so ∮ B·dl = 0. By symmetry B is tangential and constant on the loop, so B = 0 there. The same argument applies to a loop in the hollow centre, which encloses no current at all.