Solenoid

A solenoid[nb 1] is a coil wound into a tightly packed helix. In physics, the term solenoid refers to a long, thin loop of wire, often wrapped around a metallic core, which produces a magnetic field when an electric current is passed through it. Solenoids are important because they can create controlled magnetic fields and can be used as electromagnets. The term solenoid refers specifically to a magnet designed to produce a uniform magnetic field in a volume of space (where some experiment might be carried out).

In engineering, the term solenoid may also refer to a variety of transducer devices that convert energy into linear motion. The term is also often used to refer to a solenoid valve, which is an integrated device containing an electromechanical solenoid which actuates either a pneumatic or hydraulic valve, or a solenoid switch, which is a specific type of relay that internally uses an electromechanical solenoid to operate an electrical switch; for example, an automobile starter solenoid, or a linear solenoid, which is an electromechanical solenoid.

## Magnetic field of a solenoid

### Inside

This is a derivation of the magnetic field around a solenoid that is long enough so that fringe effects can be ignored. In the diagram to the right, we immediately know that the field points in the positive z direction inside the solenoid, and in the negative z direction outside the solenoid.

We see this by applying the right hand grip rule for the field around a wire. If we wrap our right hand around a wire with the thumb pointing in the direction of the current, the curl of the fingers shows how the field behaves. Since we are dealing with a long solenoid, all of the components of the magnetic field not pointing upwards cancel out by symmetry. Outside, a similar cancellation occurs, and the field is only pointing downwards.

Now consider imaginary the loop c that is located inside the solenoid. By Ampère's law, we know that the line integral of B (the magnetic field vector) around this loop is zero, since it encloses no electrical currents (it can be also assumed that the circuital electric field passing through the loop is constant under such conditions: a constant or constantly changing current through the solenoid). We have shown above that the field is pointing upwards inside the solenoid, so the horizontal portions of loop c doesn't contribute anything to the integral. Thus the integral of the up side 1 is equal to the integral of the down side 2. Since we can arbitrarily change the dimensions of the loop and get the same result, the only physical explanation is that the integrands are actually equal, that is, the magnetic field inside the solenoid is radially uniform. Note, though, that nothing prohibits it from varying longitudinally which in fact it does.

### Outside

A similar argument can be applied to the loop a to conclude that the field outside the solenoid is radially uniform or constant. This last result, which holds strictly true only near the centre of the solenoid where the field lines are parallel to its length, is important inasmuch as it shows that the field outside is practically zero since the radii of the field outside the solenoid will tend to infinity.

An intuitive argument can also be used to show that the field outside the solenoid is actually zero. Magnetic field lines only exist as loops, they cannot diverge from or converge to a point like electric field lines can (see Gauss's law for magnetism). The magnetic field lines follow the longitudinal path of the solenoid inside, so they must go in the opposite direction outside of the solenoid so that the lines can form a loop. However, the volume outside the solenoid is much greater than the volume inside, so the density of magnetic field lines outside is greatly reduced. Now recall that the field outside is constant. In order for the total number of field lines to be conserved, the field outside must go to zero as the solenoid gets longer.

### Quantitative description

Now we can consider the imaginary loop b. Take the line integral of B around the loop, with the length of the loop l. The horizontal components vanish, and the field outside is practically zero, so Ampère's Law gives us: $B l = \mu_0 N i\$

where μ0 is the magnetic constant, N the number of turns, i the current.This equation is for a solenoid with no core. The inclusion of a ferromagnetic core, such as iron, increases the magnitude of the magnetic field in the solenoid. This is expressed by the formula $B = \mu_0 \mu_r \frac{N i}{l}$

where μr is the relative permeability of the material that the core is made of. μ0μr is the permeability (μ) of the core material such that: $B = \mu \frac{N i}{l}.$