Playground

Solenoid cross-section: adjust current and turn density to see uniform B-field inside vs zero outside.

Variables

SymbolNameSIDimensionRange
BBMagnetic fieldoutput
Magnetic field along the Amperian loop
TM·T⁻²·I⁻¹0 – 0.1
IencI_encEnclosed current
Total current threading the Amperian loop
AI0 – 100
nnTurns per unit length
Number of turns per meter (solenoid application)
1/mL⁻¹10 – 10000

Deep dive

Derivation
From the Biot–Savart law, integrate B·dl around a closed loop. For a long straight wire: B(2πr) = μ₀I, giving B = μ₀I/(2πr). Maxwell noticed ∇·(∇×B) must equal zero (identity), but μ₀∇·J ≠ 0 for time-varying charge distributions. Adding μ₀ε₀∂E/∂t (displacement current) fixes the continuity equation.
Experimental verification
Ampère's original experiments with parallel current-carrying wires. Solenoid field uniformity verified by Gauss probes. Maxwell's displacement current confirmed by Hertz's 1887 detection of electromagnetic waves.
Common misconceptions
  • Ampère's law is always true but only useful for calculating B when the current distribution has sufficient symmetry
  • The displacement current term is essential for capacitor charging — without it, the law gives contradictory results for different surfaces spanning the same loop
  • The enclosed current includes ALL currents passing through any surface bounded by the loop
Real-world applications
  • Solenoid and toroid magnetic field calculations for electromagnet design
  • Magnetic field inside coaxial cables for signal integrity analysis
  • MRI gradient coil design for medical imaging
  • Tokamak plasma confinement field calculations

Worked examples

Solenoid interior field

Given:
n:
500
I:
3
Find: B inside
Solution

B = μ₀nI = 1.257×10⁻⁶ × 500 × 3 = 1.885×10⁻³ T = 1.885 mT

Field inside a toroid

Given:
N:
200
I:
5
r:
0.1
Find: B at the center of the toroid cross-section
Solution

B = μ₀NI/(2πr) = 1.257×10⁻⁶ × 200 × 5 / (2π × 0.1) = 2.0×10⁻³ T = 2.0 mT

Scenarios

What if…
  • scenario:
    What if the solenoid current doubles?
    answer:
    Field doubles: B = 3.77 mT. Linear relationship — doubling current doubles enclosed current per loop.
  • scenario:
    What if you need B = 1 T inside the solenoid?
    answer:
    Need nI = B/μ₀ = 1/(1.257×10⁻⁶) = 795,775 A-turns/m. With 10 A current, that's ~80,000 turns/m — hence superconducting magnets for MRI.
  • scenario:
    What if the solenoid is finite (not ideal)?
    answer:
    Field near the ends drops to ~50% of the center value. Outside the solenoid, B is weak but nonzero — it resembles a bar magnet's dipole field.
Limiting cases
  • condition:
    I_enc = 0
    result:
    ∮B·dl = 0
    explanation:
    No enclosed current means zero circulation — the field may still exist but has no net curl through the loop.
  • condition:
    Infinite solenoid
    result:
    B = μ₀nI (uniform inside), B = 0 outside
    explanation:
    Symmetry and Ampère's law give a perfectly uniform interior field with no leakage.

Context

André-Marie Ampère / James Clerk Maxwell · 1826

Ampère discovered the circuital law for steady currents in 1826. Maxwell added the displacement current term in 1861, completing the equation and predicting electromagnetic waves.

Hook

Why does a long solenoid create a nearly uniform field inside but almost nothing outside?

A solenoid has 500 turns per meter and carries 3 A. Find the magnetic field inside.

Dimensions: [B]·[L] = [μ₀]·[I] → T·m = (T·m/A)·A ✓
Validity: Magnetostatic form valid for steady currents. The full Ampère–Maxwell form is universally valid and is one of Maxwell's four equations. Most useful when current distributions have cylindrical, planar, or toroidal symmetry.

Related formulas