The Field of a Solenoid

A solenoid is simply a coil of wire with a current going through it. It's basically a bunch of loops stacked up. Inside the coil the field is very uniform, and the field from a solenoid is essentially identical to the field from a bar magnet.

If we have a long solenoid of length L, current I, and total number of turns N, the magnetic field inside the solenoid is given by:

B = mo NI/L

We can make this simpler by using n = N/L as the number of turns per unit length, to get:

B = mo nI

This is an almost uniform magnetic field running parallel to the axis of the solenoid.

The solenoid is basically the magnetic field equivalent of the parallel-plate capacitor, which we used to create a uniform electric field. If we put a piece of ferromagnetic material (like iron or steel) inside the solenoid we can magnify the magnetic field by a large factor (like 1000 or so).