Magnetic field due to solenoid
A solenoid is a thin wire coiled around a cylindrical tube of radius $R$. An ideal solenoid is infinitely long and tightly wound, having cylindrical symmetry and purely azimuthal current.
It produces a magnetic field of $$ \begin{align*} \v B ={}& \begin{cases} \v 0, &r>R, \\ μ_0 IN, &r<R \end{cases} \end{align*} $$ where $N$ is the number of turns per unit length and $I$ is the current.
At the end of a long solenoid, field is halved: consider joining two ends together.