Variable diameter of space-charge tubes.

Two ‘advanced’ options are available (on /setting up rays/space-charge options/advanced option for tube diameter/) for changing the diameter of space-charge tubes during ray tracing (that is, trajectory integration). The option is not available in the first run but can be activated for all later iterations.

The simpler option is to make the diameter of a tube a constant fraction of the beam diameter at that position. This option is intended only for beams that have axial (cylindrical) symmetry about the z axis. (For cpo2ds the word ‘diameter’ should be replaced by ‘thickness’.) The tube diameter found in this way is not allowed to be smaller than the original diameter specified for the tubes, .so care should be taken in chosing the value of this.

The ‘fraction’ should typically be a few times 1/sqrt(N), where N is the total number of rays, including the extra ones generated by reflections in symmetry planes. This should give a reasonably smooth distibution of charge density and hence field. (For 1/sqrt(N) the total area of the tubes will equal the area of the beam.) But if the fields at the edge of the beam are important then the fraction could be smaller.

The second (older) option makes use of the regions defined for changing the maximum step length.

For example you might want the diameter to be 0.1 most of the time but to be reduced to 0.01 for the part of the trajectory that is between z = .95 and 1.05. You might also want to specify a second region of changed diameter, eg to 0.02 between z = 1.5 and 1.6.

The number of regions and their limiting z values are those specified for the option to change the step length. See the note on changing the maximum step length for information on how regions can be set up in which the maximum step length can be changed.

An example is given in xmpl3d13.

It is expected that when dlmax is reduced in a region then the diameter of the space-charge tubes would also be reduced in the same region. But this might not always be the case. Therefore it is possible to ignore a region by giving it a negative value of dlmax or tube diameter.

An example:

Suppose that there are 2 regions and that their values of z and dlmax are

0.95 1.05 0.01

1.95 2.05 -1

Then dlmax is changed to 0.01 in the first region but is not changed in the second region.

Suppose now that the diameter of the space-charge tubes is to be changed to 0.02 in the second region but to remain unchanged in the first region. The required values of the diameter are then

-1

0.02.

If more than one region is specified then the program treats the nth region after the (n-1)th region, which means that the later regions can be superimposed inside the earlier regions.

If the stochastic option is in use an ‘advance option’ is available for using these same regions to change the averaging radius for the space-charge density during trajectory integration.