Xmpl3d92, 92nd 'example' data file for CPO3DS

Nearly helical motion in an electrostatic bottle.

 

 See also:

test2d28 helical motion in uniform magnetic field

xmpl3d91 near-helical motion in magnetic field stronger than electrostatic field

xmpl2d52 helical motion around space-charge.

 

92nd example file, a second example of use of the 'nearly helical' motion, an electrostatic bottle with a very strong magnetic field.

 

Electrons of energy 5eV are enclosed in an electrostatic bottle immersed in a uniform magnetic field of 7T. The tube has a radius of 0.05mm and a length of 100mm. The period of the helical motion is 5.10E-9ms and the pitch length is 6.77E-3mm.

 

Normally it would be necesssary to specify a maximum step length that is shorter than the pitch length -otherwise the trajectory integration (ie ray tracing) routine fails (see note at end) giving very inaccurate results and sometimes giving seemingly irrelevant messages about mesh spacings. Alternatively if maximum step times are specified instead of step lengths then these would need to be less than the period. The total ray tracing times would then be very long.

 

In Jan 2010 a 'nearly helical' option was added to allow a different method of trajectory integration in a magnetic field B when the electric force (e*E) is sufficiently smaller than the magnetic force (e*v.cross.B). The user is able to specify the maximum value of the ratio e*E/e*v.cross.B, called ratio_max, say. When the ratio < ratio_max the new option is activated and the program integrates each step of the trajectory using the analytic solution of the equation of motion in uniform E and B.

 

The above ratio is tested at the end of each step, as well as at the beginning. (Also various changes are looked at in values between the beginning and end of the step: the values of the longitudinal and transverse components of the magnetic field, the values of the electric field and of the potential. If any of these changes are too large the option is disabled for the step.)

 

The new option can be activated on the sheet

databuilder\ray tracing\advanced options.

 

 

In the present example the maximum step duration is chosen to be 1E-8ms, which is 4 periods and so is on the verge of acceptability. The 'nearly helical' option is activated when the ratio of forces mentioned above is less than 0.01 and then the step duration is set at 1E-6ms, which is 400 periods.

 

The rays are traced with helical motion in the centre of the trap but at the ends they are reflected by the repulsive electric fields (and here they are displaced radially, see note 3 below and xmpl3d91).

 

 

Great care has to be taken with the choice of step durations in the regions of low and high electric fields and the choice of step duration for the new option. The user should experiment very carefully with different choices, comparing results for the option activated or not.

 

 

Some further notes:

Note given in xmpl3d91:

(1) If the strength of the magnetic field varies a lot (as in the magnetic bottle xmpl3d20) then do not use a value larger than 0.001 for the inaccuracy for the option -a larger value might give a false result at magnetic reflection points. On the other hand, if the magnetic field is nearly uniform then a value of 001 is usually suitable.

(2) There can be a 'stroboscopic' effect, so that in the regions where the new option is activated the motion appears helical but with an increased pitch length, as in the present simulation. This occurs because the steps usually include more than one pitch length and so when the calculated coordinates at the ends of the steps are connected by the drawing routine the displayed number of rotations will be less than the actual number, giving the 'stroboscopic' effect. With other conditions the motion might not appear to be helical.

(3) In the present example the ray starts in the xz plane and so the component of the electric field in the y direction is zero, yet it can be seen that the helix is diverted in the y direction. This is because particles in crossed electric and magnetic fields drift in the direction E.cross.B, as is well known in electron optics.

(4) Beware: in a space-charge calculation the position of an electrostatic reflection plane might change as the iterations proceed.

(5) If the number of interpolation points for drawing the trajectory steps is non-zero then the interpolation routine might produce strange results at the points at which the new option becomes or ceases to become operative, so it is recommended to use zero interpolation points, as in the present simulation.

(6) As mentioned above, the trajectory integration routine tends to fail or become inaccurate when the step length is larger than 2 or 3 pitch lengths. The CPO routine uses the Bulirsch-Stoer method. The step length is automatically subdivided into as many as 32 parts but it seems that this is not sufficient for dealing with multiple oscillations.

(7) In some simulations it might be necessary to force the first step of the trajectories to be helical, even when the criteria for helical motion are not met. This can happen for example if the trajectories start at the edge of a space-charge region, where the electric field varies too much to satisfy one of the criteria. In this case it is possible to force the first step to be helical, by entering a negative value for the helical step duration.

 

New notes relevant to xmpl3d92:

(1) The option to force the first step of the trajectories to be helical, even when the criteria for helical motion are not met, is used, for the reason given in note (7) above.

(2) The step duration, t_hel say, for helical motion is chosen in the following way. Put t_non = step duration for non-helical motion, at the electrostatic mirrors. A trajectory will start with dt = t_hel but when it is wthin a time t_hel from a mirror one or more of the criteria for nearly helical motion will not be satisfied and then dt becomes t_non. After leaving the reflection region the criteria will be satisfied again and dt will revert to t_hel until the mirror at the other end of the bottle is reached.

Consider the path from the centre of the bottle to the first reflection and then back to the centre. Along this path an electron will have a step duration of t_non for an average time of approximately 0.5*t_hel. The remainder of the path has a length L - 0.5*t_hel*v, where L is the total length of the bottle (100mm) and v is the longitunal velocity of the 5eV electrons. Therefore the total number of steps along this path is N = 0.5*t_hel/t_non + (L - 0.5*t_hel*v)/(v*t_hel).

N is also of course the number of space-charge tubes that are created.

N is a minimum with respect to t_hel when t_hel = sqrt(2*L*t_non/v).

In the present example this gives t_hel = 1.23E-6ms. In fact we have used 1E-6ms (which gives N = 125 for the path).

We have chosen here to minimise N to avoid exceeding the program's limit on the total number of space-charge tubes and to approximately minimise the total computing time (since the ray tracing times are approximately proportional to the number of tubes in this example).

(3) The 'final time' has been set at 0.0001589ms in order to try produce trajectories that perform one complete oscillation, thus finishing at z = 0. The space-charge density is then approximately continuous throughout the space. If the ends of the trajectories were to overlap their beginnings then the space-charge density there would be higher than elsewhere, which is a situation we want to avoid.

(4) The beam current (the total current of all the trajectories of the beam) is chosen to be 0.0001mA initially, but is increased in steps to a final value of 0.001mA. This current is injected for a time 0.0001589ms, which is the flight time (see above). The total charge injected into the bottle is therefore 1.589E-13C, which is the charge of 1E6 electrons. At the end of an iteration there are therefore effectively 1E6 electrons trapped in the bottle. The space-charge of these electrons then acts on the trajectories of the following iteration.