Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Physics LibreTexts

22.7: Sample problems and solutions

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

Exercise 22.7.1

A square loop of wire with side length, L, carries current, I, as shown in Figure 22.7.1. What is the magnetic field at the center of the loop?

clipboard_e8f776fa33575ebc769db9e432018642d.png
Figure 22.7.1: A square loop of current.
Answer

The square loop is simply made of four straight sections of wire of length, L. The magnetic field from each section of wire is into the page, which you can easily verify with your right-hand (with your thumb in the direction of current, your fingers curl in the direction of the resulting magnetic field).

The magnetic field at the center is just four times the magnetic field produced by a single segment, which we determined in this chapter. The magnetic field at the center of the loop is thus four times the magnetic field at a distance, h=L2, from a wire of length, L:

B=4×μ0I2πL2L/2L24+L24=22μ0IπL

Exercise 22.7.2

Helmholtz coils are an arrangement of two parallel loops of current which produce a nearly uniform magnetic field. Helmholtz coils are formed by two identical circular loops of radius, R, carrying the same current, I, where the centers of the coils are separated by the distance, R, as illustrated in Figure 22.7.2. Determine the magnetic field as a function of z, along the axis of symmetry of the coils, where the origin is located half way between the two coils. Make a plot of the magnetic field as a function of z from each coil, as well as the total electric field to show that it is close to uniform between the coils.

clipboard_e016622387fc9e33ea1d41d3dc8a95475.png
Figure 22.7.2: A Helmholtz coil arrangement.
Answer

We know that the magnetic field at a distance, h, from the center of a loop of current, along its axis of symmetry is given by:

B(h)=μ0I2R2(R2+h2)32

For the two coils in the Helmholtz configuration, the magnetic field from each coil will be in the same direction. The center of the two coils are located at z=±R2. Thus, if we are located at position, z, along the z axis, one coil will be at a distance of z+R2, and the other at a distance zR2. The total magnetic field as a function of z is then given by:

Btot(z)=B(z+R2)+B(z+R2)=μ0I2R2(R2+(z+R2)2)32+μ0I2R2(R2+(zR2)2)32

We can plot this function, as well as the two individual terms using python. For information, we show the code below. In order to make the plot, we need to choose some reasonable values for the radius of the coils and the current through the coils, for example:

  • R=0.3m
  • I=0.1A

Python Code 22.7.1: Numerical integration of a function

01#Import the modules that we need:
02import numpy as np
03import pylab as pl
04 
05#Define some constants:
06mu0 = 4*np.pi*1e-7 #4 pi
07I = 0.5
08R = 0.3
09 
10#Define the values on the z axis, from -2R to +2r, in 100 increments
11z = np.linspace(-2*R,2*R,100)
12 
13#Determine the magnetic field from the coils at those values of z
14#The coil at z=-R/2:
15B1 = (mu0*I)/2 * R**2/((R**2+(z+R/2)**2)**(3/2))
16#The coil at z=+R/2:
17B2 = (mu0*I)/2 * R**2/((R**2+(z-R/2)**2)**(3/2))
18#The sum:
19B = B1 + B2
20 
21#Make the plot
22p1.figure(figsize=(10,6))
23p1.plot(z,B1,label='Coil at z=-R/2')
24p1.plot(z,B2,label='Coil at z=+R/2')
25p1.plot(z,B,label='Total')
26p1.legend()
27p1.xlabel('z position [m]')
28p1.ylabel('Magnetic field [T]')
29p1.show()

Output 22.7.1:

clipboard_e332af73a0ccefee8b3879860f7142137.png

Figure 22.7.3: Magnetic field from each coil, as well as their sum, for two coils in the Helmholtz configuration.

As advertised, we see a region between the Helmholtz coils where the magnetic field is nearly uniform.


This page titled 22.7: Sample problems and solutions is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Ryan D. Martin, Emma Neary, Joshua Rinaldo, and Olivia Woodman via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?