Test3d08, 8th 'benchmark test' data file for CPO3D
Time-dependent oscillating potentials
This test reproduces the sinusoidal motion of an electron in a sinusoidal electric field. The field is applied to a cube, as in file test3d03.dat, and the time taken for the electrons to reach a particular plane is given within the requested inaccuracy of 0.05%
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 is created by setting up a cube, as in file test3d03.dat.
The end faces have been given the voltages:
v1 = +/-30*sin(2*pi*t/tau),
where tau = 0.000001ms.
The ray starts at x = -0.5, z = 0.
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' 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 and z = -0.12448, an error of 0.03% (which is consistent with the requested ray inaccuracy, 0.05%).
At the 2nd test plane, z = 0, and at the requested 2nd crossing, we should have:
t = ti+tau = 0.000002 ms, x = 0.33977 mm.
In fact the errors in t and x are both 0.01% or smaller.
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.