Particle accelerators consists in controlled acceleration, guidage and storage of a particle beam untill it reaches the design requirements at a target location. A particle beam is usually made a several bunches of particles emitted at different time. At Fermilab, a linear particle accelerator, called A0, has been designed for fundamental research in photo-injectors. The particles accelerated are electrons emitted by a laser-excited photo-cathode. The typical bunch charge at A0 is

nC. It is let to the reader to calculate that in a bunch, the number of particles, each interacting with the others and submitted to external forces, is

. This is far from a 2-body problem, removing any hope of theoretical solution for the equation of motions, and thus, leading us to a numerical resolution of the problem.
Space charge forces are the interaction forces between the particles of the bunch. These internal forces are often neglected as their amplitude might be small compared to the external fields applied to the particles. Nevertheless, for a better modelization of the bunch evolution in the accelerator, these forces should be taken into account, especially if the bunch is compressed in one or another direction, through a compressor or a focusing element. We will further see, that even in a single drift, space charge forces should not be neglicted. Astra is a free particle tracking program, that offers the opportunity to calculate space charge with a two dimensionnal algorithm. A 3D algorithm is currently being implemented, and we propose here an inprovement of this one to allow space charge calculation for bunches going in any directions. This report will discuss the implementation of this algorithm and its testing.
This report is divided into 5 main parts, the whole trying to retrace the coherent story of my work at Fermilab. The first part will quickly present some theoretical background required for the basic understanding of this report. We will try to systematically mention references, for the curiosity of the reader to be satisfied if more complete answers are needed. The second part will focus on the first and main objective of our work: the improvement of the space charge algorithm implemented in Astra. General and technical descriptions of the method will be presented. The algorithm implemented, a succession of tests has been applied in order to validate it. Particular attention has been paid to compare theoretical expressions and simulations results. Presenting this testing phase, our third part will try to convince the reader of the validity of the algorithm. The following step consists in testing the algorithm on specific components found in particle accelerator. The main component will be a dipole, as it clearly introduced change of beam direction. Eventually, the geometry and specifications of two different accelerators have been studied in order to simulate them.
As we mentionned above the aim of our work was to modify the 3D algorithm present in Astra, for distributions that goes in any directions. The hypothesis of the beam going mainly in a straight line is thus dropped. On top of that, a meshing adapted to the bunch direction is used, resulting in a better precision for a same computational cost. We first implemented a stand alone algorithm that we integrated in Astra in a second step. Discrepencies appeared between my algorithm and the 3D algorithm currently in developpement. A long phase of debugging revealed an error of sign in the way the Lorentz transformation was done in the developpement version of the 3D algorithm from Klaus Floettman. Appart from this error, the two algorithms provides similar results. To allow a fast interpretation of the data, the comparison between several algorithm versions or several Astra simulations, multiple scripts have been written, representing more than 3000 lines of code. These scripts were written in the language
R [
7]. A modification of the way Astra outputs sigma matrices has been performed, for it to be in the most commonly used variables for phase space. Eventually we also studied the dipole fields from measurement data, and compared them with the one modelized in Astra. From our analysis, it appeared that the modelization of the dipoles should be improved in Astra. I hope that part of my work will help for the general developpment of this beautiful and free program that is Astra.
I am studying at the french graduate school SUPAERO(ISAE) that delivers an aerospace engineering master's degree. SUPAERO offers the opportunity to do, before the achievements of the studies, a gap year of 2 internships instead of a 6 months master thesis. I am glad to have been offered a position at Fermilab for one of these two internships. The writting of this report is thus required by Fermilab and by my school for partial validation of my studies. Nevertheless, I will not report only the results from my work, but I will try to present what I have learned, what helped me to understand, and try to develop this with my own philosophy, making it a personnal report. As a result of this, one can probably find that this report is unbalanceg, going sometimes into useless details, while sometimes skipping a lot of theoretical and physical background. I personnaly like figures and formulas better than long sentences, but above all, I like to understand where they come from. When discovering a subject, answers to small questions and demonstrations of small results, are the main ingredients to satisfy curiosity, develop sensitivity and better understanding of more complex systems. I thus like to report the answers from small questions I raised, because they are the ones that really matter for me as they helped me in my understanding. Small results don't ask much to be demonstrated, refering sometimes to beautiful mathematical notions, so I will report these results for them being daily useful to me, and hopefully, to somebody else. I owe most of these answers to discussions with Philippe Piot and Helend Edwards, that I would like to thank now, before reaching the aknowledgment part of this report.
MAIN NOTATIONS, VALUES AND CONVENTIONS
Subsections