# Electrodynamics/Magnetic Fields/Solenoids

A solenoid is a coil of wire with a current flowing through it.

## Vertical Wire ArrayEdit

Let us first consider an array of infinite vertical wires passing through a plane. This can be viewed as a very tall, narrow solenoid where the passing of the wires over the top and bottom can be neglected due to the distance from the plane.

We will find the magnetic field in this plane. Now, recall that the magnetic field around a single infinite, straight, wire is circular and the magnetic field strength at a point is given by:

${\displaystyle B={\frac {\mu I}{2\pi r}}}$

where:

• B is the magnetic field strength, in Tesla
• μ is the permeability of the medium between the wires, in T m A-1
• I is the current flowing in the wire, in Ampères
• r is the perpendicular distance from the wire to the point, in metres

Also recall that the total magnetic field at a point can be found by summing individual magnetic fields from each wire. However, we cannot merely add the magnetic field strength from the wires, because the magnetic field has direction as well as strength, and therefore can reinforce or cancel out the field from another wire, depending on relative current directions. Due to this, we much first work out the vector contributions from each wire and sum these instead.

Now, we know that the magnetic field is circular. The vector field xi-yj is circular in the plane about (0,0), but it does not have constant magnitude. The magnitude of this vector field is given by:

${\displaystyle {\sqrt {x^{2}+y^{2}}}}$

Thus the vector field that is of unit magnitude everywhere and circular direction is:

${\displaystyle {\frac {x}{\sqrt {x^{2}+y^{2}}}}\mathbf {i} -{\frac {y}{\sqrt {x^{2}+y^{2}}}}\mathbf {j} }$

Now, we can displace this vector field from being centred on the origin to being centred on a point (xi,yi):

${\displaystyle {\frac {x-x_{i}}{\sqrt {(x-x_{i})^{2}+(y-y_{i})^{2}}}}\mathbf {i} -{\frac {y-y_{i}}{\sqrt {(x-x_{i})^{2}+(y-y_{i})^{2}}}}\mathbf {j} }$

In order to scale the field to match the magnetic field, we must divide again by the distance from the point to the wire (ignoring the factor of μ/2π). However, we do include a current term to allow for the direction of the current:

${\displaystyle {\frac {x-x_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}I\mathbf {i} -{\frac {y-y_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}I\mathbf {j} }$

Now the vector field from all n wires, each at a point (xi,yi), is, by superposition:

${\displaystyle I\sum _{i=1}^{n}{\frac {x-x_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}\mathbf {i} -I\sum _{i=1}^{n}{\frac {y-y_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}\mathbf {j} }$

Recall that the magnitude of a vector is given by:

${\displaystyle |a\mathbf {i} +b\mathbf {j} |={\sqrt {a^{2}+b^{2}}}}$

Therefore the magnitude of the result vector at a point is:

${\displaystyle {\sqrt {\left(I\sum _{i=1}^{n}{\frac {x-x_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}\right)^{2}-\left(I\sum _{i=1}^{n}{\frac {y-y_{i}}{(x-x_{i})^{2}+(y-y_{i})^{2}}}\right)^{2}}}}$

Below is a plot of 12 wires, carrying unit current, showing the magnitude of the magnetic field. Bear in mind each wire is modelled as infinitely thin: