A solenoid is a useful device that generates a nearly uniform magnetic field, similar to that of a bar magnet, from an electrical current. It consists of a tightly-wound coil of wire to generate a magnetic field along the axis of the coil. Their length tends to be much greater than their diameter. The word solenoid can also refer to a specific electromagnetic device that creates motion when an electrical current is applied. Often this motion is in the form of an iron plunger that moves in and out.
Solenoids have many uses. They are often used in relays to open or close low current circuits or as circuit breakers/contactors in high current circuits. Cars have solenoids (known as starter solenoids or starter relays), which are used to switch on a large current to the starter motor, allowing the engine to start.
A solenoid can be very useful as the magnetic field it produces along its axis is uniform. Its overall magnetic if is very similar to that of a bar magnet. Its field can be strengthened by placing a ferromagnetic core composed of iron or steel. These contain magnetic domains, which act like tiny magnets and all align when put in an external magnetic field, increasing the overall field.
The field within the solenoid tends to be very uniform (field lines are uniformly spread), while the surrounding field is normally extremely weak. The field, B, at the center of a solenoid is given by:
where I is the current flowing through the solenoid and μ is the permeability of the core. n is the number of coils per unit length of the solenoid which is the number of coils divided by the length of the solenoid. Strictly speaking, this is the field for an idealized, infinity long coil. In practice however, it is a good application so long as the solenoid is much longer than its width and the relative permeability of its core is not much larger than that of the surrounding medium.