HEADTAIL Program
The HEADTAIL program
simulates the interaction between a single proton or positron bunch
and the uniform electron cloud which has built up inside the beam pipe.
The process of build up can be simulated beforehand by means of the
ECLOUD code,
so that the information about the average electron density in the beam
pipe, once the cloud has reached its stationary state, can be herefrom
extracted as a result and subsequently used as an input of the
HEADTAIL program.
The principle of the simulation is illustrated in the
following figure.
When studying 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 localised at one, or more, definite positions along the ring,
s=n × sel with
n=0,1,..,(Nint-1).
Both the cloud and the bunch are modelled as ensembles of
macro-particles (with Np
bunch macro-particles and
Ne macro-electrons in the cloud). The bunch is
also divided into Nsl 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
part of the bunch coming later.
The interaction between bunch particles and
cloud electrons is expressed by the equations of motion:
where the positions of electrons and bunch particles are represented by
the vectors xe=(xe,
ye) and xp
(s)=(xp, yp,z
p), z=s-ct being a co-moving
longitudinal coordinate; K(s) is the transfer
matrix with the focusing strengths between two interaction points;
Neme and Npk represent the
number of electrons in one macro-electron and the number of particles in
the k-th bunch slice, respectively; x
offk and
k are the transverse offset
and the rms-size of the k-th slice;
me is the rms-size of a macro-electron,
which is assumed to have finite size; F is expressed by
the Bassetti-Erskine (CERN-ISR-TH/80-06 1980) formula.
The interaction between bunch and electron cloud is simulated following
the steps that are shown in the figure above. The macro-electrons have
initially a uniform distribution which extends transversely over a region
10 to 20 times larger than the bunch rms-sizes. The initial velocities of
the macro-electrons are set to zero. The particles in the bunch are set
to have initial Gaussian distributions in each coordinate of their
6-dimensional phase space, and the bunch is subsequently sliced. The
bunch slicing is actually repeated each time the interaction starts,
because when synchrotron motion is taken into account, particles mix
longitudinally. As the bunch slice k interacts with the
electron cloud concentrated at the kick point, the particles therein
contained and the electrons receive a mutual kick; the perturbed electron
cloud acts then on the particles in the next bunch slice k+1,
whereas the slice k will be newly kicked by the electron cloud
at the next interaction point (after all the bunch particles have been
propagated using a linear transport matrix, which can optionally account
for the synchrotron motion, and have received a chromaticity kick).
Without synchrotron motion, the mechanism does not affect the head of the
bunch, which always feels a zero total force from the electrons, but it
can drive its tail unstable. The electron cloud configuration is uniformly
re-generated at the beginning of each interaction.
In this version of the code, 105 macro-electrons and 3x105
bunch macro-particles are used. The bunch is divided into 50 slices.
These parameters can be obviously changed at any time in the
#define lines of the source code.
The macro-electrons can have optionally finite size (and then in the input
file at the line Flag_for_the_e-field_calc_method_(0->no_1->soft_Gauss_2->PIC):
1 has to be set) or their electric field can be calculated by using a particle-in-cell
built-in module (set 2 in the above specified line of the input code).
The interaction starts from the slice containing particles with the
largest positive values of z. The model that we have used
allows the resolution of the head-tail motion of the bunch, as well as the
horizontal and vertical emittance and rms-sizes evolutions, both locally
and averaged over the full bunch. Similar simulations were reported
before (K. Ohmi and F. Zimmermann, CERN-SL-Note-2000-015 AP 2000)
, where the beam was represented by an ensemble of
micro-bunches with constant transverse size.
A tarred file of the C source code, the Fortran code for the field calculation, a prototype of the input file (.cfg), and a Makefile can be downloaded by clicking here. Simply untar the file with
tar -xvf headtail.tarThis will produce the files
headtail.c,
example.cfg, beambeam.f, fourtrans2.c
and Makefile plus the subdirectory fftw. Now edit
the Makefile to set the
Fortran and C compilers and relative flags.
Then type ``make''. This will create the program
xheadtail. You may ignore the compiler warnings.
Feel free to contact Giovanni Rumolo
<Giovanni.Rumolo@cern.ch> if you have any questions
or find any bugs.