# Magnetic Field in a Solenoid Formula

## Introduction to Solenoid

The term solenoid in Greek means "pipe-shaped". It is a type of electromagnet, its purpose is to generate a controlled magnetic field through a coil that is wound into a tightly packed helix. The coil can be arranged to produce a uniform magnetic field in a volume of space when an electric current is passed through it. According to the study of electromagnetism, a solenoid is a coil whose length is greater than its diameter; this means that it is rod-shaped. The helical coil of a solenoid does not necessarily need to revolve around a straight-line axis, for example, William Sturgeon's electromagnet of 1824 consisted of a solenoid bent in the form of horseshoe shape. Hence magnetic field formula of solenoid equation is given as follows:

B = $\mu_{0}$ $\frac{NI}{l}$

Here B represents the magnetic flux density, $\mu_{0}$ is the magnetic constant whose value is 4π x 10$^{-7}$ Hm$^{-1}$ or 12.57 x 10$^{-7}$Hm$^{-1}$, N is a number of turns, I is the current flowing through the solenoid, and l is the length of the solenoid.

### Magnetic Field Inside a Solenoid Formula

The magnetic field inside an infinitely long solenoid is homogeneous and its strength neither depends on the distance from the axis nor on the solenoid's cross-sectional area.

The derivation of the magnetic flux density surrounding a solenoid is long enough so that fringe effects can be ignored. We immediately know that from the figure, the flux density of the vector points is in the positive z-direction inside the solenoid, and outside the solenoid, it is in the negative z-direction. We can confirm this by applying the right-hand grip rule or right-hand thumb rule for the field that is present around a wire. If we wrap our right hand around a wire by pointing the thumb in the direction of the current, the curl of the fingers represents how the field behaves. Since we are dealing with a long solenoid, due to symmetry all of the components of the magnetic field that are not pointing upwards may cancel out.

Now consider the imaginary loop ‘c’ from the figure, it is located inside the solenoid. By Ampère's law, we can say that the line integral of B that is the magnetic flux density vector around this loop is zero. It happens since it encloses no electrical currents. We have shown above that the field is pointing upwards inside the solenoid, hence the horizontal portions of loop c do not contribute anything to the integral. Thus the integral of the upper side of the figure that represents one is equal to an integral part of side two that is moving downwards. Since the change in the dimensions of the loop can be done arbitrarily in order to get the same result, the integrands are actually equal. This means that the magnetic field inside the solenoid is radially uniform.

A solenoid is a coil of wire through which current flows and the magnetic field inside it is determined with the help of the contribution of each loop in the solenoid. Hence the total magnetic field depends on the number of turns of the coil and the length of the solenoid.

The magnetic field inside the solenoid is maximum, and the magnetic field inside the solenoid formula is,

B = $\mu_{0}$nI, Here ‘n’ represents the number of turns and ‘I’ the current flowing through the solenoid.

### Magnetic Field Outside a Solenoid Formula

A similar argument can be applied to the loop to conclude that the field outside the solenoid is radially uniform or constant. An intuitive argument can also be used to show that the flux density outside the solenoid is actually zero. Magnetic field lines only exist in the form of loops, they cannot diverge or converge to a point as that of the electric field lines. The magnetic field lines in the solenoid follow the longitudinal path, so outside the solenoid, these magnetic field lines must move in the opposite direction. This happens due to the lines forming a loop. However, the volume that is present outside the solenoid is much greater than that of the volume present inside. Thus the density of magnetic field lines outside the solenoid is reduced greatly. Thus we can say that the field outside the solenoid 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.

Solenoid magnetic field equation outside it is

B = $\mu_{0}$nI, since the field outside the solenoid is comparatively less as that it is present inside we can consider it as zero as the length of the solenoid increases, and thus B = 0.