Test3d31.dat, 31st 'test' file for CPO3DS
Space-charge repulsion of 2 particles in a beam using the pulsed beam option
The 2 particles are represented by a single ray that is reflected in the x = 0 symmetry plane.
The ray represents a single electrons of charge e, energy E = 1E-3eV and velocity v = 1.87E4 mm/ms, moving in the +z direction, initially with x = 0.05mm.
The external field is zero.
The beam (that is, he single ray) is pulsed from t = 0 to tf, where tf = 1.E-7ms, so the physical length is v*tf = 0.00187mm.
This length is much shorter than x and so the pulse gives a good representation of a point charge.
The ray has a final current I = 1.602E-6mA, which represents a charge of q = I*tf = 1.602E-19 coulomb = e, the charge of an electron.
The ray and its reflection therefore represent 2 electrons that repel each other as they travel in the z direction.
4 space-charge iterations are used, which is enough for convergence. The option to disable the recalulation of surface charges due to space-charges is used.
In the transverse x direction the equation of motion of an electron in the ray that starts at x0 = 0.05, due to the charge in the other ray, is
m*d2x/dt2 = q**2/(4*pi*epsilon0*(2*x)**2)
d2x/dt2 = f/(x**2), where f = q**2/(m*4*pi*epsilon0*4).
Using dimensionless parameters, put s = x/x0, g = f/x0**3, then
d2s/dt2 = g/s**2.
ds/dt = sqrt(2*g(1 - 1/s))
when the initial value of ds/dt is zero.
t = sqrt(0.5/g)*integral(1/sqrt(1 - 1/s))
= sqrt(0.5/g)*(sqrt(s*(s-1)) + 0.5*ln(2*s-1+2*sqrt(s*(s-1)))
(Note that the integration stated in test3d30 cannot be used here because of
the change is sign of d2x/dt2.)
The time to go from x = x0 to x = 2*x0 (s = 1 to 2) is therefore
t = sqrt(0.5/g)*2.29559 = 3.14184E-8*2.29559 = 7.21237E-8s = 7.21237E-5ms.
With the present settings the program gives 7.21245E-05ms, which is very close.
When the pulse duration tf is increased t also increases (for example when tf is increased by a factor of 10 and I is decreased correspondingly, then t increases to 7.2367E-5). This happens because the physical length of the pulse is then not much shorter than x and so the forces are reduced.
It is advisable to make the maximum step time (dtmax) smaller or equal to tf (in the present file they are both 1.E-7ms). If dtmax is made longer then the calculations become less accurate (for example when it is increased to 1.E-6 in the present simulation, t increases to 7.2973E-5, an error of 1.1%).
In practice, a small dtmax implies a large number of ray steps and so the maximum value of the total number of steps that the program allows might be exceeded.
In practical simulations the pulse duration would be fixed, not variable, the number of rays would be large and each ray would typically represent a large number of particles.