Test2d08, 8th 'benchmark test' data file for CPO2D
Time-dependent oscillating potentials
This test reproduces the sinusoidal motion of an electron in a sinusoidal electric field. A uniform electric field is set up between 2 flat parallel plates, as in file test2d04.dat. The value of z at the crossing point of a particular plane should be 0.12452 mm. The value given by the program is 0.12441, an error of 0.09% (which is consistent with the requested ray inaccuracy, 0.05%, and the total number of segments, 50).
The number of segments used in the present example is small enough for the example to be run with the ‘demo’ version of CPO2D. Higher accuracy could of course be obtained with more segments, using the standard or full versions of CPO2D.
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.
The end faces at z = +/-1 have been given the voltages:
v1 = +/-30*sin(2*pi*t/tau),
where tau = 0.000001ms.
An electron starts at x = -0.5, z = 0, a point that has zero potential.
A solution that does not include a linear dependence on time is
z = -(e*E/m*omega**2)*sin(omega*t),
where omega = 2*pi/tau
In this example, the electric field E is 30 volt per mm, the period tau is 0.000001 ms, the initial direction is 45 degrees to the field and the initial time 'ti' (which is entered along with the other initial ray parameters) is 0.000001 ms (that is, one period). Therefore the energy is 4.00959 eV and the path of the electron should be given by:
x = 0.5+vx*(t-ti),
z = -0.133653*sin(2*pi*(t-ti)/tau),
where vx = 839768m/s (and where x is in mm, t is in ms),
Therefore at the test plane x = 0.5, we should have:
t = 0.0000021908 ms, z = -0.12452 mm.
In fact t is given correctly (although only to 3 significant figures) and z = -0.12441, an error of 0.09% (which is consistent with the requested ray inaccuracy, 0.05%, and the total number of segments, 50).
The crossing information at the 2nd test plane, at z = 0, is retained for the 2nd crossing of the plane (and this was denoted in the data file above by putting the letter 'm' in the 6th space of the appropriate line, see the relevant note, and the number 2 in the line that defines the crossing plane). At this crossing we should have:
t = ti+tau = 0.000002 ms, x = 0.33977 mm.
In fact t is given correctly (although only to 3 significant figures) and
x = 0.33986, an error of 0.03%
Another way of setting up the oscillating field is with a user-supplied routine. An example of such a routine, supplied as part of the CPO package, allows square and sawtooth waveforms.