xmpl2d01, 1st 'example' data file for CPO2D
A twotube lens
One cylinder extends from z=5.0 to z=0.05, the other from z=0.05 to z=5.0, both with a radius of 0.5, and both capped at their far ends. Only one value of the voltage ratio v2/v1 is chosen in this example, namely 10. The focal and midfocal lengths and all the third order spatial and chromatic aberration coefficients are obtained, and are extrapolated to an infinite number of segments. To check the computed aberration coefficients, some specific rays are also traced through the lens.
The number of segments used in the present example is small enough for the example to be run with the ‘demo’ version of CPO2D (but see the comment at the end of this file). Higher accuracy could of course be obtained with more segments, using the standard or full versions of CPO2D.
One cylinder extends from z=5.0 to z=0.05, the other from z=0.05 to z=5.0, both with a radius of 0.5, and both capped at their far ends. The z=0 plane is made a plane of voltage antisymmetry. The charge density on the cylinders is highest at the ends near the gap, so the segments into which the cylinders are subdivided are made the smallest there (by using 'type 1' of subdivision.
A total of 160 segments is used (before the reflection in the z=0 plane). The requested fractional inaccuracy of the boundary charges is 0.0001, and that of the potentials, fields and ray tracings is 0.001.
The voltages on the cylinders are specified in the data file as 4.5 and +4.5, but when the lens properties are calculated the program takes the electrode voltages specified by the User and then scales the original potential field and adds a constant potential to the whole field so that an electron which is at a point of potential V has a kinetic energy E = eV.
The region from z=4.8 to +4.8 is specified for obtaining the lens parameters, and this length is divided into 1000 steps. The requested value of the voltage ratio V2/V1 (which is essentially E2/E1) is 10.
The first line of data in the table below shows the focal lengths obtained with the above conditions. The f's and F's are focal and midfocal lengths respectively, and the subscipts 1 and 2 label the asympotic object and image spaces respectively. The next line shows the values obtained with more segments, using the full version of CPO2D. The third line of data shows the results obtained by extrapolating to an infinite number (N) of segments and a zero inaccuracy (acc), as explained in more detail below and in Chapter 4 (section 4.3) of the Users Guide (where the present lens is quoted as a specific example). A modified form of the program has been used for this, to give more accurate results, and to more significant figures). These results could serve as 'benchmark' values for future tests. The last line of data shows the focal lengths given by E Harting and F H Read, Electrostatic Lenses (Elsevier, Amsterdam, 1976) the text pages of this book are available in \cpo\document\harting.
N 
acc 
f1 
f2 
F1 
F2 
50 
0.001 
0.8014 
2.534 
1.619 
1.183 
160 
0.001 
0.8002 
2.530 
1.617 
1.180 
infinity 
0 
0.799682 
2.528819 
1.616288 
1.179489 
*HR: 

0.80 
2.54 
1.62 
1.19 
(*Harting and Read)
It can be seen that the inaccuracies in the first line of data are typically 0.2%, but only 50 segments have been used. The errors in the next line are consistent with the requested inaccuracy, and the data of Harting and Read are also consistent with their claimed maximum inaccuracy of 1%
The next table shows some representative results for spherical aberration coefficients, again for V2/V1=10. 'N' and 'acc' have the same meaning as in the first table. The Cs are the spherical aberration coefficients defined by Harting and Read (see also P W Hawkes and E Kasper, Principles of Electron Optics, Academic Press, 1989)
N 
acc 
Cs0 
Cs1 
Cs2 
Cs3 
Cs4 
50 
.001 
3.697 
7.545 
5.997 
2.208 
0.3206 
160 
.001 
3.681 
7.510 
5.967 
2.197 
0.3190 
infinity 
0 
3.67422 
7.49678 
5.95583 
2.19294 
0.318416 
*HR: 

3.70 
7.54 
5.99 
2.21 
0.320 
It can be seen that the inaccuracies in the first and second lines of data are on average about 0.7% and 0.2% respectively, and that the data of Harting and Read are consistent with their claimed maximum inaccuracy of 1% Again the results in the 2nd row of data could serve as 'benchmark' values in future.
The next table shows some representative results for the chromatic aberration coefficients Ccn defined by L A Baranova et al, Sov. Phys. Tech. Phys. 34, 1409 (1989) and Hawkes and Kasper (see the relevant note for further information) and for the Petzval integral.
N 
acc 
Cc0 
Cc1 
Cc2 
Petzval 
50 
.001 
0.8302 
1.005 
0.3167 
0.4522 
160 
.001 
0.8290 
1.004 
0.3164 
0.4528 
infinity 
0 
0.828658 
1.003617 
0.316353 
0.453212 
Baranova et al 

