A (parasitic) plane capacitor is formed by two cocentric squares, fig.11:
A working condition of Vxx+Vyy=0
is assumed, approximated by 4Vi,j = Vi+1,j + Vi-1,j + Vi,j+1 + Vi,j-1
It is quite straightforward (five lines of code for a uniform grid!) to form a set of simultaneous equations (in the nodes' voltages), in order to impose the working hypothesis throughout the gap between the squares, remembering that the potential on the squares is known. By exploiting symmetry, only 1/8th of the structure needs to be modelled.
Error discussion is an important part of any numerical method: Several assumptions have already been made:
- Boundary quantization is a good approximation to the original model: This really is not an issue for the squares examined, but it would have been a different matter, had part of the boundary been curved. Adapting a fine grid to a complicated model is error- prone and time- consuming. Adapting a fine grid to a complicated model also incurs serious overheads in formulating the corresponding equations.
- As the actual potential distribution has not been calculated (there is no need to use finite elements if it has), it is assumed to vary linearly between adjacent nodes, in the hope that the discrepancy will be acceptable: It will be (usually), if the number of elements is large enough. As convergence is not guaranteed by any means under all circumstances, it is a very good idea to repeat the computation using a finer grid and make certain that the corresponding figures are in reasonable agreement: If they are not, the simulation must be repeated using more elements still, until they are. A more dense mesh will only help in critical parts of the model. It is unfair to expect very good accuracy wherever there is a discontinuity in the field vector (near the corners of the inner square.) Lastly, an excessive number of elements will make no worthwhile contribution to the accuracy of the results; The accuracy could even worsen, because of round- off errors associated with the processing of large matrices unless an adequate number of decimal places is used.
For simple models, the solution of the equations can be obtained by the procedure at the end of the 'Simplified Simulation' section (ignoring all references to imaginary parts), but for large matrices, several improvements are possible: If the coefficient to be eliminated already has a value of zero, there is no need for the computer dutifully to multiply and subtract the zeros. Further sparse matrix techniques can efficiently store the matrix. Lastly, matrices are usually stored on a row- by- row basis, and if they are too large to be wholly contained in fast memory at the same time, reduction (triangularization) row- by- row (rather than column- by- column) will minimise the transactions between the cache and the file.
All sides of the inner square are one unit long, those of the outter square two units long; the outter square is grounded. The following table shows the percentage (%) of the inner square potential at various points on the grid (slightly denser than in figure 11, and uniform.) The symmetry about the main diagonal in the four leftmost columns is evident: A | | | | | | | | | | | D |
| 03 | 06 | 09 | 12 | 15 | 17 | 18 | 19 | 19 | 20 | |
| 06 | 13 | 19 | 25 | 31 | 35 | 37 | 38 | 39 | 40 | |
| 09 | 19 | 29 | 39 | 48 | 54 | 57 | 58 | 59 | 60 | |
| 12 | 25 | 39 | 54 | 69 | 75 | 78 | 79 | 79 | 80 | |
B | | | | | | | | | | | C |
It is now quite easy to plot equipotential curves (or even field lines) by using some kind of interpolation on the results: Field components are obtained from the partial derivatives of the potential (in the horizontal and vertical direction), but this must only be done with care; while inexact data (or its integral) may be acceptable, its derivative may not be, and could occasionally benefit from a denser mesh. Graphs will follow.