A953 of 55
0 XP
  1. Hook
  2. Predict
  3. Name it
  4. Check
  5. Explain

A9 · Lesson 53 · Project

Compute a cable's capacitance from Laplace's equation

A coaxial cable's datasheet lists its capacitance per meter: about 100 pF/m for the common RG-58. For a round coax there's a formula, but for a square trace inside a shield, a pair of wires over a ground plane, or a connector, there isn't, and engineers use field solvers: programs that solve Laplace's equation on a grid and then read off the capacitance. In this project you'll write one, test it against the coax formula, and see how the grid's coarseness limits its accuracy.

Predict

A field solver approximates the round inner conductor by the grid squares inside it. Will it overestimate or underestimate the capacitance?

Name it

The plan

  1. Set up the geometry. On an N×N grid, mark the inner conductor (points with r≤a, held at 1 V) and the outer conductor (points with r≥b, held at 0 V). Everything in between is free.
  2. Relax. Repeatedly replace every free point with the average of its four neighbors until nothing changes (lesson 46).
  3. Measure the capacitance. The stored energy per unit length is W=ε02∬|∇V|2dA, and W=12C′V2. With V = 1 V,
C′=ε0∬|∇V|2dA≈ε0∑[(ΔxV)2+(ΔyV)2]

where the sum runs over all neighboring pairs of grid points. In two dimensions the grid spacing cancels: |∇V|2≈(ΔV/h)2 and each cell has area h2.

The exact answer for round coax

By Gauss's law, the field between the conductors is E=λ2πεr, which integrates to

V(r)=V0ln⁡(b/r)ln⁡(b/a)C′=2πε0εrln⁡(b/a)

Your solver should match the potential closely and the capacitance to within a few percent on a modest grid.

Worked example

Estimate RG-58's capacitance: a = 0.45 mm, b = 1.47 mm, polyethylene with εr = 2.25.

Show the solution
  1. Capacitance per meter. C′=2π×8.854×10−12×2.25ln⁡(1.47/0.45)=1.252×10−101.184=106pF/m
  2. Compare with datasheets. Datasheets give about 100 pF/m; the real dielectric and conductor dimensions differ slightly from these round numbers.

Answer about 106 pF/m.

Worked example

How do you know the relaxation has converged?

Show the solution
  1. Run it longer. See whether the answer changes.
  2. An example. On an 81 × 81 grid with a = 8 and b = 24 cells, 5000 sweeps and 10 000 sweeps give the same capacitance to six digits.
  3. What's left. What remains is discretization error from the staircase boundaries, which only a finer grid reduces.

Answer it has converged when running more sweeps no longer changes the answer; the error that remains comes from the grid and needs a finer one.

Check

Step 1. Write coax(N, a, b, iters): an N×N grid centered on the middle, 1 V where r≤a (in grid cells), 0 V where r≥b, relaxed iters times by four-neighbor averaging on the free points only. Return the grid.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 2. Write capacitance(V) returning the capacitance per meter, ε0∑[(ΔxV)2+(ΔyV)2] over all neighboring pairs, for a 1 V solution. coax is included.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 3. A coax cable has inner radius 0.45 mm, outer radius 1.47 mm and dielectric εr = 1.5. What is its capacitance per meter, from the exact formula?

Write units the way you normally would: 1.5 pF/m and 0.0015 nF/m are the same answer.

Explain why

Why does the energy method give capacitance from the potential alone?

Practice

Keep practicing

4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.