0.825 
0.995 
0.315 

It can be seen that the inaccuracies of the Ccn in the first, second and fourth lines of data average out at 0.12%, 0.04% and 0.6% respectively.
The accuracy of the calculated lens parameters can be affected by the choice of the number nz of steps used for evaluating the various integrals. If nz is too small the tracings become inaccurate. For 'N'=160 and 'acc'=0.001 the calculated lens parameters are essentially constant for nz equal to about 500 or more, which corresponds to a step length of about 0.02D or less, where D is the diameter of the lens. The user should establish the appropriate value of nz empirically for each lens.
The results obtained by extrapolation to N=infinity are collected together in the table below. Values of N from 450 to 900 have been used with a modified version of the program in which inaccuracies of 0.000001 can be requested and the results are given to more significant figures). As explained in more detail in Chapter 3 (section 3.4) of the User's Guide (where the present lens is quoted as a specific example), plots of the lens parameters p versus 1/(N^2) are approximately straight, and so the asymptotic values p(infinity) can be found. The values p(900) at N=900 are used as the recommended values, and the errors are chosen so that they include p(825) and p(infinity). The following results have been obtained (where the numbers in brackets represent the estimated errors in the last significant figures):
f1,2, F1,2 = 
0.799682(4) 
2.528819(12) 
1.616288(7) 
1.179489(6) 

cs0,1,2,3,4= 
3.67422(5) 
7.49678(10) 
5.95583(8) 
2.19294(3) 
0.318416(5) 
cc0,1,2,ptz= 
0.828658(5) 
1.003617(6) 
0.316353(3) 
0.453212(4) 

These values can serve as 'benchmark' values for future comparisons.
To check the computed aberration coefficients, the program has also been asked to trace some specific rays through the lens. The voltages on the cylinders are 4.5V and +4.5V, and the initial kinetic energy of the electrons is 1 eV, so the voltage ratio V2/V1 is effectively 10. The rays all start at z1 = 4.0, and so in the absence of aberrations should cross the axis at z2 = 2.030 (calculated, for consistency, using the focal lengths obtained for N=160), which has therefore been used as the position of the 'test plane'. The initial angles to the axis are 0.03, 0.06 and 0.09. The table below shows the computed values of the distance rf from the axis at the test plane. The spherical aberration coefficient for z1 = 4.0 is 162.1 (as obtained from the calculated Cs), and this has been used to give the values of rf in the row labelled 'calculated' in the table.
alpha = 
0.03 
0.06 
0.09 
computed rf (N=50) = 
0.00137 
0.01247 
0.04764 
computed rf (N=160) = 
0.00146 
0.01266 
0.04788 
'calculated' rf = 
0.00147 
0.01176 
0.03968 
A larger discrepancy would usually be expected for the smallest value of alpha, due to the inherent difficulties that exist in accurately tracing rays that are very near to the axis. The discrepancies for the higher valued of alpha are caused by the presence of higher order aberrations.
A further ray has been started from the axis, at z=4 and with alpha=0.06, and with an energy that is 5% higher. It can be seen that the increase in energy causes rf to change from 0.01247 to 0.00596, an increase of 0.00651. The chromatic aberration coefficient is 6.625 for z1 = 4.0 (as obtained from the calculated Cc), which gives the value 0.00667 for the change in rf. The computed and 'calculated' values therefore differ by 2.4%
Finally, two rays have been started offaxis and parallel to the axis, one with a higher energy. The difference in the values of rf is 0.00261. The value of Cd (the coefficient of chromatic aberration of magnification), calculated using the computed values of Cc1 and Cc2, is 1.579, giving the value 0.00265 for the change in rf. The two values of rf differ by 1.5%
The total computing time is 52 sec, using a 66MHz 486 PC.
To improve the calculation of the nearaxis rays the 'improve nearaxis radial field' option could be used.
(In the ‘demo’ version of the program the maximum numbers of axial and ray points are easily exceeded. The program automatically reduces the number of axial points, but to obtain all the ray information it might be necessary to use longer step lengths.)
The option to output lens parameters for a specific object position can be used.