100 likes | 184 Views
Learn about changes made to the SixTrack code for radiation damping, its effect on computing time, and the optimization process for particle tracking.
E N D
Changes in the RADIATION DAMPING routine in SixTrack Elena Quaranta Roderik Bruce
Outline • Some modification has been done to the code… …why? …how? …where? • any inputs changed? • new outputs added? • conclusions
…why? SixTrack radiation damping routine can track particles starting with a certain energy offset with respect to the nominal energy + 1 routine (by R. Bruce & S. Redaelli) …to study the effect of emission of synchrotron radiation particles are tracked taking into account the energy loss on every turn 6.71 keV/turn (scaled with the forth power of energy) !! more than 1million turns before particle hit the IR3 TCP (see CWG on March 18, 2013) Huge computing time (≈4 days for a 64 particles simulation)
…how? Case 1: apply large energy loss 6.71 MeV/turn x Case 2: apply small energy loss 6.71 keV/turn To guarantee at least 2 synchrotron oscillations before particle reach IR3 TCP Solution found: energy loss dependent on x-coordinate at IR3 TCP
…where? ! RADIATION DAMPING at IR3 TCP if(i.eq.1423) then if (iturn.eq.1) then do j=1,napx eLossLarge(j)=1.d0 enddo endif if (iturn.gt.1) then xTCP3 = nsig_tcp3 * sqrt(tbetax(i)*myemitx0) do j=1,napx if (eLossLarge(ipart(j)).eq.0.d0) then ejv(j) = ejv(j) - 6.71d-3*(ejv(j)/7000000.d0)**4 write(998,*)ipart(j)+100*samplenumber,iturn,6.71e-3,(ejv(j)-myenom)/myenom, xv(1,j) else … if we are at the IR3 TCP… …apply small energy loss to particle j …and at the first turn create array: 1=> do large energy loss, 0=> do realistic small energy loss If the value of the array is 0 for particle j ... If the value of the array is 1 for particle j… x-coordinate of IR3 TCP debugging output
…where? … if (xTCP3 - 1.d-3*abs(xv(1,j)).LE.100.0d-6) then ! ejv(j) is the energy in MeV for particle j ejv(j) = ejv(j) - 6.71d-3*(ejv(j)/7000000.d0)**4 eLossLarge(ipart(j))=0.d0 write(998,*)ipart(j)+100*samplenumber,iturn,6.71e-3,(ejv(j)-myenom)/myenom, xv(1,j) else ejv(j) = ejv(j) - 6.71*(ejv(j)/7000000.d0)**4 write(998,*)ipart(j)+100*samplenumber,iturn,6.71,(ejv(j)-myenom)/myenom, xv(1,j) endif endif enddo endif endif debugging output …if particle j is within 2 synchrotron oscillations from IR3 TCP… …apply small energy loss… …apply large energy loss …also for all the consecutive turn for particle j ..if farther away than 2 synchrotron oscillations from IR3 TCP… debugging output
any input changed? COLLIMATION (1) .TRUE. (2) 1 7000000 (3) 4 4.3 .0015 0. 0. "startingConditions_new.dat" 1.129E-4 75.5 … name of the external file set to 4 = “read from external file” • No new inputs are required • In the fort.3: external file containing both betatron and longitudinal phase space coordinates for each particle to be read by SixTrack to set the particle starting conditions
new outputs added? - particle ID - number of turn - energy loss (6.71 keV or 6.71 MeV) - energy offset - x-coordinate at IR3 TCP fort.998 • No new “real” outputs created • 1 debugging output:
Conclusions New routine 3.5 hours for 640 particles simulation Old routine 4 days for 64 particles simulation • The validation of the new routine is still on going: the comparison between the new simulations and the results from the previous ones is now under studied. • However, the computing time is significantly reduced using the new version of the routine: