xmpl3d91, 91st 'example' data file for CPO3DS

Nearly helical motion in magnetic field stronger than electrostatic field.

test2d28 helical motion in uniform magnetic field

xmpl3d92 near-helical motion, electrostatic bottle

xmpl2d52 helical motion around space-charge.

Electrons of energy 5eV are reflected at an electrostatic mirror immersed in a uniform magnetic field of 10T. To see the effects of a small transverse magnetic field a solenoid is added to give a field of approximately 6E-3T in the y direction from z = 0.4 t0 0.6 (this field is only approximately constant because the rings of the solenoid are not closely spaced).

The period of the helical motion is 3.57E-9ms and the pitch length is 4.74E-3mm.

Normally it would be necesssary to specify a maximum step duration that is shorter than the period -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 lengths are specified instead of step durations then these would need to be less than the pitch length. In fact a step duration of less than approximately 3E-10ms is necessary in the present example, and so the total ray tracing time is long.

A 'nearly helical' option is available 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.  This usually greatly reduces the computing time.

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 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-9ms, which is 28% of a period and so is fairly safe. If 1E-8 is used the results at the reflection point are noticeably different. 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 4E-8ms.

To see the correct helical motion in the region of zero electric field, the nearly helical option can to be disabled. But then the inaccuracy for ray tracing has to be reduced to 1E-5 (and the number of interpolation points can be non-zero). The results obtained are then nearly the same, except that the computing time is much longer and the total number of steps is larger, which would be significant in space-charge iterations where space-charge tubes are created.

The ray starts with helical motion and when it meets the electrostatic mirror it is reflected and also moves a short distance in the y direction (see note 3 below). After returning back past the initial z value it meets the region of transverse magnetic field and so follows the new field lines (in the region from z = 0.45 to 0.55, y increases by approximately 6.5E-5, which corresponds to By = 6E-3, Bz = 10).

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:

(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.

For further notes see xmpl3d92.