If you are studying for an electromagnetism midterm or brushing up on your fundamentals for a power electronics role, you have likely encountered the classic thick-wire problem. While finding the field outside a long straight wire is trivial, calculating the internal field when the current density is non-uniform separates the memorizers from the engineers. In this magnetic field example, we will walk through a rigorous, step-by-step solution, expose the most common algebraic trap, and show you how to verify the theoretical math on your workbench using a linear Hall effect sensor.
The Problem Statement: A Classic Magnetic Field Example
Problem Statement:
A solid cylindrical copper wire of radius R = 5.0 mm carries a total steady current I = 10 A. Due to manufacturing anomalies or specific AC skin-effect conditions, the current density J is not uniform; it varies radially from the central axis according to the function J(r) = b · r, where b is a constant and r is the radial distance.
Tasks:
1. Determine the constant b in terms of I and R.
2. Derive the magnitude of the magnetic field B as a function of r for both the interior (r < R) and exterior (r > R) regions.
3. Calculate the exact magnetic field magnitude at r = 2.0 mm and r = 8.0 mm.
Step-by-Step Solution: Applying Ampere's Law
Which theorem applies and why? We use Ampere's Law (∮ B · dl = μ0 Ienc) because the system possesses perfect cylindrical symmetry. This symmetry guarantees that the magnetic field lines form concentric circles, making the line integral trivial to evaluate. Attempting this with the Biot-Savart Law would require a grueling 3D volume integral.
⚠ The Trap: The most common mistake in this magnetic field example is assuming the enclosed current is Ienc = I · (r2/R2). That formula is only valid for a uniform current density. Because J(r) increases linearly with r, more current flows near the outer edge of the wire. You must integrate to find Ienc.
Step 1: Find the Constant 'b'
The total current I is the integral of the current density over the entire cross-sectional area. The differential area element for a ring of radius r and thickness dr is dA = 2πr dr.
- I = ∫0R J(r) dA = ∫0R (b · r) (2πr dr)
- I = 2πb ∫0R r2 dr = 2πb [r3 / 3]0R
- I = (2πbR3) / 3
- Solving for b: b = 3I / (2πR3)
Step 2: Magnetic Field Inside the Wire (r < R)
We draw an Amperian loop of radius r (where r < R). The enclosed current is the integral from 0 to r.
- Ienc = ∫0r (b · r') (2πr' dr') = (2πbr3) / 3
- Substitute our expression for b: Ienc = (2πr3 / 3) · [3I / (2πR3)]
- Ienc = I (r3 / R3)
- Apply Ampere's Law: B(2πr) = μ0 Ienc
- B(2πr) = μ0 I (r3 / R3)
- B = (μ0 I r2) / (2πR3)
Step 3: Magnetic Field Outside the Wire (r > R)
For an Amperian loop outside the wire, the enclosed current is simply the total current I.
- B(2πr) = μ0 I
- B = (μ0 I) / (2πr)
Step 4: Numerical Calculation
We use the standard engineering approximation for the permeability of free space: μ0 = 4π × 10-7 T·m/A. (Note: Since the 2019 SI base unit redefinition, μ0 is technically an experimentally determined value, but 4π × 10-7 remains the accepted standard for all practical circuit and field calculations).
At r = 2.0 mm (0.002 m) [Inside]:
- B = [(4π × 10-7) · 10 · (0.002)2] / [2π · (0.005)3]
- B = [2 × 10-7 · 10 · 4 × 10-6] / [1.25 × 10-7]
- B = 6.4 × 10-5 Tesla = 64 μT
At r = 8.0 mm (0.008 m) [Outside]:
- B = [(4π × 10-7) · 10] / [2π · 0.008]
- B = [2 × 10-6] / 0.008
- B = 2.5 × 10-4 Tesla = 250 μT
Sanity Check and Independent Verification
Before moving on, an engineer must verify the result. We check three dimensions: units, order of magnitude, and boundary conditions.
| Check Type | Expected Result | Our Result |
|---|---|---|
| Units | Tesla (T) or microtesla (μT) | Pass (64 μT and 250 μT) |
| Order of Magnitude | Earth's field is ~50 μT. A 10A wire at mm distances should be in the same ballpark to slightly higher. | Pass (64 μT and 250 μT are physically reasonable) |
| Boundary Condition (r = R) | Inside and outside formulas must yield the exact same value at the surface boundary. | Pass (Both yield μ0I / 2πR at r=R) |
How to Verify the Answer Independently on the Bench
Theory is great, but physics lives on the workbench. You can independently verify this magnetic field example by building a simple linear Hall effect sensor rig. Wire an SS49E linear Hall sensor to an Arduino Uno (VCC to 5V, GND to GND, OUT to A0). The SS49E outputs a quiescent voltage of 2.5V at 0 Gauss, with a sensitivity of roughly 1.4 mV/Gauss (or 14 mV/mT).
By pushing 10A of DC current through a thick 10mm diameter copper rod (using a bench power supply or a 12V lead-acid battery with a power resistor to limit current), you can map the analog voltage readings from the sensor at 2mm and 8mm depths. Convert the ADC values back to microteslas in your Arduino sketch, and you will see the physical r2 vs 1/r dependence match our derived equations perfectly.
Frequently Asked Questions
What is a real-world magnetic field example of non-uniform current density?
The most common real-world scenario is the AC skin effect. While our problem used a linear DC profile (J ∝ r), alternating current forces charge carriers to the outer periphery of the conductor due to self-induced eddy currents. At 60 Hz mains frequency, the skin depth in copper is about 8.5 mm, meaning a standard 4 AWG wire carries current relatively uniformly. However, at high frequencies (like the 100 kHz switching frequency of a modern SiC MOSFET inverter), the current density becomes heavily concentrated at the surface, drastically altering the internal magnetic field profile and increasing effective AC resistance.
How does this magnetic field example change if the conductor is a hollow tube?
If the wire were a hollow cylindrical tube with an inner radius a and outer radius b, the problem splits into three regions. For the hollow void (r < a), the enclosed current is strictly zero, meaning the magnetic field inside the hollow core is exactly 0 T. For the material itself (a < r < b), your integration limits for Ienc change from [0, r] to [a, r]. Outside the tube (r > b), the field remains identical to our exterior equation: B = μ0I / 2πr. This principle is why coaxial cables and waveguides are designed with specific hollow geometries to contain or shape magnetic fields.
Why is Ampere's Law preferred over Biot-Savart in this magnetic field example?
The Biot-Savart Law calculates the magnetic field by integrating the contributions of every infinitesimal current element (dB = (μ0/4π) · (I dl × r̂) / r2). For a 3D volume with non-uniform current density, this requires a brutal triple integral in cylindrical coordinates. Ampere's Law leverages macroscopic symmetry. Because we know the field must be azimuthal and constant in magnitude along a circular path, the line integral collapses to simple multiplication (B · 2πr). Always look for cylindrical, planar, or solenoidal symmetry first; if it exists, Ampere's Law will save you hours of calculus.






