The CPO programs are particularly powerful for space-charge problems.
The important steps in space-charge calculations (using the space-charge versions CPO2DS or CPO3DS) are:
This is the conventional method used in other programs, but is usually not the better of the two methods offered in the CPO programs.
The space through which the beam passes is notionally divided into an array of square or cubic cells, each of which can hold a space-charge. As a ray passes through a cell it deposits a charge there, given by
q = i.t
where i is the current and t is the time spent traversing the cell.
The cells are created only where they are needed, in the volume traversed by the rays.
The total charges in the cells (each with its weighted centre-of-gravity) are used to calculate space-charge potentials and fields.
The space-charge cells are completely independent of the ray mesh spacing used for the ray mesh points (if rays are traced by the mesh method), and so the mesh spacing of the space-charge cells does not have to have the same as the mesh spacing for the rays.
Each individual step of a ray is considered separately. The charge associated with a step is
q = i.s/v
where i is the current, s is the step length (which in general is not constant) and v is the velocity. This charge is put into a narrow 'tube' (ie cylinder) that encloses the step. The space-charge of the beam is then the sum of the charges in the tubes. The tube method is usually the more suitable, particularly for beams that are long and thin.
Each set of rays is traced in the space-charge created by the previous complete set of rays. The first set will therefore travel through the electrode system with no space-charges present, but will leave space-charges in the space-charge cells or tubes, ready for the next set of rays. If the initial conditions of the rays are always the same then after a few iterations the final conditions of the rays should converge to a self-consistent result. The rate and smoothness of the convergence will depend on the damping factor that the User has chosen.
The sets of rays can be changed from one iteration to the next, and can consist of particles of mixed mass and charge.
The presence of the space-charges of the rays causes changes to the charges on the boundary elements (ie the electrodes and their segments), which are therefore re-calculated at each iteration.