General advice on segmentation.


Here we collect together some of the advice given elsewhere.


But before we do that, here is some important general advice.

It is generally true that the best accuracy is obtained when all the segments carry approximately the same charge. This is particularly important for the critical parts of a system, such as a cathode and its surrounding electrodes. It is less important for electrodes that are far from a beam or are not ‘seen’ by the beam.

So in the initial stages of setting up a simulation (when, hopefully, the number of segments is still small and the requested inaccuracy is comparatively large) set the printing level high enough to see the segment charges, and inspect them Then adjust all the subdivision numbers. It is usually sufficient to do this only for the critical parts of the system, deleting the other electrodes temporarily. When the choice of subdivision numbers is not clear, it can help to use the iterative subdivision option.


Now, back to the collected advice:


First, things not to do:


2D and 3D systems

  • Do not allow electrodes to cross each other.
  • Do not allow electrodes and segments to overlap or coincide, either wholly or partly, even if they have the same potential, because the results would then be meaningless. The program automatically tests for this, unless the test is disabled. See the detailed note.


2D systems

(Some of this is taken from subdivision of 2d electrodes.)

  • When an electrode has a free end the segments should be concentrated there, using the advanced option in databuilder.
  • Avoid creating pairs of segments that have a separation smaller than their lengths, because each segment is assumed to carry a uniformly distributed charge on its surface, which in these circumstances might not be a good assumption.
  • Avoid creating segments that have the form of long thin cylinders, for the same reason.


3D systems


Second, positive advice, things to do:

(Some of this is taken from section 3.4 of the Users Guide, on choosing the subdivision numbers, where further details can be found.)


  • The important segments are those that are "seen" by the beam, so make sure that they are small, for example their sides should be small compared to the distance to the beam.
  • Electrodes that are not "seen" by the beam can often be omitted entirely from the simulation, when they do not affect the electrostatic field at the beam.
  • Segments of electrodes that are not "seen" by the beam should be made significantly larger, if they are not omitted, but do not make their sides larger than about one quarter their distance from the beam.
  • Segments should be smallest where the charge density is highest at edges and corners, if these are in critical region.
  • In general, concentrate the segments in the regions that are most likely to have the greatest effect on the parameters of interest in the simulation (whatever they might be, such as potentials, fields or ray end points).
  • It is important to make use of planes of reflection symmetry when these exist (it rarely happens in 3D systems that there is not at least one plane of symmetry).
  • To obtain the greatest accuracy (in a given computing time):
  1. With the present set of segment numbers, calculate the parameter of interest and use this value as a temporary standard.
  2. Decrease the number of segments in a selected region to test the sensitivity to the parameter of interest.
  3. Repeat this for other regions, so building up information on where large numbers of segments are needed and conversely where small numbers can be used.
  • If the field near an electrode is important, for example if rays start from that electrode, then try to add another artificial electrode near to it and at the same potential, to increase the accuracy of the field in this region. This applies particularly to cathodes.
  • If the field near an electrode is important then do not spoil it by using large segments on nearby electrodes.
  • Try to avoid having free outer ends of electrodes. by adding segments to close them off (see also the next bullet point).
  • Add artificial ‘bridging‘ electrodes to fill the gaps between the outer edges of electrodes in accelerator or lens systems. Put linear voltage gradients on these bridges.