Improving ray paths


If you are starting a simulation and the rays are obviously wrong, read on. On the other hand if you are using a large number of segments and are not getting the accuracy you expect, go to HELP!.


If the ray tracings seem to be wrong, the most probable reasons are:

(1) The rays are started at or near an electrode (this must be avoided because the fields there can be less accurate).

(2) There are too few boundary segments, particularly in regions near to the rays, or surrounding the region where the rays start. It could happen for example that a ray starts in a region that should be field-free, but the ray is not a straight line in this region -in which case the number of segments that surround the region should be increased.

(3) There are enough segments surrounding the region of interest, but in the same vicinity there are other much larger segments that create a less accurate potential that extends over about twice their size.

(4) The 3D segments are too long and thin (see the note on choosing shapes of 3D triangles and rectangles).

(5) The choice of 'initial step length or time' is too large, which might cause the following unwanted effects to occur:

(a) the first part of the ray might appear on the screen as a linear portion,

(b) the ray might “jump” over a region in which the field changes quickly, giving an inaccurate tracing.

(6) The choice of 'maximum step length or time' is too large, which might cause the following unwanted effects to occur:

(a) the rays might appear on the screen as non-smooth, made up of piecewise linear portions (even with the interpolation points). If it is important that the rays be seen to be smooth, then reduce the maximum step length or time. Do not decrease the ray inaccuracy, so that the program automatically reduces the step length or time, because this could give a large increase in the tracing time,

(b) The crossing conditions at the test planes might become inaccurate because the interpolations used to find the conditions are over a large distance,

(c) the rays might 'jump' over regions in which the fields change quickly, giving an inaccurate tracing,

(d) if rays are reflected sharply the tracings might be inaccurate.


Other possible reasons are:

(1) The rays and the electrodes have different reflection symmetries.

(2) The mesh method of ray tracing is being used and a ray passes near to or goes through an electrode, in which case the mesh points used to calculate a field might lie on the surface of the electrode (where the field is indeterminate) or might straddle the electrode.

(3) The mesh method of ray tracing is being used in the presence of space-charges, and mesh spacing is not sufficiently smaller than the radius of the beam.

(4) The surface charges on the segments have not been calculated accurately enough.

(5) A ray exists outside a system of electrodes and the 'zero charge' option has not been disabled, in which case outer potential will tend to a non-zero constant and the outer field will be zero or small. In these circumstances enclose the system with extra electrodes.


If the ray tracings seem to be too slow, look at section on ray tracing speed.


See also the notes on troubleshooting.