350 likes | 437 Views
An overview of TREDI & CSR test cases. L. Giannessi – M. Quattromini. Presented at. “Coherent Synchrotron and its impact on the beam dynamics of high brightness electron beams” January 14-18, 2002 at DESY-Zeuthen (Berlin, GERMANY). TREDI ….
E N D
An overview of TREDI& CSR test cases L. Giannessi – M. Quattromini Presented at “Coherent Synchrotron and its impact on the beam dynamics of high brightness electron beams” January 14-18, 2002 at DESY-Zeuthen (Berlin, GERMANY)
TREDI … … is a multi-purpose macroparticle 3D Monte Carlo, devoted to the simulation of electron beams through • Rf-guns • Linacs (TW & SW) • Solenoids • Bendings • Undulators • Quads’ • … where Self Fields are accounted for by means of Lienard-Wiechert retarded potentials
SELF FIELDS Source R(t’) Target
Motivations • Three dimensional effects in photo-injectors Inhomogeneities of cathode quantum efficiency Laser misalignments Multipolar terms in accelerating fields • “3-D” injector for high aspect ratio beam production …. on the way … • … Study of coherent radiation emission in bendings and interaction with beam emittance and energy spread
History • 1992-1995 - Start: EU Network on RF-Injectors* Fortran / DOS (PC-386 – 20MHz) Procs: “VII J.D'Etude Sur la Photoem. a Fort Courant” Grenoble 20-22 Septembre 1995 • 1996-1997 - Covariant smoothing of SC Fields Ported to C/Linux (PC-Pentium – 133MHz)FEL 1996 - NIM A393, p.434 (1997) - Procs. of 2nd Melfi works. 2000 - Aracne ed.(2000) • 1998-1999 - Simulation of bunching in low energy FEL** Added Devices (SW Linac – Solenoid - UM) (PC-Pentium – 266MHz) FEL 1998 - NIM A436, p.443 (1999) (not proceedings …) • 2001-2002 - Italian initiative for Short FEL • Today: Many upgrades -First tests of CSR in new version *Contributions from A. Marranca ** Contributions from P. Musumeci
Major upgrade to: • Accomodate more devices (Bends, Linacs, Solenoids …) • Load field profiles from files • Point2point or Point2grid SC Fields evaluation (NxN NxM) • Allowed piecewise simulations • Graphical User Interface for Input File preparation (TCL/Tk) • Graphical Post Processor for Mathematica / MathCad / IDL • Porting to MPI for Parallel Simulations • Fix Data / Code architectural dependence • SDDS support for data exchange with FEL codes • ? Smoothing of acceleration fields (still more work required) • Radiative energy loss • 5000 lines 12.000+ lines of code + pre/post processors
TREDI FlowChart Start Load configuration & init phase space Charge distribution & external fields known at time t Adaptive algorithm tests accuracy & evaluates step length t Exit if Z>Zend Trajectories are intagrated to t+ t Self Fields are evaluated at time t+ t
Present Beam Parallelization Time NOW Particle trajectory 1 Particle trajectory 2 Particle trajectory 3 Self Fields Particle trajectory k-2 Particle trajectory k-1 Particle trajectory k …………………….. ………… Node 1 Node 2 Node 3 Node n
CSR Tests with TREDI Problems: CSR cases are memory and cpu consuming Parallelization required very few particles (300 particles 4h on IBM SP3/16 nodes - 400 MHz each) The program seems much slower than expected The real enemy is the noise: Analysis and suppression of numerical noise Test cases • Basic - No compression 5 nC - 5 GeV • 500 MeV - 1.0 nC - Gaussian • 5 GeV - 1.0 nC/0.5nC - Gaussian
Collective (coherent) effect Source R(t’) Targets Source 2 Particles interaction incoherent “collision” Target
Suppression of noise • Acceleration fields • Can be very large in high energy cases • Decrease only with distance as 1/R • Produce transverse forces In the case of pure coulomb fields Regularization is obtained by giving macroparticles a finite size In the case of radiative fields Regularization is obtained by giving macroparticles a finite size in momentum space
Suppression of noise II The momentum integral can be estimated by assigning a minimum momentum dispersion The spatial integral is treated applying the Gauss theorem … Transverse Electric Field = 10-4 = 104 View angle
Suppression of noise III The integral in momentum space with a Gaussian distribution is CPU time consuming Alternative: Limit angle of “influence” of particles to force collective interactions P = impact parameter P=0 point like particles - no smoothing collisions dominate P=1 limited spread particles - collective effects are dominant P>1 spread out macroparticle - reduced interaction
Effect of impact parameter(Simulation of first bend - “basic” case)
Basic case - P=1 - No compression - 5 GeV 1.0 nC Phase space at exit still noisy !
E= 5 GeV - Q=1 nC Bunch Length
Emittance vs. z dispersion
E= 5 GeV - Q=0.5 nC Bunch Length
E= 500MeV - Q=1.0 nC Bunch Length
Conclusions • The noise suppression method has reduced the effects of SF on longitudinal phase space, without being completely effective in the transverse phase space • A rigorous model of fields regularization, relying on a realistic momentum dispersion of macroparticles will be soon implemented • The low number of macroparticles in severely limiting the reliability of the results • Diagnostic on fields will be implemented to improve insight on the smoothing procedure • The reason of the slow down of the code must be understood • Before the end of the workshop the 1000 particles case will be finished - we will see.