Home

LIAR - A Computer Program for the Modeling and Simulation

image

Contents

1. 3 11 Correction schemes Emittance preservation in accelerators requires the application of several correction algorithms In LIAR we implemented a number of different methods 3 11 1 1 to 1 correction Standard correction scheme with dipole correctors Two choices are available 1 Least square minimization of the BPM readings using dipole correctors over a range of the linac The 1 to 1 approach means that exactly one downstream BPM is assigned to every dipole corrector The number of BPM s is equal to the number of dipole correctors Usually only correctors at high P values are used for trajectory correction This means that the information of half of the BPM s is not used in the 1 to 1 correction scheme For the least square minimization the R 2 elements of the beam transfer matrices are needed If the dipole corrector is located at location 1 and the BPM at location 2 then the Rj2 is calculated from the Twiss parameters E Ria p VP sin Aw 26 Theory concepts and features 13 where Ay is the phase advance between the two points E and E gt are the beam energies and 8 and the P functions We then solve for the dipole corrector strengths K in order to minimize all BPM readings zj 131 Ea a 2 a 2 A A Bi gt gt L2 Rig Ri ee 0 Ko min i 27 En RO ie E eS _ The straight forward Twiss calculation compare above does not include any wakefield effects This 1 to 1 optimization algorithm should ther
2. Input file nb 7 for the dispersion DFSFILE8 Input file nb 8 for the dispersion DFSFILE9 Input file nb 9 for the dispersion DOCOR t Flag to decide whether to set the correctors REF 1 Reference number to be updated with the DFS trajec tory DLUM_WAIST Calculate the luminosity loss from IP waist shifts due to the linac BMAG Calculated are the luminosity loss RMS and maximum as an average over single slices and for the whole bunch assuming that slice to slice offsets have not been corrected at the IP FILE dlum_waist out Output file BUNCH 1 Bunch to be considered O all UNIT 0 If UNIT is not equal 0 one line with the results is writ ten to the file unit UNIT The file must be opened with OPEN_FILE and closed with CLOSE_FILE EMITC 47 Calculate the optimal settings of the specified emittance bump in order to minimize emittance This is a deterministic calculation Details are explained in section 3 11 7 NAME Name of emittance bump to use must be set SETFDBK T Flag whether to set the feedbacks accordingly RESET F Flag for resetting of old feedback setpoints EMITC_MKB As EMITC but allows to optimize the emittance with feedbacks or multi knobs NAME Name of emittance bump to use must be set SETFDBK T Flag whether to set the feedbacks accordingly RESET F Flag for resetting of old feedback setpoints 48 EMITC_DEF EMITC_DEF Define an emittance bump and prepare emittance opti
3. Nominal phase of RF with respect to head of first bunch in Radian Error of RF phase A frr in Radian Nominal gradient of acceleration in GeV m Relative error of accelerating gradient A Esrad Egrad Horizontal misalignment of structure piece i in m Vertical misalignment of structure piece i in m INTEGER number indicating the structure type e g SLC has 3 different structure types dimpling The modes in each structure can have frequency errors Only a limited number of such frequency errors is actually generated and randomly assigned to structures This INTE GER number gives the error type for each structure Horizontal up and downstream beam position wrt x 0 if the RF structure i is used as an RF BPM Vertical up and downstream beam position wrt y 0 if the RF structure i is used as an RF BPM Resolution of RF BPM RF frequency of particular structure XCOR i LENGTH Length of horizontal corrector i in m XCOR i FIELD Integrated dipole field of horizontal corrector i in Tesla m XCOR i DFIELD Relative field error AB B XCOR TILT Rotation about longitudinal axis in Radian XCOR i REF Reference corrector strength Vertical corrector list The vertical correctors are described by the following information YCOR i LENGTH Length of vertical corrector i in m YCOR FIELD Integrated dipole field of vertical corrector i in Tesla m YCOR i DFIELD Relative field error A B B YCORQ TILT Rotation about
4. Wilko 39 Az kg W 13 ee w Az x1 W ki AT Ke Wr Ka Axz ks Walks with W as the vector of weights The x correspond to different lattice scale factors x For each of the n BPM s we have four measured quantities The weights are defined through inverse measurement errors Let s first consider the absolute trajectory measurement z Its measurement error has a statistical contribution a x dres and a systematic contribution Obpm from the absolute BPM misalignment The statistical error 0 17 arises mainly from the BPM resolution and is usually much smaller than the individual BPM misalignments The weight on z is then 1 O es bpm Ideally the error on the measured trajectory difference Az only has the statistical contributions of the two measurements The weights on Az are then defined by the BPM resolution ores 1 a ae 41 WA n 3 Equations 40 and 41 define the x The BPM resolution is usually much better than the BPM to quadrupole alignment and we can write approximately y 5 are i 42 2 a Ki 20Tes Therefore minimizing the dispersion makes optimum use of the BPM s and is much more efficient than Theory concepts and features 17 solely minimizing the absolute trajectory We next define a correlation matrix R17 0 0 Rize 0 0 Rise 0 0 RIAL 0 0 Ri RE 0 Rizea Riza 0 A Rie Rian 0 43 Rize Rizo 0 Ripe Re es ge Ri Rips Ria Riot Rigi Rinn Riz
5. 0 66269 i Comment Here is a MARKER for a wire scanner 13 W110444T 504 i 3 0 23400 Du Q110501T 0 05340 57 70276 106800 0 i 13 M110501T 503 5 Q110501T 0 05340 57 70276 106800 0 A Note that the type 7 here is refined into types 7 01 and 7 0001 LIAR only considers the INTEGER part of types and does not use those extensions The corrector type is specified by the first letter of its label X or Y For both TRANSPORT and MAD input decks the initial energy must be included in the LIAR command line In addition one can optionaly set the number of pieces per structure which is nominally set to 1 and the number of structures per girder which is also nominally set to 1 If NGIRDER is specified every NGIRDER structures are assigned to a girder There is no check for quads or drifts that might disrupt this girder assignment 104 Description of input files Unit Description Default 8 ioh m ora e Table III Unit numbers and default units for LIAR TRANSPORT input decks Units can be changed with the transport type 15 8 2 Wakefields The wakefields are not calculated inside LIAR It is assumed that the wakefield calculation is performed separately from the beam dynamics calculations with specialized programs The wakefields are specified to LIAR in the form of tables LIAR then calculates the convolution of the wakefields with the beam In the following we describe the wakefield tables 8
6. 7381052E 03 16 00000 4 796680 8068226E 03 15 00000 4 496888 6950982E 03 14 00000 4 197095 2000588E 02 13 00000 3 897302 1352341E 02 12 00000 3 597510 1416716E 02 11 00000 3 297718 1661893E 02 10 00000 2 997925 3258084E 02 9 000000 2 698133 6305721E 02 8 000000 2 398340 1494190E 01 7 000000 2 098547 2751879E 01 6 000000 1 798755 4453740E 01 5 000000 1 498963 5440400E 01 4 000000 1 199170 6634378E 01 3 000000 8993775 7310159E 01 2 000000 5995850 7526019E 01 1 000000 2997925 8234391E 01 0000000E 00 0000000E 00 8815681E 01 1 000000 2997925 9749197E 01 2 000000 5995850 9986860E 01 3 000000 8993775 9490541E 01 4 000000 1 199170 7611185E 01 5 000000 1 498963 4963293E 01 6 000000 1 798755 2484623E 01 7 000000 2 098547 1100318E 01 The number of specified slices must not exceed the maximum number of slices as defined in the LIAR include files 108 Subroutine and function list 9 LIST OF PROGRAM SUBROUTINES AND FUNCTIONS Here we provide alphabetical lists of subroutines and functions We also specify the file where they are located The main routine is located in the file liar f We also list the FORTRAN unit file numbers used in the program Generally numbers can be used by different subroutines as long as the files are closed at the end of the subroutine Note that the unit number 77 is reserved for the LIAR command file and must not be used by any subroutine l 1 Subroutines are define
7. Assume that the phase between the RF and the beam is right in the beginning Errors along the drive line for the RF triggers will increase linearly with the length This error runs from 0 to 2 ERROR However the energy spread is kept at a minimum in the linac using a global RF phase knob phaseramp This will put the average RF phase error to zero We obtain the type of error that is implemented with MDLERR ERROR 0 d0 Magnitude of error degree RESET F Logical flag for resetting of previous errors 54 MEAS_BPM MEAS BPM The actual BPM values are read and saved into an output ASCII file The BPM readings can be normalized with the beta functions and the beam energy FILE Name for BPM output file must be set ERROR T Flag whether to include BPM errors or not NORM F Flag whether to normalize BPM readings with Twiss or not BUNCH 1 Bunch number for BPM measurement O bunch av erage weighted with absolute charge The output file provides the following information Column Information Number 1 BPM number 2 S position m 3 Horizontal BPM reading m 4 Vertical BPM reading m 5 Horizontal normalized emittance m rad 6 Vertical normalized emittance m rad 7 Horizontal phase advance rad 8 Vertical phase advance rad 9 Horizontal beta function m 10 Vertical beta function m 11 Horizontal BMAG 12 Vertical BMAG 13 Horizontal luminosity factor 14 Verti
8. CORS standard Selection of corrector scheme STANDARD SLC XFILE X Corrector BPM association file for option SLC YFILE Y Corrector BPM association file for option SLC BPMX qf Selection of BPM s for horizontal plane C QF QD BPMY gd Selection of BPM s for vertical plane QF QD MINPHASE 1 4 Minimum phase advance between corrector and asso i ciated BPM MAXPHASE 37 4 Maximum phase advance between corrector and as sociated BPM DPOS 500 d 6 Offset in m for emittance bump calibration DANG 50 d 6 Angle in radian for emittance bump calibration SILENT F Logical flag for silent mode reduced standard out put 50 ERROR_GAUSS_QUAD ERROR_GAUSS BPM Random Gaussian misalignment of the BPM s NAME SEED RESET RESOL X MEAN X SIGMA X_CUT Y_SIGMA 1K Time OwWooo Name of BPM s to misalign specifies all The string can be used for searching on the names e g M02 SEED for random misalignments Flag for resetting previously assigned BPM errors to Zero BPM resolution in m Average horizontal misalignment in m RMS horizontal misalignment in m Sigma cut on Gaussian tails RMS vertical misalignment in m ERROR GAUSS QUAD Assign random Gaussian imperfections to the quadrupoles NAME SEED RESET BPM X MEAN X SIGMA X CUT Y_SIGMA T_SIGMA DK_SIGMA So os Name of quadrupoles to misalign specifies all The st
9. E W B D y W B D WD 64 He Ha y gt W A B X WAS wa 65 8 E WC D Y WC gt WD 66 a Y W B C y W B y WiC D W D A WD y wia 67 From equation 56 we obtain the following explicit expressions for the optimal setpoints 1 ot Ho Ky HuK 68 To A 292 Ky 12 Ke 68 ns 1 r gt HuK HeKi 69 Ay Hoo H 70 Due to limitations of the beam instrumentation the slice offsets and divergences are not known individually in a real accelerator The bump setpoints are therefore optimized manually in order to minimize the measured bunch emittance However future advances in the beam instrumentation could provide for a deterministic emittance optimization like it is described here 3 12 Observables There are many relevant observables defined in LIAR Obvious observables are the phase space positions at MARKERS and part of it at BPM s for slices whole bunches or the whole beam Also obvious are the 20 Theory concepts and features machine Twiss parameters 8 Y at all elements and for electrons and positrons We define the beam emittance with respect to the beam centroid as E 072025 oy 71 where C 2 y Qi ai 7 0 72 LL Q Fash 1 1 GE yt 12 Cir A 5 Qi K T z r ET 73 Q i No 1 a gl ny 4 Gai 0 Qi 2 T 000005 74 12 5 T iTi 7 T ag Cit 75 1 2 T Seas y Qiz 76 Q i No N Q LQ 17 t N
10. LOAD It can only be used from the interactive command level Do not use it within a command file LIAR will read all commands from the specified file and switch back to the interactive program level at its end FILE Name of input command file must be specified Exit the program This command is identical to STOP and QUIT 52 LOAD FDBK GOLD Gold the feedbacks The feedback reference information is updated to the actual trajectory offset and angle in the feedback marker BUNCH 0 Bunch number of updating information O average RESET T Reset all setpoints to zero FDBK_MISAL The feedbacks are misaligned to the neighbouring BPM s This command allows the feedbacks to follow the beamline misalignment therefore only acting on the beam offset with respect to the beamline misalignment as in a real feedback Actually the feedback reference information is adjusted NBPM 4 Number of up and downstream BPM s to consider for beamline misalignment RESET T Flag for resetting previously assigned reference infor mation See the command PLOT Execute a command file This command is identical to READ and EXEC It can only be used from the interactive command level Do not use it within a command file LIAR will read all commands from the specified file and switch back to the interactive program level at its end FILE Name of input command file must be specified LOGBOOK 53 The logbook command allows to save
11. Ralph A e Fixed tracking and correction for beams with bunches of opposite charges electrons and positrons Ralph A 10 2 Version 1 9 e Fixed bug in energy scaling for splitted quads This bug significantly affected the chromatic emittance growth with splitted quadrupoles Ralph A e Fixed minor bugs in EXPAND and DEFINE_CORR routines Tor R Ralph A e Implemented kick angle for SET_CORRECTOR routine Ralph A e Implemented MEAS_PHASE2 command Ralph A Known problems and bugs 113 11 KNOWN PROBLEMS AND BUGS This is a list of known problems and bugs e Twiss calculation The calculation of the Twiss parameters command CALC_TWISS is done using an approximation of high energy For low energy cases and a large acceleration the calculation provides unprecise results The beta function shows an apparent beating The tracking results are NOT affected by this They are correct at any energy The problem will be fixed o e Bending magnets are not treated correctly Bunch compressors cannot be simulated with LIAR A correct treatment of bending magnets will be implemented e UNIX The end of tracking analysis prints an initial energy spread of zero though it was set to non zero value in SET_BEAM This problem does not affect the tracking results 114 References 12 ACKNOWLEDGEMENTS We wish to thank Vinod Bharadwaj and Mark Woodley for their help in checking LIAR and their many useful comments 13 REFERENCES 1 K L B
12. Y1 or Y2 FIELD ERRFIELD LENGTH PSI FIELD ERRFIELD PHASE ERRPHASE LENGTH MISAL PSI BETA TRAJ RF struc tures FIELD ERRFIELD LENGTH PSI FIELD ERRFIELD LENGTH PSI TRAJ DISPERSION EMIT EMITGROWTH BEMIT BMAG LUMR SELECT X ALL S l N E PST QUAD S N E PSI STRUC S N E PSI xcoR s N E PSI YCOR S N E PSI BPM S N E l PSI 7 MARKER Z 7 TRAJ Marker s PLOT 65 DIV EMIT Now we explain the symbols that were used in the previous table in alphabetical order BEMIT Normalized RMS beam emittance for the whole beam multi bunch BETA Beta function from Twiss calculation single particle model BMAG Beta mismatch magnitude DIV RMS beam divergence for the whole beam DISPERSION Beam dispersion as measured with the last MEAS_DISP command E Absolute beam energy EMIT Normalized RMS beam emittance for a single bunch EMITGROWTH Growth in normalized RMS beam emittance for a single bunch ERRFIELD Error field value bending field focusing field accelerating field ERRPHASE Error in phase between RF and beam FIELD Field value bending field focusing field accelerating field LENGTH Element length LUMR Luminosity reduction factor similar to inverse of effective emittance MISAL Offset misalignment N Number of element PHASE Phase between RF and beam
13. cut parameters multiples of DX DY TILT DX 0 E 06 DY 0 E 06 TILT 0 E 06 XCUT 2 5 YCUT 2 5 TILTCUT 2 5 SEED 0 c Read the REAL 8 command parameters and change selected parameters to c specified values DO i 1 PAR RNUM IF PAR RNAME i EQ DX THEN DX PAR RVALUE i ELSEIF PAR RNAME i EQ DY THEN DY PAR RVALUE i ELSEIF PAR RNAME i EQ TILT THEN TILT PAR RVALUE i 4 ELSEIF PAR RNAME 1 EQ XCUT THEN XCUT PAR RVALUE 1 ELSEIF PAR RNAME i EQ YCUT THEN YCUT PAR RVALUE i ELSEIF PAR RNAME i EQ TILTCUT THEN TILTCUT PAR RVALUE i ELSEIF PAR RNAME i EQ SEED THEN SEED ROUND PAR RVALUE i ELSE WRITE ERROR gt Parameter not recognized PAR RNAME 1 ENDIF Control parameters 89 END DO This approach allows a large flexibility in adding subroutines and command parameters If a parameter is not specified in the command line its default value is used 7 6 Control parameters The central control for the debug level and the default output unit is done with the include file control inc which defined the variables DEBUG Debug level OUTLUN Default output unit screen file Those variables should consistently be used to control the debug and the standard output Local varibales with the same name must not be defined 7 7 Physics constants The include file constants inc defines physical constants that are useful in many parts
14. o e ei RARA A A A 37 5 6 Beamiset p oo ca aa EII AE RE A 37 al Wakefield SEP micca A A e e E AAA ee OR A AE 37 5 8 Accelerator imperfections eco a A AA 37 5 9 Trajectory feedbacks fs c ita e a e Ad al aa h 38 5 10 Multi device knobs eed we A a 38 SAt A O Se Se a 38 5 12 Correction algorithms eos ace ei e A AE Pe bg AE RA 38 Es A E A hee ee oes 39 E A A E Oren 39 S15 Reference data Le m s ral rd A e an ta S 40 5 16 Experimental observables 400 Y A e a SO we 40 5 17 Executing command Wes A ape A ae ae eG eo 40 3 18 Additional outpur niles soes ET gaa Bik Eee Ge E cd PS Ee EA 40 DET DES is A A RA AA A he Sk ea Wh gee a AS 40 COMMAND REFERENCE SECTION 42 ATEMOVE ui a a A rs de ns os AR 42 AUTOPHASE ca tia Os ick gyre li ad a AO a hes hah as 42 CALECTWISS gt ia A A AA TADA AI EA ar aa 43 CALC UWISSP cio tte A A A A E o OS 43 CHECK LATTICE aeae atia n AA A od eee ta 43 CORRECT e wk rene eo A oie e ieee does hits ie A owe od Soe NR AS eee 44 CORRECTES avetu eo eo ae eek E SAA ce ares a Bae eS A SOE 44 CLEOSE FILE S da ga de lts E eek eect A O E 44 DEBINE FEEDBACK ad oia aaa os ae a A ee eS 45 DERINE MULPIKNOD 03008 0 ap So eo oS co OLE Wi a ee ee a ee ae Be a ES 45 DEFINE SUPPORT acia 2 ada e at oe Bk ee dd he AOR BE ties 46 DES 58 RS ee oe a a SO AA Shaan th ade ee le Gea Brae He we 46 DLUVMEWAIST SA a ds ds Prec et a ad A VT 46 EMITE LEAR ES A DAA A 47 EMITC MKB tc tek wl OR A A e do A A Bh ph as tae Sel 47
15. where low emittance high intensity beams must be accelerated to energies in the 0 05 1 TeV range LIAR is designed to be used for a variety of different projects It has been applied to and checked against the existing Stanford Linear Collider SLC the linacs of the proposed Next Linear Collider NLC and the proposed Linac Coherent Light Source LCLS at SLAC LIAR allows the study of single and multi particle beam dynamics in linear accelerators It calculates emittance dilutions due to wakefield deflections linear and non linear dispersion and chromatic effects in the presence of multiple accelerator imperfections Both single bunch and multi bunch beams can be sim ulated It is possible to simultaneously study the acceleration of positive and negative charges in a linac Diagnostic and correction devices include beam position monitors RF pickups dipole correctors magnet movers beam based feedbacks multi device knobs and emittance bumps Several basic and advanced op timization schemes are implemented Present limitations arise from the incomplete treatment of bending magnets and sextupoles A major objective of the LIAR project is to provide an open programming platform for the accelerator physics community We invite interested scientists to join this project Due to its design LIAR allows straight forward access to its internal FORTRAN data structures The program can easily be extended and its interactive command language ensures maxim
16. 2 1 Short range transverse and longitudinal wakefields Short range wakefields are set from the command SET_SR_WEF The short range wakefields are specified by one wakefield input file which gives both the longitudinal monopole and the transverse dipole wake fields of cylindrically symmetric accelerating structures These two functions are sufficient for obtaining the behavior of an arbitrarily shaped ultra relativistic short bunch in the linac if the transverse beam size is small compared to the structure iris radius a if the orbit excursions are r lt a 2 and if the beta function is large compared to the structure period The longitudinal wakefields give the average longitudinal voltage loss per meter of structure experienced by a test particle a distance s behind an ultra ralativistic point driv ing charge of charge 1 pico coulomb The transverse wakefields give the average transverse voltage gain per meter of structure and per meter of offset of the driving charge ra experienced by a test particle a distance s behind the same point driving charge The wakefield input file is expected to begin with several lines of comments indicated by a in the first row followed by a number n of records of longitudinal data with each record giving an index not used an s position in meters and the wakefield in V pC m The parameter s should begin at zero and increase in equal increments The program reads this data and uses cubic spl
17. AXIS E Flag for emittance calculation wrt axis instead of the centroid E_GEOM E Flag for geometric emittance instead of normalized one INIT E Flag for reinitialization of beam to initial conditions MBUNCH 1 Bunch selection for detailed slice information RFBUNCH 1 Bunch selection for RF BPM DOLOG E Flag for saving end results into logbook PLANE both Plane for 1 to 1 correction X Y BOTH BUNCH 0 Selection of bunch for correction O all CORS standard Selection of corrector scheme STANDARD SLC XFILE X Corrector BPM association file for option SLC YFILE Y Corrector BPM association file for option SLC BPMX qf Selection of BPM s for horizontal plane QF QD ALL BPMY gd Selection of BPM s for vertical plane QF QD ALL MINPHASE 7 4 Minimum phase advance between corrector and asso ciated BPM MAXPHASE 37 4 Maximum phase advance between corrector and as sociated BPM ITER 1 Number of iterations BEGIN first Numter of first element for correction END last Number of last element for correction RESOL 0 RMS BPM resolution in m CUT 3 Sigma cutoff for BPM resolution errors REF 0 If REF is not equal zero then the steering will be done to the BPM reference with number REF The standard correction scheme uses correctors at QF s for the horizontal correction and correctors at QD s for the vertical correction Correction schemes may fail du
18. Beam loading loss factor in V C m Number of particles per bunch for beam loading Initial x phase advance in rad Initial y phase advance in rad Initial 2 in m Initial P in m Initial Initial ay Flag for inclusion of errors CHECK_LATTICE Check the lattice for errors inconsistencies 44 CLOSE_FILE CORRECT Standard 1 to 1 trajectory correction where a least squares solution for the whole linac is implemented The dipole correctors are set to their new values This correction depends on the zero current Twiss values Therefore it is recommended that a first correction is done with the command TRACKC PLANE both Plane for correction X Y BOTH BUNCH 0 Selection of bunch for correction 0 all CORS standard Selection of corrector scheme STANDARD SLC XFILE X Corrector BPM association file for option SLC YFILE Y Corrector BPM association file for option SLC BPMX qf Selection of BPM s for horizontal plane QF QD ALL BPMY qd Selection of BPM s for vertical plane QF QD ALL SCALE 1 Scale factor for correction to be applied REJECT 1 Threshold for kick rejection in rad The standard correction scheme uses correctors at QF s for the horizontal correction and correctors at QD s for the vertical correction Correction schemes may fail due to specifics in the used lattice A new lat tice generally has to be made working with this routine BPM s can be specif
19. EMITC DER yr ast a ad Othe ae oS id di eho BA 48 EMITE DEF MKB 2 5 9 Baie aha aod se A E OR Rom a GRE le a ote Oe a Gens 49 ERROR GAUSS BEM ocios a Pe Sr be ee ma aye ee SOS 50 ERROR GAUSS QUAD 2 2 2 34 4b hee Sie he ok bk as e ead Sow es 50 ERROR GAUSS STRUC amp o as Gees See aa A ee oe at OH GAS SE A 51 EXEC 6 2 ed Sa be Roe a sl be be eran fra hd BES e ES 51 EXIT 04 rara ya Ka The me Ry Ge Moers G Rie ge Ro ee ge say dee a ae mae GTR Ed Se Gail 51 F BK GOLD 44 5 id 204 Bak hk Oa Boge A A eae Rh ace 52 FDBR MESALS Si a und dy o SRA a Pe eh eS AA ale ATA 52 GNUBBOT taco y Ue totaled Sees NR ui RE ick Beal SA we tea Baie AA 52 LOAD 6 95 ae ee Se eee Tea He Dede ES o Su ese SaaS aS E UE OD Sai 52 LOGBOOK Bry 8 ts as de ae la A Rae Lee E Howe Ae a 53 MIDEERR Sa RE Ha ee are a we ae BERLE 53 MIB AS BEIM 2 Sut Gch or acre ee eS ss Sew ate he Be at ee ait ne G 54 Contents 3 t MEAS BUNCH m e neh a Ad taa Shae diia 55 MEAS DISPERSION ooo aaa a ee eee 56 MEAS EMIT e yo oe a ek ao a de ad Ook a A a 57 2 MEAS PHASE adas Dir id dei Bere da td ee lh es ee daa 58 MEAS PHASE rera a So OR oe ear he Gade Be Pe EE RES 59 MEAS REP 2655 6 2 65 be fogs a ales hk taal ee add y le de le ranean iene 2 60 MEAS TRAIN deso ee vested oe ti Dek Rs ee wien Sedna hy oe wed 61 MISALIGN SUPPORTS iii tt a Gea ea eS 61 OPEN FILE 20 tr a aa a We ci 61 PLOT A A AE A RA ita Ne 62 PRINT LATTICE 4 2 63 tr u E E A A e dd IA rt BG 66
20. NFIT 11 Number of downstream BPM s for x x fit NCUT 3 Number of RMS cut for elimination of bad BPM s FUDGE 1 0 Possible wakefield fudge factor for single particle phase advance The output file provides the following information Column Information Nb 1 y Number of BPM 2 S position of BPM m 3 X linac phase advance rad 4 X diff phase adv from linac to Twiss rad 5 X amplification 1 0 without WF s 6 X beta mismatch BMAG 7 Linac X beta function m 8 Design X beta function m l 9 Diff in X alpha function 10 Y linac phase advance rad 11 Y diff phase adv from linac to Twiss rad 12 Y amplification 1 0 without WF s 13 Y beta mismatch BMAG 14 Linac Y beta function m 15 Design Y beta function m 16 Diff in Y alpha function 60 MEAS_REF At each BPM a number of different references e g number 1 to 10 can be stored internally This allows for example to calculate the average X and Y emittance growth along the linac for a number of seeds The command MEAS_REF takes a specified observable X and Y and stores it into the selected reference By default each reference stores the sum the sum of the squares and the number of entries The option RESET allows to reset a reference to zero before it is filled The option SUBREF allows to subtract another reference before saving the data l CHOICE BPM Choice for observable to be put into reference P
21. TRACK_CENTR TRACK_SIGMA TRAJFIT TRAJFIT_INTERN UPPER_CASE utilities f utilities f set_beam f utilities f set_beam f liar f utilities f set_initial f correction f wakesteer f multi f multi f multi f read_lat f set_sr_wf f quadwake f set_wf_long_lr f set_wf_transv_lr f track f track f utilities f correction f correction f align_support f multi f align_support f track f trackana f correction f correction f correction_suppl f track f track f utilities f utilities f liar f Functions are defined in the following files Function COMPAR DLUM EMIT EXPHASE FIND_BPM FIND_XCOR FIND_YCOR FIND_QUAD FSWAKE GAUSS_INT GETLEN IBEAM File name correction f utilities f emit f track f read_lat read_lat read_lat read_lat set_sr_wf f set_beam f liar f ibeam f Fh Fh hh hh Subroutine and function list Subroutine and function list MCLOCK_LIAR PHASEX PHASEY RAN_EXP RAN_FLAT RAN_GAUSS ROUND rand_aix f phase f phase f rand_aix f rand_aix f rand_aix f liar f rand_win rand_win rand_win rand_win 17 20 21 28 51 52 53 54 55 56 72 73 aK 77 80 81 set_sr_wf f slcref f read_lat f set_beam f correction f read_lat f slcref f correction f set_wf_transv_lr f set_wf_transv_lr f liar f align_support dfs f align_support align_support align_support align_support align_ support align_support d s f graphics f logbook
22. TWISSG BETAX Horiz 2 function in m for all elements 7 TWISS 1 BETAY Vert function in m for all elements 7 TWISS ALPHAX Horiz a for all elements 2 TWISS i ALPHAY Vert a for all elements 2 For positrons the TWISS parameters are saved into TWISSP Accelerator support The information about the accelerator support is saved in the data structure SUPPORT SUPPORT i FOR QUAD SUPPORT i FOR STRUC SUPPORT i POINTER j SUPPORT i S1 SUPPORT i S2 SUPPORT i NATTACH Logical flag for quadrupole support only one support point Logical flag for RF structure support two support points Pointer to every element that is attached to the support struc ture 7 Lonitudinal position of first support point m Lonitudinal position of second support point m Number of attached elements for support structure 2 For positrons the TWISS parameters are saved into TWISSP Initial conditions 95 7 9 Initial conditions The initial conditions are defined with the command SET_INITIAL which reads the specified parameters and fills the common block accordingly By including the file initial inc the following information can be accessed and changed INIT X Initial horizontal position in mm INIT ANGX Initial horizontal angle in mrad INIT Y Initial vertical position in mm INIT ANGY Initial vertical angle in mrad INIT ENERGY Initial averaged beam energy in GeV INIT ESPREAD Initial energy spread og in GeV INIT E
23. a 1 to 1 correction on the fly after feedback loops that have zero setpoints For additional details see TRACK and TRACKC ORDER 2 Order of beam transport l centroid 2 beam el lipse COUPLE E Flag for coupled beam transport WF_T_SR ad be Flag for transverse short range wakefields WF _T_LR iT Flag for transverse long range wakefields WF_L SR d Flag for longitudinal short range wakefields WF_L_LR T Flag for longitudinal long range wakefields WF Q SR E Flag for transverse short range quadrupole wake fields E_AXIS F Flag for emittance calculation wrt axis instead of the centroid E GEOM F Flag for geometric emittance instead of normalized E one MBUNCH 1 Bunch selection for markers ITER 3 Number of iterations per feedback DOLOG E Flag for saving end results into logbook MBUNCH 1 Bunch selection for detailed slice information RFBUNCH 1 Bunch selection for RF BPM CORS standard Selection of corrector scheme STANDARD SLC XFILE X Corrector BPM association file for option SLC YFILE Y Corrector BPM association file for option SLC BPMX af Selection of BPM s for horizontal plane QF QD ALL BPMY qd Selection of BPM s for vertical plane QF QD i ALE MINPHASE 7 4 Minimum phase advance between corrector and asso ciated BPM MAXPHASE 37 4 Maximum phase advance between corrector and as sociated BPM CITER 1 Number of iterations for correction SILENT F Flag for silent mo
24. and analyze results It is filled during tracking with emittance growth luminosity reduction and RMS orbits At the end of the job the average and RMS over all the stored results can be calculated Alternatively all data can be written into an output file and analyzed for average and RMS values Separate sets of data can be defined Most options of the command should be used alternatively and cannot be combined FILE Name for output file if writing to file PRINT F Write data into the file specified by FILE RESET F Reset the logbook SET O Change the actual set number to the value of SET Zero has no effect Different sets are analyzed sepa rately and are appended into a single output file NEWSET F Increase the actual number of the data set by one PROCESS F Process logbook data and write analysis to unit OUT LUN The output file provides the following information note that the different sets are appended Number of seed Horizontal emittance growth Vertical emittance growth Horizontal luminosity reduction Vertical luminosity reduction Horizontal RMS trajectory offset um Vertical RMS trajectory offset um Final beam energy GeV Horizontal BMAG Vertical BMAG MDLERR Implement an RF phase error that goes from ERROR at the beginning of the linac to ERROR at the end The error changes linearly with longitudinal position s This is a main driveline MDL type of error
25. and the luminosity reduc tions are calculated and saved for all regular BPM s The RF BPM s at the beginning and the end of each structure are updated with the beam position Tracking can be done in first or second order coupled or un coupled with or without the different types of wakefields by specifying the different command parameters It is recommended always to call the simple TRACK command once after setting up the simulation The specified options will set up defaults that are used by some correction commands e g by the tracking part of QALIGN After tracking is done the command TRAJFIT can be used to fit the beam offset and angle at a specified BPM using a number of downstream BPM readings 5 12 Correction algorithms Two families of correction algorithms are available There are procedures that do not include tracking CORRECT performs a 1 to 1 correction by solving a least squares problem for the BPM s of the whole linac compare section 3 11 1 The dipole correctors are adjusted accordingly One needs to call the tracking routine afterwards CORRECT assumes that exactly one downstream BPM next QF is associated to every dipole corrector this QF The command might fail if the lattice is not set up properly Positively charged particles are handled by the command CORRECTP RFALIGN realigns the RF structures using movers at the two support points of the common girder compare section 3 11 2 Tracking needs to be called before an
26. are setup with the command SET_CONTROL 5 2 Quitting the program The program LIAR is ended with the commands STOP QUIT or EXIT 5 3 Maximum dimensional definitions Because LIAR is mainly written in FORTRAN77 the maximum dimensions for the lattice beam etc are defined before the compilation of the program They are all defined in the include file dimen sions inc and can be adjusted easily However the program must be recompiled and linked The command SHOW_DEFINITIONS allows to determine the maximum dimensions for the actual version of LIAR 5 4 Defining the lattice and the RF The second step in setting up a simulation is to define a lattice In version 1 9 lattice files can be read in as TRANSPORT decks or MAD tape files compare section 8 1 The corresponding commands are READ_TRNS and READ_MAD Magnet element types locations and strengths are defined within the lattice files Marker points should be added to the lattice files as needed e g for feedbacks The lattice can be printed using the command PRINT_LATTICE Marker points that have been defined can be listed with the command SHOW_MARKER The internal consistency of the lattice can be checked with the command CHECK LATTICE RF phases are defined in the input files In addition the command SET_RF allows to change the RF phases in any part of the accelerator to a given value In SET_RF also the final beam energy can be adjusted with an appropriate scaling of the latt
27. corrector associ ation File name for DFS file to be written Corrector scheme to be used standard SLC Definition of BPM s for x correction QD QF ALL Definition of BPM s for y correction QD QF ALL Minimum phase advance between corrector and asso ciated BPM Maximum phase advance between corrector and as sociated BPM X Corrector BPM association file for option SLC Y Corrector BPM association file for option SLC MEAS_EMIT 57 Number 1 BPM number 2 S position m If data is written to the file specified by UNIT then for each call one line containing the following informa tion is appended 1 Energy deviation for measurement 2 Final X dispersion m 3 Final Y dispersion m 4 RMS X dispersion along linac m 5 RMS Y dispersion along linac m MEAS EMIT The actual emittances at the BPM s are read and saved into an ASCII output file FILE Name for emittance output file must be set BUNCH 1 Bunch number for emittance measurement O all The output file provides the following information 1 BPM number 2 S position m 3 Horizontal normalized emittance m rad 4 Vertical normalized emittance m rad 58 MEAS_PHASE MEAS PHASE The vertical phase advance on a betatron oscillation must be generated prior to this command by SET INITIAL or SET CORRECTOR and TRACK is measured by detecting the locations of the zero crossings The method used
28. f phase f slcref f track f liar f re phase f track f phase f track f sE E E f E f served 111 112 What s new 10 WHAT S NEW Starting with version 1 8 we keep a list of major new features and improvements New commands are listed in parenthesis and upper case 10 1 Version 1 8 e Graphical output PLOT Ralph A e Multi knob definition and emittance opyimization DEFINE MULTIKNOB SET_MULTIKNOB SHOW_MULTIKNOB DEF_EMITC_MKB EMITC_MKB Tor R e Quadrupole wakefields SET_SRQ_WF Frank Z e Scale charge of selected bunches SET CHARGE Ralph A e Internal generation of LRWF frequency errors Tor R e Dimensional definitions moved into definitions inc SHOW_DIMENSIONS Ralph A e Routines for manipulating BPM references and dipole corrector fields SET_BPMREF SET_CORRECTOR Ralph A e Modified SET_SR_WF to read in any number of input lines from wakefield file Tor R e Routine to define simplified transverse long range wakefields for SLC SET_LRWF_SA Gennadi S e Mathematica interface to LIAR Allows to use Mathematica s power to analyze and process simulation results Gennadi S e Added option MEAS_SLICE_BUNCH to command TRACK in order to save all slice trajectories into output ASCII file for a selected bunch Ralph A e Fixed bug in tracking routine The transfer matrix for RF structures became ill defined for a coasting beam no change of beam energy no acceleration and no beam loading
29. for NLC and Kjgg 6 6 x 10 V C m for _ SLC 2 is the single bunch charge and L is the length of the RF structure 3 5 Optics calculations The Twiss values of the machine ellipse are calculated under the following assumptions 1 zero bunch length 2 zero current 3 no transverse wakefield effects However longitudinal beam loading can be included with the simple analytical estimate from Eq 10 The machine Twiss values are purely determined from the transport matrices of the beamline elements The same matrices that are used for tracking are used for the optics calculation However no particle tracking is done We call the result of this calculation the design model This model is used for all correction algorithms where the transport matrix between two points in the accelerator needs to be known Due to wakefields and imperfections this model is only approximately correct However it is easily known and it is sufficient for the accelerator operation as long as correction schemes are iterated In order to improve In order to divide a structure into pieces the lattice input files do not need to be changed A command parameter in READ TRNS and READ_MAD allows to break a structure into a number of pieces from within LIAR The parameters for the short range longitudinal wakefields are specified in the commands that make use of this simple ap proximation 10 Theory concepts and features the convergence of cor
30. minimize the beam emittance at so called wire markers A logbook records the emittance after 1 to 1 steering set 1 and after applying the emittance bumps set 2 After each seed the logbook is processed to show the average emittance growth for both cases We also save the average emittance luminosity factor and beta mismatch along the linac in references that are printed into ASCII files We do not go through the details of the simulation and encourage the reader to consult the reference information for each command 36 Commands in the simulation context 5 LIAR COMMANDS IN THE SIMULATION CONTEXT The theoretical concepts that were implemented into LIAR were discussed in section 3 Now we concen trate on the corresponding LIAR commands and describe how an actual simulation is put together A detailed alphabetical description of all commands is supplied in the next section Here we try to shortly explain the functionality of all commands in the context of a simulation This is helpful for determining what com mands must be specified and in what order The following steps are given in the required order for building a simulation run This section can provide an useful overview on the functionality that is implemented in LIAR 5 1 Initialization and setup Before doing anything else the program variables should be initialized to zero This is done with the com mand RESET General control parameters debug level standard output
31. site afs slac stanford edwpublic software liar release Bug fixes will generally not result in a new version number The existing version of LIAR will just be updated Every 1 2 months however a new version will be released that contains all the old features plus the new commands that have been added since the last release If existing commands are enhanced or significantly changed they will be available under a slightly changed name The original commands with their old functionality will be available under their old name We thus will try to maintain backward compatibility Theory concepts and features 7 3 THEORY CONCEPTS AND FEATURES The overall design goal for LIAR was to provide a programming platform for simulations of linear accel erators The basic structure was required to be flexible enough to include all beam physics and imperfections that are relevant to the operation and optical design of linear accelerators At the same time it had to be easy enough to allow additions and extensions by non experts A working knowledge of FORTRAN should be sufficient to join the LIAR project and to help supplying new features An interactive command language was implemented in order to ensure maximum ease of use In the following we summarize the features and basic concepts of LIAR version 1 9 In order to describe the charged particle beam transport we use the TRANSPORT formalism 1 Modifications are mainly necessary to include wakefield e
32. string can be used for searching on names e g K02 FRF Lattice RF frequency in Hz optional SCALE F Flag for scaling lattice to final beam energy ENERGY 0 Final beam energy in GeV GRAD Lattice Gradient in GeV m instead of ENERGY parameter PHASE 0 First RF phase in degree 0 PHASE6 0 Sixth RF phase in degree NSWITCH1 Name of structure to switch phase LSWITCH1 INFTY Longitudinal position of phase switch in m There is no switch if this value is larger than the accelerator length ESWITCH1 INFTY Energy of phase switch in GeV There is no switch if this value is larger than the final beam energy NSWITCHS Name of structure to switch phase LSWITCHS INFTY Longitudinal position of phase switch in m ESWITCHS INFTY Energy of phase switch in GeV KLOSS 0 Loss factor from beam loading in V C m optional CHARGE 0 Bunch charge in number of particles per bunch for beam loading optional 76 SET_SRQ_WF SET_LRWF_SA Set up simplified long range wakefields Long range wakefields from one bunch to the next are repre sented by a point like wakefield kick plus its first derivative in position z along the bunch If a structure is broken into several pieces the wakefield stays the same along the whole structure This is in contrast to the command SET_WF_TRANSV_LR that actually assigns a single wakefield mode to each cell of the structure thus allowing a more realistic representation of long range wakefields
33. 4 um Y sig 113 64 um BEAM TRAJECTORY BPM READINGS average Xav 02 um Y av 3 67 um RMS X_sig 150 00 um Y_ sig 110 48 um FINAL BETA FUNCTIONS from beam B_x 27 64 m By 51 34 m from TWISS B_x 22 13 m B_y 27 25 m FINAL ALPHA FUNCTIONS from beam Ax 7404 A y 1 403 from TWISS A_x 7051 A_y 700 FINAL GEOM EMITTANCE initial value E_x 1 29E 08 rad m E_y 1 50E 09 rad m wrt centroid E_x 4 39E 10 rad m E_y 5 51E 11 rad m wrt axis E_x 1 68E 09 rad m E_y 2 83E 10 rad m FINAL NORM EMITTANCE initial value E_x 3 00E 05 rad m E_y 3 50E 06 rad m wrt centroid E_x 3 95E 05 rad m E_y 4 96E 06 rad m wrt axis Ex 1 52E 04 rad m E y 2 55E 05 rad m This output information is explained in Table I In addition most of the results are saved at every BPM location They can be printed out into files for example in order to study the emittance growth along the linac compare summary descriptions in sections 5 13 and 5 14 NN Getting started Beam energy Initial beam energy in GeV Final beam energy in GeV Absolute energy spread in GeV start and end Relative energy spread in start and end Beam blow up gx g y bl X Y emittance growth Ae eg of the first bunch gx g y av Average single bunch X Y emittance growth Ae eo g_x g y train X Y emittance growth Ae ey for bunch train incl bunch offsets R_x Roy X Y luminosity estimate in of ideal lu m
34. 7D 04 206 16358843D 11 10981940D 15 206 2107941D 04 _ For the actual calculation of the wakefield function for SLAC examples compare 10 106 Description of input files 8 2 3 Simplified long range transverse wakefields Transverse long range wakefields can be specified in a simplified form with the command SET_LRWF_SA only for two bunches right now Wakefields from one bunch to the next are represented by a point like wakefield kick V pC m plus its first derivative in position z along the bunch If a structure is broken into several pieces the wakefield stays the same along the whole structure This is in contrast to the com mand SET_WF_TRANSV_LR that actually assigns a single wakefield mode to each cell of the structure thus allowing a more realistic representation of long range wakefields in the presence of internal structure misalignments However for many purposes the simplified treatment is adequate The input file is organized into comment lines indicated by a in the first row and data records that consist 1 of the longitudinal position s m behind the leading bunch and 2 the wakefield in V pC m We give an example of an input file SLC TRANSVERSE WAKE TRSL451 S M WAKE V PC meter meter 0 0 0 001 2541 54 0 002 3128 86 0 003 3710 29 0 004 4082 0 005 4327 14 0 496 365 829 0 497 154 343 0 498 116 049 0 499 394 657 8 2 4 Long range longitudinal wakefields Long range longitudinal wakefields a
35. BO AL ge a Slo has Alas Sa eee bs eae 75 SETIRWE SAna rar Rot ob hte Rte ee ak amp He ewe God Bole d ee ae So we 76 SETS WPa e an dd acts A o Be TAS Duo al ee 76 SET SROIWE 23 e a te ere ak hes HEME daa a 76 SET WE TRANSV LR lt a id E ek ene 77 SHOW_DEFINITIONS OB Oe ee oa te Side at le E A ae ae 78 SHOW FEEDBACK o airi gal gue eater os ed ORO Be rele e 78 SHOW MARKER coua a e Be oe eS 78 SHOW OMISALIGN a ome Feet sob a o la ENS ead er AE a E ow AA 78 4 Contents SHOW MULTIKNOB ariel e Go ba bos A AR E AAA SHOW SUPPORT cad ya A AT da HBOS e St Ses STORT cant oo on ma era a o TRACK url nicas to E a ds Be e e alte le WO Ge A TRACK C oad aa at Data Sra ii e tae an Gea Ren Sak 8 TRACKER ao e OA ASS A O a AAA Hoa TRACKE aude chow yc os ERAS A a TRACKECO uti id OS idad ds geet s he amp Bs eee r Mc TRAJEIT sra a o DI AAA E ARANA 7 DO IT YOURSELF EXTENSIONS TO LIAR THE INTERNAL DATA STRUCTURE 7 1 Understanding the command language 7 2 Adding a command and subroutine 2 o e 7 3 Accessing information from other parts of LIAR o o o ooo ee 7 4 Dimensional constants and definitions o e e 7 5 Command parameters dc a hg te ae SR A Ss cod we ee Be as as ee Os Contr l parameters rs Sas ere eS BS SAS SSS REE SOD Cae eS Tel PHYSICS CONSLANIS e ee Ae a Bk BAR Pa AAC EA a od 7S Lattice description ye arras 19 iInitialcond
36. BPM i in m Vertical dispersion at BPM i in m Tilt of BPM i in rad RMS resolution of BPM i in m Value of X reference nb k at BPM number 7 The two fields allow for example to store the sum and the sum of the squares Value of Y reference nb k at BPM number 7 The two fields allow for example to store the sum and the sum of the squares Number of entries for the reference nb k Allows to calcu late the mean RMS error on the mean Status of BPM number 7 for reference nb k O bad 1 good Status of the actual BPM inside LIAR O bad 1 good Energy in GeV of the tracked beam at the actual BPM Beam energy spread in GeV of the tracked beam Horizontal beam size during last tracking in m Vertical beam size during last tracking in m Horizontal divergence during last tracking in rad Vertical divergence during last tracking in rad Type of reference number k Character 16 92 RF Structure list RF structures are defined as physical entities allowing separate misalignments for any Internal data structure number of sub pieces ipiece STRUC i LENGTH STRUC i RFPHASE STRUC i ERRPHASE STRUC i GRADIENT STRUC i ERRGRAD STRUC i DX ipiece STRUC i DY ipiece STRUC i TYPE STRUC i ERRTYPE STRUC i RFBPM_X 2 STRUC i RFBPM_Y 2 STRUC G RESOL STRUC i FRF Horizontal corrector list The horizontal correctors are described by the following information Length of structure piece i in m
37. C1_R12Y Element number of y corrector nb 2 R12 from y corrector to marker point FDBK i C1_R22Y R22 from y corrector to marker point FDBK i C2_R12Y R12 from y corrector 2 to marker point FDBK i C2_R22Y R22 from y corrector 2 to marker point Since the internal information of the emittance bumps is likely not to be needed by many people it is not described here It can be looked up in the include file 7 12 Logbook data A logbook structure is defined for keeping results in memory It is managed with pre existing commands see above and should not necessarily be modified from other subroutines It is accessed with the include Logbook 101 file logbook inc For more details please look into this include file 102 Description of input files 8 DESCRIPTION OF INPUT FILES In order to run LIAR a number of input files needs to be supplied The standard files can be found in afs slac stanford edu public software liar release infiles Available standard files for LIAR version 1 9 at this moment include 1 slc trns SLC design lattice TRANSPORT deck 2 nlcll trns NLCIIb design lattice TRANSPORT deck 3 pre_linac tape NLC pre linac design lattice MAD file 4 srwf_nic dat Short range wakefield file for NLC 5 srwf_slc dat Short range wakefield file for SLC 6 srwf_q_slc dat Short range wakefield file for SLC with quadrupole wakefields 7 1rwf_t_slc dat Long range transverse wakefield for SLC 8 l1lrwf_1l_slc da
38. FINE_MULTIKNOB A multi knob is defined A multi knob has a number of elements attached to it Each element has a defined parameter that is to be moved by a specified scale factor A simple case of a multi knob would be a closed three corrector bump In this case three dipole correctors would be assigned to the multi knob The relevant parameters are the corrector fields Each corrector has a scale factor that is calculated such that the total bump is closed The command SET_MULTIKNOB assigns a value to the multiknob Note that multi knobs can be defined with quadrupoles structures and correctors The parameters can be field offset tilt RF phase or energy gradient NAME Name of the multi knob must be set FILE Optional input file for multi knob definitions not yet implemented CORRECT F Switch for 1 to 1 correction in multi knob region ELEMENT Name of attached element must be set PARAMETER Parameter of element to be varied must be set FACTOR O Scale factor for parameter must be set Note that the ELEMENT PARAMETER FACTOR block must be repeated multiple times in order to assign several elements to a multi knob However it must be repeated as a block Here we list the elements and parameters that are recognized Element type Recognized parameters Quadrupoles Xx gt X offset Y gt Y offset TILT gt Tilt angle FIELD gt Quadr field Structures X gt X offset Y gt Y offset P
39. HASE gt RF phase GRADIENT gt Acclerating gradient Dipole corr FIELD gt Dipole field ectors TILT gt Tilt angle 46 DLUM_WAIST DEFINE SUPPORT Define the support for the accelerator Assuming a regular lattice any number of structures can be assigned to a single girder Quadrupoles can be assigned to the same girders or can be defined with a separate support Every girder with structures on it has two support points begin and end A quadrupole plus BPM corrector has only one support point For example this allows the easy simulation of ground motion NGIRDER 0 Number of RF structures per girder must be set OSUPPORT T Logical flag for a separate quadrupole support Routine for calculation of dispersion free steering DFS solution from an absolute orbit and one or more dispersion orbits The files are expected to have been generated with the command MEAS_DISPERSION The DFS is done over the range of BPM s and correctors in the input files Note that the reference is only updated for the BPM s used for DFS at QF s or QD s and only in the provided range TRAJFILE Input file for the absolute trajectory DFSFILE1 Input file nb 1 for the dispersion DFSFILE2 Input file nb 2 for the dispersion DFSFILE3 Input file nb 3 for the dispersion DFSFILE4 Input file nb 4 for the dispersion DFSFILES Input file nb 5 for the dispersion DFSFILE6 Input file nb 6 for the dispersion DFSFILE7
40. MIADNAAWNH a The beam information is a big memory block 4 MByte with 100 bunches 30 slices and 10 macro particles Its size determines also the speed of the tracking algorithm In order to have maximum calculation speed no blank fields in data we need to use a strict convention Beam particles always MUST be accessed in the following way ICOUNT 0 DO IBUNCH 1 NBUNCH DO ISLICE 1 NSLICE DO IMP 1 NMP ICOUNT ICOUNT 1 BEAM ICOUNT CHARGE QPART BEAM ICOUNT X 6 ENERGY END DO END DO Beam and wakefield description 97 END DO An INTEGER 4 function IBEAM ibunch islice imp is provided in order to directly get the position of a beam particle in the one dimensional beam array Beam information Beam informations actual numbers of bunches slices macro particles bunch length are accessed over NR BUNCH NR SLICE NR MP NR BEAMPART NR SLICESPACING NR BUNCHLENGTH NR BUNCHSPACING Actual number of bunches in beam Actual number of slices per bunch Actual number of macro particles per slice Actual number of beam particles NR BUNCH NR SLICE NR MP Nominal distance between adjacent slices in m Nominal length of single bunch in m Nominal distance between adjacent bunches in m 98 Transverse dipole wakefields Transverse dipole wakefields are saved for each possible difference in slice bunch position CAglice bunch We always assume that the relative slice positions ar
41. MITX Initial emittance in radian m INIT EMITY Initial emittance in radian m INITNEMITX Normalized initial emittance in radian m INIT NEMITY Normalized initial emittance in radian m INIT BETAX Initial beta function in m INITBETAY Initial beta function in m INIT ALPHAX Initial a INIT ALPHAY Initial a The structure INIT refers to electrons If positrons are considered as well the initial positron information is stored in INITP Initial conditions can be defined before or after building the lattice They must be set before setting up the beam command SET_BEAM If they are changed incoming jitter the SET BEAM command must be rerun Example of use INCLUDE definitions inc INCLUDE initial inc EMITO_ELEC INIT NEMITY EMITO_POSI INITP NEMITY 7 10 Beam and wakefield description The beam is divided into bunches that are divided into slices that are divided into monoenergetic macro particles The bunches are allowed to have an arbitrary 3 dimensional charge distribution According to the distribution the charge is distributed to all slices and macro particles All bunches have the same charge distribution We assume that the wavelength of all long range wakefields is long compared to the bunch length With this assumption it is sufficient to calculate the long range wakefields for every bunch distance By supplying their slopes with respect to z the strengths of wakefields can be extrapolated within a bunch assuming
42. PRINERERS o pl BR POR AS A E a a ed AER 66 PRINTS WISS qe masa ars le da o de a Is 66 PRINT TWISSES 60 e ce ob vila de o S AA SA Bp EE eh ORE ds 66 CABINAS A he les a 67 Os or a Bs o td ea at to do la do No 67 READ Sn er aa aha uk Gus athe oe ae ee amp e is ee 68 READIMAD gt a ode eg ieee hb Bee eS hee a ee pta atk es Ey E e Y 68 READ A hn es ee ek ste AN E aoe ation A 68 READISLCORBID ar a ale Be det oR ein ee OEE Oe amp 69 READ TRNS ea te it eet eek ted hn Sh gee EO ee ee Se howe 69 REPOAVG sb Sng gues oars ioe EG See ede OMS A RE ae ae eee 69 REP SUB arias Sorc goto gi Bed te a Stee a BE BS Boks a BR BES 69 RESET ches hind a ie eae colores bw ae ane eo ts a av ia AeA ras ted A 70 REALIGN 79 bs e id a dole tebe war erat 70 RES WITCHODES aa x he Sh one peed aca Bee ee hee Dae Be ace 70 SCALE LATTICES wet wo it WOR ch ee SOL Sen Sow bs HE ae a iA 71 SENS YKICK ia Sd ke Sect eA E Bod eng tee at aa Oe 71 SENS YOUADS puece a gible at wise eee ado eG oe ate hea Ace 71 SEL BEAM 20 cs oe ok else Cil e Sided aN Ss Gales nal Ee a e oe 72 SETTBPMRER fe 90s keene ss ts eid ak akin al ia e 73 SET CHARGE it eo ooo Bok ea OR ek eR A PEPER SE SOS BORE 73 SET CONTROL Tara aos ak as See DE a a ios Ee etd Been eA 73 SET CORRECTOR 6 aba dad ed Beton e hh a heen te 73 SEL FEEDBACK oa A SEE OU O ERE CAS Eins 74 SET INTA oie She eh eral a oa Sed it al al aa 74 SET MUETIKNOB 05 2 2h lates Ste Steer om nce thet ah a a 75 SET RE se Acta
43. PSI Betatron phase advance from Twiss calculation single particle model Q Charge S Longitudinal position along the accelerator SIGE Absolute RMS energy spread in single bunch SIGE_E Relative RMS energy spread in single bunch sigma y E SIZE Absolute RMS beam size TRAJ Beam trajectory offsets 66 PRINT_TWISSP PRINT_LATTICE Prints the lattice and its parameter to unit OUTLUN Of course first a lattice must be defined from an input deck PRINT REF Command to save data from a selected reference into a file FILE Output file name REF O Number of reference to save 0 none SILENT F Logical flag for silent mode no standard output The output file provides the following information BPM number Longitudinal position s m X average value Error on average X standard deviation X root mean squared RMS Y average value Error on average Y standard deviation Y root mean squared RMS Number of entries H e FOLO N DURP UWUNEAE t PRINT_TWISS Prints the calculated Twiss parameters for electrons to unit OUTLUN PRINT_TWISSP Prints the calculated Twiss parameters for positrons to unit OUTLUN QALIGN 67 QALIGN Quadrupole and structure alignment routine Assuming that all trajectory deflections arise from quadrupoles we use the BPM readings to solve for the quadrupole offsets Using movers we align the quads in sections then use the RF BPM readings to align the RF structures to the bea
44. RF BPM IFIRST 1 First support structure to realign _ ILAST 1 Last support structure to realign SEED Time Seed for random number generator CUT 3 Cutoff in sigmas for random number distribution SILENT F Logical flag for silent mode no standard output RF_SWITCHOFF Switch off the accelerating RF and rescale the lattice after a specified location in the beamline The short range beam loading can be taken into account compare SET_RF SO O Location for start of switching off KLOSS 0 Loss factor from beam loading in V C m optional _CHARGE 0 Bunch charge in number of particles per bunch for beam loading optional SILENT T Option for silen mode reduced output SCALE_LATTICE 71 SCALE _LATTICE Scale all quadrupole and corrector strengths by a specified amount This is equivalent to an energy change and allows to evaluate the dispersion The scaling is done by attaching relative strength errors to all magnet strengths The errors can then easily be reset ERROR 0 Relative error for quadrupole and corrector strengths with respect to their nominal values If ERROR for example is 0 1 then all nominal fields are multiplied by 0 9 RESET T Logical flag for resetting previous strength errors SILENT F Logical flag for silent mode no standard output SENS_YKICK Get sensitivity of final BPM reading for kicks along the linac R12 elements DKICK 100 d 6 Strength of kick rad to be used FILE sens_ykick o
45. SLAC AP 103 April 1997 LIAR A Computer Program for the Modeling and Simulation of High Performance Linacs R Assmann C Adolphsen K Bane P Emma T Raubenheimer R Siemann K Thompson F Zimmermann Stanford Linear Accelerator Center Stanford University Stanford California 94309 U S A Version 1 9 April 1997 WWW homepage at http www slac stanford edu grp arb rwaNiar htm Work supported by Department of Energy contract DE AC03 76SF00515 DISCLAIMER NOTICE The items furnished herewith were developed under the sponsorship of the U S Government Neither the U S nor the U S DOE nor the Leland Stanford Junior University nor their employees makes any warranty express or implied or assumes any liability or responsibility for accuracy completeness or usefulness of any information apparatus product or process disclosed or represents that its use will not infringe privately owned rights Mention of any product its manufacturer or suppliers shall not nor is it intended to imply approval disapproval or fitness for any particular use The U S and the University at all times retain the right to use and disseminate the furnished items for any purpose whatsoever Notice 91 02 01 ABSTRACT The computer program LIAR LInear Accelerator Research code is a numerical modeling and simulation tool for high performance linacs Amongst others it addresses the needs of state of the art linear colliders
46. STRUCTURE We describe here how the user can add its own subroutine The internal structure of LIAR is explained in more detail The implementation of the command language allows easy use of subroutines without knowing details about their content 7 1 Understanding the command language As explained before the command language accepts commands of the following form MISALIGN_QUAD DX 5 E 06 DY 7 E 06 TILT 1 E 06 RESET T NAME Q02 This command would randomly misalign all quadrupoles in the beamline From the command line LIAR extracts the following informations 1 Subroutine to be called MISALIGN_QUAD 2 Number of REAL 8 parameters 3 3 List of REAL 8 par names CHAR 8 DX DY TILT 4 List of par values REAL 8 5 E 06 7 E 06 1 E 06 5 Number of LOGICAL parameters 1 6 List of LOGICAL par names CHAR 8 RESET 7 List of par values LOGICAL true 8 Number of STRING parameters 1 9 List of STRING par names CHAR 8 NAME 10 List of par values STRING Q02 The main program of LIAR will read a command line get the subroutine name command name and call it passing the number of parameters a list of parameter names and a list of parameter values over a COM MON block As parameter values we foresee REAL 8 LOGICAL s and STRING s at the moment If nec essary the REAL 8 values can be converted into INTEGER values inside the called subroutine ROUND utili
47. TORE FILE REF SMIN SMAX DFS CHECK DFSFILE CORS BPMX BPMY MINPHASE MAXPHASE _ The output file specified with the FILE parameter provides the following information XFILE YFILE 0 001 sE energy 0 E dfsfile standard QF t QD file to be used as input to the dispersion free steering command DFS Fractional error on beam energy This is converted into a lattice strength error Flag for establishing nominal reference by calling tracking Alternatively any BPM reference or the ac tual BPM information can be used as nominal refer ence If unit is not equal zero the dispersion results are written into the File with unit number UNIT The file must be opened and closed with the command OPEN FILE and CLOSE_FILE Silent option for command Choice of method to determine dispersion choices are energy and lattice Bunch for dispersion measurement O all Measure dispersion by adjusting errors or by chang ing the nominal values Gives the same results but can be important for calculation of Twiss Flag for restoring the original state Optional output file for dispersion vs z If REF is not equal zero then the nominal trajectory is read from the BPM reference REF Minimum s value in m for dispersion measrement Valid Maximum s value in m for dispersion measurement Flag for preparing DFS input file Everything else are DFS options Flag for printing out check of BPM
48. TRANSV_LR If wakefields shall be included in the calculation then they must be specified be fore the relevant tracking command If the bunch length is changed with SET_BEAM then the wakefields must be redefined In addition we provide the possibility to specify simplified long range wakefields via the command SET_LRWF_SA Internal structure misalignments however can not be simulated with those simplified wakefields 5 8 Accelerator imperfections Imperfections can be assigned to most beamline parameters in LIAR The commands ERROR GAUSS _ STRUC ERROR_GAUSS QUAD and ERROR_GAUSS_BPM assign Gaussian errors to the RF structures the quadrupoles and the BPM s These commands also allow to offset parameters e g simulating phase ramp Almost any subset of elements can be selected and BPM s can be misaligned with the quadrupoles The command MISALIGN_SUPPORT allows to randomly misalign the accelerator support whereas ATL MOVE moves the support points assuming the ATL approximation The command FDBK_MISAL misaligns feedback reference points to the average misalignment of the neighboring BPM s When feedbacks are used this command must be called after every change in the BPM alignment Tables of accelerator imperfections 38 Commands in the simulation context can be printed with the command SHOW_MISALIGN The command MDLERR allows to implement RF errors that result from imperfections of the drive line for the RF triggers see command 5 9 Tr
49. Theory concepts and features The result is Ra PO AO sl Ra ROTO RETO ae Ba Ae aote a NIETO a 91 The R matrix is then transformed into normalized coordinates gos Ra ARo 92 f I R 93 12 zae 93 R Bo ao B a ae Ru Vin y BBR co a 94 2 Tare p i 95 This transformation requires the knowledge of the optical functions and along the linac Assuming that they are locally correct we use the design Twiss values from the single particle model Now we can define a number of observables that describe the real linac optics 1 Centroid linac phase advance yy Y arctan 5 96 11 2 Enhancement x of linac oscillation amplitude Re vdet R 97 y Eo E 3 Linac P function pi pr y Bi as cR T sip B 98 det R where c and s are defined as en x c COs ercran 2 and s sin arctan a2 99 11 11 _ 4Note that though we write the arctan function the arctan2 function is used for the LIAR implementation Theory concepts and features 23 4 Linac a f unction R R e R p C a 8 19 j 21 sRoo l yy a 100 l det R f i where c and s are defined as above 5 The linac mag mismatch is obtained with Equation 80 the linac optical functions 6 and and the design optical functions and a In order to describe a wakefield dominated linac completely the two beam deflections must be induced along the whole leng
50. acing in m and A is the wakefield slope in Gev m 10 ppb The results are written to a file FILE autphase bns Name for output file WFA 145 Wakefield slope Gev m 10 ppb The output file provides the following information Column Information Nb 1 Quadrupole number 2 S position m 3 Absolute energy spread GeV result 4 Relative energy spread result 5 Phase advance since previous quadrupole 6 Distance to previous quadrupole CALC_TWISS 43 CALC_TWISS Calculate e Twiss values for the actual lattice and optics The Twiss values are determined from the transfer matrices R zero bunch length The RF acceleration can be roughly corrected for single bunch beam loading effects Assume electrons The command can take its initial values from the Twiss array e g only if specified in MAD input deck KLOSS 0 CHARGE 0 PSIX Twiss PSIY Twiss BETAX Twiss BETAY Twiss ALPHAX Twiss ALPHAY Twiss ERRORS f Beam loading loss factor in V C m Number of particles per bunch for beam loading Initial x phase advance in rad Initial y phase advance in rad Initial 2 in m Initial 6 in m Initial o Initial Flag for inclusion of errors CALC _TWISSP Calculate the e Twiss values for the actual lattice and optics Same algorithm as for electrons compare CALC_TWISS KLOSS 0 CHARGE 0 PSIX Twiss PSIY Twiss BETAX Twiss BETAY Twiss ALPHAX Twiss ALPHAY Twiss ERRORS ff
51. ad Bunch energy GeV Bunch charge C Horizontal whole beam emittance m rad Vertical whole beam emittance m rad MISALIGN_SUPPORT Randomly misalign the accelerator support that was previously defined with the command DE FINE_SUPPORT SIGX 0 Horizontal RMS misalignment m SIGY 0 Vertical RMS misalignment m SEED Time Seed for random number generator CUT 3 Cutoff in number of sigmas for misalignments RESET E Reset old misalignments QUAD _ T Misalign quadrupole support points STRUC UT Misalign structure support points OPEN_FILE Open an ASCII file UNIT 0 Unit for file number to open FILE File name 62 PLOT The PLOT command provides for scientific and ready to publish quality plots through the gnuplot program The use of the external gnuplot program is completely transparent for the user and does not require any knowledge of this program Gnuplot 15 is freely available for almost any computer platform and LIAR assumes that the gnuplot 3 6 beta release is installed in the path of the program The LIAR graphics allows to graphically visualize almost any internal information in plots The output is send to the screen or and to PS or EPS files or and to a postscript printer 1 Horizontal axis SELECT BPM Selection of elements to be used for plots This pa rameter puts constraints on valid choices for the hor izontal and vertical axes Valid selections are listed later X S Choice for horizont
52. ad_lat f MDLERR utilities f MEAS_BPM track f MEAS_BUNCH track f MEAS_DISPERSION d s f MEAS_EMIT track f MEAS_PHASE phase f MEAS_PHASE2 Phase f MEAS_REF utilities f MEAS_TRAIN track f MISALIGN_SUPPORT align_support f NO_BLANKS liar f OPEN_FILE utilities f PARSE liar f PARSE TRNS read_lat f PRINT_LATTICE read_lat f PRINT_REF utilities f PRINT_TWISS PRINT_TWISSP PROCESS_PAR read_lat f read_lat f liar f a A A ee ee ee _ _ _ 2 _ _ _ _ 0 _ _ _ o _ c _ _ _ QALIGN align_support_suppl f RAN_INIT rand_win f rand aix f READ_MAD read_lat f READ_SLC slcref f READ_SLC_ORBIT slcref f READ_TRNS read_lat f REF_AVG slcref f REF_PRINT slcref f REF_SUB slcref f RESET liar f RESET_PAR liar f RESID correction f _ RF_SWITCHOFF utilities f RFALIGN align_support f RMAT_BEND track f RMAT_DRIFT track f RMAT_QUAD track f RMAT_STRUC1 track f RMAT_STRUC2 track f RMAT_XCOR track f RMAT_YCOR track f RTRACK track f RTRACKC correction_suppl t SCALE_LATTICE dfs f 110 SENS_YQUAD SENS_YKICK SET_BEAM SET_BPMREF SET_CHARGE SET_CONTROL SET_CORRECTOR SET_INITIAL SET_FEEDBACK SET_LRWF_SA SET_MULTIKNOB SET_MULTIKNOB_DO SET_MULTI_ELEMENT SET_RF SET_SR_WF SET_SRQ_WF SET_WF_LONG_LR SET_WF_TRANSV_LR SHIFT_UP SHIFT_DOWN SHOW_DEFINITIONS SHOW_FEEDBACK SHOW_MARKER SHOW_MISALIGN SHOW_MULTIKNOB SHOW_SUPPORT TRACK TRACKANA TRACKC TRACKF TRACKFC
53. ajectory feedbacks Feedbacks compare section 3 11 6 can be defined at every marker point compare section 8 1 us ing the command DEFINE FEEDBACK The feedback setpoints are set and reset with the command SET_FEEDBACK This command also allows to change the active plane of a feedback X Y BOTH NONE giving the possibility to switch off feedbacks A list of feedbacks is printed from the command SHOW_FEEDBACK The command FDBK_MISAL references the feedbacks to the BPM misalignment as in an actual feedback where the BPM readings are fitted The feedbacks can be golded using the command FDBK GOLD which means that the feedback reference information is updated to the actual trajectory off sets at the feedback marker point 5 10 Multi device knobs Multi device knobs e g N corrector closed bumps can be defined with the command DE FINE MULTIKNOB Devices that can be specified within a multi device knob include quadrupoles RF structures and dipole correctors Parameters that can be changed include transverse misalignments magnetic fields longitudinal rotation angles RF phases and gradients The value of a multi device knob is changed with the command SET_MULTIKNOB Existing multi device knobs can be displayed using the command SHOW_MULTIKNOB 5 11 Tracking When the relevant pieces of information are set up the command TRACK will track the beam through the beamline During tracking the bunch positions the emittances the BMAG s
54. ake is generated Although typically much weaker than the dipole wake the quadrupole wake may not always be neglected since it is not easily recognized and its effect can be orthogonal to that of the dipole wake The implementation in LIAR closely follows the prescription by Chao and Cooper 11 Two types of quadrupole moments exist a normal quadrupole moment 2 1 and a skew quadrupole moment 24 2 Which are defined by Qu lt 2 gt lt gt 16 Qu 2 lt 2y gt 17 The wake field generated by a slice with quadrupole moments Q4 and 2 gives rise to a Lorentz force on another slice following a distance z behind it 11 which reads g rg FA Ze K e e z e 5 W z Qui 13 y Qulu 29 18 where W z is the quadrupole wake function and and denote unit vectors in the horizontal and vertical direction In LIAR only the short range quadrupole wake field is implemented For the kth slice the transfer matrix through a half structure of half length L is given by 11 1 0 0 0 1 0 Rguad e E 0 ES 0 1 9 q 0 q 1 where a n Yk YN Walz e Dit 20 i 1 and i _Te L da Yy zi Zk Qa 2 1 21 k i l The sums are taken over all the previous slices and N is the charge of slice i in units of e The quadrupole moments of the th slice are Pati Ozz Oyy ui ers Y 22 and Quai 20 xy i 22iy 23 where the o s denote elements of the sigma matrix for the ith slice The quadrupole
55. al axis Valid selections are listed later XPLANE X Selected plane for horizontal axis XMIN automatic Minimum value for X axis automatic if not speci fied XMAX automatic Maximum value for X axis automatic if not speci fied MARKER LAST Name of marker for SELECT MARKER 2 First vertical axis Y1 TRAJ Choice for first vertical axis left Valid selections are listed later PLANE1 X Selected plane for first vertical axis BUNCH1 1 Bunch selection for first vertical axis Y1MIN automatic Minimum value for first Y axis automatic if not spec i ified YIMAX automatic Maximum value for first Y axis automatic if not specified TITLE1 automatic Title for first Y data selection automatic if not speci fied LINTYPE1 lines Choose plot type for first data series Choose from lines points linespoints impulses dots steps fsteps histeps boxes boxerrorbars financebars candle sticks or vector This is passed directly to gnuplot and therefore it is important to type in lower letters PLOT 3 Second vertical axis Y2 ta PLANE2 em BUNCH2 1 Y2MIN automatic Y2MAX automatic TITLE2 automatic LINTYPE2 lines 4 Output options TERM T or F PS F or T PSFILE LIAR ps EPS iF EPSFILE LIAR eps PRINTER 5 Plot options Choice for second vertical axis right If not specified then there is only one set of data Valid selections are listed later Selected
56. al direction in Radian BEND i EDGE1 BEND i EDGE2 Lattice description 91 BPM list All BPM s share the same basic structure During each tracking the beam positions and emittances for all bunches are saved BPM i XBEAM j BPM i YBEAM j BPM i XEMIT j BPM i YEMIT j BPM i XEMITALL BPM i YEMITALL BPM i XLUMEF BPM i YLUMF BPM i XBMAG j BPM i YBMAG j BPM i DX BPM i DY BPM i ETAX BPM i ETAY BPM i TILT BPM i RESOL BPM i XREF k 2 BPM i YREF k 2 BPM i NREF k BPM i REFSTAT k BPM i STATUS BPM i ENERGY BPM i ESPREAD BPM i XSIZE BPM i YSIZE BPM i XPSIZE BPM i YPSIZE REF_BPMY k Horizontal position of beam in BPM i in m saved during last tracking for all bunches 7 wrt axis x 0 Vertical position of beam in BPM i in m saved during last tracking for all bunches 7 wrt axis y 0 Horizontal bunch emittance saved during last tracking for all bunches 7 Vertical bunch emittance saved during last tracking for all bunches 7 Horizontal beam emittance saved during last tracking Vertical beam emittance saved during last tracking Average X luminosity reduction for bunch train Average Y luminosity reduction for bunch train Horizontal BMAG saved during last tracking for all bunches 7 Vertical BMAG saved during last tracking for all bunches j Horizontal misalignment of BPM i in m Vertical misalignment of BPM i in m Horizontal dispersion at
57. and and its parameters should be supplied as well 7 3 Accessing information from other parts of LIAR _ Any added subroutine needs to access internal information from other parts of LIAR All important infor mations in LIAR are organized in FORTRAN records Records are an extended FORTRAN feature that is available for most FORTRAN compilers Records have the power to combine components of different types into a single structure This will become clear later The records are defined in include files and put into COMMON blocks They can then be accessed by including the proper include files e g INCLUDE definitions inc INCLUDE par inc Dimensional constants Command parameters INCLUDE control inc Control parameters INCLUDE constants inc Physics constants INCLUDE lattice inc Lattice description INCLUDE initial inc Initial conditions INCLUDE beam inc Beam description INCLUDE logbook inc t Logbook data INCLUDE feedback inc Feedback loops and emittance bumps From the documentation of the include files on the following pages it is seen how all kinds of specific informations are accessed Note that dimensions inc ALWAYS must be included as the first include file 7 4 Dimensional constants and definitions All basic dimensional constants are defined in the include file definitions inc It MUST be included as the FIRST include file Manipulating the dimensions in this file allows to adjust LIAR t
58. atrix Rf transports the beam through one half of the structure It takes into account the acceleration and longitudinal beam loading The matrix Rp describes the transverse wakefield deflections experienced by each slice of the beam Transverse wakefield kicks are thus lumped together into the middle of the structures This ansatz is refined by breaking up the structures into many pieces Each structure piece is then treated with the ansatz shown above Tracking through the RF structures involves convoluting the beam with beam excited transverse and longitudinal wakefields 3 4 Beam energy and RF phases A major problem in the operation and optimization of a linear accelerator is the choice and implementation of the right phases between the beam and the accelerating RF Adjustments in the RF phases allow for example the implementation of bunch compressors or BNS damping Changing the RF phases will modify the effective acceleration and the beam energy It is necessary to readjust the beam energy to its design value and to scale the quadrupole strengths accordingly Longitudinal wakefields will cause further energy loss that must be compensated in order to avoid a lattice mismatch LIAR provides for a consistent way to adjust the RF phases and the final beam energy The energy loss E from single bunch longitudinal wakefields is estimated in lattice calculations from 5E Koss Q L 10 where K ogg is the loss factor e g Kjggg 5 05 x 10 V C m
59. cal luminosity factor 15 Beam energy GeV 16 Relative beam energy spread 17 Horizontal beam size m 18 Horizontal divergence rad 19 Vertical beam size m 20 Vertical divergence rad 21 Absolut energy spread GeV MEAS_BUNCH 55 MEAS BUNCH At each marker location the phase space information for a single bunch is available This bunch is specified with the MBUNCH option in the tracking commands The command MEAS BUNCH allows to print the phase space information for all beam slices at a marker position into an ASCII file For printing a list of available markers refer to the command SHOW_MARKER Markers must be defined in the input deck FILE Name for output file must be set MARKER Name of marker must be set BUNCH 1 Bunch number to be used for retrieving internal z info The output file provides the following information Colum Information Number 1 Slice number 2 Horizontal slice offset X m 3 Horizontal slice angle X rad 4 Vertical slice offset Y m 5 Vertical slice angle Y rad 6 Horizontal norm slice emittance m rad 7 Vertical norm slice emittance m rad 8 Slice energy GeV 9 Slice charge C 10 Longitudinal slice position z m 56 MEAS DISPERSION MEAS DISPERSION Measure the dispersion by changing the beam energy or by changing the lattice strength Optionally write ERROR INIT UNIT SILENT _ CHOICE BUNCH DESIGN RES
60. ces k MARKER i ENERGY k Energy in GeV for all slices k MARKER i Q k A Charge for all slices k The slice informations are saved only for the bunch specified by the parameter MBUNCH during the last tracking 94 Internal data structure List of relevant numbers In order to use the information above one needs to know the number of elements quad s NUM ELEM NUM QUAD NUM PIECE_ PER_STRUC NUM PIECE NUM STRUC NUM SUPPORT NUM GIRDER NUM STRUC_TYPE NUM STRUC_ERRTYPE NUM BPM _ NUM BEND NUM XCOR NUM YCOR NUM MARKER NUM SUPPORT Total number of elements in lattice Total number of quadrupoles Number of pieces each accelerating structure is divided into Total number of pieces of accelerating structures Total number of structures Total number of support structures girders Total number of girders obsolete Number of different structures in lattice Number of structure types with different frequency errors which are randomly assigned to the structures Total number of BPM s Total number of bending magnets Total number of horizontal correctors Total number of vertical correctors Total number of markers Total number of support structures defined Twiss parameters When calculated the e Twiss parameters are saved into the following structure for all elements TWISS 1 PSIX Horiz phase advance in rad for all elements TWISS i PSTY Vert phase advance in rad for all elements 7
61. d after this command Another family of commands includes the tracking part TRACKC will track the beam through the lattice and do a 1 to 1 correction on the fly compare section 3 11 1 This is a fast and easily converging correction algorithm The 1 to 1 correction assumes that exactly one downstream BPM next QF is associated to Commands in the simulation context 39 every dipole corrector this QF The command might fail if the lattice is not set up properly TRACKCP handles positively charged bunches TRACKF tracks through the lattice while adjusting the feedbacks at the same time Finally TRACKFC tracks while adjusting the feedbacks and performing a 1 to 1 correction after feedbacks with zero setpoints Those commands offer the same options as the TRACK command compare section 5 11 QALIGN is another correction algorithm that includes the tracking It is the most complex optimization routine in LIAR Based on the BPM readings QALIGN solves a least squares problem for a beam based alignment of quadrupoles and RF structures compare section 3 11 2 This routine involves multiple tracking and the solution of large matrices It is therefore relatively slow Beware that QALIGN assumes that there is a BPM at every quadrupole location This requirement is different than the requirement for 1 to 1 correction Quadrupoles are assumed to be splitted with the BPM in between At the border between neighboring sections dipole correctors are needed i
62. d commands can be entered interactively or read in as a command file by specifying LOAD FILE filename at the LIAR prompt alternatively the READ or EXEC commands can be used Note that exclamation marks indicate comments In this example the command names are printed in upper case all options in lower case Note however that LIAR is not case sensitive though UNIX file names are We first show the complete command input file We then will go through the details of the command file explaining every step RESET all I READ_TRNS infile infiles slc trns energy 1 19 npiece 1 I SET_RF energy 46 k scale bes kloss 0 66d14 charge 3 5d10 phasel 222 lswitchl 800 phase2 16 5 i CALC_TWISS betax 3 40 betay 3 08 alphax 0 156 alphay 0 066 i Getting started 31 SET_INITIAL x 200 d 6 y 200 d 6 energy 1 19 espread 0 014 nemitx 3 d 5 nemity 0 35d 5 match SET_BEAM current 3 5d10 blength 1100 d 6 nb 1 ns 20 nm 3 SET_SR_WF file infiles srwf_slc dat 1 TRACK MEAS_BPM file bpm dat Now we step through this input file and explain the commands and their options Note that we do only specify the necessary options Many more options exist but we use their default values In the first simulation step all data areas are initialized to zero RESET all Now we read in an SLC transport deck define the injection energy and te
63. d emittance bumps SHOW_MISALIGN Print information about the misalignment and connected information The standard setup prints a summary of RMS misalignments and errors to the standard output In addition one or more beamline element types can be selected for ASCII table output into a file QUAD F Logical flag for output of quadrupole information BPM F Logical flag for output of BPM information RF F Logical flag for output of RF structure information BEND F Logical flag for output of bending magnet informa tion XCOR F Logical flag for output of X corrector information YCOR F Logical flag for output of Y corrector information FILE Generic filename for output The extension is added depending on the beamline element type BUNCH 1 Bunch number for BPM reading output The files contain the following informations for every structure piece one obtains one line of output Element type File extension BPM number S position m X misalignment m misalignment m BPM reading m BPM reading m beam position m beam position m emittance m rad emittance m rad luminosity reduction RO0O00J30U pun A KXKXxK oK eH SHOW_MULTIKNOB 79 Y luminosity reduction Quadrupole number S position m Rel strength error X misalignment m Y misalignment m Tilt rad Integrated field Tm SND UW BPWN EP Structure number S positio
64. d in the following files ADJUST_LATTICE utilities f ATL align_support f ATLMOVE align_support f AUTOPHASE align_support f CHECK_LATTICE read_lat f CALC_LUMF track f CALC_LUMF2 track f CALC_TWISS read_lat f CALC_TWISSP read_lat f CLOSE_FILE utilities f CONV_QUADW quadwake f CONV_LONG track f CONV_TRANSV track f CORR_BPM d s f CORRECT correction f CORRECT_QUAD correct_quad f _ CORRECTSQUAD correct_quad f CORRECTSQUAD2 align_support_suppl f CORRECTP correction f COVAR correction f CSPLIN set_sr_wf f DEFINE_FEEDBACK correction f DEFINE_MULTIKNOB multi f DEFINE_SUPPORT align_support f DFSX d s f DFSY dfs f DLUM_WAIST utilities f DOTRAJFIT phase f DUMMY addition f EMIT2 emit f EMITC correction f EMITC_DEF correction f EMITC_DEF_MKB emitc_mkb f EMITC_MKB emitc_mkb f ERROR_GAUSS_BPM ERROR_GAUSS_QUAD ERROR_GAUSS_STRUC error_gauss f error_gauss f DEFINE_CORR correction f error_gauss f ERROR_HANDLE liar f EXPAND liar f FDBK_GOLD align_support f 7 FDBK_MISAL align_support f Subroutine and function list 109 GET_2ND quadwake f GET_ESPREAD track f GET_ESPREAD2 track f GET_POS track f GET_POS2 track f GNUPLOT graphics f HECOMP correction f HOLVE correction f LINEFIT align_support f LINLSQ correction f LOAD liar f LOGBOOK track f MAT_MULT re
65. d to the LCLS project at SLAC 15 GeV the CLIC project at CERN and to studies of a possible future 2 5 TeV linac The program can be applied to a broad range of problems that vary widely in energy and beam parameters Interested scientists are explicitly invited to join the LIAR project and to contribute new features com mands The LIAR code is put into the public domain and can be used and distributed freely However we expect that publications that contain LIAR results make proper reference to this user s guide In addition we ask that any extensions and modifications to this program are made available to the scientific community for free usage Contributions and questions should be submitted by e mail to assmann Oslac stanford edu 2 1 Cross checks The name of this program does not indicate that all its results are wrong Indeed some effort was invested to make sure that LIAR provides correct answers LIAR results were cross checked against the following computer programs e Transport 1 e LTrack 2 e Turtle 3 e Private codes from Raubenheimer Adolphsen and Kubo 4 The results show excellent consistency In addition SLC measurements were simulated with very good _ agreement However as always there is no kind of warranty that results are correct Bugs probably exist and LIAR might occasionally lie Problems should be reported by e mail to assmann Oslac stanford edu 2 2 Compatibility The LIAR code is mai
66. de no standard output The standard correction scheme uses correctors at QF s for the horizontal correction and correctors at QD s for the vertical correction Correction schemes may fail due to specifics in the used lattice A new lat tice generally has to be made working with this routine BPM s can be specified with a search string e g BPMY MY will select all BPM s with names that start with MY 84 TRAJFIT TRAJFIT Fit the trajectory offset and divergence at a location with NBPM downstream BPM readings The fit is calculated analytically and is done for both planes Results are printed to standard output An internal version of this routine is available passing the results as arguments ELEMO NAME NBPM BUNCH REFNUM ERROR WFUDGE SILENT oo ue l E Number of element where x x y and y are to be fitted Either ELEMO or NAME must be specified Name of element where x x y and y are to be fitted Either ELEMO or NAME must be specified Number of downstream BPM s to be included in the fit Number of bunch that is used for the fit 0 all Number of reference that is subtracted from the BPM information 0 none Logical flag to include BPM offset errors Possible wakefield fudge factor to adjust for defo cussing effect of wakefields 1 no wakefields Logical flag for silent mode less standard output Internal data structure 85 7 DO IT YOURSELF EXTENSIONS TO LIAR THE INTERNAL DATA
67. ds UMAD or UTRANS A list of recognized lattice elements and their TRANSPORT codes is given in Table II Note that bending magnets are not treated correctly in LIAR version 1 9 This is an example of part of an SLC input file Di Q110401T 0 05340 57 11113 106800 0 13 M110401T 503 5 Q110401T 0 05340 57 11113 106800 0 i 3 0 02700 f A 11 K1100411 0 32680 0 006069 0 0 10 5 7 01 X110402T A _ Note that all specified numbers in the TRANSPORT deck are assumed to be real numbers Integer numbers are not allowed Description of input files 103 Element Param 1 Param 2 Param 3 UAD Aperture em Length m A E GeV degree 6 7 Ca Tdegres Table II Definitions and conventions for TRANSPORT input decks that are recognized by LIAR Some element types use a specific convention for labelling Note that bending magnets are not yet implemented correctly in version 1 9 Note further that parameters which have no importance for some elements indicated by may be omitted Any specified types and parameters MUST have type REAL e g do use O instead of 0 Units can be changed with type 15 For unit numbers see Table III LL K1100412 0 25000 0 004643 0 0 10 5 i 7 0001 Y110403T 11 K1100413 1 60481 0 029803 0 0 10 5 i 3 2 0 86249 11 K1100414 2 18161 0 040514 0 0 10 5 H 3 0 86249 11 K1100415 3 04410 0 056531 0 0 10 5 11 K1100416 2 18161 0 040514 0 0 10 5 3
68. e 1 ely The underscore _ is added automatically by the command line parser 4 Command options consist of the option name and its value The values are assigned with an equal sign Itis essential that the values are specified in the following way a Logicals are specified by t T f or F e g couple t If a parameter is specified without an equal sign then it is assumed to be of type logical and to have the value T So specifying couple is equivalent to couple t b Character strings must be enclosed in SINGLE quotes e g file run TEST Note that UNIX filenames are case sensitive though LIAR is not c Every parameter that is not recognized as a logical variable or a character string and that contains an equal sign is read in as a REAL value Therefore failing to obey to the rules described will result in errors 5 Each input line can take a maximum of 80 characters A single command is allowed to take up to 10 input lines 9 continuation lines 6 Comments are indicated by Everything which follows on the particular input line is disregarded 7 The use of TAB s is not allowed It will result in errors This is an example of a valid command line syntax ERROR_GAUSS_QUAD X_SIGMA 5 E 06 comment Y_SIGMA 7 E 06 comment A T_SIGMA 1 E 06 comment NAME Q02 comment Lines of comments within the scope of a single command are not allowed The follow
69. e Wake Field Effects in High Intensity Linacs Part Acc Vol 13 p 1 12 1983 12 K Bane and P Wilson private communication 13 T O Raubenheimer and R D Ruth A Dispersion Free Trajectory Correction Technique for Linear Colliders Nucl Instr and Meth A302 1991 191 14 W Spence Unpublished note August 1995 15 See one of the several home pages of the gnuplot project For example http ww nas nasa gov woo gnuplot info html
70. e ee ee EE US ewe Se ed 3 11 Correction SCHEMES ui AAA AA RADA CRE RS ILL A tosL Correction s e eae a wk ee ds 3 11 2 Beam based alignment and steering o o SAL Dispersion free steering Dar AAA te SG a 3 11 4 Other beam based correction schemes o e S L LS Enero y feedback Dal a AO EA AE G 3 TL6 ooo AAA E kN ee Ea eee th aes cea A 3 11 7 Global emittance bumps Lea A le AS be AAA 3 12 Opservables e an u rs de a a ato a ac 3 13 Matching A dE AE AA ee ee o a al ap te o oh Mand 314 Trajectory AIG Ger A Deak SIA RR A EI Sl Diasnostie nac model s s 4 22 rie p A e A ANE St i eS aei 4 GETTING STARTED WITH LIAR o A AA AAN 4 2 Introduction to the command language 43 Iterative command 1o0ps 5205 is A A AS A RA ee 7a A gt Standard LIAR Output sac spas di eee od AI AA BR E 4 5 MATHEMATICA interfa e s oo uaa Cale wee eae AR agg BES BOGS SSeS 4 6 Examples of SLC command files 6 sd Pei 42S A ape ada 46l Simple SLC study er tt SP AE A Be tod in AE et been 4 6 2 Advanced SLO stidy Aa a ene pe eRe ove a E ee Se RS 5 LIAR COMMANDS IN THE SIMULATION CONTEXT 5 1 Initialization and setup a a BE Rea es Gahan eee OU Bae Be ek 5 2 Qube the proprati e s ees erase e eh a rie E AS EA a A SG eee 5 3 Maximum dimensional definitions ese ee we ee we Contents 5 4 Defining the lattice and the Rf uc a a a a 36 5 5 gt Twiss calculavion
71. e excited by all preceding slices j It is determined as follows WSR 0 i 1 SE MO glt EWP 1 0 L 13 j 1 Here the Q are the charges in the slices or j and wp is the wakefield function as determined from the design specific input file The head of the bunch is 1 and the sum term is only evaluated fori gt 1 Lis the length of the structure A slice in a bunch k experiences a transverse trajectory deflection 0 due to short range and long range wakefields that are excited by the preceding slices in all preceding bunches The deflection angle is k 1 0 k 1 E Qjz L WIP j P T E 2 WE j P T E 14 j 1 1 1 5D Qa LWP 1 i 15 i 1 The Q are the bunch charges and the Q the slice charges WLR k j P T E is the long range wakefield function for the bunch distance k j Aspunch the structure piece P the structure type T and the error type E WER k i P T E is its derivative with respect to the longitudinal offset z to the bunch center Long range wakefields can be defined for different structure types T and different error types E The term SR i specifies the short range transverse wakefield function for a slice distance J i ASstice Theory concepts and features 11 3 8 Quadrupole wakefields If a beam possesses a transverse quadrupole moment relative to the accelerator pipe axis e g if the beam is not round or off axis a quadrupole w
72. e of input command file must be specified READ_MAD Read the lattice and the optics from a MAD TAPE input deck compare description of input files The initial energy must be included in the command line In addition one can optionaly set the number of pieces per structure which is nominally set to 1 and the number of structures per girder which is also nominally set to 1 If NGIRDER is specified every NGIRDER structures are assigned to a girder There is no check for quads or drifts that might disrupt this girder assignment INFILE Input file name must be set ENERGY 2 Injection energy in GeV NPIECE 1 Number of pieces per structure NGIRDER 1 Number of structures per girder READ_SLC Read the actual SLC settings from a file that is generated within the SLC steering panel Such a file contains the measured trajectories the corrector settings the quadrupole settings and the assumed energy profile along the SLC linac Reading such a file allows adjusting the LIAR model as closely to SLC as possible Mi INFILE Input file name must be set ORBIT F Logical flag for reading trajectory information into a reference which is specified by the option SAVE SAVE 1 Specifies where the reference trajectory information is saved Twenty different references are allowed so the option SAVE must take values between 1 and 20 QUAD F Logical flag for reading quadrupole information and adjusting the RF acceleration to reproduce
73. e the same in all bunches The structures are symmetric so that the wakefields are the same in both transverse directions If structures are broken into pieces the wakefield kicks need to be specified for each piece position ipiece For transverse wakefields the convolution with the beam must be done for both transverse planes before tracking through each beamline piece the kick depends on actual transverse beam positions WF T SR A slice WF_T LR A bunch ipiece itype ierr WF_T DER A punch ipiece itype ierr WF T DDLR Apynch gt ipiece itype ierr WE_T THETAX ibunch islice WF_T THETAY ibunch islice Internal data structure Transverse kick in V C m from short range transverse wakefields for each difference Aglice in slice position Short range wake fields decay long before the next bunch ar rives Transverse kick in V C m from long range transverse wakefields for each difference in bunch positions Apynch each piece posi tion ipiece and each frequency error type ierr Slope of transverse long range wakefields wrt z in V C mi assuming only one weighted average frequency This allows both to extrapolate the long range wakefields within a bunch and to include small errors in bunch spacing Second derivative of transverse long range wakefields wrt z in V C m Horizontal kick from transverse wakefields for slice islice in bunch ibunch Vertical kick from transverse wakef
74. e to specifics in the used lattice A new lat tice generally has to be made working with this routine BPM s can be specified with a search string e g BPMY MY will select all BPM s with names that start with MY 82 TRACKF Track the beam through the lattice with 1 to 1 correction assuming positively charged particles Same options as in command TRACKC but the roles of focusing and defocusing magnets are exchanged Track the beam through the lattice and adjust feedbacks For additional details see TRACK ORDER COUPLE WFE_T_SR WE_T_LR WE_L_SR WE_L_LR WF_Q SR E_AXIS E_GEOM INIT MBUNCH RFBUNCH ITER DOLOG SILENT 2 TRACKF Order of beam transport 1 centroid 2 beam el lipse Flag for coupled beam transport Flag for transverse short range wakefields Flag for transverse long range wakefields Flag for longitudinal short range wakefields Flag for longitudinal long range wakefields Flag for transverse short range quadrupole wake fields Flag for emittance calculation wrt axis instead of the centroid Flag for geometric emittance instead of normalized one Flag for reinitialization of beam to initial conditions Bunch selection for detailed slice information Bunch selection for RF BPM Number of iterations per feedback Flag for saving end results into logbook Flag for silent mode no standard output TRACKFC 83 TRACKFC Track the beam through the lattice adjust feedbacks and do
75. ecuting command files Command files lists of valid LIAR commands can be loaded and executed with the LOAD EXEC or READ commands Command files allow the automatic execution of nested command loops They may not be called from within another command file 5 18 Additional output files Some commands allow to write a single line result into an output file that is specified by an output unit number This for example allows to change a beam or measurement parameter in steps and to record an important observable as a function of this parameter The corresponding output files are opened and closed with the commands OPEN_FILE and CLOSE_FILE 5 19 Graphics LIAR provides an interface to the gnuplot 15 scientific plotting program The use of the external gnuplot program is completely transparent for the user and does not require any knowledge of this program LIAR provides ready to plot input data and command files It automatically calls the graphics program controls the graphics output screen PS EPS PS printer and will return to the main LIAR program In order to allow for advanced font and border handling we assume that the beta release version 3 6 or later of gnuplot is installed This beta release is freely available for almost any computer platform including AIX 3 2 32 bit windows LINUX etc A LIAR PLOT command allows to create plots of almost any internal information Commands in the simulation context 41 Axis and key labels inc
76. effectively The dispersion 7 in LIAR is defined as the change Az s in trajectory offset for a relative energy change AE E AE K Az s ms 37 M S 33 Theory concepts and features 15 In order to determine the dispersion AE E is assumed to be constant along s Equivalent to changes in the beam energy is a change in the lattice strength K for quadrupoles and correctors transverse structure deflections can be neglected For practical reasons dispersion in linear accelerators is best measured with a lattice scaling Note that dispersion in a linear accelerator is not as uniquely defined as in a storage ring However the definition used here provides a dispersion that is a well defined observable From the measured dispersion a dispersion minimized trajectory can be calculated This is called Dispersion free Steering 13 Since the superposition of many errors generates the dispersion a model for how a deflection at any location changes the trajectory at all downstream locations is required Neglecting wakefield effects the absolute reading x at a BPM j due to all upstream kicks 0 is ae ae ee y Bis bi 34 1 1 where the transport matrix elements Ry from the kick 2 to the BPM y are given by Rig Bi Bl sin wi yi 35 Here the E are the beam energies the 6 are the beta functions and the 71 are the betatron phase advances Now we c lculate how the dispersive kicks change the difference traject
77. efore be iterated in small regions in order to converge to the final solution 2 Iterative minimization of each BPM reading by using one upstream dipole corrector 7 2 upstream This is a fast approach that works well in simulation but cannot easily be realized in large accelerators 3 11 2 Beam based alignment and steering Beam based alignment of quadrupoles and accelerating structures This algorithm minimizes the BPM readings so that it also works as a steering algorithm The algorithm minimizes the quadrupole and structure BPM readings by first moving the quadrupoles thereby steering the trajectory and then moving the accelerator structures to align them along the beam trajectory Because of imperfections in the accelerator model a long linac is typically divided into many shorter regions of 50 to 100 quadrupoles and the algorithm is applied to each region individually To obtain _ full correction one usually has to iterate the correction multiple times The simulations include the effect of finite BPM resolution reading to reading jitter and accelerator component misalignments The algorithm determines the quadrupole movements in an attempt to align the magnets in a straight line between the first and last quadrupoles of the region being considered the first and last quadrupoles of the region are not moved by the algorithm The beam is then launched along the beamline by adjusting either the initial conditions for the first r
78. egion of the linac or by adjusting a single dipole corrector located at the first quadrupole for all subsequent regions only a single dipole corrector is needed to join regions because the beam trajectory should be centered at the first quadrupole which is the last quadrupole of the preceding region Finally weights can be added for the BPM resolution and the quadrupole movements the nominal values are the expected BPM resolution and the expected quadrupole misalignments with respect to adjacent magnets These weights will limit the magnitude of the moves constraining the trajectory to lie along the pre determined axis which can be assumed to be set by the initial mechanical alignment In specific the quadrupole alignment algorithm finds the least squares solution to the problem my p q2 m Ral ga or Ril 28 IN 1 T z 0 z 0 14 Theory concepts and features with a weighting vector given by 1 0 m1 1 5 5pm N 1 0 quad2 29 1 0 quad N 1 1 Oinit B Oinit The measurement vector consists of N BPM measurements m followed by N zeros which are used to limit the quadrupole movements The solution vector consists of N 2 quadrupole movements followed by z and xi Which are the initial conditions or 9 which is a corrector located at the first quadrupole of the region Next the weighting vector consists Of Obpm Squad ANd Oinit Which are the estimated BPM resolution quadrupole misalignments and initial err
79. ency errors we have a specific convention for the file name Input files are eof form FILEBASE e concatenated with _ and a 2 digit structure type number e concatenated with and a 3 digit sequence number e concatenated with in_tlrw The 3 digit integer sequence numbers start from SEQSTART and increase in integer order up to SEQSTART NUM STRUC_ERRTYPE 1 For example if SET_WF_TRANSV_LR is called with the parameters FILEBASE infiles DDS1 SEQSTART 101 and the internal variables for the number of structure types and the number of frequency errors are found to be NUM STRUC_TYPE 4 NUM STRUC_ERRTYPE 50 then the wake input file names are assumed to be infiles DDS1_01_101 in_tlrw infiles DDS1_01_102 in_tlrw infiles DDS1_01_150 in_tlrw infiles DDS1_03_101 in_tlrw infiles DDS1_03_102 in_tlrw infiles DDS1_03_150 in_tlrw The user must make sure that all those files for different structure types and different frequency errors exist Note that frequency errors can also be generated internally in LIAR 78 SHOW_MISALIGN SHOW_DEFINITIONS Print the maximum dimensions of basic LIAR data structures Those dimensions are defined in the file definitions inc and cannot be changed after compilation of LIAR SHOW_FEEDBACK Print a list of all feedback loops that are defined SHOW_MARKER Print a list of all MARKER points that are defined They can be used for feedback loops an
80. er slice nm SET_BEAM current 3 5d10 blength 1100 d 6 nb 1 ns 20 nm 3 Finally we specify the wakefields The wakefield functions are read in as tables from input files that have been generated with specialized programs e g with MAFIA 7 or 8 SET_SR_WF file infiles srwf_slc dat Everything is now set up to track the beam through the lattice TRACK The end of tracking analysis prints a lot of useful data to standard output e g emittance growth RMS trajectory offsets Compare the example in section 4 4 In order to study details along the linac we generate an ASCII table that contains the BPM readings the emittances the beta mismatch and other observables as a function of longitudinal position MEAS BPM file bpm dat An external plotting program e g gnuplot or PAW can now read the ASCII table and generate plots The table format is described in the reference description of the command MEAS_BPM Alternatively plots can be generated directly with the command PLOT 4 6 2 Advanced SLC study Now we show an example of an advanced SLC simulation The input file can be found in afs slac stanford edu public software liar release examples cmdsic2 This example includes imperfections BNS damping trajectory corrections feedback loops and emittance bump optimizations The calculations are performed for 100 statistically different cases This example illustrates the power of LIAR to study imperfec
81. es to include SAVE Number of reference where to save the average REF_SUB Calculate and save the difference between two reference trajectories REF 2 Number of reference 1 REF2 Number of reference 2 REF3 Number of reference where to save REF1 REF2 70 RF_SWITCHOFF RESET Reset parts or all of the memory information in LIAR to zero ALL F Reset all information to zero BEAM F Reset the beam information to zero CONTROL F Reset the control information to zero RF F Reset the RF information to zero LOGBOOK F Reset the logbook to zero INITIAL F Reset the initial conditions to zero FEEDBACK F Reset the feedback information to zero LATTICE F Reset the lattice information to zero CORRECTOR F Reset all corrector strengths to zero TRAJFIT F Reset parameters for trajectory fit routines Align the RF structures to the beam Before this routine is called the beam must be tracked through the lattice in order to update the RF BPM s RF BPM s are located in the beginning and the end of each RF structure BEWARE If the structures are divided into pieces then the RF BPM errors due to piece to piece misalignments are included Otherwise those errors should be included in the resolution error effective resolution For realignment we use both RF BPM s per structure PLANE BOTH Plane of structure realignment X Y BOTH SIGX 0 Horizontal resolution of RF BPM SIGY 0 Vertical resolution of
82. ffects and the beam acceleration LIAR profited from the experience with earlier simulation programs 4 3 1 Phase space description A position in phase space is defined by the 6 dimensional vector S R gt A SS where z lt 0 is the head 1 rn lt A E The head of the bunch is located in the negative z direction Here x and z are the horizontal displacement and angle y and y are the vertical displacement and angle z is the longitudinal distance to the nominal center of the bunch and E is the total energy Note that the definition of the energy coordinate differs from the TRANSPORT convention The vector X describes the centroid motion of a thin longitudinal slice of a bunch With each slice we can also associate a beam matrix o Since the bunch length is constant in linear accelerators it is sufficient to consider the beam matrix for the transverse planes only It can be written as gs Ozz Ogg lea B A 2 Ogg Og z Q Y Here 8 and y 1 a are the Twiss parameters related by the Courant Snyder invariant ya 2x1 Bx e 3 This equation describes the beam ellipse which in a linear accelerator must be distinguished from the so called machine ellipse compare 5 The lattice is designed for a given set of initial beam conditions This determines the design or machine ellipse matched case If the beam is injected with different initial conditions then its Twiss values and the beam ellipse w
83. gy cut in number of sigmas ZCUT 3 Bunch length cut in number of sigmas EZCORREL O Correlation between longit position z and relative en o ergy deviation AE E of a particle AE E E 1 EZCORREL z EZCORREL is defined in units of 1 m NB 1 Number of bunches must be set NS 20 Number of slices must be set NM 5 Number of macro particles must be set BSPACE 0 Nominal bunch spacing in m for long range wake fields POSITRON F Define first bunch as a positron bunch SILENT F Logical flag for silent mode of command no standard output ZFILE Optional name of input file to define initial bunch dis tribution integral normalized to 1 The parameters NS ZCUT and BLENGTH are ignored and deter mined from the input file SET_BPMREF 173 SET_BPMREF Modify selected BPM reference information manually Useful for example in order to specify a closed bump in a reference that then is implemented by reference steering compare TRACKC NAME Name of BPM REF O Number of reference to modified RESET F Flag for resetting old reference value to zero X 0 Reference value X in m Y 0 Reference value Y in m SET_CHARGE Scale the charge of a specified bunch BUNCH 1 Number of bunch to be changed in charge SCALE 1 Scale factor for the bunch charge 1 no change SET_CONTROL Set the general control parameter for LIAR DEBUG 0 Debug level OUTLUN 6 Unit number for output 6 terminal The all
84. he file The character string comprising each line may be up to 80 characters long and should be enclosed in quotes Line 5 Number of transverse modes N modes Is assumed to be the same as the number of cells Lines 6 7 Two more strings of up to 80 characters enclosed in quotes Typically these are used to remind the user of the format and units of the lines to follow which contain the information about each mode Line 8 Nmodes 7 Line for each transverse mode containing 1 mode number sequential from 1 to Nmodes 2 mode frequency fn in Hz 3 coefficient of mode W in V C m 4 location cell number of centroid of mode 5 quality factor Q of mode This is an example of such an input file DESCRIPTION DDS TE10 manifold no freq errs unif coupling periodicity COPPER Q QCU 6500 00000000000000 LEGEND29 7 6 1994 12 21 NO ERRORS LEGEND25 PERT Tue Sep 19 14 26 08 1995 206 M FREQUENCY 2 KICK FACTOR MODE_CEN Q o HZ V C M 2 1 12530989D 11 46482276D 14 3 6499996D 04 2 12771960D 11 14977500D 14 6 6499996D 04 3 12908022D 11 10556679D 14 8 6499996D 04 4 13008189D 11 86671965D 13 10 6499996D 04 x 5 13087500D 11 76209984D 13 11 6499996D 04 6 13150877D 11 69696504D 13 13 6499996D 04 202 15954405D 11 82348892D 14 201 8058751D 03 203 16014419D 11 63097705D 14 202 1089590D 04 204 16087801D 11 53580452D 14 203 1611691D 04 205 16186417D 11 53811225D 14 204 226995
85. ic observables that are determined from measured BPM values The same diagnostic method was applied for SLC very successfully It allows to experimentally determine the real linac optics We follow the method that was first described in 14 The linac beam transport is best described by the R matrices for the centroid motion As an example let s define the linac R 2 s They can be written in a general form for locations 0 and i as Ria 4 o K y B1 0 81 3 sin Ay 84 This is a simple extension of Eq 26 that was defined for design values without wakefields The additional factor x describes any blowup of an induced linac betatron oscillation for example due to head to tail wakefield amplification Without wakefields and errors k is exactly one Note that the centroid phase advance Az between two points in the linac can be strongly modified by wakefields as well as the centroid G functions The centroid beam transport in a linac can be described by examining the betatron oscillations x1 x1 and 2 h due to two beam deflections that are about 7 apart in phase advance indicated by the subscripts 1 and 2 The R matrix from an initial point number 0 close to the origin of the beam deflections to a downstream location number i is obtained from solving simultaneously zli US Ri Ri 1 0 2 1 7 Ra Ra x 0 85 za i _ Ru Ri za 0 k sU 7 Rai Re xo 0 86 22
86. ice The RF acceleration can be switched off after some specified point with the command RF_SWITCHOFF The lattice is rescaled and a coasting beam can be simulated After having defined the lattice and the RF additional commands become available The command READ SLC allows to read actual SLC magnet strengths and energy profiles and to adjust the RF accord ingly Accelerator support structures girders with 1 or 2 support points are defined with the command DE FINE_SUPPORT All elements that are sensitive to misalignments are being attached to a support structure TNote that this is the required order for an initial setup of the simulation Early setup commands can be used again later to modify beam or lattice parameters Note that all specified numbers in the TRANSPORT deck are assumed to be real numbers Integer numbers are not allowed Commands in the simulation context 37 This allows to simulate the effect of ground motion girder vibrations The command SHOW SUPPORT prints a list of the defined support The command SCALE_LATTICE allows to scale all quadrupole and corrector strengths by a specified amount This is equivalent to change the beam energy and is used in SLC to measure dispersion Single correctors can be changed in kick angle using the command SET_CORRECTOR 5 5 Twiss calculation As soon as the lattice is defined the Twiss parameters can be calculated The command CALC_TWISS calculates the Twiss parameters for electro
87. ied with a search string e g BPMY MY will select all BPM s with names that start with MY Note that the CORS option SLC reads in an input file with SLC definitions Standard 1 to 1 trajectory correction like CORRECT for positrons PLANE both Plane for correction X Y BOTH BUNCH 0 Selection of bunch for correction O all CORS standard Selection of corrector scheme STANDARD SLC XFILE X Corrector BPM association file for option SLC YFILE Y Corrector BPM association file for option SLC BPMX qf Selection of BPM s for horizontal plane CQF QD BPMY qd Selection of BPM s for vertical plane QF QD SCALE 1 Scale factor for correction to be applied REJECT 1 Threshold for kick rejection in rad CLOSE_FILE Close an ASCII file that previously was opened with the command OPEN_FILE UNIT 0 Unit for file number to close DEFINE_FEEDBACK 45 DEFINE_FEEDBACK A feedback loop is defined The command evaluates the effectiveness of all pairs of two correctors upstream of the observation point where one of the two correctors is the previous or the pre previous corrector The most effective pair is assigned to the feedback loop MARKER Name of the observation marker for the feedback must be set NCOR 8 Number of upstream dipole correctors to consider PLANE both Active plane for the feedback loop BUNCH 1 Active bunch for the feedback loop 0 all DE
88. ields for slice islice in bunch ibunch Beam and wakefield description 99 Transverse quadrupole wakefields Transverse short range quadrupole wakefields are saved for each possible difference in slice position Aglice We always assume that the relative slice positions are the same in all bunches The structures are symmetric so that the wakefields are the same in both transverse directions WF_Q SR A glice Transverse kick in V C m from short range transverse quadrupole wakefields for each difference Agj in slice position Short range wakefields decay long before the next bunch arrives WF_Q THETAX ibunch islice Horizontal kick from transverse quadrupole wakefields for slice islice in bunch ibunch WF_Q THETAY ibunch islice Vertical kick from transverse quadrupole wakefields for slice islice in bunch ibunch WF_Q RG j ibunch islice Quadrupole wakefield R matrix for slice is lice in bunch ibunch Both i and j run from l to 5 Longitudinal wakefields Longitudinal wakefields are saved for each possible difference in slice bunch position CAglice bunch We always assume that the relative slice positions are the same in all bunches If structures are broken into pieces the wakefield kicks need to be specified for each piece position ipiece For longitudinal wakefields the convolution with the beam is done only once for each beam setup Allowing for intensity jitter it is done once at
89. ill be different unmatched case Even if the beam is injected with the initial conditions matched imperfections will generally cause the beam ellipse to differ from the machine ellipse 3 2 Beam description The beam with a total charge of Q is described as a train of N bunches Np Q Q 4 A j 1 8 Theory concepts and features Each bunch is longitudinally divided into N slices that are located at different positions z Note that z is zero for the center of the bunch without bending magnets and negative for its head T shall be the charge distribution along z it might be Gaussian and its integral shall be one T is a function of the bunch length oz The bunch charge Q is distributed into N slices at positions z as follows Ns Q X Tilo O 5 i l For a Gaussian distribution the slice positions z are determined from the bunch length o the number of slices N and the number N of standard deviations to be considered on each side oe i M N 2N 0 6 2 Ns Finally each slice is divided into Nm mono energetic beam ellipses Ig shall be the energy distribution in a slice The function T depends on the uncorrelated energy spread og With og Nm and the number N of standard deviations to be considered on each side we obtain the energies Em Nm 1 2N 0 Em TH A ly 7 m 2 Nm 7 and the corresponding charge distribution for each slice Nm Qi Taz Em Qm 8 al The bea
90. in rad _ ENERGY O Injection energy in GeV ESPREAD 0 Initial energy spread in GeV EMITX O Initial horizontal emittance in rad m EMITY O Initial vertical emittance in rad m NEMITX 0 Normalized initial horizontal emittance in rad m NEMITY 0 Normalized initial vertical emittance in rad m BETAX O Initial 6 in m BETAY O Initial P in m ALPHAX 0 Initial z ALPHAY 0 Initial ay MATCH F Match the initial 8 s and a s to the TWISS informa tion e g specified with command CALC_TWISS SET_MULTIKNOB 75 SET_MULTIKNOB Change settings of a specified multiknob The new value is always added on top of the old value NAME Name of multiknob to set must be set VALUE 0 Change in multiknob value Set the RF phases e g BNS damping Specify only one kind of switching location energy element name or s position Up to six different RF phases can be specified We use the following convention for RF phases A positive RF phase will put the beam behind the crest a negative RF phase will put it before the crest Mathematically this means that for a particle at location z its total phase with respect to the RF on crest Ppp 0 assumed to be at z 0 is Ptotal PRE FRE 2 103 where kpp is the wave number 27 fpp c of the accelerating RF Remember that z lt 0 corresponds toa location before the crest e g the head of the bunch NAME oe Name of structures to set must be set selects all structures The
91. in the presence of internal structure misalignments l TFILE Filename for transv wakefield input must be set LFILE Filename for long wakefield input must be set TRANSV T Flag for transverse wakefields LONGIT T Flag for longitudinal wakefields SET_SR_WF Set up the short range wakefields FILE Filename for wakefield input must be set TRANSV T Flag for transverse wakefields LONGIT T Flag for longitudinal wakefields SET_SRQ_WF _ Set up the short range wakefields including quadrupole wakes The input file contains the quadrupole wakefield information after the dipole wakefield information FILE Filename for wakefield input must be set _TRANSV_ T Flag for transverse wakefields LONGIT T Flag for longitudinal wakefields SET_WF_TRANS V_LR 77 SET_WF_TRANSV_LR Set the long range transverse wakefields Assumes that the number of specified modes see input files is equal to the number of cells in the structure FILEBASE SS Filebase for transverse long range wakefield file SEQSTART 101 Start value for file sequence number FILE iss Optional output file for wakefields including fre quency errors GENERATE LF Flag for generating LRWF frequency errors FREQ_ERROR 0 RMS frequency error Af f for long range wake fields SEED time Seed for random number generator NUM_ERRTYPE NUM STRUC_ERRTYPE Number of different errors Allowing for different types of structures and wakefield frequ
92. ine and a and 8 are the beam Twiss values In the ideal matched case Bmag iS equal to one Theory concepts and features 21 3 13 Matching Optical matching routines are not implemented at this time 3 14 Trajectory fit It is often necessary to fit the beam centroid offset and angle at some location 0 from a number n of downstream BPM measurements This fit has a unique solution and x 0 x 0 can be calculated analyti cally as T Xakela _ Li Ria i LP Ru i z i M E Ruli Ria i Ei Ruli Reli pe i D Ri i Ri2 i 82 Ruli eli Ee RAO a x 0 vist 11 1 ae Dist 1 i z 0 83 Ziz Ruli Ri2 1 The fit naturally requires the knowledge of the R matrix from the point to be fitted to all downstream BPM locations and the BPM readings x i This fit is implemented in the command TRAJFIT 3 15 Diagnostic linac model The transfer matrices in a linac can be very different from the ones that are calculated in a single particle model within LIAR Reasons for this can be wakefield effects that are expected from the design multi particle beam dynamics or errors in the beam energy quadrupole strengths etc Analytical estimates for multi particle beam behavior generally do not have the accuracy as required for the characterization of wake field dominated linacs In addition parameter errors are by definition unknown in real accelerators LIAR therefore implements beam diagnost
93. ine interpolation to find the wakes at intermediate points The largest values of s needs to be sufficiently large to accommodate the largest separation of two macro particles in the bunch to be tracked Next in the file come more comment cards followed again by n records of transverse data with each record giving an index not used an s position the same set as before and the wakefield in V pC m The longitudinal coordinates for transverse and longitudinal wakefield points must agree for each point 1 n This is an example of an input file for SLC M 0 SLAC 45 DELTA FUNCTION WAKE I Z M WAKE V PC M 1 0 000000 224 909975 2 0 000150 180 920263 199 0 029700 9 337811 200 0 029850 9 395827 M 1 SLAC 45 DELTA FUNCTION WAKE I Z M WAKET V PC M 2 1 0 000000 0 0000 Description of input files 105 2 0 000150 371 1632 199 0 029700 227 3678 200 0 029850 246 5704 For the actual calculation of short range wakefield functions compare 8 and 7 8 2 2 Accurate long range transverse wakefields We give here the format of the input file for the long range transverse wakefields command SET_WF_TRANSV_LR The long range transverse wakefield is of the form Nmodes W 2 Y W sin 2m f 2 c exp 27 f 2 2Q c n l 104 and has the units V C m The format of the file is as follows Lines 1 4 First there are four lines allocated for descriptive information about the structure whose modes are described by t
94. ing command would fail ERROR_GAUSS_QUAD X_SIGMA 5 E 06 comment Y_SIGMA 7 E 06 comment WRONG T_SIGMA 1 E 06 comment NAME Q02 comment _ However keep in mind that UNIX filenames are case sensitive Getting started 27 4 3 Iterative command loops An advanced feature of the LIAR command language is the possibility to specify iterative loops over groups of commands Up to three nested levels of do loops are allowed For each loop a step variable is defined that can be used to specify command options The basic do loop is implemented in a FORTRAN fashion DO SDY 1E 6 T10E 6 10 ERROR_GAUSS_QUAD X_SIGMA 5 E 06 comment Y_SIGMA SDY comment T_SIGMA 1 E 06 comment NAME Q02 comment END DO In this example the variable SDY is stepped up from 1 x 107 to 10 x 107 in 10 steps In the misalignment command its value is accessed by SDY The implementation of do loops allows also to vary the seed of misalignments or to modify filenames for the output e g FILE output SEED Using DO variables for output filenames will only take into account the integer part of the variable the allowable range is 0 to 1000 Do loops are only permitted in input command files executed with the commands LOAD EXEC or READ They cannot be specified at the LIAR prompt Do loops are expanded during a special prepro cessing of an input file e g input liar If anything goes wrong the expanded input fi
95. inosity BMAGX BMAGY X Y beta mismatch 1 no mismatch Tnitial beam size S x Sy Initial X Y 1g beam sizes Final beam size S_x S_y Final X Y 1g beam sizes Jitter offsets J_x J_y Beam offsets with respect to the axis or a meee iene Beam trajectory ideal X_av Y_av Average X Y beam offset at BPM loca tions with respect to ideal reference line RMS X Y beam offset at BPM locations with respect to ideal reference line Average X Y beam offset with respect to BPM centers RMS X Y beam offset with respect to BPM centers X and Y beta function at the end of the machine from a tracked beam and b lattice Twiss calculation X and Y alpha function at the end of the machine from a tracked beam and b lattice Twiss calculation Geometric emittances at start and end of tracking The final emittance is speci fied both with respect to the beam cen troid and with respect to the ideal refer ence line Normalized emittances at start and end of tracking The final emittance is spec ified both with respect to the beam cen troid and with respect to the ideal refer ence line X sig Y sig Beam trajectory BPM X_av Y_av X_sig Y sig Final beta functions Final alpha functions Geometric emittance Normalized emittance 29 Table I Definition of quantities that are printed out as the summary information af
96. is identical to the one used at the SLC lattice diagnostic pulse LDP The results are saved into an ASCH file FILE SLCFILE BUNCH ERROR REF PLANE Name for phase advance output file must be set Name for phase advance output file in SLC LDP for mat 1 Bunch number for phase advance measurement O all T Flag whether to include BPM reading errors 0 The phase can be measured from BPM reference REF Y Plane for phase measurement X Y The output file provides the following information S position of BPM s m Measured vertical phase advance rad Twiss model vertical phase advance rad Difference between 2 and 3 rad vertical beta function m Vertical traj offset incl errors m Beam energy GeV S position of zero crossing m Meas phase advance at zero crossing rad Difference with respect to model rad MEAS_PHASE2 59 MEAS PHASE2 This commands simulates an intial beam offset and angle and determines the linac optical functions from the resulting BPM offsets The method is described in section 3 15 Both planes are diagnosed at once The results are saved into an ASCII file In contrary to the command MEAS_PHASE this command does not require any preceding implementation of a betatron oscillation FILE phase2 dat Name for output file BUNCH 1 Bunch number for phase advance measurement O all SAVETWISS E Flag for saving Twiss functions at BPM s into file bpmtwiss dat
97. itions sose gis A A ab See o doa Woe A 7 10 Beam and wakefield description 4 4 Krak A ROS SL 7 11 Feedback loops and emittance bumps ee so 112 Logbook datas sl gout dk ene das wld Ae A e we eS 8 DESCRIPTION OF INPUT FILES 8 1 Lattice description exe e A oe Wa a GOS He 8 2 Wakefields inate es GG taney te A a ot By tee tee ae dee ame Rana hs wea Cha eh a ION y 8 2 1 Short range transverse and longitudinal wakefields 8 2 2 Accurate long range transverse WakefieldS o o o 8 2 3 Simplified long range transverse WakefieldS o o 8 2 4 Long range longitudinal wakefields o 8 2 5 Arbitrary initial bunch distribution along z 9 LIST OF PROGRAM SUBROUTINES AND FUNCTIONS 10 WHAT S NEW LOM Versions g lt 6 6 ap oe oe ec es ek eB we ee OA Oe aa ss IOA Versi n di 2 es a TA A A RIA A eee IA A et GA 11 KNOWN PROBLEMS AND BUGS 12 ACKNOWLEDGEMENTS 13 REFERENCES 108 112 112 112 113 114 114 The LIAR project 5 2 THE LIAR PROJECT The LIAR Llnear Accelerator Research code project was started at SLAC in August 1995 in order to provide a computing and simulation tool that addresses the needs of high performance linear accelerators Its first objective was to implement advanced simulations for the main linacs of SLC 50 GeV and NLC 500 GeV at SLAC Since then it has been applie
98. l changes are done with respect to reference values The following information is defined for the feedback loops IFDBK Actual number of defined feedbacks FDBK NAME Name of feedback loop 7 FDBK i IMARKER Pointer to relevant observation marker FDBK i TELEM_M Element number of relevant marker FDBK i BUNCH Active bunch for feedback observation O all FDBK i PLANE Active plane for feedback X Y BOTH NONE FDBK i REF_X Reference x offset at observation point FDBK i REF_XANG Reference x divergence at observation point FDBK i REF_Y FDBK i REF_YANG Reference y offset at observation point Reference y divergence at observation point FDBK i X Desired Az at observation point FDBK i XANG Desired Az at observation point FDBK i Y Desired Ay at observation point FDBK i YANG Desired Ay at observation point FDBKG ICOR1X Pointer to x corrector nb 1 FDBK i JELEM_C1X Element number of x corrector nb 1 FDBK i ICOR2X Pointer to x corrector nb 2 FDBK i IELEM_C2X FDBK i C1_R12X FDBK i C1_R22X Element number of x corrector nb 2 R12 from x corrector 1 to marker point R22 from x corrector to marker point FDBK i C2_R12X R12 from x corrector 2 to marker point FDBK i C2_R22X R22 from x corrector 2 to marker point FDBK ICOR 1 Y Pointer to y corrector nb 1 FDBK i IELEM C1Y Element number of y corrector nb 1 FDBK ICOR2Y Pointer to y corrector nb 2 FDBK i IELEM_C2Y FDBK i
99. les e g input liar_1 input liar_2 and input liar_3 can be found in the actual directory and should be checked for errors The expanded file with the highest number will be actually executed It should not contain any DO or ENDDO commands 28 Getting started 4 4 Standard LIAR output LIAR provides extensive information during the execution of its commands For example the progress of the tracking is indicated by a trackometer TRACKOMETER RARRANRRARARARRAKRANRARARARARARARRARARARA At the end of the tracking summary information is printed to the standard output End of tracking ANALYSIS BEAM ENERGY acceleration E_0 1 190 Gev gt E_f 46 003 Gev spread E_sig 016 GeV gt E_sig 124 GeV rel spread SIGE E 1 322 gt SIGE E 269 BEAM BLOW UP Emittance bl g_x 31 621 g_y 41 845 av g_x 31 621 g_y 41 845 train _ Xx 31 621 g_y 41 845 Lumin factor R_x 94 6 R_y 95 1 3 BMAG mismatch BMAGX 1 030 BMAGY 1 212 INITIAL BEAM SIZE Horizontal S_x 274 7 um Ss x 64 6 urad Vertical Sy 85 5 um Sy 24 0 urad FINAL BEAM SIZE Horizontal S_x 129 028 um S_x 3 685 urad Vertical S_y 45 858 um Sy 1 247 urad JITTER OFFSETS WRT AXIS FOR BUNCH O Horizontal J_x 94 um J_x 22 urad Vertical lt JY 2 11 um Jy 1 12 urad BEAM TRAJECTORY IDEAL average Xav 10 um Y av 1 93 um RMS X_sig 159 5
100. ll LIAR to treat each structure in a single piece READ_TRNS infile infiles slc trns i energy 1 19 npiece 1 The RF is set up with the command SET_RF We specify the final beam energy energy a first RF phase phasel a switching point Iswitch1 for the RF phase at 800 m and a second RF phase The lattice and the acceleration is scaled scale to fit those RF phases and the final beam energy We also compensate for longitudinal beam loading with a simple model kloss and charge SET_RF energy 46 scale t kloss 0 66d14 charge 3 5d10 phasel 22 lswitch1 800 phase2 16 5 Itis always a good idea to calculate the Twiss values at all elements though not needed for our example The initial Twiss values must be specified CALC_TWISS betax 3 40 betay 3 08 alphax 0 156 2 alphay 0 066 32 Getting started We specify the injection energy the initial energy spread and the initial normalized emittances The match option tells LIAR to match the beam to the Twiss values that were specified before We also define an horizontal and vertical injection offset of 200 zm x and y SET_INITIAL x 200 d 6 y 200 d 6 energy diel espread 0 014 nemitx 3 d 5 nemity 0 35d 5 match Next we define the bunch population the bunch length the number of bunches nb the number of slices per bunch ns and the number of mono energetic beam ellipses p
101. longitudinal axis in Radian YCOR i REF Reference corrector strength Lattice description 93 Marker list We save the average beam position and average emittance at the locations of markers at the time of the tracking MARKER XEMITALL Horizontal beam emittance MARKER YEMITALL Vertical beam emittance MARKER XSIZE Horizontal beam size in m MARKER i YSIZE Vertical beam size in m MARKER XPSIZE Horizontal divergence in rad MARKER i YPSIZE Vertical divergence in rad MARKER i XBEAM j Horizontal position in m for all bunches 7 MARKER i YBEAM j Vertical position in m for all bunches j MARKER 1 KANGBEAM j Horizontal divergence in rad for all bunches 7 MARKER YANGBEAM j Vertical divergence in rad for all bunches 7 MARKER i XEMITBEAM j Horizontal emittance for all bunches 7 MARKER i YEMITBEAM j Vertical emittance for all bunches 7 MARKER i ENERGYBEAM j Energy in GeV for all bunches j MARKER i QBEAM G Charge in C for all bunches 7 MARKER XLUME X luminosity reduction for all bunches j MARKER i YLUMF j Y luminosity reduction for all bunches 7 MARKER i X k Horizontal position in m for all slices k MARKER 1 Y k Vertical position in m for all slices k MARKER XANG k Horizontal divergence in rad for all slices k MARKER i YANG k Vertical divergence in rad for all slices k MARKER i XEMIT k Horizontal emittance for all slices k MARKER i YEMIT k Vertical emittance for all sli
102. lows for example to easily study the average emittance growth at all BPM s The references can be manipulated with the commands REF_AVG averaging of a number of references and REF_SUB difference between two references The command PRINT_REF saves a selected reference into a file Actual SLC data can be read into references using the commands READ SLC and READ_SLC_ORBIT Sometimes it is useful just to specify a few BPM values in a reference trajectory for example in order to specify a closed bump This can be done with the command SET_BPMREF Afterwards TRACKC can be used to steer to the manipulated reference thus for example implementing the specified closed bump 5 16 Experimental observables The multi particle beam dispersion can be determined with the command MEAS_DISPERSION Option ally files are written that can be used as input to a dispersion free steering command DFS The command DLUM_WAIST estimates the expected waist shift due to the simulated linac errors and its effect on the luminosity The linac optical functions phase advance beta functions alpha functions amplitude growth can be determined beyond the single particle Twiss values with the command MEAS_PHASE2 They are obtained including wakefield effects multi particle beam dynamics and lattice errors The sensitivity of the final beam offset and angle to beam deflections or quadrupole offsets is obtained with the commands SENS_YKICK or SENS_YQUAD 5 17 Ex
103. luding units are automatically created Up to two curves can be overlayed in a single plot More details of available options are described in the reference section under PLOT Alternatively the LIAR interface to MATHEMATICA compare section 4 5 can be used for plotting pur poses 42 AUTOPHASE 6 COMMAND REFERENCE SECTION Here we give an alphabetical list of commands For each command the available options and their default values are explained Several commands need to be executed in the right order For example we have to define the lattice and initial beam conditions before we can track the beam Other interdependencies might be less obvious but can be figured out with the information from the previous section Move the accelerator support assuming the ATL approximation 9 A Tak 101 where T is the time in seconds and L is the distance in meters AX 0 Constant A um m s for the horizontal plane _ AY 0 Constant A pum m s for the vertical plane T 0 Time in seconds SEED Time Seed for random number generator CUT 3 Cutoff in number of sigmas for ATL drifts RESET F Logical flag for resetting previous misalignments AUTOPHASE Estimate the BNS autophasing energy spread og E for a simple two particle model 2 TE L A I o p GP 102 E 4E Here E is the beam energy in GeV a is the RMS bunch length in m J is the bunch population in 10 is the phase advance per FODO cell is the quadrupole sp
104. lysis and saving of emittance at BPM s et cetera Flag for geometric emittance instead of normalized one Used for emittance analysis and saving of emit tance at BPM s et cetera Flag for reinitialization of beam to initial conditions Normally true because e g several seeds are calcu lated for the same accelerator always resetting the beam to the same starting point If false multi tracking can be realized For example a beam could be tracked through N identical FODO cells by track ing it N times through a single FODO cell However the use of this option seems to be limited Bunch selection for detailed slice information Bunch selection for RF BPM Flag for saving end results into logbook Save the trajectories of all slices along the beam line into the file slice bpm Saved are BPM Nr S XBEAM YBEAM X slicel Y slicel X sliceN Y sliceN No measurement for MEAS SLICE BUNCH equal 0 TRACKC 81 Track the beam through the lattice with 1 to 1 correction on the fly For additional details see TRACK ORDER 2 Order of beam transport 1 centroid 2 beam el lipse COUPLE T Flag for coupled beam transport WF_T_SR T Flag for transverse short range wakefields WF_T_LR T Flag for transverse long range wakefields WFL SR E Flag for longitudinal short range wakefields WF_L_LR ib Flag for longitudinal long range wakefields WF_Q SR F Flag for transverse short range quadrupole wake fields E
105. m It is possible to iterate over the solution In order to transport the beam from one section into the next section we use dipole correctors at or close to the common quadrupole BEWARE This routine assumes splitted quadrupoles with a BPM and acorrector in between NLC case This can be modified easily look for use of dipole correctors PLANE Plane X or Y or correction must be set DOLOG E Update the logbook with tracking results SEED Time Seed of random number generator for resolution NSTEPS 1 Number of alignment sections in linac ITER 5 Number of iterations NORF 0 Number of iterations without structure alignment QSTEPS 9999 Number of quadrupoles between fixed quads _ OVERLAP 5 Number of elements in tracking overlap between sec tions BPM_RESOL 0 Resolution of BPM s m RF_RESOL 0 Resolution of RF BPM s m MOVER_RESOL 0 Resolution of quadrupole movers m WEIGHT_BPM 1 Inverse weight on BPM s for Isq routine m WEIGHT_INIT 0 Inverse weight on initial dipole correctors WEIGHT_MOVER 0 Inverse weight on the quadrupole mover change m Exit the program This command is identical to STOP and EXIT 68 READ_SLC READ Execute a command file This command is identical to EXEC and LOAD It can only be used from the interactive command level Do not use it within a command file LIAR will read all commands from the specified file and switch back to the interactive program level at its end FILE Nam
106. m description in version 1 9 is equidistant in slice position z along the whole accelerator The next version of LIAR will eliminate this requirement and will allow for changes of the bunch length in bending _ Magnets 3 3 Beamline elements Beamline elements that are defined in LIAR include 1 quadrupole magnets 2 dipole magnets not complete in LIAR 1 9 3 RF accelerating structures beam position monitors BPM s Mai gt horizontal and vertical dipole correctors and D marker points Dispersive effects are included for all elements In a more general version of this program one would like to include synchrotron radiation effects and sextupoles All elements are described as thick lenses The transport matrices R that are used are those defined in the TRANSPORT formalism 1 They were modified only to include the transport through the preceding drift space for each element The beam is always tracked through the combination of an element plus its preceding drift space This allows to maximize computing speed The transport matrix for each element is Theory concepts and features 9 calculated separately for each beam ellipse of each slice of each bunch excluding drifts Such all orders of dispersion are included The accelerating RF structures are treated in a special way They are described by at least two structure pieces with an interleaved transverse wakefield deflection Rif Riga RwE Ref 9 The m
107. matically enters into a batch mode if it is started with a command file parameter The UNIX command gt liar cmdfile will start the program liar with the command file cmdfile as input After all commands have been executed LIAR is stopped The batch mode is highly recommended for large simulation jobs Since LIAR uses about 35 MBytes of random access memory the use of system resources is minimized by running in batch mode 4 2 Introduction to the command language The LIAR command language is inspired from the MAD style 6 However our implementation is sig nificantly different allowing several flexible extensions At the same time some restrictions are introduced Certain rules must be followed for the command line syntax All those rules apply to both the interactive and the batch mode of LIAR 1 A command line that can extend over several lines consists of a command name and any number of a command options 26 Getting started LIAR gt track order 1 couple f command option option Command options can be specified in any order and many of them can be omitted Parameters that are omitted use their default values LIAR is not case sensitive 2 All parts of the command line must be separated by commata Spaces in the command line are ignored 3 An input line that is ended by a comma is automatically continued into the next line A command is _ ended by breaking a line without a comma LIAR gt track order coupl
108. mit txt PRINT_REF ref 2 file out_lumf txt PRINT_REF ref 3 file out_bmag txt LOGBOOK process LOGBOOK print END DO SET_CONTROL debug file out_slcemit log Getting started Reset the logbook Reset reference data Do 100 different cases Reset corrector fields Specify logbook set 1 Randomly misalign all RF structures Randomly misalign quad s and associated BPM s Randomly misalign BPM s with respect to the quadrupoles Track with 1 to 1 corr SLC scheme Put results into logbook Update feedbk reference Specify logbook set 2 Optimize emittance bump Track with 1 to 1 corr and feedbacks Optimize emittance bump Track with 1 to 1 corr F and feedbacks Put results into logbook Add emittance to ref 1 Add lum factor to ref 2 Add bmag to ref 3 Save AV RMS of ref 1 Save AV RMS of ref 2 Save AV RMS of ref 3 Process the logbook Save the logbook file End of loop over 100 seed Change standard output Getting started 35 outlun 6 to screen This simulation will set up the SLC case implement feedbacks at pre defined markers and implement SLC style emittance bumps that use the feedbacks to cancel dispersion and wakefield dilutions of the beam emittance Having done the basic setup LIAR loops over 100 SLC cases with different imperfections For each case 1 to 1 steering is performed and two emittance bumps are set to
109. mization Details are explained in section 3 11 7 For the calibration of the emittance bump the beam must be tracked through the lattice After feedbacks with zero setpoints a 1 to 1 correction is performed Compare the command EMITC NAME MBUNCH FDBK WIRE ITER WF_T_SR WF_T_LR WF_L_SR WF_L_LR RFBUNCH CITER CORS XFILE YFLE BPMX BPMY MINPHASE MAXPHASE DPOS DANG SILENT 1 EI standard qf qd n 4 3 4 500 d 6 50 d 6 F Name for the emittance bump must be set Active bunch for emittance optimization Name of feedback loop to be used must be set Name of MARKER for wire measurement must be set Number of iterations for bump calibration Flag for transverse short range wakefields Flag for transverse long range wakefields Flag for longitudinal short range wakefields Flag for longitudinal long range wakefields Bunch selection for RF BPM Number of 1 to 1 correction iterations Selection of corrector scheme STANDARD SLC X Corrector BPM association file for option SLC Y Corrector BPM association file for option SLC Selection of BPM s for horizontal plane CQF QD Selection of BPM s for vertical plane QF QD Minimum phase advance between corrector and asso ciated BPM Maximum phase advance between corrector and as sociated BPM Offset in m for emittance bump calibration Angle in radian for emittance bump calibration Logical flag f
110. mmands can be redirected into any file for later consideration It con tains rather complete informations about parameters emittance growth trajectories et cetera Summary results are saved and accessed via the logbook In addition the commands MEAS_BPM and MEAS_EMIT allow to save BPM readings emittances and a lot of other useful data as a function of s into ASCII files The command SHOW_MISALIGN saves alignment and related data into ASCII files The command MEAS PHASE allows to measure the vertical phase advance from a betatron oscillation It should only be called when a betatron oscillation actually is present in the BPM readings or in any BPM reference compare section 5 15 The phase space information of the beam is saved at all marker points The command MEAS BUNCH prints out the phase space information of all beam slices for the bunch that was specified with the parameter MBUNCH during the last tracking The command MEAS_TRAIN provides the multibunch phase space at a Specified marker for the whole bunch train 40 Commands in the simulation context 5 15 Reference data LIAR allows to save internally reference data for the trajectory emittance and similar quantities At every BPM up to 10 reference informations can be saved A number of different observables can be saved into specified references with MEAS_REF For each reference number and each BPM the sum of values the sum of squared values and the number entries is stored This al
111. n m Phase error rad Rel gradient error piece misalignment m piece misalignment m of first RF BPM m of second RF BPM m of first RF BPM m of second RF BPM m KKM MK Corrector number S position m Rel field error Tilt rad Integrated field Tm OF WN RP SHOW_MULTIKNOB Print a list of all multiknobs that are defined SHOW_SUPPORT Print information about the accelerator support structure Exit the program This command is identical to QUIT and EXIT 80 TRACK Track the beam through the lattice The summary output at the end of the tracking is explained in Table I ORDER 2 COUPLE T WF T SR T WF TLR T WF L SR T WFLLR T WF Q SR E _ELAXIS F E GEOM F NT T MBUNCH 1 RFBUNCH l DOLOG F MEAS SLICE BUNCH 0 Order of beam transport l centroid 2 beam el lipse Full beam ellipse second order tracking should be used in most cases Chromaticity and dis persion are always included to all orders Flag for coupled beam transport If false all element tilts e g skew quadrupoles are ignored Flag for transverse short range wakefields Flag for transverse long range wakefields Flag for longitudinal short range wakefields Flag for longitudinal long range wakefields Flag for transverse short range quadrupole wake fields Flag for emittance calculation wrt axis instead of the centroid position Used for emittance ana
112. n order to kick the beam from one section into the next section Emittance bumps are another kind of correction algorithm compare section 3 11 7 The command EMITC_DEF defines an emittance bump The name of the feedback to be adjusted and the name of a marker where we assume the emittance measurement must be specified This command will perform some tracking in order to calibrate the specified emittance bump Alternatively up to two multi device knobs can be spec ified with the command EMITC_DEF_MKB in order to optimize the beam emittance Once the emittance bump is defined the command EMITC will adjust it to minimize the projected emittance at the observation point In case multi device knobs are used the command EMITC_MKB is available It is a good idea always to call the simple TRACK command before the correction commands are used The specified TRACK options will set up defaults that are used by some correction commands 5 13 Logbook _ An internal logbook keeps tracking results in memory The DOLOG flag for tracking commands decides whether results are stored in the logbook or not When looping over simulations we can fill the measurements into a single data set or organize it into several data sets e g a data set for each current with each 100 random seeds The logbook is managed with the LOGBOOK command It allows to analyze the data table mean sigma or to print it into an ASCII file 5 14 Output The standard ONLINE output of co
113. nly written in standard Fortran 77 It however takes advantage of the STRUCTURE and RECORD extensions that are available in most Fortran compilers The code is stand alone apart from a few system calls random number generator time that need to be adjusted to the actual computer system No specific libraries are required for the compilation LIAR version 1 9 is presently running under those operating systems e UNIX IBM AIX 3 2 etc Computer UNIX RISC workstations e Windows 95 Windows NT Personal Computers Computer gt Pentium 133 MHz gt 32 MB RAM Compiler Microsoft Powerstation Fortran 4 0 The code is easily ported as long as Fortran compilers are available that support the STRUCTURE and RECORD extensions A Macintosh version can be generated using the appropriate version of the Microsoft Powerstation compiler Unfortunately there is no free LINUX Fortran compiler available that supports STRUCTURE s and RECORD s or Fortran 90 features An adequate commercial compiler for LINUX is available from Absoft compare http marie mit edu templon fortran html 6 The LIAR project 2 3 Updates bug fixes and additional information The most recent information on LIAR is available through its home page on the World Wide Web http www slac stanford edu grp arb rwa liar htm Please check for changes in the User s Manual or use the ONLINE manual with the most recent information New versions of LIAR will be put to its AFS
114. ns the command CALC_TWISSP for positrons The results can be printed to the standard output with the commands PRINT_TWISS and PRINT_TWISSP It is advisable ALWAYS to calculate the Twiss parameters They are needed for all kinds of correction schemes feedbacks emittance bumps et cetera 5 6 Beam setup Before the actual bunch train is defined the initial beam conditions need to be specified with the command SET_INITIAL Afterwards the beam is setup with SET BEAM When the initial conditions are changed one must not forget to call SET_BEAM again After the first calls of SET_INITIAL and SET_BEAM only the parameters that change must be respecified By default the commands use the parameters that were specified for the previous call SET_BEAM also allows to put random errors on bunch length or charge If more than one bunch is defined then single bunch charges can be modified separately with the command SET_CHARGE The BNS autophasing energy spread for the given lattice and beam can be calculated with the command AUTOPHASE 5 7 Wakefield setup The wakefields associated with the beam and the accelerating RF structures are read in from separate input files compare section 8 2 The standard command for reading in transverse and longitudinal short range wakefields is SET_SR_WF In a modified version SET_SRQ_WF both dipole and quadrupole short range wakefields can be specified Long range transverse wakefields are specified with the command SET_WF_
115. o The sum ru s over the individual beam ellipses in the beam Ny and N can be chosen such that the emittance is calculated for the whole beam a single bunch or a single slice If the beam emittance is calculated then No is equal to 1 and N is equal to the product of the number of bunches the number of slices per bunch and the number of mono energetic beam ellipses per slice Ni Ni Ns Nm 78 Q is the charge in the beam ellipse and 0 7 07121 and 07 1 are the beam ellipse parameters as introduced in equation 2 The emittance is not a measure of luminosity reduction Large emittances often result from large tails that contain only little charge A figure of merit for luminosity reduction can be obtained from a cross correlation of a bunch with itself Beam tails are naturally de weighted We define the following luminosity reduction factor R Ns N T Tr 2 a ie QQ ex 1 7 79 Ta a2 Pla G2 403 j l i 1 0 0 2 1 J The double sum runs over all slices in a bunch The Zz are the average centroid offsets of the slices and the 0 are the RMS sizes of the given slice Note that this definition of the luminosity reduction factor oscillates The final value obtained in LIAR is therefore averaged over the last 5 of the BPM s in the linac The mismatch mag between the machine ellipse and the beam ellipse is of great importance in linear accelerators We use the following definition STOET o Here and 8 are the mach
116. o Twiss Set up beam Specify bunch population bunch length number of bunches slices macro particles Define short range WF s Define feedbacks at predefined markers Track beam through Define emittance bump using the feedback feedbk06 to minimize the emittance at a predefined marker Calibrate bumps using 1 to 1 correction SLC scheme Define second emittance bump 34 xfile infiles xmatch ext_elec yfile infiles ymatch ext_elec citer 1 silent j LOGBOOK reset RESET reference DO seed 1 100 100 l RESET corrector LOGBOOK set 1 f ERROR_GAUSS_STRUC name Ee EL x_sigma 200 e 6 y_sigma 200 e 6 ERROR_GAUSS_QUAD name S oor x_sigma 100 e 6 y_sigma 100 e 6 bpm t ERROR_GAUSS_BPM name eR x_sigma 100 e 6 y_sigma 100 e 6 reset 1 TRACKC cors slc xfile infiles xmatch ext_elec E yfile infiles ymatch ext_elec iter 1 dolog FDBK_GOLD LOGBOOK set 2 1 EMITC name ebump1 reset TRACKFC cors slc xfile infiles xmatch ext_elec yfile infiles ymatch ext_elec iter 6 citer 1 silent I EMITC name ebump2 reset TRACKFC cors slc xfile infiles xmatch ext_elec yfile infiles ymatch ext_elec iter 6 citer 1 silent dolog MEAS_REF choice emit ref 1 reset f _ MEAS_REF choice lum ref 2 reset f MEAS_REF choice bmag ref 3 reset f PRINT_REF ref 1 file out_e
117. o a particular problem thus avoiding memory problems The dimensions are transferred to the subroutine by including the file dimensions inc Command parameters 87 The dimensional constants can be accessed from the subroutine e g for checking of dimensions in the following way NBUNCH_MAX Maximum number of bunches NB_MAX NSLICE _ MAX Maximum number of slices per bunch NSMAX NS MAX NMP MAX Maximum number of monoenergetic beam ellipses per slice NBEAMP_ MAX Maximum number of beam particles This is NBUNCH_MAX NSLICE_MAX NMP_MAX STRUC_TYPE _ MAX Maximum number of different RF structure types WF_ERROR MAX Maximum number of error types for transverse long range wakefields NPIECE MAX Maximum number of pieces per RF structure NPIECE PER STRUC MAX NFDBK_MAX Maximum number of feedbacks NEBUMPMAX Maximum number of emittance bumps NELEM_MAX Maximum number of beamline elements NQUAD_MAX Maximum number of quadrupoles NBEND_MAX Maximum number of bending magnets NBPM_MAX Maximum number of BPM s NSTRUCT_MAX Maximum number of RF structures NXCOR MAX Maximum number of horizontal dipole correctors NYCOR_MAX Maximum number of vertical dipole correctors _ NMARKER MAX E Maximum number of marker points MAX_NREF Maximum number of reference points per BPM NSUPPORT_MAX Maximum number of support girders NATTACH_MAX Maximum number of elements that are attached to a single girder NRFBPM_MAX Maximum numbe
118. of the program CONST_VC Speed of light in m s CONST_QE Electron charge in Coulomb CONST_PI Value of 7 z CONST_EMASS Mass of the electron in GeV CONST_INFTY Infinity approximation 10 CONST_BCONV Conversion factor in p reB Local varibales with the same name must not be defined 7 8 Lattice description As all the other information the lattice is saved in the form of FORTRAN records which are defined as structures We define a list of elements which guides the user through the lattice The actual elements are saved in structures according to their types quads structures This allows an easy and intuitive access tothe properties of each element By including the file l ttice inc the following information can be accessed and changed 90 Internal data structure Element list The beamline is described as a list of elements An element holds all information which is not specific to the type of the element For specific information it points to the adequate entry in a type specific list ELEMENT NAME ELEMENT i S ELEMENT i DS ELEMENT i LDRIFT ELEMENT i ENERGY ELEMENT i IS_QUAD ELEMENT i IS_ BEND ELEMENT i IS_STRUC ELEMENT i IS_BPM ELEMENT i IS_XCOR ELEMENT i IS YCOR ELEMENT IS MARKER ELEMENT i POINTER Example Name of element i up to eight characters Longitudinal position of head of element i in m Longitudinal misalignment of quadrupole i in m This should not change the o
119. only one weighted average frequency With the slopes we can also allow for small errors in bunch spacing By including the file afs slac stanford edu public software liar release src_v1 9 beam inc the following information can be accessed and changed 96 Internal data structure Beam information The beam is divided into bunches slices and macro particles Since we might track up to 100 000 beam particles or beam ellipses in second order transport the handling of this information limits the CPU performance We try to implement the beam in a way that maximizes the cache hit rate For each beam particle we have phase space and beam size sigma matrix information The sigma matrix is symmetric so that only a triangle has to be saved BEAM i CHARGE Charge associated with beam particle i in C BEAM i X j Phase space vector of beam particle i J runs from 1 to 6 with j 1 is x horizontal position in m 2 is x horizontal beam angle in radian 3 is y vertical position in m 4 is y horizontal beam angle in radian 5 is z long pos wrt center of bunch in m 6 is E beam energy in GeV BEAM SIGMA Sigma matrix for the 2 dimensional coupled case and beam particle 1 The sigma matrix carries the beam size informa 66599 tion j runs from 1 to 10 with is SIGMA I 1 is SIGMA 2 1 is SIGMA 2 2 is SIGMA 3 1 is SIGMA 3 2 is SIGMA 3 3 is SIGMA 4 1 is SIGMA 4 2 is SIGMA 4 3 is SIGMA 4 4 a ll DO
120. or silent mode reduced standard out put EMITC_DEF_MKB 49 EMITC_DEF_MKB As EMITC_DEF but the emittance bump can be defined with multi knobs as well Note that EMITC_DEF_MKB does not perform any 1 to 1 correction after feedbacks or multi knobs E g non closure of bumps etc is NOT corrected Compare the command EMITC_MKB Note that FDBK or MBX1_NAME MBX2_NAME MBY1 NAME and MBY2_NAME must be specified A feedback has four degrees of freedom x x y y Every degree of freedom is replaced by a multi knob thus requiring four multi knobs two per plane NAME Name for the emittance bump must be set MBUNCH 1 Active bunch for emittance optimization FDBK Name of feedback loop to be used must be set if not multi knob MBXI1 NAME Name of Ist X multi knob must be set if not feed back MBX2_NAME_ Name of 2nd X multi knob must be set if not feed back MBYI_ NAME Name of 1st Y multi knob must be set if not feed back MBY2_NAME Name of 2nd Y multi knob must be set if not feed back WIRE Name of MARKER for wire measurement must be ee set ITER 3 Number of iterations for bump calibration WF_T_SR Le Flag for transverse short range wakefields WF_T_LR LT Flag for transverse long range wakefields WF_L SR La Flag for longitudinal short range wakefields WF_L_LR T Flag for longitudinal long range wakefields RFBUNCH 1 Bunch selection for RF BPM CITER 1 Number of 1 to 1 correction iterations
121. or which nominally would be equal to the quadrupole misalignments Finally the matrix R is given by 0 0 0 Ri Ra 1 0 0 Ri Ra TOR KoRia 1 0 Riu Ra 30 1 K2R 2 K3Ri 0 Ri Ra 30 KeoRig K3Riq Ky 2R12 Ry Ra where K is the integrated quadrupole strength Rj is the 1 2 transport matrix element from the quadrupole to the BPM R and Ra are the 1 1 and 2 1 matrix elements from the initial point to the BPM s After applying the quadrupole solution the movers on the accelerator structures are adjusted such that the average RF BPM reading on a girder is minimized Each structure has two RF BPM s one at either side Let s assume that structures are mounted on a single girder that has a mover at either end We then have 2 RF BPM readings z at the locations s with i running from 1 to N We then obtain the girder to beam offset Az at every location s from Ag s m st e 31 with and c m 3 32 This is a simple straight line fit to the RF BPM readings and 7 indicate the averages over all s and z In order to align the RF structures a mover at a location Sm is moved by Az s Adjusting both movers on a girder will thus minimize the average RF BPM reading 3 11 3 Dispersion free steering Quadrupole misalignments but also RF structure misalignments cause both trajectory deflections and centroid dispersion A measurement of the centroid dispersion then allows to compensate misalignments
122. ory Ax when the lattice is scaled equivalent to change in beam energy For the scaled lattice we need to recalculate the Twiss parameters primed quantities Then obtain for Az A Ar a z X Rigs 6 36 i 1 where the Rig are the transport matrix elements for the scaled lattice We define a lattice scaling factor x from the change AK in the quadrupole strength K as AK 1 37 R 37 Effects from non linear dispersion are neglected since we use more than one lattice scalings for our analysis The dispersion free solution should be local Dispersion bumps are not easily possible and linear and non linear dispersion are minimized simultaneously For a given lattice scaling the Rj are Rigi Rig sy BB sin y 38 The Twiss parameters are calculated with the longitudinal magnet positions the magnetic field values of the quadrupoles and the beam energy at each magnet The above model predicts the effect of dispersive deflections on the absolute trajectory z and the difference trajectories Az 1 Alternatively if we scale the lattice and measure z and Az x we can use the model to calculate corrector settings that minimize both zf and Az x With four sets of measurements in each 16 Theory concepts and features hysteresis cycle and n BPM s we define the vector B of measurements as q wi Az k1 Wi ri Az K2 W4 ka Az 13 WA 13 q W2 Ax m W r B Az k2 w
123. ossi ble choices are BPM beam offsets X and Y at the BPM s EMIT emittances X and Y at the BPM s LUM luminosity factors X and Y at the BPM s ENERGY beam energy at the BPM s ESPREAD beam energy spread at the BPM s BMAG beta mismatch X and Y at the BPM s BSIZE beam sizes X and Y at the BPM s DIVERGENCE beam divergences at the BPM s ERROR T Logical flag for beam offsets to include BPM offset errors RESET F Logical flag for resetting the reference to zero before eee filling it SILENT E Logical flag for silent mode no standard output BUNCH 0 Choice of bunch for observable 0 all REF 1 Number of reference to fill SUBREF 0 Number of reference to subtract before filling refer ence number REF 0 none MEAS_TRAIN MEAS TRAIN 61 At each marker location the bunch phase space information is available for the whole bunch train This command prints the phase space information for all bunches at a marker position into an ASCII file For a list of available markers refer to the command SHOW_MARKER FILE MARKER Name for output file must be set Name of marker must be set The output file provides the following information F O0Oto 0300 B WNP PR Bunch number Horizontal trajectory offset X m Horizontal trajectory angle X rad Vertical trajectory offset Y m Vertical trajectory angle Y rad Horizontal norm bunch emittance m rad Vertical norm bunch emittance m r
124. owed unit numbers range from 30 to 49 You must select a unit from this range OUTFILE Optional output file name if OUTLUN is not 6 SET_CORRECTOR Change the field value of a dipole corrector NAME Name of the dipole corrector RESET F Flag for resetting old field value to zero FIELD 0 Field change in T m KICK 0 Alternatively kick change in radian 74 SET_INITIAL SET_ FEEDBACK Change settings of a specified feedback loop NAME Name of feedback loop to set must be set PLANE both Active plane for feedback X Y BOTH NONE BUNCH 1 Active bunch for feedback O all 0 Desired Az in m 0 Desired Az in rad Y 0 Desired Ay in m 0 Desired Ay in rad F Logical flag for resetting of setpoints SET_INITIAL Set initial beam conditions The command has to be called separately for electrons and positrons The default values for SET_INITIAL are only set for the first call All calls after the first call take their defaults from the last previous call Therefore there is no need to respecify all options each time After changing initial conditions the command SET_BEAM must be called so that the changes are implemented DO NOT specify EMITX Y and NEMITX Y at the same time Decide for one option POSITRON F Define initial conditions for positrons Default is elec trons X O Initial x position in m ANGX O Initial x divergence in rad Y O Initial y position in m ANGY O Initial y divergence
125. p y and y are the slice offsets divergences needed to minimize the emittance The number of the slices in the bunch is N The weights W of the slices are defined as Qi Q where Q is the total bunch charge and Q is the charge of the slice The absolute minimum of the above x occurs when all the y y are equal to the z x However a single emittance bump cannot provide enough degrees of freedom to actually achieve that We express the slice positions y and divergences y in terms of the setpoints xy and xp for the first feedback W 53 Aizto BL 54 Cito D x5 55 Ui Y The coefficients A B Ci and D are obtained experimentally by varying the setpoints xy and x while observing the y and y l Solving for the minimum x provides the following solution for the optimal setpoints port ma gt H K 56 To Theory concepts and features 19 The vector K depends on the slice offsets and divergences at the observation point and is defined as follows K y W 2 A gt Wiz Ema E Wi x C y Wiz y wo 57 ta E WiC EQ 2 Wiri 2 WiC E Way Wa 58 Ky SWB 5wa Ew 0 Lol L wat Sw 69 a E W 2 D y WB gt W z 5 W D X Wiz 5 wa 60 The 2 x 2 matrix H depends only on the transfer coefficients A B C and D 2 2 E W A wa ro Eme we 61 20 E W A C WA Y we 62 t A He Eras z wa vate WD ba wD l 63 Ay 20
126. plane for second vertical axis Bunch selection for second vertical axis Minimum value for second Y axis automatic if not specified Maximum value for second Y axis automatic if not specified Title for second Y data selection automatic if not specified Choose plot type for second data series Compare to LINTYPE Display graphics online on the terminal Default is true for LIAR in interactive mode and false for the batch mode Save graphics into a Postscript PS file Default is false for LIAR in interactive mode and true for the batch mode Name of Postscript file Save graphics into Encapsulated Postscript EPS file Name of Encapsulated Postscript file Name of printer to send the Postscript file to only UNIX STYLE automatic Two plot styles are available 1 ONE All data is plotted versus a single axis in a single plot 2 2AXIS Two series of data are plotted into a sin gle plot against two different axes KEY left Location of the data label Valid choices are left right top bottom outside or below Any reasonable combination of those parameters is valid as well The choice is passed directly to gnuplot and therefore it is ri important to type in lower letters ERROR T Include element errors into the plot 63 64 PLOT Here we give a summary of valid choices for the SELECT parameter We also give the valid choices for horizontal and vertical data for the specified element type
127. r of RF BPM s per structure NSEED MAX Maximum number of seeds per set in the logbook NSET_MAX Maximum number of sets in the logbook NPAR_MAX Maximum number of parameters for a single LIAR command NMULTLMAX Maximum number of multi knobs NMULTLELEMENT_MAX Maximum number of elements per multi knob 7 5 Command parameters A command is defined with any number of options The options are transferred to the subroutine in the record PAR by including the file par inc The parameters can be accessed from the subroutine in the following way 88 Internal data structure PAR COMMAND Command and subroutine name PAR RNUM Number of REAL 8 parameters specified with command PAR RNAMK 1 Name of i parameter specified PAR RVALUE i Value of i parameter specified REAL 8 PAR LNUM Number of LOGICAL parameters specified with command PAR LNAME i Name of i parameter specified PAR LVALUE i Value of i parameter specified LOGICAL PAR SNUM Number of STRING parameters specified with command PAR SNAME i Name of i parameter specified PAR SVALUE i Value of i parameter specified STRING The following example illustrates how the REAL 8 parameters could be processed in a subroutine all vari ables execept PAR are defined locally LOGICAL and STRING parameters are accessed in equivalent loops REAL 8 DX DY TILT XCUT YCUT TILTCUT INTEGER 4 SEED c Set default RMS values for hor and vert misalignment tilt and c
128. rder of elements Length of drift before head of element in m Design energy at element i in GeV Logical flag whether element i is a quad or not Logical flag whether element i is a bending magnet or not Logical flag whether element i is a structure or not Logical flag whether element i is a BPM or not Logical flag whether element i is a X corrector or not Logical flag whether element i is a Y corrector or not Logical flag whether element i is a MARKER or not Position number of element i in type specific list of quad s structures IF ELEMENT i IS_QUAD WRITE QUAD ELEMENT 1 POINTER K Quadrupole list All quadrupoles share the same basic structure Splitted quadrupoles are allowed Elements which are slices of one physical quadrupole should all point to the same entry in this list _ assuming same misalignments QUAD i LENGTH Length of quadrupole i in m QUAD i K Integrated nominal quadrupole strength in T QUAD i DK Relative error in quadrupole strength AK K QUAD i DX Horizontal misalignment of quadrupole i in m QUAD i DY Vertical misalignment of quadrupole i in m QUAD i TILT Rotation about the longitudinal direction in Radian Bending magnet list Bending magnets are implemented without synchrotron radiation BEND i LENGTH Length of quadrupole i in m BEND i B Nominal bending field in T BEND i DB Relative error in bending field A B B BEND i TILT Rotation about the longitudin
129. re only implemented in the simplified form as described in the previ ous section At this time only a two bunch scheme is implemented but a scheme for n bunches can easily be provided The input file is organized into comment lines indicated by a in the first row and data records that consist 1 of the longitudinal position s m behind the leading bunch and 2 the longitudinal wakefield in V pC m We give an example of an input file SLC LONGITUDINAL WAKE S M WAKE V PC M 0 0000E 00 2 5850E 02 7 5000E 04 1 2527E 02 1 5000E 03 9 1271E 01 2 2500E 03 7 1900E 01 3 0000E 03 5 8458E 01 2 9625E 01 1 3539E 00 2 9700E 01 5 4442E 00 2 9775E 01 1 6743E 01 2 9850E 01 1 5822E 01 2 9925E 01 5 6519E 00 8 2 5 Arbitrary initial bunch distribution along z The initial bunch distribution in z can be defined from an input file Its integral is required to be 1 An example for SLC compare infiles directory is Description of input files 107 SLC bunch shape as measured with the Streak camera Particle e Compressor voltage 42 MV The data is averaged over 30 40 measurements Time jitter was removed Integral of distribution normalized to 1 Data R Holtzapple reformatted R Assmann Time ps z mm Fract Intensity 21 00000 6 295642 1013589E 03 20 00000 5 995850 1749323E 03 19 00000 5 696057 5837724E 03 18 00000 5 396265 4360712E 03 17 00000 5 096472
130. rection methods an improved wakefield model might be used Serious correction problems will most likely result from local errors in the quadrupole fields the acceleration and the RF phases Those errors can be set in LIAR and can be included or excluded from the Twiss calculation 3 6 Beam tracking Beam ellipses are tracked fully coupled in 6D without synchrotron radiation Both the centroids X and the beam ellipses o are tracked through the lattice Xx RXo 11 and oi RoR 12 The beam can be defined as a sequence of electron and positron bunches The lattice is scaled internally according to the sign of the bunch charge Wakefields can be arbitrarily switched on and off for the tracking 3 7 Dipole wakefields Both single bunch and multi bunch dipole wakefield effects are included for the transverse plane The wakefields are read in as parameterizations from design specific input files compare section 8 2 In the transverse planes imperfections of the long range wakefields can be defined As long as there are no im perfections the transverse wakefield kick per unit offset per energy per charge is the same in all structures Long range wakefield imperfections are defined for a small number of imperfection types that are ran domly assigned to the RF structures Long range longitudinal wakefields can be represented as well A slice experiences an energy loss 6 due to short range longitudinal wakefields that ar
131. ring can be used for searching on the names e g QF SEED for random misalignments Flag for resetting previously assigned quad errors to zero Flag for misaligning BPM s within split quad s at the same time Average horizontal misalignment in m RMS horizontal misalignment in m Sigma cut on Gaussian tails RMS vertical misalignment in m RMS rotation error around the longitudinal axis in rad RMS strength error AK K ERROR_GAUSS_STRUC ERROR GAUSS_STRUC Assign random Gaussian imperfections to the RF structures NAME KE Name of structures to misalign specifies all The string can be used for searching on the names e g K02 SEED Time SEED for random misalignments RESET T Flag for resetting previously assigned structure errors to zero SPLIT F Flag for optional splitting of combined structures SLC RESOL 0 Resolution of RF BPM s NUM ERR TYPE 1 Number of error types for structures X_MEAN 0 Average horizontal misalignment of whole structure in m X_SIGMA 0 RMS horizontal misalignment of whole structure in m X_CUT 3 Sigma cut on Gaussian tails Y SIGMA 0 RMS vertical misalignment of whole structure in m PX_SIGMA 0 RMS horizontal misalignment of pieces in m PY_SIGMA 0 RMS vertical misalignment of pieces in m PHAS_SIGMA 0 RMS phase error in radian GRAD _SIGMA 0 RMS gradient error AG G EXEC 51 Execute a command file This command is identical to READ and
132. rown et al TRANSPORT A computer program for designing charged particle beam transport systems May 1977 SLAC 91 Rev 2 2 K Bane SLAC 3 D C Carey K L Brown and EC Iselin Decay Turtle Trace Unlimited Rays Through Lumped Elements A Computer Program for Simulating Charged Particle Beam Transport Systems Including Decay Calculations SLAC 0246 1982 4 K Kubo et al Phase space simulation program for main linacs of future linear colliders May 1995 NLC Note 14 5 T Raubenheimer Generation and Acceleration of Low Emittance Flat Beams for Future Linear Colliders PhD thesis SLAC 387 6 H Grote and F C Iselin The MAD program version 8 10 User s reference manual CERN SL 90 13 AP 7 F Ebeling et al MAFIA user manual 1992 8 K Bane and P Wilson Proc of the 11 Int Conf on High Energy Accelerators CERN Birh user Verlag Basel 7 1980 p 592 9 B A Baklakov et al Investigation of Seismic Vibrations for Linear Collider VLEPP Sov Phys ZhTF vol 63 No 10 1993 p 122 in Russian See also V Shiltsev et al Measurements of Ground Vibrations and Orbit Motion at HERA DESY HERA 95 06 10 N Kroll et al Manifold damping of the NLC detuned accelerating structure presented at the 6t Workshop on Advanced Accelerator Concepts Lake Geneva WI June 12 18 1994 SLAC PUB 6660 11 A W Chao and R W Cooper Transverse Quadrupol
133. s Rize oo Rizs and solve for the vector X of corrector settings min W B AX llo 44 The solution X provides a set of corrector strengths that minimizes the trajectory and dispersion measure ments simultaneously Instead of solving for corrector kicks we could have solved for quadrupole positions that minimize the absolute trajectory and the dispersion 3 11 4 Other beam based correction schemes Wake free steering algorithm not yet fully implemented 3 11 5 Energy feedback Fix the energy at a location using dedicated feedback klystrons not yet implemented The actual beam energy E is adjusted to the energy setpoint Fsetp Note that we do not define any energy reference as for the position feedbacks 3 11 6 Position feedback A generic implementation without worrying about technical feasibility is realized A feedback is defined by a reference position and angle Tres and x 45 ref and the setpoints asin and se 46 at a point in the linac Two upstream correctors that are reasonably close and efficient are used to adjust the actual beam position and angle team Zbeam to the reference values plus the setpoints Lbeam Tref Lsetp 47 fr 4 l J r ed Theam Tref ag Tsetp 48 A feedback can be iterated in order to achieve the best agreement In the LIAR implementation the Theam and Theam at the feedback points are calculated with respect to the design plane That is different from a 18 Theory concep
134. s not yet compiled volunteers are welcome In order to run LIAR as a SLAC user get your personal UNIX account and e g login on morgan01 Then you could proceed 1 Copy directory tree gt cp r p afs slac stanford edu public software liar release liar 2 Change to run directory gt cd liar run 3 Copy example command file gt cp examples cmdslcl 4 Run LIAR and execute command file gt liar cmdslcl Getting started 25 5 orexecute LIAR in interactive mode gt liar The Windows 95 PC version of LIAR runs as a console application in a DOS window LIAR can be run in two different modes If it is started from the command level without any parameters e g liar then it will enter into an interactive mode and the user is prompted for input ILE IIL II I MARA Version 1 9 L I near A ccelerator R esearch code SLAC 1997 225 Ralph Assmann Karl Bane Tor Raubenheimer Kathy Thompson LIAR gt By typing the command LIAR gt load file cmdfile the command file cmdfile would be executed from the interactive program level After all commands in the file have been executed the control is returned to the user who could now submit a few final commands to complete the job The interactive mode is used best for small simulations or for making sure that a bigger job will provide useful results The load command can only be used from the interactive level of LIAR Nesting of command files is not allowed LIAR auto
135. t Long range longitudinal wakefield for SLC 9 DDSTE10_01_001 in_tlrw Long range transv wakefield file for NLC 10 lat90 trns 90 deg lattice at 20 GeV with structures but without nominal acceleration Special files needed for some LIAR options are 1 xmatch ext_elec SLC X corrector BPM matching file 2 ymatch ext_elec SLC Y corrector BPM matching file 3 slc trns_new SLC design lattice with splitted RF structures 4 ldp format SLC phase advance format file 5 sigz_ e42 slc dat Measured longitudinal bunch distribution available for 30 MV to 42 MV In the next sections we give descriptions and references for the input formats which are used by LIAR If LIAR is to be extended to other accelerators than SLC and NLC those formats should be used or alternatively new input routines can be written 8 1 Lattice description The lattice can be entered as either a MAD TAPE file or a TRANSPORT input file The MAD TAPE files are generated using the MAD program and the TWISS command The format of these files is described in the MAD manual The TRANSPORT file format must be the old numeric format where element types are identified by numeric codes Labels are enclosed in single or double quotes and up to eight characters are read Continuation lines are distinguished with ambersands and comments begin with an opening parathesis and extend for the rest of the line Units can be changed with type code 15 but are NOT set with the comman
136. ter each tracking in LIAR 30 Getting started 4 5 MATHEMATICA interface LIAR has been run within the MATHEMATICA environment The interface allows to edit LIAR input files run the program and to process the LIAR output files all within the MATHEMATICA environment The mathematical power of MATHEMATICA can be very helpful in testing advanced optimization algorithms or in comparing analytical theories with simulation results The MATHEMATICA interface consists primarily in a number of functions that transfer LIAR information into MATHEMATICA objects and often also allow to plot them easily Further information can be obtained from Gennadi Stupakov at SLAC e mail stupakov slac stanford edu 4 6 Examples of SLC command files We show two examples for SLC simulations A simple SLC case allows the new user to get familiar with the concept of the LIAR command language and the basic philosophy in setting up a simulation An advanced simulation demonstrates the capabilities of the computer program in defining multiple imperfections and advanced correction schemes 4 6 1 Simple SLC study The first example considers a simple case where we just simulate the effect of an injection offset of 200 um in both planes It includes wakefield and dispersion effects and a setup for BNS damping The trajectories and emittances are calculated The input file can be found in afs slac stanford edu public software liar release examples cmdslcl The liste
137. th of the linac resulting in a two dimensional table of R 2 s In LIAR we have implemented the simulation and analysis of two incoming betatron oscillations as obtained from a possible diagnostic pulse see command MEAS_PHASE2 24 Getting started 4 GETTING STARTED WITH LIAR This section provides a basic introduction to LIAR First we explain how to set up the program Then we describe the basic rules of the LIAR command language and the possibility of automatic command loops The standard LIAR output is explained and we provide two examples of both simple and advanced SLC simulations 4 1 Setup LIAR is presently implemented for UNIX and MS windows operating systems Its home directory is located in a SLAC AFS account under UNIX The released version is world readable and is located at afs slac stanford edu public software liar release The directory tree is as follows bin aix6000 Executable for the IBM AIX unix system i examples Example command files doc Documentation in LaTex and Postscript format infiles Required input files lattices run Directory to run command examples src_v1 9 Source code for LIAR version 1 9 including Makefile SLAC workstations that are suitable for running LIAR include the SCS public machines morgan0l1 to mor gan06 The liar directory tree can be copied to a private UNIX machine and recompiled using the Makefile which is provided A VAX VMS version is foreseen but i
138. the SLC energy profile Reading the quadrupole information replaces the original information The acceleration is adjusted by putting RF gradient errors CORR F Logical flag for reading corrector information into a reference cannot be changed POSITRON F Flag for electrons or positrons not implemented PRINT F Print gradient errors from adjusting the energy profile into the local file E PRINT READ_SLC_ORBIT 69 READ SLC_ORBIT Read an SLC linac orbit file into a BPM reference FILE Input file name must be set REF O Reference number to save the orbit in 1 to 20 CHANGEXY F Flag for exchanging x and y information READ_TRNS Read the lattice and the optics from a TRANSPORT input deck compare description of input files The initial energy must be included in the command line In addition one can optionaly set the number of pieces per structure which is nominally set to 1 and the number of structures per girder which is also nominally set to 1 If NGIRDER is specified every NGIRDER structures are assigned to a girder There is no check for quads or drifts that might disrupt this girder assignment INFILE Input file name must be set ENERGY 2 Injection energy in GeV NPIECE 1 Number of pieces per structure NGIRDER 1 Number of structures per girder REF_AVG Calculate and save the average of a number of reference trajectories FIRST Number of first reference to include NB Number of referenc
139. the beginning of each tracking WF_L SR Aglice l Deacceleration in V C m from short range longitudi nal wakefields for each relative slice position WF_L LR A bunch ipiece Deacceleration in V C m from long range longitudi nal wakefields for each bunch spacing and each piece position ipiece The compensation with the RF voltage must be taken into account correctly We as sume no errors in the accelerating RF voltage WF L DER A punch ipiece Slope of longitudinal long range wakefields wrt z in V C m assuming only one weighted average fre quency This allows both to extrapolate the long range wakefields within a bunch and to include small errors in bunch spacing WF_L DDLR Apunch ipiece Second derivative of longitudinal long range wake fields wrt z in V C m WF_L ELOSS ibunch islice ipiece Longitudinal wakefield deacceleration after convolu tion with beam in GeV for every bunch slice each _ piece position ipiece 100 Internal data structure 7 11 In LIAR feedback loops and emittance bumps can be implemented at marker points The include file Feedback loops and emittance bumps feedback inc provides access to the internal definitions of feedback loops and emittance bumps A feedback loop is implemented such that the observation point is set to any marker The two most efficient upstream dipole correctors are found in order to manipulate z z y and y at the observation marker point Al
140. tions and their correction Alternatively initial beta and alpha functions can be specified Getting started RESET all SET_CONTROL debug 0 outlun 46 outfile test txt READ_TRNS infile infiles slc trns energy 1 19 npiece 1 l SET_RF energy 46 scale t kloss 0 66d14 charge 3 5d10 phasel 22 lswitchl 800 phase2 16 5 l CALC_TWISS betax 3 40 betay 3 08 alphax 0 156 alphay 0 066 I SET_INITIAL energy 1 19 espread 0 014 nemitx 3 d 5 nemity 0 35d 5 m match i SET_BEAM current 3 5d10 blength 1100 d 6 nb oly ns 20 nm 3 SET_SR_WF file feedbk06 DEFINE_FEEDBACK marker feedbk11 DEFINE_FEEDBACK marker feedbk18 1 TRACK li EMITC_DEF name ebumpl fdbk feedbk06 wire wire0001 iter 8 cors slc xfile infiles xmatch ext_elec yfile infiles ymatch ext_elec citer 1 silent EMITC_DEF name fdbk wire iter cors DEFINE_FEEDBACK marker infiles srwf_slc dat ebump2 feedbk11 wire0002 6 tsla 33 Reset data Send standard output to file test txt on unit 46 Read transport input deck and define injection energy Set final beam energy and RF phases Scale lattice accordingly Calculate Twiss values Specify initial beta and alpha functions Specify initial energy energy spread normalized emittances Match initial beta and alpha t
141. ts and features real implementation where a number of BPM readings are used to fit Zpeam and Theam at one location in the lmac An obvious problem occurs when the beamline has large long wavelength misalignments A real feedback would not see those kinds of misalignments since the whole beamline locally moves However in LIAR the generic feedbacks would try to steer the beam back to the design plane which obviously is wrong A command is provided to misalign the feedback reference to the beamline FDBK_MISAL This generic feedback definition is well suited to describe the feedback stabilization of slow drifts for times larger than about 10 seconds It is not suitable e g to study the pulse to pulse feedback response to fast changes 3 11 7 Global emittance bumps A global emittance bump correction is implemented Emittance bumps are trajectory oscillations that are excited with a feedback at one point sy and closed with another feedback at some other point s1 The minimal emittance using such a bump is obtained using a deterministic approach Minimizing the emittance means minimizing the Courant Snyder invariant We define a x at an observation point downstream of the two feedbacks X yo 206 2 Bo 49 with Ns 2 o 2 Wilg yi Ema va 50 Ns O y E Eto Ewe 651 i l i l 2 3 Wala Y Em 52 The x and z are the offset and divergence of every slice i before the application of the emittance bum
142. ty function 7 2 Adding a command and subroutine For adding a subroutine first copy the liar directory tree to your local account see above Then go into the src_v1 9 subdirectory and do all your changes there You should t add your subroutine to the file addition f and 2 specify the command and subroutine name to the main program in the file l ar f Just look for then copy an existing ELSEIF block and modify the command name the subroutine name and the z comment as appropiate for your addition 86 Internal data structure DO NOT MODIFY EXISTING SUBROUTINES COPY THEM INTO addition f AND RENAME THEM ONLY AFTER THAT YOU SHOULD MODIFY THEM MODIFYING ORIGINAL COM MANDS SUBROUTINES WILL LIKELY RESULT IN SERIOUS INCOMPATIBILITIES It is important to note that all subroutines are called with an errorflag INTEGER 4 as the only parameter INTEGER 4 ERRFLAG _ CALL subroutine ERRFLAG IF ERRFLAG NE O THEN WRITE ERR gt Command failed PAR COMMAND ENDIF The Makefile will automatically detect your addition and both compile and link it You need to type make liar on the UNIX level while in the src_v1 9 directory A new executable liar will be generated Just add it into directory bin aix6000 The command can now be used inside LIAR After the addition is tested and debugged it can be included into the general release of the program by submitting it to the LIAR s coordinator A short description of the comm
143. um ease of use Presently versions of LIAR are compiled for UNIX and MS Windows operating systems An interface for the graphical visualization of results is provided Scientific graphs can be saved in the PS and EPS file formats In addition a Mathematica interface has been developed LIAR now contains more than 40 000 lines of source code in more than 130 subroutines _ _ This report describes the theoretical basis of the program provides a reference for existing features and explains how to add further commands The LIAR home page and the ONLINE version of this manual can be accessed under http www slac stanford edu grp arb rwa liar htm Contents 1 Contents 1 CONTENTS 2 THE LIAR PROJECT 2P Crosschecks ra e a a A O O 22 Compatibility e EN AA IN Beco sh 2 3 Updates bug fixes and additional information 3 THEORY CONCEPTS AND FEATURES 3 1 Phase space description ica bt a a E A A 3 2 BEAM MESCTIPUOM eras in da ah Gee el We A ae ED BY ea Bice Eh ee ae ae S55 Beamline elements dia Gb ig a se mace wh ase A ae 3 4 Beam energy and Rf phases il AA Ew ee ee Se eS BA 30 SOptiescalculavions lt Bc ats aa See as A AA Wg edd 3 6 Beam tracking anne a a RPGS st eR ge Gone ir oe eget Be box e a Dip lewakefields 2 crsa tah oe o Ripe tee Oey ee at MS a 3 8 Quadrupole wakeniclds dec siu heed e were wk Bae eRe eas 3 9 J St tic imperfections m eyo eae Moy ts SSA ES he ge te a ee aL 3 10 Dynamic imperfections y AE Bae K
144. ut Name for output file name NAV 16 Number of BPM s for averaging of R12 s at the end of the linac SENS_YQUAD Get sensitivity of final BPM reading for quadrupole offsets along the linac equivalent R12 elements DY 100 d 6 Strength of kick rad to be used FILE sens ykick out Name for output file name NAV 16 Number of BPM s for averaging of R12 s at the end of the linac 72 SET_BEAM SET_BEAM Set up the beam in bunches slices and monoenergetic macro particles The command assumes that the initial conditions have been set up properly with SET_INITIAL The default values for SET_BEAM are only set for the first call All calls after the first call take their defaults from the last previous call Therefore there is no need to respecify all options each time CURRENT Number of electrons per bunch must be set ERRCURRENT 0 One o amplitude of a random error that is added to the value of CURRENT e g current jitter CUTCURRENT 3 Number of sigma cut for random e current error CURRENTP Number of positrons per bunch ERRCURRENTP 0 One g amplitude of a random error that is added to the value of CURRENTP CUTCURRENTP 3 Number of sigma cut for random et current error BLENGTH RMS bunch length in m must be set ERRBLENGTH 0 One amplitude of a random error that is added to e the value of BLENGTH e g bunch length jitter CUTCURRENT 3 Number of sigma cut for random e current error ECUT 3 Ener
145. wake function for the SLAC linac was calculated by Bane and Wilson 11 12 W Az 0 38 x 10 m Az 1 5 mm 693 0 16 A2 1 mm 24 The quadrupole wake function for other accelerators can be estimated by scaling from the dipole wake function 12 Theory concepts and features 3 9 Static imperfections Imperfections are understood to be static if their magnitudes do not significantly change on an hourly time scale Here we give a list of error types that are presently implemented 1 Quadrupoles Transverse positions rotation angle about longitudinal direction roll strength 2 BPM s Transverse positions transverse positions with respect to quadrupole centers finite resolution 3 Accelerating structures Transverse positions offset misalignment gradient RF phase Structures are misaligned on girders as whole structures or in sub pieces 3 10 Dynamic imperfections Dynamic imperfections are imperfections which may change from pulse to pulse or may drift significantly over minutes or hours 1 Ground motion Random ground motion vibrations and drifts as predicted from the ATL model 9 o A T L 25 where T is the time in seconds and L is the distance in meters and A is a constant 2 Timing fluctuations Random or systematic changes of the RF phase in the entire linac 3 Initial conditions Random and systematic changes of the initial beam parameters incoming posi tion intensity phase jitter

Download Pdf Manuals

image

Related Search

Related Contents

maemo 4 Quick Start Guide  ADJUDICACION DIRECTA DE MENOR CUANTA CMAC  FS2009USB(ARM) - Equinox Technologies UK Ltd.  Reflecta AFM 2000      

Copyright © All rights reserved.
Failed to retrieve file