Code Comparison for Simulations of Photo-Injectors C.Limborg, Y.K.Batygin, SLAC, Stanford, CA 94309, USA M.Boscolo, M.Ferrario, V.Fusco, LNF-INFN, 00044 Frascati, Italy L.Giannessi, M.Quattromini, ENEA Research Center, 00044 Frascati, Italy J.-P. Carneiro, K. Floettmann, DESY, 22603 Hamburg, Germany TEST PROBLEM 1nC 10ps square pulse, 1 mm uniform transverse laser pulse No Thermal emittance 110MV/m Solenoid 2.541 kG DESCRIPTION OF CODES HOMDYN multi-envelope model based on the time dependent evolution of a uniform bunch. basic approximation: bunch represented by a uniformly charged cylinder whose length and radius vary keeping anyway uniform the charge distribution inside the bunch. algorithm very efficient and despite some strong simplifying assumptions it allows the quick relaxation of the large number of parameters involved in parameter studies, to quickly find a reasonably optimized configuration. BEAMPATH space charge potential calculated from the direct solution of Poisson's equation by cloud-in-cell method in a moving system of coordinates with Dirichlet boundary conditions at the aperture and periodic conditions in z-direction. Simulation of the beam with large energy spread is performed utilizing Green function method for interaction of particles with individual energies. PARMELA / ASTRA space charge force by Lorentz-transforming the particles position and field maps into the average rest frame of the beam. It then applies static forces to the various rings of the cylindrical map assuming a constant charge density inside a ring. This algorithm requires to have at least 5 particles in each of the cell of the cylindrical grid. PARMELA /SPCH3D fast Fourier Transform set on a 3D grid over which the electric field is solved to verify Poisson’s equation. time consuming : requires running at least 100k particles and small aspect ratios of the cell dimensions. to be used when the AR horizontal to vertical of the beam is more than 2 and when the transverse profile does not have a cylindrical symmetry. TREDI fully 3D Monte Carlo code devoted to the simulation of beam dynamics. Space charge fields computed with Lienard Wiechert formalism and taking into account the effects due to the finite propagation velocity of signals. This is accomplished by storing the histories of macro-particles, and by tracking back in time the source coordinates until a retarded condition is fulfilled. Short bunch injector simulations (as the test case) can be run also in a faster “Static” mode, where instantaneous signal propagation is assumed. The “Retarded” mode allows the simulation of a wider class of problems such as CSR effects in bendings. DESCRIPTION OF CODES HOMDYN multi-envelope model based on the time dependent evolution of a uniform bunch. basic approximation: bunch represented by a uniformly charged cylinder whose length and radius vary keeping anyway uniform the charge distribution inside the bunch. algorithm very efficient and despite some strong simplifying assumptions it allows the quick exploration of a large number of parameters, to quickly find a reasonably optimized configuration. Contact : Massimo Ferrario , Massimo.Ferrario@lnf.infn.it E zsc s Ersc s Q 2 o Rs2 Q 4 o Rs L s zs zt Ar , s Rs / s L H s , Ar , s G s , Ar , s Position from tail Slice aspect ratio in rest frame with Rs slice radius Transverse equation : “envelope equation” Longitudinal equation .. zs E acc z, t E zsc z, t E zimage z, t 3 z m e o s 2 .. . . 2c 2 k p 4 1 2 sol rf Rs s s Rs K s K s Rs Gsc s, Ar Gimage s*, Ar c s Rs Rs3 Damping solenoid focusing rf focusing space charge force image charge thermal emittance pressure DESCRIPTION OF CODES PARMELA / ASTRA Space charge force computation: Lorentz-transforming the particles position and field maps into the average rest frame of the beam. It then applies static forces to the various rings of the cylindrical map assuming a constant charge density inside a ring. This algorithm requires to have at least 5 particles in each of the cell of the cylindrical grid. PARMELA : ylloyd@qwest.net , or jbillen@lanl.gov ASTRA : Also point-to-point option available but useless In the rest frame of bunch, sample particle R r d Cloud-in-cell U Poisson Equation’s solver Lorentz-transform to moving frame Distribution of space charge of macroparticles among grid nodes Solution of Poisson’s Equation on grid o with boundary conditions U (a, z ) 0, U 0, z 0,U r , z U r , z L r Differentiation of potential grid function to determine components of electrostatic field in moving system Back to lab frame BEAMPATH space charge potential calculated from the direct solution of Poisson's equation by cloud-in-cell method in a moving system of coordinates with Dirichlet boundary conditions at the aperture and periodic conditions in z-direction. Simulation of the beam with large energy spread is performed utilizing Green function method for interaction of particles with individual energies. Contact: Yuri Batygin, batygin@slac.stanford.edu PARMELA /SPCH3D fast Fourier Transform set on a 3D grid over which the electric field is solved to verify Poisson’s equation. time consuming : requires running at least 100k particles and small aspect ratios of the cell dimensions. to be used when the AR horizontal to vertical of the beam is more than 2 and when the transverse profile does not have a cylindrical symmetry. Lienard Wiechert TREDI fully 3D Monte Carlo code devoted to the simulation of beam dynamics. Space charge fields computed with Lienard Wiechert formalism and taking into account the effects due to the finite propagation velocity of signals. This is accomplished by storing the histories of macro-particles, and by tracking back in time the source coordinates until a retarded condition is fulfilled. Short bunch injector simulations (as the test case) can be run also in a faster “Static” mode, where instantaneous signal propagation is assumed. The “Retarded” mode allows the simulation of a wider class of problems such as CSR effects in bendings. http://www.tredi.enea.it/ • Powerful for image charge problem space charge solver • Point to grid evaluation •Parallel processing •The velocity of the source particle doesn’t change on a time scale comparable to the retarded time; The contribution of acceleration fields is negligible. … similar to Parmela, GPT, ASTRA Matching initial parameters – without space charge Injection phase, electric maps of fields, initial distribution Define output quantities to compare Inside the gun : comparison with space charge Gun + solenoid + drift : comparison of codes with space charge Code Platform CPU Number of particles Mesh points Nr x Nz HOMDYN PC Win BEAMPATH PC Win 1 GHz 104 256 x 2048 50x50 mm2 0.1o (Gun) 1o (Drift) 8000 PARMELA PC Win 1 GHz 2.5 104 25 x 75 50x50 mm2 0.1o (Gun) 1o (Drift) 9846 PARMELA/ SPCH 3D PC Win 1 GHz 105 32 x 32 x 1024 Autom atic 0.1o (Gun) 1o (Drift) 1.4.104 ASTRA PC Win 1.8 Ghz 1.5 104 20 x 60 Autom atic 0.1o …5o 420 5 104 20 x 30 Auto matic Adaptive 7.5 103 5 104 20 x 30 75 slices TREDI Static PC 1.8 Ghz Integration step CPU time (sec) 25 - 1.8 Ghz TREDI LienardWiechert Mesh size hr x hz Adaptive 7.4 104 PARMELA – Different meshing Beam size, energy spread, bunch length unchanged, but Transverse emittance varies CPU time SPACE Meshing Integration Steps Number particles 9846 sec 50 x 50 mm2 1100, 0.1o then 1o 25 k 1286 sec 100 x 100 mm2 1100, 0.1o then 1o 12.5 k 445 sec 200 x 200 mm2 1100, 0.1o then 1o 6.25 k 345 sec 100 x 100 mm2 505, 0.2o then 1o 12.5 k CONCLUSION Good agreement between codes despite different treatment of the physics Physics note represented: Thermal emitance Shottky effect (ASTRA is the only code including this effect) Good approximation at initial acceleration ? Other comparisons MAFIA (P.Balleyguier CEA, R.Rimmer TJL) IMPACT (Ji Qiang) Future extension: add S-Band accelerating structure L-Band Gun for TTF • Simulation Issues for RF PhotoInjectors [ICAPS 2002] E.Colby, V.Ivanov, Z.Li, C.Limborg • Extraction from cathode First 40 ps after extraction when static field 100MV/m on cathode: – Image charge on cathode Parmela includes image charge while PIC code solves Maxwell equations – Sheer of velocities Parmela computes in frame of reference particle at a stage where spread in velocities is large; • Parameters - Ez=100 MV/m (peak on cathode) @ at 100 MHz. - Q= 1nC, uniformly distributed in space and time in a 1 mm radius x 10 ps long cylinder. - The beam is launched with 1 eV energy Velocity sheer (max(z)-min(z)) ____ Mean bunch velocity <z> ____ versus mean bunch position <z> • Good agreement for 4 codes • Parmela overestimates emittance • Need to include Shottky effect High Charge – Case of A0 experiment • DUVFEL measurements (W.Graves, D.Dowell, E.Loos, C.Limborg, P.Emma , P.Piot) Slice emittance measurement - quad scan combined with zero-crossing Simulations for reconstituting the - Slice emittance, Projected emittance -Twiss parameters 1.6 cell gun with copper cathode Bend Linac tanks 5 MeV 75 MeV Dump Solenoid = 98 A Solenoid = 108 A To get good agreement, used experimental - thermal emittance - longitudinal profile - non-uniformity of transverse profile Solenoid = 104 A