Section 2.6 of the User's Guide for CPO2D and CPO3D
(or proceed to section 2.7)
Accuracy of field evaluations.
A valuable (and somewhat unusual) feature of the CPO programs is that the user can choose some of the inaccuracy levels. A lower inaccuracy will of course require a longer computing time, so the user is able to make the best use of the available time. To optimise the speed the program selects the appropriate approximations at each stage to try to achieve the chosen inaccuracy.
IT MUST BE EMPHASISED THAT THE BEST AVAILABLE INACCURACIES ARE USUALLY SIGNIFICANTLY BETTER THAN THOSE AVAILABLE IN OTHER COMMERCIAL PROGRAMS, IN WHICH A CHOICE IS USUALLY NOT GIVEN.
Potentials and fields are calculated:
(a) when specific information is wanted before ray tracing about potentials and/or fields along a line or in a grid, or
(b) when rays are being traced, or
(c) when contours are being plotted after ray tracing.
On all three occasions the user is asked to specify an inaccuracy. (But whatever inaccuracy is requested, the individual calculations are always carried out in double precision.)
The user also specifies the number of segments (and advice on how to do this is given in chapter 3). It is particularly important to have a high density of segments in critical regions.
The inaccuracy of the surface charges depends on the pre-set fractional inaccuracy of the charge evaluation, but it also depends on several other factors, including
(1) the total number of segments into which the electrodes are subdivided,
(2) the choice of subdivisions for the electrodes, and
(3) the geometry.
The inaccuracy that are entered are only a guide, and in any case the 'inaccuracy' cannot be clearly defined in general.
The accuracy is always improved by using the zero total charge option. When the program says that this option is not allowed then another action is recommended, as explained in the note on the zero total charge option.
Further information is given in chapter 3.
In regions very near to an electrode (more precisely, at points nearer to a segment than the width of the segment) there is a tendency for the inaccuracy to be worse than the requested value. The program uses a technique to improve the potentials in these circumstances, but this requires extra computing time. This technique for improvement can be disabled (and time saved) by selecting the appropriate option in the contours menu or by entering the inaccuracy value as a negative number in the data file (but the program will of course make it positive before using it). See also notes on contour details and potentials, fields and contours near to boundaries.
To get a more quantitative value for the inaccuracy, use a simulation with a known solution.
To find what a result would be for an infinite value of the number (n) of segments, vary n and plot the result against 1/n or 1/n squared, and then extrapolate to 1/n = 0, as explained in the note on extrapolation.
When electrodes are curved an inscribing correction is usually automatically enabled in CPO2D and is initially enabled in CPO3D when it is allowed to be so, since the field accuracy is also always improved for curved electrodes.
Special care is needed when using a cathode with an anode at high voltage (and this note also applies to other problems in which particles change their energy by several orders of magnitude).
In certain rare situations it can happen in CPO3D that the potentials and fields do not have the exact symmetry or anti-symmetry that has been specified. This can occur for example when the number of segments is small and when the lowest inaccuracy has been requested (which is of course an inconsistent request). The origin of this lies in the limited number of digits used in saving segment data in the binary data file.
Four final comments, particularly for those who have used FDM and FEM programs (that is, programs that are based on a 'grid' of points, such as SIMION):
(1) In most commercial programs little or no indication is given of the accuracy of the final results.
(2) Inaccuracy of matrix inversion:
A trivial inaccuracy (but the only one that is mentioned in some FDM and FEM programs) is the inaccuracy in solving the main matrix equation. In FDM and FEM programs this equation represents a numerical approximation to Laplace’s equation and is usually solved by an iterative relaxation process to give the potentials at the mesh points. The relevant iterations are stopped when some pre-set convergence error is reached (for example 10 to the power of -10). But note that the convergence error in FDM and FEM programs does not represent the differences between the calculated and true potentials at the mesh points, which are much larger (and which are usually not specified or estimated). For example with SIMION you could use an array of only 5*5 grid points and solve the equation with a precision of 10 to the power of -12, but the accuracy of the potentials at the points would not be this! In the CPO programs the main matrix equation gives the charges and is solved with double precision accuracy (that is, typically better than 10 to the power of -13).
(3) Boundary potentials
It is the boundary charges that are the source of the field in the BEM method, not the boundary potentials (although the potentials were of course used to obtain the charges).
Note that in the present form of the BEM the potentials at the centres of the segments are exact but the potentials calculated on other parts of the segments are not exact. Similarly in the FDM and FEM the potentials at the mesh points are exact but the potentials between those points are not exact. In potential plots in the FDM and FEM the mesh points are usually used for the plotting and so the potential distribution appears to be exact over the whole boundary, which it is not! On the other hand in potential plots in the BEM the plotting points usually do not coincide with the centres of the segments and so the potential distribution looks less exact than in the in the FDM and FEM, which it is not! And note also that in the BEM the potential distribution is much more accurate in the interior region, where the particle fly, than in the boundary region.
For more detailed information, see notes on potentials, fields and contours near to boundaries and contour details.
(4) Number of segments
You are probably accustomed to having to use the maximum number of grid points to obtain a reasonable accuracy, and so will assume that in an BEM program you should also use the maximum number of segments. But we hope that you will follow the advice in chapter 3 of the User's Guide, or will at least look at the advice given in HELP!!, and then you will almost certainly be very surprised at how few segments you need to obtain high accuracy.
(proceed to next section)