Electron cloud simulations : beam instabilities and wakefields

121002-1 HEADTAIL is a simulation program developed at CERN which is aimed at studying the single-bunch instability arising from the interaction on successive turns of a single bunch with the cloud generated by the previous bunches. The code includes chromaticity, space charge tune spread, broad-band impedance, and detuning with amplitude for more realistic simulation. Examples of application are shown. Transverse and longitudinal wake functions are also outputs of the HEADTAIL code.


I. INTRODUCTION
Two different aspects of the electron cloud phenomenon are modeled and simulated by means of the two program ECLOUD [1] and HEADTAIL, developed at CERN.
The first program ECLOUD simulates the buildup of the electron cloud during the passage of a bunch train.It provides information on the transverse electron distribution inside the vacuum chamber, the time evolution of the total number of electrons, the energy spectrum of electrons impinging on the wall, and the corresponding heat load [2].These outputs have already proven extremely interesting both for comparison with existing data on the electron cloud in the SPS [3][4][5] and for extrapolation to the LHC, like the estimation of heat load [6] or of the pressure rise in the experimental areas [4].Furthermore, the electron density value at saturation can be used as an input to study the possible destabilizing effect of the cloud on a bunch that goes through it.
The second program HEADTAIL models the interaction of a single bunch with an electron cloud on successive turns.The cloud is assumed to be generated by the preceding bunches, and is generally assumed to be initially uniform, although other initial distributions can be considered.As observed above, its density is inferred from parallel simulations with the ECLOUD code.The electrons give rise to a head-tail wakefield, which amplifies any initial small deformation in the bunch shape, e.g., due to the finite number of macroparticles in the simulation.Without synchrotron motion, the resulting instability resembles the beam breakup in a linac [7,8].If synchrotron motion is included, the instability becomes similar to a regular transverse mode coupling instability (TMCI) [9].It induces a transverse centroid motion and also a substantial emittance growth.In our simulation, the interaction between beam and cloud is calculated by computing the electric fields of either species on a twodimensional grid, from which we then deduce the force exerted on the macroparticles of the opposite species.The code optionally includes nonzero chromaticity in both transverse planes, the additional effect of a broad-band resonator, space charge or beam-beam, and amplitude detuning.Electrons can evolve in a field-free region or in different magnetic field configurations (strong dipole, solenoid, or combined function magnet).
HEADTAIL can be used to compute the single-bunch transverse wakefield, the single-bunch instability threshold, and the instability growth rate above the threshold.It also contains all the necessary information to extract the longitudinal wakefield and the resulting potential-well distortion.Moreover, the structure of the program easily allows us to isolate single effects or to study the synergy between them.
Detailed description of the code structure and applications are presented in the following sections.

