Magnetic Field of a Curved Wire
Creating Magnetic Field of a Curved Wire
Jeet Bhatkar – Fall 2025
Big Idea
An electric current in a wire creates a magnetic field that curls around the wire.
For a curved wire, each tiny piece of the wire contributes a small magnetic field. The total field is found by adding (integrating) all these contributions. For arcs of a circle, this leads to simple and very useful formulas.
Key Equations
Biot–Savart Law (for a small piece of wire)
- [math]\displaystyle{ d\vec{B} = \frac{\mu_0}{4\pi}\,\frac{I\, d\vec{\ell} \times \hat{r}}{r^2} }[/math]
- [math]\displaystyle{ \mu_0 }[/math] = permeability of free space
- [math]\displaystyle{ I }[/math] = current (A)
- [math]\displaystyle{ d\vec{\ell} }[/math] = tiny vector along the wire (direction of current)
- [math]\displaystyle{ \hat{r} }[/math] = unit vector from the wire element to the field point
- [math]\displaystyle{ r }[/math] = distance from the wire element to the field point
Magnetic field at the center of a circular arc
For a wire shaped as a circular arc of radius [math]\displaystyle{ R }[/math] and angle [math]\displaystyle{ \theta }[/math] (in radians), carrying current [math]\displaystyle{ I }[/math]:
- [math]\displaystyle{ B = \frac{\mu_0 I}{4\pi R}\,\theta }[/math]
Direction: given by the right–hand rule (thumb along current, fingers curl in direction of [math]\displaystyle{ \vec{B} }[/math] through the center).
Special cases:
- Full circle: [math]\displaystyle{ \theta = 2\pi }[/math], field at the center is
[math]\displaystyle{ B = \dfrac{\mu_0 I}{2R} }[/math]
- Semicircle: [math]\displaystyle{ \theta = \pi }[/math], field at the center is
[math]\displaystyle{ B = \dfrac{\mu_0 I}{4R} }[/math]
Conceptual Picture
- Magnetic field lines form closed loops around the current.
- For a circular arc, field lines near the center look like circles centered on the arc’s center.
- The more wire around the center (larger [math]\displaystyle{ \theta }[/math]) or the larger the current [math]\displaystyle{ I }[/math], the stronger the field there.
- Increasing the radius [math]\displaystyle{ R }[/math] spreads the current farther away, so the field at the center gets weaker: [math]\displaystyle{ B \propto 1/R }[/math].
Use the right–hand rule: point your thumb along the current; your fingers curl in the direction of the magnetic field.
Worked Example: Field at the Center of a Semicircular Wire
Problem. A thin wire is bent into a semicircle of radius [math]\displaystyle{ R = 5.0\,\text{cm} }[/math]. A current of [math]\displaystyle{ I = 3.0\,\text{A} }[/math] flows through the wire. Find the magnitude and direction of the magnetic field at the center of the semicircle.
Solution.
The semicircle is a circular arc with [math]\displaystyle{ \theta = \pi }[/math]. Use the arc formula:
- [math]\displaystyle{ B = \frac{\mu_0 I}{4\pi R}\,\theta = \frac{\mu_0 I}{4\pi R}\,\pi = \frac{\mu_0 I}{4R} }[/math]
Convert [math]\displaystyle{ R }[/math] to meters:
- [math]\displaystyle{ R = 5.0\,\text{cm} = 0.050\,\text{m} }[/math]
Then:
- [math]\displaystyle{ B = \frac{(4\pi \times 10^{-7}\,\text{T·m/A})(3.0\,\text{A})}{4(0.050\,\text{m})} \approx 1.9 \times 10^{-5}\,\text{T} }[/math]
Direction: use the right–hand rule for the current around the semicircle.
- If current flows counterclockwise as seen from above, [math]\displaystyle{ \vec{B} }[/math] at the center points out of the page.
- If current flows clockwise, [math]\displaystyle{ \vec{B} }[/math] points into the page.
Computational Model (GlowScript)
This GlowScript model approximates a circular arc by many small straight segments and uses the Biot–Savart law to compute the magnetic field at the center.
<syntaxhighlight lang="python"> from vpython import * import numpy as np
- constants
mu0 = 4*pi*1e-7 # T·m/A I = 3.0 # current (A) R = 0.1 # radius of arc (m) theta_total = pi # total angle of arc (radians), e.g. pi for semicircle
N = 200 # number of segments
scene.caption = "Magnetic field at the center of a curved wire (arc)\n" scene.width = 700 scene.height = 400
- center where we calculate B
r_center = vector(0, 0, 0)
- draw the wire as small cylinders along an arc in the x–y plane
wire_segments = [] angles = np.linspace(-theta_total/2, theta_total/2, N)
for i in range(N - 1):
a1 = angles[i] a2 = angles[i + 1] p1 = vector(R*cos(a1), R*sin(a1), 0) p2 = vector(R*cos(a2), R*sin(a2), 0) seg = cylinder(pos=p1, axis=(p2 - p1), radius=0.003, color=color.orange) wire_segments.append(seg)
- arrow to show magnetic field at the center
B_arrow = arrow(pos=r_center, axis=vector(0, 0, 0), color=color.cyan)
def compute_B_center():
B = vector(0, 0, 0)
for seg in wire_segments:
dl = seg.axis # direction of current element
r_mid = seg.pos + 0.5*seg.axis # midpoint of the segment
r_vec = r_center - r_mid
r = mag(r_vec)
if r == 0:
continue
dB = (mu0*I/(4*pi)) * cross(dl, r_vec) / r**3
B += dB
return B
B = compute_B_center() B_arrow.axis = B * 5e5 # scale so we can see the arrow
scene.append_to_caption(f"Approximate |B| at center = {mag(B):.3e} T\n") </syntaxhighlight>
You can experiment by changing [math]\displaystyle{ I }[/math] (current), [math]\displaystyle{ R }[/math] (radius), and [math]\displaystyle{ \theta_\text{total} }[/math] (total angle in radians).
Common Mistakes
- Using degrees instead of radians in the arc formula.
The formula [math]\displaystyle{ B = \dfrac{\mu_0 I}{4\pi R}\,\theta }[/math] assumes [math]\displaystyle{ \theta }[/math] is in radians.
- Forgetting that the arc formula is for the field at the center of the circle only.
- Getting the right–hand rule backwards.
Thumb along current; curled fingers show the direction of [math]\displaystyle{ \vec{B} }[/math].
- Ignoring contributions from straight segments in mixed “straight + curved” wire problems.
Practice Problems
- A wire is bent into a quarter–circle of radius [math]\displaystyle{ R }[/math] carrying current [math]\displaystyle{ I }[/math].
* (a) Find the magnitude of the magnetic field at the center of the circle.
* (b) If the quarter–circle is completed to a full circle with the same current, by what factor does [math]\displaystyle{ B }[/math] change?
- A wire consists of a semicircle of radius [math]\displaystyle{ R }[/math] connected to two long straight segments that extend radially outward from the ends of the semicircle.
* Find the direction of the net magnetic field at the center. * Which part (arc or straight segments) contributes most to the magnitude? Explain qualitatively.
- A circular loop of radius [math]\displaystyle{ R }[/math] carries current [math]\displaystyle{ I }[/math].
* (a) Find [math]\displaystyle{ B }[/math] at the center. * (b) If only half of the loop remained (a semicircle), what would [math]\displaystyle{ B }[/math] be at the center?
- You are given a choice of two wires to create a magnetic field at a point:
(1) a small circular loop of radius [math]\displaystyle{ R }[/math] with current [math]\displaystyle{ I }[/math], or (2) a larger circular loop of radius [math]\displaystyle{ 2R }[/math] with the same current. * Which produces the larger [math]\displaystyle{ B }[/math] at its center? Show your reasoning.
Copyright and Image Ideas
- Draw your own diagram of a curved wire (arc) with the current direction and the magnetic field at the center indicated by an arrow into or out of the page.
- Draw a full circular loop with field lines near the center.
After you create the images, upload them and insert them with: