Next: Measuring the Electric Potential Up: ELECTRIC FIELDS Previous: Introduction

Solving Laplace's Equation on a Discrete Lattice

We can expand the potential function tex2html_wrap_inline184 in a Taylor series around some point in space tex2html_wrap_inline186 to give the potential at the six points tex2html_wrap_inline188 , tex2html_wrap_inline190 and tex2html_wrap_inline192 which symmetrically surround tex2html_wrap_inline186 .

To third order in tex2html_wrap_inline196 (i.e. tex2html_wrap_inline198 ):

eqnarray41

The average of those six values of the potential at points surrounding tex2html_wrap_inline186 is then, to third order in tex2html_wrap_inline196 :

equation73

If the potential satisfies Laplace's equation tex2html_wrap_inline204 , then the average of the six neighbouring values of the potential is just the potential at the point in question (where we have neglected terms in tex2html_wrap_inline206 and higher).

We can now use this result to calculate the potential tex2html_wrap_inline184 numerically for a given set of boundary conditions. We rely on the fact (demonstrated above) that the value of a harmonic function at some point in space is equal to its average over the neighbourhood of the point. We represent the potential function tex2html_wrap_inline180 by values at an array of discrete points, including discrete points at the boundaries. We then adjust the values at non-boundary points until each value is equal to the average of its neighbouring values. To do this, we employ an approximate technique: the relaxation method.

We start with the boundary values fixed at their given values and assign arbitrary values to the interior points. Next, we cycle through each of the interior points and assign its value to the average of its neighbouring 4 (in two dimensions) adjacent grid points. We repeat this over and over again until the changes in the values become acceptably small. We could do this calculation by hand, though we would quickly find the iterations quite tiresome. Fortunately, we can use a spreadsheet program to quickly do these calculations for us.