You are on page 1of 3

 

Rotationally-Invariant Version
I created another very-similar spreadsheet that solves Laplace’s equation in D=3 for
objects with rotational symmetry about the Z axis. It can be found in reference 4.

Unlike the previous versions, it does not assume translational invariance along


the Z axis, so you can calculate the behavior of objects shaped like pears, or bowls, et
cetera. Each cell represents an area dr∧dz in polar coordinates. Note that I am
avoiding the word “cylindrical” because mathematicians use the word to describe
anything with translational invariance, while physicists use the same word to describe
anything with rotational invariance. Sigh.

This is the same as the previous spreadsheet, but it uses the formula for the Laplacian
in polar coordinates as discussed at e.g. reference 5.

The potential grid represents a slice through the axis of symmetry. Rotational
symmetry implies that any such slice has reflection symmetry. If you fill in the left
half-plane of the potential grid (with your chosen objects and other boundary
conditions), the spreadsheet formulas will mirror it in the right half-plane. It
is not necessary or desirable for you to manually change anything in the right half-
plane.

Similar remarks apply to the symmetry of the charge-density grid; it represents a slice
through the axis of symmetry.

In D=3 with rotational symmetry about the Z axis, the Laplacian is (d/dr)2 + (1/r)
(d/dr) + (d/dz)2; we know the phi-derivative is zero.

(You can contrast this with the previous cases, namely D=3 with translational
symmetry in the Z direction, where the Laplacian was (d/dx)2 + (d/dyf)2; we knew
the Z-derivative was zero.)

In the cells of the spreadsheet, I have simplified the formula by observing that (1/r)
(d/dr) is equal to (1/x)(d/dx) on the slice of interest, by cancellation of a factor
of sign(x).

In this spreadsheet there is a fourth grid, just to the right of the grid that shows the
charge per unit volume. It shows the charge per unit area (dr∧dz) in a ring. You can
find the total charge on an object by summing the numbers in this grid. There is no
point in summing the numbers in the charge-per-unit-volume grid; that doesn’t make
sense for several reasons, including dimensional analysis.
To improve the accuracy, I use a smart estimate of the quantity (1/r)(d/dr). In
particular, I take the arithmetic mean of the left-hand difference (w−b)/x1 and the
right-hand difference (c−w)/x2; this accounts for an important nonlinearity because the
radius is different in the two denominators.

Validity checks: I verified that a region with a log(r) potential produces zero charge
density, with high accuracy. I also checked that the field calculation and charge
calculation are automatically gauge invariant, because of the structure of the Lapacian
operator.

I implemented periodic boundary conditions in the Z direction, and this is the default


behavior. I also implemented hall-of-mirrors boundary conditions, which you can
optionally use instead.

In the R direction, there is only one choice: the perpendicular component of the


electric field vanishes on this boundary. This is reminiscent of the hall-of-mirrors
boundary condition, but there is no physical interpretation in terms of tiling the
universe. Instead, this can be viewed as surrounding the region of interest, at
each Z level, with an annulus extending to infinity. The potential on this annulus
depends on Z but is independent of R. This means that outside the region of interest,
there will be zero charge, although there will be nonzero fields. These fields seem a
bit unphysical. To make these fields go away, you can arrange that the potential at the
large-R boundary is independent of Z. To achieve this, it suffices to arrange that one
of your electrodes fully encloses all the other electrodes.

4  Calculating the Capacitance


You can use these spreadsheets to calculate capacitance.

We start by assigning suitable voltages to objects on the potential-grid and observing


the amount of induced charge. We find the total charge on each object by summing
the cells of the charge-grid occupied by each object.

Then we hold N−1 of the objects at constant potential and wiggle the voltage on the
remaining one. We observe what happens to the charge on each and every object by
turning the crank on Laplace’s equation. This gives us numerical values for the matrix
elements Cij.

For details on what a capacitance matrix is, and how to calculate its matrix elements,
see reference 6.
5  Additional Details
The following remarks apply to all three versions of the spreadsheet.

I’ve got “iteration-mode” turned on.

 Excel: Presumably you want to leave it on; otherwise it’s illegal to have self-
references or circular references. Menu → Tools → Options → Calculation →
Iteration.
 Gnumeric: This doesn’t seem to matter much. I’m not sure what’s going on.
File → Document Properties → Calculation → Iteration.

Suggestion: If you are going to seriously play with this, you will want to make use of
the spreadsheet’s recalculation controls. You might want to delay recalculation if you
are making numerous changes to the grid, but thereafter you will want automatic
recalculation:

 Excel: Tools → Options → Calculation → Manual/Automatic


 Gnumeric: File → Document Properties → Calculation → Automatic/Manual.

At any time you can invoke the manual "recalculate now" function with the F9 key.

The following small features probably require having the “1997” (or later) version of
excel. They are known to work with version 9 (the one that comes with office 2000):

 I use "Conditional Formatting" to highlight the contours of potential and field-


strength. The contour interval is controlled by a cell near the lower-right corner of the
potential grid. A value about one sixth of the maximum potential-difference seems to
look good.
 You can double-click on a cell, and it will highlight which cells contribute to
the value of that cell. This works fine for the |field| grid; on the potential grid it is
somewhat confusing because some of the contributor-cells are hidden under the
displayed formula. Clicking puts you into "edit mode" for editing that cell, which is
probably not what you want. Hit "escape" to get out of this mode. It is less confusing
if you format the potential grid as flush-left or flush-right (not centered) but if you’re
not using this clicking feature then centering looks better.

You might also like