### Magnetostatic energy

#### Problem:

A permanent magnet has circular pole pieces of radius a separated by an arbitrary distance.  The magnetic field B is uniform between the pole pieces.  Calculate the force between the pole pieces in terms of B and a.

Solution:

• Concepts:
Energy stored in the magnetic field
• Reasoning:
F = -dU/dx.
• Details of the calculation:
The magnetic field is confined to the region between the pole pieces.  The energy stored in the field is U = (2μ0)all spaceB2dV in SI units.  Here U = (2μ0)-½B2πa2x, where x denotes the distance between the pole pieces.  F = -dU/dx = -(2μ0)B2πa2.  The minus sign indicates that the force is attractive.

#### Problem:

A solenoid is designed to store UL = 0.10 J of energy when it carries a current of I = 450 mA.
The solenoid has a cross-sectional area of A = 5.0 cm2 and a length l = 0.20m.
How many turns of wire must the solenoid have?

Solution:

• Concepts:
The magnetic field inside a solenoid, magnetostatic energy
• Reasoning
Approximation:  B = μ0nI inside the solenoid,  B = 0 outside.
U = (2μ0)all spaceB2dV.
The integral over all space reduces to an integral over the volume of the solenoid.
• Details of the calculation:
UL = (1/(2μ0))B2V = μ0n2I2lA/2.
2UL/( μ0I2lA) = n2,  n = 88654.  N = nl = 17731.
or
UL = ½LI2,  L = nlBA/I = μ0n2lA,  n2 = 2UL/( μ0I2lA).

#### Problem:

A spiral spring has N turns and initial length x0.  How does its length changes if a small current I is made to flow through it?  Assume that the spring has a spring constant k for longitudinal deformations, that it can be treated as a perfect ("infinitely long") solenoid, and that its radius R remains fixed.

Solution:

• Concepts:
In equilibrium Fnet = 0.
• Reasoning:
Adjacent coils of the spring attract each other.  The spring gets shorter.  As the spring contracts, the energy stored in the magnetic field changes and the battery maintaining the current I does work.
The mechanical work done by the system is  ΔWmech = ΔWbatt - ΔUmag.  In equilibrium we need Fnet = 0, or dWmech/dx  = Fext = kΔx.
• Details of the calculation:
Given:  I is small, Δx is small, the length of the spring changes little from x0.
Let the x-axis point upward.
Assume the current I is established in a spring of length x0.
The magnetic field inside the spring is uniform and has magnitude B = μ0IN/x0.
The energy stored in the field is Umag = B2V/(2μ0) = B2πR2x0/(2μ0) = μ0I2N2πR2/(2x0).
Assume the length of the spring changes by a small amount Δx.
For a small displacement the energy stored in the field changes by
ΔU = dU/dx|x0Δx = -[μ0I2N2πR2/(2x02)]Δx.
The energy stored in the field increases when x decreases.
[We know the coil will contract, but the stored field energy increases when the coil contracts.  How can this be?]
The flux through the coils is NBπR2.  When x changes, B changes, and therefore the flux changes and an emf is induced.
In the small time interval Δt we have emf = -NπR2ΔB/Δt.
The extra work done by the battery to keep the current I flowing is emf*I*Δt = I*NπR2ΔB.
For  a small displacement ΔB = dB/dx|x0Δx, so ΔWbatt = -[μ0I2N2πR2/x02]Δx = 2ΔU.
When x decreases the battery has to do extra work against the induced emf to keep the current constant at I.  (Lenz's rule)
But when x decreases, only ½ of the work the battery does ends up being stored as field energy.  The other half goes into mechanical work done on the system, which can be stored as elastic potential energy or converted to kinetic energy, or dissipated through friction or radiation.
The mechanical work done by the system is ΔWmech = ΔWbatt - ΔUmag  = -[μ0I2N2πR2/(2x02)]Δx.
When x decreases, ΔWmech is positive.
When the system is in equilibrium if the net force is zero.
In equilibrium dWmech/dx = -μ0I2N2πR2/(2x02) = kΔx.
Δx = -μ0I2N2πR2/(2kx02).

Why do we look at the force, and not just the energy?
ΔWmech  = -[μ0I2N2πR2/(2x02)]Δx.
When the coil has contracted by Δx and is in equilibrium after any oscillation have damped out, not all the mechanical work done is stored as elastic potential energy.
In this example Fext = dWmech/dx is constant.
The work done on the system by the external force to is Wmech = ∫0Δx Fextdx = FextΔx.
(With our orientation of the x-axis, both Fext and Δx are negative, Wmech is positive.)
But Fext = kΔx, so Wmech =  kΔx2.  The elastic potential energy stored in the spring is ½kΔx2 = ½Wmech.