# Magnetic Field due to Solenoid ## Magnetic Field due to Solenoid This lecture is based on HRW.
A solenoid is a long coil of wire wrapped in many turns. When a current passes through it, it creates a nearly uniform magnetic field inside.
Solenoids can convert electric current to mechanical action, and so are very commonly used as switches. The magnetic field within a solenoid depends upon the current and density of turns. In order to estimate roughly the force with which a solenoid pulls on ferromagnetic rods placed near it, one can use the change in magnetic field energy as the rod is inserted into the solenoid. The force is roughly

change in magnetic field energy
force on rod = — — — — — — — — —
distance rod moves into the solenoid

The energy density of the magnetic field depends on the strength of the field, squared, and also upon the magnetic permeability of the material it fills. Iron has a much, much larger permeability than a vacuum.
Even small solenoids can exert forces of a few newtons.

Consider a long solenoid having n number of turns per unit length and carrying current I am as shown in the figure. The magnetic field outside the solenoid is almost zero but the magnetic field inside the solenoid is uniform which is directed along the axis of the solenoid. Consider a closed-loop PQRSP having length PQ= RS = x. If dl be the small line element the direction of B is along with dl. So the angle between solenoid and PQ is 0°. If N be the no. of turns in the closed-loop PQRSP the magnetic-field-due-to-solenoid1

Let I’ be the current enclosed by closed-loop then
Let I’ be the current enclosed by closed-loop then

Now from Ampere’s Law  