# 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.

- [math]\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = \mu_0I_\mathrm{enc}[/math]

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):

- [math]\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = B l [/math]

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:

- [math]I_\mathrm{enc} = NI \,[/math]

Therefore:

- [math]\oint_C \mathbf{B} \cdot \mathrm{d}\boldsymbol{\ell} = B l = \mu_0 NI [/math]

The magnetic field inside the coil is thus:

- [math] B = \frac{\mu_0 NI}{l} [/math]

## Magnetic Flux

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:

- [math]\Phi=\int_S \mathbf{B} \cdot dS = B A = \frac{\mu_0 NIA}{l} [/math]

## Flux Linkage

Due to the additive effects of Ampere's law, the total flux through the coil can be increased by adding more turns. The **flux linkage** is the total amount of flux that links all the current (and by extension, turns of the coil) that generate it.

Since magnetic flux density is uniform inside a simple coil, the flux linkage is equivalent to the magnetic flux derived above:

- [math]\lambda = \Phi = \frac{\mu_0 NIA}{l} [/math]

## Inductance

The inductance of the coil is:

- [math]L = \frac{N \Phi}{I} = \frac{\mu_0 N^{2} A}{l} [/math]