Test3d03, 3rd 'benchmark test' data file for CPO3D

Parabolic motion in uniform field


In this test a uniform electric field is set up inside a cube by applying potentials +1 and -1 to two opposite ‘end’ faces, and the appropriate linearly varying potentials to the other ‘side’ faces. All four planes of reflection symmetry are used, which increases the number of subdivisions by a factor of 16. Examples of calculated potentials and fields are given on the screen. Two rays are traced, both of which should be parabolic. The coordinates of the first ray are recorded when it crosses a ‘test plane’ and again when it hits an electrode. The second ray shows how the program deals with reflections, reducing the step lengths when the ray is near the reflection point.


(This simulation can be given cylindrical or planar symmetry, and so can be solved even more quickly and accurately using CPO2D, with the data in files test2d03.dat or test2d04.dat)

The number of segments used in the present example is small enough for the example to be run with the 'demo' version of CPO3D. Higher accuracy could of course be obtained with more segments, using the standard or full versions of CPO3D.


Detailed description:


The following data were obtained when the memory and speed of PC's was much more limited than at present, so the available number of segments was small and the requested inaccuracies were fairly high to give a quick demonstration.


A uniform electric field in the z direction is created by setting up a cube that has voltages 1 and -1 on opposite faces (and a linearly varying voltage on the connecting faces). All 4 planes of reflection symmetry are used, so the end face at +1 volt starts in the minimum octant as a single triangle (divided 32 times), while a side face starts in the minimum quadrant as a single square (divided 64 times).

The first information that appears on the screen consists of potentials and fields along the line specified in the data file. The potentials and fields are consistent with the requested inaccuracy of 0.05%, except for the field at the face of the cube (which is indefinite). The potentials and fields in the region of the corners have larger errors, for the reasons explained in the note potentials, fields and contours near to boundaries. As explained in there, these errors are easily reduced either by making the segments near the corners shorter or by adding extra short lengths of electrodes that touch the corners and lie outside the cube, but in practice this would be necessary only if (exceptionally) electrons travel in this region.


The first ray is started with a kinetic energy of 1eV, at (x,z) = (-0.5,0) and at 45 degrees to the x and z axes. The path of the electron should therefore be the parabola

 z = 0.5 - 0.5*(x-0.5)**2

The values of z are sampled at 2 values of x: firstly at the 'test plane' x = 0.5 and secondly when the rays hit the electrode at x = 1. The values of z obtained by CPO3D can be found in the output file tmp3a.dat, and are as follows:


  z at x = 0.5  z at x = 1

 exact cpo3d error exact cpo3d error

 0.5 0.49989 .02% 0.375 0.37511 .03%


The errors are consistent with the requested (approximate) inaccuracy of 0.05% for the rays and with the number of segments, 96 (times 16 for 4 reflection planes). ). The total computing time for the boundary charges and for the ray tracing is a few seconds.


A second ray is started with a kinetic energy of 1.0025 eV at x=0.0, z=-0.5, with direction cosines proportional to 0.05, 1.0. It lies close to the z direction and is reflected almost normally at z = 0.5. It should cross the plane z = -0.5 (the second test plane) at 0.2. In fact it crosses at 0.20078.


The reason for adding this ray is to show how the program deals with reflected rays. Inspecting the output file, it can be seen that the step lengths are reduced (as far as 0.1*dlmax in this example) when the ray is near the reflection point, to give a more accurate result and also to give a smoother plot.