HEADTAIL
The electron cloud can act as a short-range wakefield and drive a single-bunch instability [10,11].Such kind of instability is held to be responsible for the vertical emittance blowup that is observed at the KEK B factory [12] and also for that in SPS.Next we describe the model that we have employed to simulate single-bunch effects due to the electron cloud.
A proton or positron bunch interacts with the electron cloud during its passage.When we study the single-bunch effects of the electron cloud, only perturbations of the cloud induced by the passing bunch are considered.All the relevant bunch and lattice parameters, as well as the average equilibrium density of the electron cloud along the ring, are basic input parameters for the simulation of the coupled motion between bunch and cloud electrons.For simplicity, the kick approximation is used for the action of the electron cloud on the bunch: the cloud is assumed to be localized at one or more definite positions along the ring, s ns el with n 0; 1; . . .; N int ÿ 1.Both the cloud and the bunch are modeled as ensembles of macroparticles (with N p bunch macroparticles and N e macroelectrons in the cloud).The bunch is also divided into N sl slices, which interact with the electron cloud after one another and cause the distortion of the initially uniform cloud distribution that can significantly affect the body and tail of the bunch.( where the positions of electrons and bunch particles are represented by the vectors x e x e ; y e and x p s x p ; y p ; z p , with z s ÿ ct being a comoving longitudinal coordinate; Ks is the distributed 3D focusing strength between two interaction points (the transformation of the relevant 6D vectors of the beam particles between these points is performed by appropriate 6 6 matrices); f e x; y and f p;SL x; y represent the distribution functions of the electron cloud and of the bunch particles contained in one slice, respectively; E e;p is the electric field of the electrons and of the beam, respectively, calculated by means of a particle-in-cell (PIC) algorithm adapted to our code from Schulte's Guinea-Pig code for beam-beam studies; B ext is an external magnetic field that can significantly influence the electron dynamics in the region where the cloud is expected to be the strongest.The field of the electron cloud acting on itself can optionally be included [13], though the effect during the bunch passage is small in most cases, and hence it is normally neglected.The momentum changes of electrons and beam macroparticles due to their mutual attraction are computed in time steps that correspond to the different longitudinal slices into which the bunch is subdivided.Between two interactions, the bunch is propagated around the arcs of the storage ring, where the betatron motion in both planes is modeled by a rotation matrix.Synchrotron motion is also included.Hence, the beam macroparticles slowly interchange their longitudinal positions and, in particu-lar, can move across slices between turns.The effect of chromaticity is modeled by an additional rotation matrix which depends on the energy of each particle.With a further rotation, the tune shift due to space charge or beam-beam can be introduced in the bunch motion.Depending on whether this last rotation is applied around the center of the chamber or around the center of each individual bunch slice x xz, it models either a beam-beam interaction or a space charge force.Amplitude detuning is optionally introduced as a tune dependence on the single particle actions, I x;y .Finally, a regular transverse impedance, represented by the broad-band resonator can optionally be included.Putting it all together, the transverse phase space coordinates of the generic bunch macroparticle are transformed over one turn according to

III. SIMULATION OF THE ELECTRON CLOUD INDUCED INSTABILITY AT THE CERN SPS
As explained above, our code tracks electrons transversely along each bunch passage and bunch particles over many turns.The simulated electron motion reveals how electrons are progressively focused towards the bunch region as the bunch goes by.In Fig. 2 the electron phase spaces and distributions are shown, as they appear at the end of the interaction with one bunch (having started from transverse uniform distributions).The simulation has been performed here with the PIC code; the agreement with the evolution predicted by a soft-Gaussian approximation is excellent, as may be deduced from the pictures in Ref. [14].
As far as SPS simulations are concerned (for parameters, see Table I), it is interesting to observe in Fig. 3 how an SPS bunch containing N b 8 10 10 protons would suffer a strong dipole mode instability under the effect of the broad-band impedance alone, but now this effect gets actually damped by space charge and enhanced by the electron cloud.The instability manifests itself only in the vertical plane.There are at least two good reasons to account for that: first, in the vertical plane the impedance is larger [15], and second, there is evidence that in the SPS the electron cloud is mostly localized in the arcs, where   there is a strong vertical magnetic field, and therefore the electrons are mostly pinched vertically by the passing bunch.A positive chromaticity can strongly damp the instability, as shown in Fig. 4 where the emittance growth over 5 ms is plotted for three different values of chromaticity.
In the SPS at 26 GeV=c space charge seems to play a key role, since it actually causes a coherent centroid motion even where the electron cloud alone would cause only incoherent emittance growth.Comparison of Figs. 5 and 6 reveals that space charge renders the beam motion more unstable and violent.In particular, it leads to slice centroid oscillations along the bunch.On the other hand, the simulation without space charge shows only a persistent emittance growth, occurring more or less uniformly along the bunch.The different signatures of the simulated instability for these two cases resemble the difference between the actual beam observations at SPS and KEKB.
At the SPS injection momentum of 26 GeV=c, the beam is still affected by space charge forces, which according to our simulations might be a reason for the observed difference.

IV. TRANSVERSE AND LONGITUDINAL WAKEFIELDS IN THE CERN SPS
Also wakefields can be calculated by using the HEADTAIL code.In the simulation, we displace one bunch slice (for instance, vertically by an amount y / y ), and then we evaluate the electron cloud response in terms of electric field on axis (x y 0).Normalizing this field by the amount of displacement and the number of particles contained in the displaced slice, we obtain the dipole wake function on axis (in s ÿ1 m ÿ1 , after multiplication by the factor mc 2 =e 2 ).As the field on axis is not directly related to the force exerted by the cloud on the slices that follow the displaced one, we can also evaluate an averaged dipole wake function from the net force caused by a displaced slice on later portions of the beam.In this case, instead of looking only at the field on axis, we calculate the overall force exerted by the distorted cloud on all the particles contained in one slice, and then divide by the total charge in that slice to obtain an effective electric field.Shapes in the two cases appear quite different, as shown in Figs.7 and 8.Note that the two definitions of the wake would yield the same result for a conventional dipole wakefield.Wake functions on axis reach much larger values and exhibit a spiky structure that is smoothed out to a more regular profile when the integration over the bunch slice is carried out.These plots correspond to an almost round beam in an SPS fieldfree region and are calculated for a longitudinally uniform bunch distribution.In a dipole region, the horizontal wake tends to disappear, and the vertical one becomes also weaker (see Fig. 9). Figure 10 shows the averaged  dipole wake function for the offset first slice and a Gaussian bunch distribution in a dipole field region.Even though the kick approximation allows us to use a two-dimensional model to study transverse effects, the electron cloud is in reality distributed more or less uniformly around the ring, and thus generates a longitudinal wakefield which may give rise to potential-well distortion and eventually microwave instability.The longitudinal field arises primarily from the accumulation of electrons near the center of the bunch during its passage.The code HEADTAIL does not directly compute the longitudinal electric field.However, we can obtain the latter from the time evolution of the transverse electron distribution.The idea consists of reconstructing the three-dimensional electron distribution by identifying the time during the bunch passage with the longitudinal position along the bunch.This distribution can then be postprocessed in order to compute the longitudinal electric field on a three-dimensional grid.We assume that the initial electron distribution is unperturbed and uniform, and assign a homogeneous charge distribution to the region of the grid which lies in front of the bunch.The electric field is calculated on the 3D grid points using a cloud-in-cell algorithm, and is then multiplied by the factor z=C to account for the fact that the real electrons are distributed all around the circumference C. Figure 11 displays the longitudinal electric field E z z due to the electron cloud simulated for a Gaussian bunch in the SPS.The bunch profile is also indicated.The field is negligibly small (in agreement with the estimation from a full 3D plasma physics code [16]), less than 10 V=m.To estimate the   possible bunch distortion due to this field, we assume a Gaussian energy distribution and compute the longitudinal bunch profile expected for the electron cloud potential well using where the longitudinal wake Wz, wake function from a Gaussian bunch, is related to the longitudinal electric field estimated from the HEADTAIL code by We like to call Eq. ( 3) the quasi-Haissinski solution.
Unlike the real Haissinski equation [17] for an ordinary wakefield, Eq. ( 3) is not self-consistent, since the field E z z on the right-hand side varies with the beam distribution in an unknown way.As reported in the first equality of Eq. ( 3), valid for a regular wake, the wakefield can be expressed as a convolution between the distribution function and the Green function wake W 0 : the equation can then be solved numerically for z.For the electron cloud case, such Green function W 0 is not known, and it may not even exist owing to violations of linearity and time invariance.Nevertheless, we can use Eq. ( 3) to compute the bunch profile which would be formed under the influence of the additional electric field E z z (neglecting its dependence on the bunch profile itself) and compare this with the initial distribution.A discrepancy would indicate a significant potential-well distortion and therefore would require a few more iterations to determine the selfconsistent bunch profile.
However, Fig. 12 shows that the initial and predicted distributions are very similar, and hence we do not expect a large effect of the electron cloud on the longitudinal bunch shape in the SPS.We note that the modified dis-tribution is shifted slightly forward, which compensates for the additional energy loss due to the cloud.

V. APPLICATION TO THE KEKB
So far we have shown results for the CERN SPS ring.It is interesting to show, as further applications of the HEADTAIL code, a few results from simulations of the KEKB Factory Low Energy Ring. Parameters that we have used in our simulations are summarized in Table II.Figures 13 and 14 show horizontal and vertical centroid motion for a nominal bunch under the action of an electron cloud with density 10 12 m ÿ3 and supposed uniformly distributed all along the ring.Chromaticity was set to zero in this case.A dipole motion is observable only in the vertical direction, probably because of the flatness of the KEK bunch.To illustrate the beneficial effect of chromaticity on the instability, we show first in Fig. 15 how the vertical centroid motion is damped for high vertical chromaticity.Then, in Fig. 16 the emittance growths relative to different chromaticity values are plotted on the same graph.It is clear that higher positive chromaticities can damp the coherent emittance growth otherwise predicted for zero or very low chromaticity.For the purpose of code benchmarking and validation, we show in Fig. 17 the same chromaticity scan for KEK done by Ohmi [18] with his PEI code.The agreement with our results is excellent.
FIG. 16. (Color) Vertical rms-size growth of a KEK bunch over 500 turns for different values of chromaticity (labeled in Q 0 y y Q y .Chromaticity helps against the e-cloud instability.All plots have been obtained using the HEADTAIL code.The influence of a solenoid field on the electron cloud driven single-bunch instability can also be of interest, and it has been studied in connection with the KEKB LER too, since there are solenoids along 90% of the ring.In Figs.18 and 19 the horizontal and vertical wake functions are plotted for a KEK nominal bunch and the nominal value of the solenoid field (B sol 3 mT).The difference between the two figures is that the horizontal and vertical displacements were separately applied to the first bunch slice: nevertheless, the expected effect of exciting a wake in the orthogonal plane is not quite visible in either case in spite of the coupling in the electron motion due to the solenoid.This is because the KEK bunch is very short and the solenoid field not strong enough to efficiently couple planes over one bunch pass (electron cyclotron period for B sol 3 mT is T c 12 ns, and the KEK bunch length is t b 0:053 ns).In Ref. [13] it was shown how for a long SPS bunch in a solenoid a strong effect was visible in both planes even after displacing a bunch slice only in one plane.When the coupling is effective, the wakefield becomes much weaker and the instability is likely to be cured [13], as appears from the loss of pinching shown in Fig. 20 for an SPS bunch propagated through an electron cloud in a solenoid field region (B z 0, 2.5, 10 mT).

VI. CONCLUSIONS AND OUTLOOK
In conclusion, in this paper we have described the code HEADTAIL that was developed at CERN in order to study the degrading effect of an electron cloud on the single bunch.Examples of application have been shown, with special emphasis to the CERN SPS.Growth rate of the instability and beneficial effect of chromaticity, as experimentally observed [19], have been reproduced by simulations including electron cloud, space charge, and broad-band impedance.It has also been highlighted that space charge plays a key role in destabilizing the centroid beam motion: when its effect is neglected only an incoherent emittance growth is predicted to occur.
Transverse and longitudinal wake functions have been calculated by means of the HEADTAIL code.Transverse wakes can be of great interest to predict the instability threshold from the TMCI theory, although this theory can be applied only in first approximation and needs to be adapted to this particular case.The electron cloud wake fields are not conventional, because they strongly depend on the position along the bunch from where they get excited.Work is being carried out to take into account this feature in the theory [20].Assuming the electron distributions at subsequent times to be those at subsequent longitudinal positions (with the appropriate scaling factor), the longitudinal wakefield has also been evaluated  from the output of the HEADTAIL code and found to be small.It can only slightly affect the bunch shape and is not likely to be responsible for any microwave instability.The results of the HEADTAIL code have been benchmarked against the predictions of Ohmi's PEI code: the beneficial effect of chromaticity on the electron cloud single-bunch instability for a KEK bunch has been reproduced by both codes in excellent agreement.
FIG. 3. (Color) Evolution of the centroid vertical position of an SPS bunch over 500 turns for the three labeled cases.
FIG. 2. (Color)Horizontal and vertical phase space of the electrons after a bunch has gone through (top pictures), and relative distributions (bottom pictures).
FIG. 9. (Color) Horizontal and vertical averaged dipole wake functions for a uniform SPS bunch, evaluated displacing the first bunch slice, in a dipole field region.

FIG. 7 .
FIG. 7. (Color)Horizontal and vertical averaged dipole wake functions for a uniform SPS bunch, evaluated displacing three different bunch slices at t 0, 3=10t b , and 3=5t b .The simulation has been carried out in a field-free region.

FIG. 8 .
FIG. 8. (Color)Horizontal and vertical wake functions on axis for a uniform SPS bunch, evaluated displacing three different bunch slices at t 0, 3=10t b , and 3=5t b .The simulation has been carried out in a field-free region.

FIG. 12 .
FIG.12.(Color) Equilibrium bunch density computed from the wake for a Gaussian bunch in the SPS.The Gaussian is slightly shifted.

FIG. 14
FIG. 14. (Color) Vertical centroid motion of a KEK bunch interacting with an electron cloud.Chromaticity y was set to zero.The coherent dipole oscillation reveals an instability.

FIG. 13 .FIG. 15 .
FIG. 13. (Color) Horizontal centroid motion of a KEK bunch interacting with an electron cloud.Chromaticity x was set to zero.No unstable motion is visible.

FIG. 19
FIG. 19.(Color)Horizontal and vertical wake functions along a KEK bunch that goes through an electron cloud inside a 30 G solenoid field region.The bunch head was displaced only vertically by an amount y y =10.

FIG. 20 1 FIG. 18
FIG. 20. (Color)Electron densities along the x axis after 4=5 of the SPS bunch has passed through the cloud and for B z 0, 2.5, 10 mT.This simulation result shows how the pinching effect disappears when the solenoid field is strong enough as to significantly couple the electron motion over one bunch pass.
The principle of the simulation PHYSICAL REVIEW SPECIAL TOPICS -ACCELERATORS AND BEAMS,VOLUME 5, 121002 (2002)

TABLE I .
SPS parameters used in the simulations.

TABLE II .
Simulation parameters for KEKB LER.
FIG. 11. (Color) Longitudinal electric field due to the electron cloud for a Gaussian bunch in the SPS.Bunch head is on the left.
FIG. 17. Vertical rms-size growth of a KEK bunch for different values of the chromaticity (labeled in Q 0 y Q y .Chromaticity helps against the e-cloud instability.All plots have been obtained using the PEI code by Ohmi.