# Coil

In electrical engineering, a coil or solenoid refers to a current-carrying wire loop that is wound in a tight spiral (sometimes around a ferromagnetic core).

## Magnetic Field of a Coil

Consider a long coil such that its length is very large compared to its cross-sectional diameter. Experiments show that the magnetic field outside the coil is negligible compared with the field inside the coil.

The field lines inside the coil always run perpendicular to the cross-section of the coil (since from Gauss' law, magnetic fields have zero divergence):

Using Ampere's law, we can calculate the the magnetic field inside the coil. Suppose there is a closed rectangular loop (C) that goes parallel to the field inside the coil for length L, comes out at right angles and returns outside the coil:

Ampere's law states that any closed line integral of the magnetic field is equal to the total current that the line's path encloses, i.e.

$\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = \mu_0I_\mathrm{enc}$

In the case of the coil, it is assumed that there is no magnetic field outside the coil, so the line integral can be evaluated simply as the magnitude of the B field times the length of the line inside the coil (note that inside the coil, the magnitude of the magnetic field is constant along any path parallel to the axis):

$\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = B l$

The total current enclosed by the path is equal to the current I flowing through the wire multiplied by the number of turns N that the path encloses:

$I_\mathrm{enc} = NI \,$

Therefore:

$\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = B l = \mu_0 NI$

The magnetic field inside the coil is thus:

$B = \frac{\mu_0 NI}{l}$

## Magnetic Flux Figure 3. Magnetic flux lines through the cross-sectional surface of the coil

Since we assumed that the magnetic field is negligible outside the coil, the magnetic flux is completely due to the field inside the coil passing through the cross-sectional surface of the coil.

Given that the field inside the coil is always perpendicular to the cross-section of the coil, the surface integration is simply the magnitude of the field multiplied by the cross-sectional area A:

$\Phi=\int_S \mathbf{B} \cdot dS = B A = \frac{\mu_0 NIA}{l}$

$\lambda = \Phi = \frac{\mu_0 NIA}{l}$
$L = \frac{N \Phi}{I} = \frac{\mu_0 N^{2} A}{l}$