Skip to main content
Physics LibreTexts

7.6: Magnetic Field Inside a Straight Coil

  • Page ID
    24286
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    In this section, we use the magnetostatic integral form of Ampere’s Circuital Law (ACL) to determine the magnetic field inside a straight coil of the type shown in Figure \(\PageIndex{1}\) in response to a steady (i.e., DC) current. The result has a number of applications, including the analysis and design of inductors, solenoids (coils that are used as magnets, typically as part of an actuator), and as a building block and source of insight for more complex problems.

    m0120_fStraightCoil.png Figure \(\PageIndex{1}\): A straight coil. (public domain; Zureks).

    The present problem is illustrated in Figure \(\PageIndex{2}\). The coil is circular with radius \(a\) and length \(l\), and consists of \(N\) turns (“windings”) of wire wound with uniform winding density. Since the coil forms a cylinder, the problem is easiest to work in cylindrical coordinates with the axis of the coil aligned along the \(z\) axis.

    m0120_fCoil.png Figure \(\PageIndex{2}\): Determination of the magnetic field due to DC current in a coil.

    To begin, let’s take stock of what we already know about the answer, which is actually quite a bit. The magnetic field deep inside the coil is generally aligned with axis of the coil as shown in Figure \(\PageIndex{3}\). This can be explained using the result for the magnetic field due to a straight line current (Section 7.5), in which we found that the magnetic field follows a “right-hand rule.” The magnetic field points in the direction of the fingers of the right hand when the thumb of the right hand is aligned in the direction of current flow. The wire comprising the coil is obviously not straight, but we can consider just one short segment of one turn and then sum the results for all such segments. When we consider this for a single turn of the coil, the situation is as shown in Figure \(\PageIndex{4}\). Summing the results for many loops, we see that the direction of the magnetic field inside the coil must be generally in the \(+\hat{\bf z}\) direction when the current \(I\) is applied as shown in Figures \(\PageIndex{2}\) and \(\PageIndex{3}\). However, there is one caveat. The windings must be sufficiently closely-spaced that the magnetic field lines can only pass through the openings at the end of the coil and do not take any “shortcuts” between individual windings.

    m0120_fStraightCoilFieldLines_1.png Figure \(\PageIndex{3}\): Magnetic field lines inside a straight coil with closely-spaced windings. (Dotted circles represent current flowing up/out from the page; crossed circles represent current flowing down/into the page.) (© CC BY SA 3.0; Geek3) m0120_fOneTurn.png Figure \(\PageIndex{4}\): Magnetic field due to a single loop (© CC0 1.0 (modified); Chetvorno)

    Figure \(\PageIndex{3}\) also indicates that the magnetic field lines near the ends of the coil diverge from the axis of the coil. This is understandable since magnetic field lines form closed loops. The relatively complex structure of the magnetic fields near the ends of the coil (the “fringing field”) and outside of the coil make them relatively difficult to analyze. Therefore, here we shall restrict our attention to the magnetic field deep inside the coil. This restriction turns out to be of little consequence as long as \(l\gg a\).

    Also, it is apparent from the radial symmetry of the coil that the magnitude of the magnetic field cannot depend on \(\phi\). Putting these findings together, we find that the most general form for the magnetic field intensity deep inside the coil is \({\bf H}\approx\hat{\bf z}H(\rho)\). That is, the direction of \({\bf H}\) is \(\pm\hat{\bf z}\) and the magnitude of \({\bf H}\) depends, at most, on \(\rho\). In fact, we will soon find with the assistance of ACL that the magnitude of \({\bf H}\) doesn’t depend on \(\rho\) either.

    Here’s the relevant form of ACL: \[\oint_{\mathcal C}{ {\bf H} \cdot d{\bf l} } = I_{encl} \label{m0120_eACL} \] where \(I_{encl}\) is the current enclosed by the closed path \({\mathcal C}\). ACL works for any closed path that encloses the current of interest. Also, for simplicity, we prefer a path that lies on a constant-coordinate surface. The selected path is shown in Figure \(\PageIndex{5}\). The benefits of this particular path will soon become apparent. However, note for now that this particular choice is consistent with the right-hand rule relating the direction of \({\mathcal C}\) to the direction of positive \(I\). That is, when \(I\) is positive, the current in the turns of the coil pass through the surface bounded by \({\mathcal C}\) in the same direction as the fingers of the right hand when the thumb is aligned in the indicated direction of \({\mathcal C}\).

    m0120_fPath.png Figure \(\PageIndex{5}\): Selected path of integration. (© CC BY SA 4.0: K. Kikkeri)

    Let’s define \(N\) to be the number of windings in the coil. Then, the winding density of the coil is \(N/l\) (turns/m). Let the path length in the \(z\) direction be \(l'\), as indicated in Figure \(\PageIndex{5}\). Then the enclosed current is

    \[I_{encl}=\frac{N}{l}l'I \nonumber \]

    That is, the number of turns per unit length times length gives number of turns, and this quantity times the current through the wire is the total amount of current crossing the surface bounded by \({\mathcal C}\).

    For the choice of \({\mathcal C}\) made above, and taking our approximation for the form of \({\bf H}\) as exact, Equation \ref{m0120_eACL} becomes \[\oint_{\mathcal C}{ \left[\hat{\bf z}H(\rho)\right] \cdot d{\bf l} } = \frac{N}{l}l'I \label{m0120_eACL1} \] The integral consists of segments \(A\), \(B\), \(C\), and \(D\), as shown in Figure \(\PageIndex{5}\). Let us consider the result for each of these segments individually:

    • The integral over segments \(B\) and \(D\) is zero because \(d{\bf l}=\hat{\rho}d\rho\) for these segments, and so \({\bf H}\cdot d{\bf l}=0\) for these segments.
    • It is also possible to make the contribution from Segment \(C\) go to zero simply by letting \(\rho_2\to\infty\). The argument is as follows. The magnitude of \({\bf H}\) outside the coil must decrease with distance from the coil, so for \(\rho\) sufficiently large, \({\bf H}(\rho)\) becomes negligible. If that’s the case, then the integral over Segment \(C\) also becomes negligible.

    With \(\rho_2\to\infty\), only Segment \(A\) contributes significantly to the integral over \({\mathcal C}\) and Equation \ref{m0120_eACL1} becomes:

    \begin{aligned}
    \frac{N}{l} l^{\prime} I &=\int_{z_{1}}^{z_{2}}\left[\hat{\mathbf{z}} H\left(\rho_{1}\right)\right] \cdot(\hat{\mathbf{z}} d z) \\
    &=H\left(\rho_{1}\right) \int_{z_{1}}^{z_{2}} d z \\
    &=H\left(\rho_{1}\right)\left[z_{2}-z_{1}\right]
    \end{aligned}

    Note \(z_2-z_1\) is simply \(l'\). Also, we have found that the result is independent of \(\rho_1\), as anticipated earlier. Summarizing: \[\boxed{ {\bf H} \approx \hat{\bf z}\frac{NI}{l} ~~ \mbox{inside coil} } \label{m0120_eResult} \]

    Let’s take a moment to consider the implications of this remarkably simple result.

    • Note that it is dimensionally correct; that is, current divided by length gives units of A/m, which are the units of \({\bf H}\).
    • We have found that the magnetic field is simply winding density (\(N/l\)) times current. To increase the magnetic field, you can either use more turns per unit length or increase the current.
    • We have found that the magnetic field is uniform inside the coil; that is, the magnetic field along the axis is equal to the magnetic field close to the cylinder wall formed by the coil. However, this does not apply close to ends of the coil, since we have neglected the fringing field.

    These findings have useful applications in more complicated and practical problems, so it is worthwhile taking note of these now. Summarizing:

    The magnetic field deep inside an ideal straight coil (Equation \ref{m0120_eResult}) is uniform and proportional to winding density and current.


    This page titled 7.6: Magnetic Field Inside a Straight Coil is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Steven W. Ellingson (Virginia Tech Libraries' Open Education Initiative) .