Tracking particles with wake fields and space charge effects

A simple and precise way to account for beam cavity interactions is the use of delta wake potentials known from RF calculations or measurements. When this procedure is introduced in a tracking program following super-particles such as in PARMELA, besides the effect of the space charge, the evolution of the charge distribution within the bunches of a train can be determined. The interesting application is for non-rigid bunches at intermediate or low energy, as for the study of Compact Linear Collider beams in the CLIC Test Facility at CERN.


I. INTRODUCTION
Beam dynamics can be calculated with 'self consistent' codes with corresponding determination of the fields and of the movement during successive steps of time, as in MAFIA [1]. Available memory space and computing time restrict the application to short distances.
Other codes, as DTRACK and MTRACK [2,3] can follow a beam sliced longitudinally allowing for the study of transverse displacements, wake field effects and their cancellation along a very long beam path. With the code PARMELA [4], a number of different 'external' electromagnetic fields can be taken into account with specialized routines. The self field due to the space charge and its effect can be calculated, the charge being distributed in superparticles with equal charges. This paper discusses the implementation which was made for the effects of the wakefields created by interaction of these super-particles with corrugated cavities. The force on a particle can be calculated by summing the actions of the one particle wakefield (delta or Green's function) due to the particles in front. When using the modal description of the delta wake, the frequencies and the loss factors are characteristics of a segment of the tube and may be referenced to the longitudinal geometry of the line as is done for any other type of fields. Then part of the problem is to find these constants for a given segment.

A. The one particle wake field
The measurements or the calculations can be made in the time domain or in the frequency domain.
Isolating the contribution of discrete frequencies in the expression of the longitudinal delta wake: w L δ (t) = ∑ n cos(ω n t) ∫ ω−ε ω+ε 4 Re(Z L (ω)) dω This corresponds to the modal description of the longitudinal delta wake in mode 0: w L δ (t) = ∑ n 2 k δ n cos(ω n t) The expressions for the transverse wake are similar, but with a sine function, and the transverse delta wake for the dipole mode in a structure with cell iris radius a is: w T δ (t) = ∑ n 2 k δ n (c/ω n ) a −2 sin (ω n t)

B. The programs giving the modal loss factors
In some cases the analytic expressions for w δ (t) and Z(ω) are known, as for the resistive wall of a circular pipe [6]. For a corrugated structure with rotational symmetry, several codes are available. KN7C and TRANSVRS, requiring a simplified geometry have been used for obtaining the ω n and k δ n for the CLIC structure [7]. Time domain code ABCI [8] includes a Fourier transform of the time domain wake fields giving the impedance versus frequency variation, from which the discrete series of parameters of the modal description can be derived. For the 3D CLIC transfer structure, MAFIA gives the effective wake fields for a given gaussian bunch length [9]. The deconvolution giving w δ (t) is much easier when the lowest modes are dominant.

C. Computing time limitations and the number of modes
Because the bunches are assumed to be non rigid, the delta wake field is calculated many times in the tracking program.

Short range
The number of modes necessary for describing the short range wake fields can be limited by using an integral equivalent of the summation on the upper modes, (optical resonator model), and, as this should be done at each time step, spline functions are prepared in advance for further interpolations depending on the structure type. Another approximation has been proposed [10], from considering the asymptotic behaviour of the loss factor for a gaussian bunch when its length tends to 0. The total loss factor as a function of the gaussian distribution rms value, and the delta wake as a function of distance s to the particle, can be written: k L (σ) = ∑ g n σ bn and w L δ (s) = ∑ a n s bn with the same exponent b n , and a n depending on g n and b n .
The total loss factor is not necessarily known, but if the effective wake is known for a gaussian bunch, a deconvolution can provide the coefficients for b n and a n , leading to a description of the wake field near the particle with a sum of very few terms. This is shown in Fig. 1 for the CLIC longitudinal delta wake field and on Fig. 2 for the transverse one, for an approximation with 3 terms only. Long range For the long range wake, the cancellation of the effects of the higher modes because of the frequency distribution is such that enough precision is attained when using only the first of them, as shown Fig. 3, where the longitudinal wake for CLIC obtained with 200 modes is compared with the one obtained with one mode only. For 9 modes, the difference is hardly visible at the same scale. The input file for the code is prepared in a very similar way to the operation without wake fields, but another file is given concerning the successive segments of the beam path where wake fields are considered, with references to different lists of frequencies, modal loss factors and group velocities.
All the particles are transported in each of the successive (and constant) intervals of time. The space charge forces are calculated for the distribution of the particles at a given time, and the kicks resulting from these forces are applied in advance for n s basic time steps. The effect is therefore superimposed on the one due to the action of the external electromagnetic fields, calculated at each basic time step.
The action of the wake fields is superimposed in a similar way. They are also calculated for the distribution of the particles at a given time, and the resulting kicks applied on all particles for n w successive basic time intervals.
Routines for the space charge and for the wake field are separated from those for the external fields and independent, which helps for implementation and for disconnecting the effects. By choosing the time interval, the precision can be adapted to the amount of charge, the energy and the degree of interaction with the walls. The simplicity of the kick formulation counterbalances the inconvenience of having many short time steps.

A. Logic of the code
When a particle position coincides with a zone with wake field, some of its parameters are recorded or updated at the previous limit of the zone. This is used to calculate the time separation between the particles, and the transverse coordinates all the particles in front had when passing by the same position as the considered one. Using the coordinates of the other particles at the same time could be misleading because the change in the parameters, specially the transverse coordinates of the particles far ahead can be significant.
If the group velocity v g of the energy flow has been indicated as different from c in the data for the wake fields , the particle at a distance z from the entry of the structure is influenced only by the particles ahead distant by less than : z (c-v g )/ v g [11]. This complicates the logic of the code, but it is the price to pay for tracking particles in non rigid bunches, that is even at low energy, with longitudinal crossing allowed. Particles are assembled into bunches at the input of the beam line. There is no limitation except available space for the total number of particles and available computer time.

B. Example of the output
As an example of the output, 2 gaussian bunches with σ = 0.7 mm, separated by 1 cm (360° of 30 GHz pulsing) are represented after 10 cm drift in the CLIC structure and 5 cm free drift. Initial energy is 60 MeV, charge per bunch 20 nC. The space charge effect is disconnected. The second bunch is represented shifted by 360°. An initial y transverse displace-ment of 1 mm of both bunches at the input and the transverse wakes are the source of the divergence yp of the particles recorded at the end. Initial emittance in y yp, and initial dispersion in momentum were chosen zero to exhibit the pure effect of the wakes. The grouping of macro particles close to the centres of the bunches comes from the initial gaussian distributions. The envelopes are shown for both bunches for 100% and 90% of the particles.

III. CONCLUSIONS
PARMELA has been transformed to treat carefully the action of the wake fields, using the modal description or the delta wake or another approximation. The version thus modified is called PARMTRACK [12]. All the existing parts of the code for treating accurately the action of the space charge and of the external fields have been kept unchanged.
Thanks go to G. Guignard for showing the need for a tracking program combining space charge and wake fields.