a brief introduction of sad
play

A brief introduction of SAD with a design example K. Oide 18-19 - PowerPoint PPT Presentation

Yukinori Kobayashi (KEK) Tsukasa Miyajima (KEK) Kazuhito Ohmi (KEK) Katsunobu Oide (CERN/KEK) David C. Sagan (Cornell U.) Local Organization Committee Noboru Yamamoto (KEK) Yoshihiro Funakoshi Kaoru Yokoya (KEK) Kazuro Furukawa Frank


  1. Yukinori Kobayashi (KEK) Tsukasa Miyajima (KEK) Kazuhito Ohmi (KEK) Katsunobu Oide (CERN/KEK) David C. Sagan (Cornell U.) Local Organization Committee Noboru Yamamoto (KEK) Yoshihiro Funakoshi Kaoru Yokoya (KEK) Kazuro Furukawa Frank Zimmermann (CERN) Kentaro Harada Hiroyuki Harada (JAEA) Naoko Iida Susumu Kamada Haruyo Koiso Toshihiro Mimashi Akio Morita Takashi Obina Yukiyoshi Ohnishi (Chair) Kazuhito Ohmi Katsunobu Oide Yoichi Sato Hiroshi Sugimoto Demin Zhou Workshop SAD2019 3-go-kan Seminar Hall, KEK, Japan 18-19 September 2019 A brief introduction of SAD with a design example K. Oide 18-19 Sept. 2019 SAD Workshop 2019 @ KEK A SAD source: https://github.com/KatsOide/SAD A command manual with some description of beam dynamics: https://hep-project-sad.web.cern.ch/SADHelp/SADHelp.html SAD home page @ KEK: http://acc-physics.kek.jp/SAD/index.html Many thanks to N. Akasaka, K. Hirata, S. Kamada, M. Kikuchi, H. Koiso, S. Kuroda, A. Morita, K. Ohmi, Y. Ohnishi, S. Yamada, N. Yamamoto, K. Yokoya, D. Zhou, F. Zimmermann, and all contributors and users of SAD. � 1

  2. What SAD can do? • Design of accelerator beams • Optics calculation & matching • 5D and 6D optics • ring & linac • geometry matching • off-momentum matching • finite-amplitude matching • Emittance calculation of an electron ring with synchrotron radiation, intrabeam scattering, space charge • 6D full symplectic tracking of macro particles with synchrotron radiation, strong- weak beam-beam, space charge, radiative Bhabha,… • Polarization calculation (under development) • Parallel computing by fork processes and shared memory • Mathematica -like scripting language • Graphics using Tcl/Tk widgets • Accelerator control & data taking via EPICS interface • and more … � 2

  3. An example: main booster ring for FCC-ee with 4 IP IR Let us design a 1/4 of the main • booster for FCC-ee @ 182.5 GeV RF RF with a single SAD deck for: optics matching • IR IR emittance adjustment • 13.137 km chromaticity correction with 2 • RF RF family, non-interleaved sextupoles IR check dynamic aperture • ρ = Arc : � B P P U 1/4 Ring ( QRING ) S - m 0 0 6 1 B P : F P U R S 13.137 km SUPPA - SUPPA ρ = ARC : � IRSTR : 1568 m � 3

  4. Starting SAD SAD can be installed on many unix-like systems including linux, macOS, FreeBSD, • cygwin, etc. On LXPLUS and HPC, SAD is invoked by • /eos/experiment/fcc/ee/accelerator/SAD/oldsad/bin/gs filename X is needed for graphics • SAD starts in “MAIN” mode: • theresa:~/SAD/oldsad>gsd /scratch/oide..87208~example_booster.sad~ (gsd is a local script to invoke SAD as above) *** Welcome to SAD Ver.1.1.6.9.4k64 built at 2019-09-11 16:53:46 +0200 *** *** Today: 01:53:10 Sunday 09/15/2019 *** OFF LOG ECHO;READ 77 ; 1 ! ! This is a tutorial for SAD to construct an electron ring ! for the FCC-ee main booster with the 4 IP configuration. ! ! In each line, after ! is ignored, except within "". ! ! SAD starts in the "MAIN" mode which is used to define elements and beam lines. ! However, they can be (re)defined in the "FFS" mode later. ……. This example files is available at (SAD_ROOTPATH)/script/example_booster.sad . � 4

  5. MAIN mode for component definitions • SAD starts in “MAIN” mode, which defines optics elements and beam lines. They can be (re)defined in the “FFS” mode later. • Syntax: ( element type ) name = ( keyword = value-expression [ unit ] … ) … ; • Element types: DRIFT, BEND, QUAD, SEXT, OCT, DECA, DODECA, MULT, SOL, CAVI, BEAMBEAM, MARK , etc., and LINE . • Math expressions with real variables and some functions are usable for value. ! Define drift spaces ! Multiple drifts can be defined by a single DRIFT until ";". ! DRIFT LX03 = (L = 0.3) LSX = (L = 2.8 + 0.3*2) LSA = (L = 25) LSB = (L=25) ! SAD uses the SI unit, radian, and eV. LM = (L=30) LRF = (L=15) ! expressions with real variables and some basic math functions can be used. LLA = (L=8) LLB = (L=8) ; ! ! Define dipoles with temporary values. ! Actual values will be determined later. ! BEND B1 = (L=25 ANGLE=0.002 E1 = 0.5 E2 = 0.5) ! L is the arc length. ; ! E1 and E2 are the edge angles at the entrance and exit, divided by ANGLE. ! E1 = E2 = 0.5 means a rectangular dipole. ……. � 5

  6. MAIN mode (quads and sexts) ! ! Define quads with initial strengths ! Strengths will be determined by matching beam lines later. ! QUAD QF = (L=3 K1=0.05) QD = (L=3 K1 = -0.05) ! K1 = B'L/(Brho) , hor. focusing is positive. QSA1 = (L=3 K1=-0.05) ! quads for dispersion suppressors A QSA2 = (L=3 K1= 0.05) QSA3 = (L=3 K1=-0.05) QSA4 = (L=3 K1= 0.05) QSA5 = (L=3 K1=-0.05) QSB1 = (L=3 K1=-0.05) ! quads for dispersion suppressors B QSB2 = (L=3 K1= 0.05) QSB3 = (L=3 K1=-0.05) QSB4 = (L=3 K1= 0.05) QSB5 = (L=3 K1=-0.05) QMF = (L=3 K1= 0.05) ! quads for IR straight sections QMD = (L=3 K1=-0.05) QRF = (L=3 K1= 0.05) ! quads for RF section QRD = (L=3 K1=-0.05) ; ! Define sexts ! The strengths "K2" = B’'L/(Brho) will be determined by chromaticity correction later. ! SEXT SF = (L=2.8) SD = (L=2.8) ; � 6

  7. MAIN mode (RF and MARKER) ; ! Define RF cavity ! The voltage will be defined later to adjust the bunch length. ! "FREQ" is the rf frequency, but no need to be a harmonic of the revolution frequency. ! If an exact harmonic is necessary, use "HARM" instead. ! CAVI CAV = (FREQ = 400 MHZ) ; ! Define markers, which are necessary at the beginning of a beam line. ! Markers are also used to keep and transfer Twiss parameters to other beam lines in matching. ! MARK F1 = (BX = 10 BY = 10) ! betax = betay = 10 m as the initial values. FR = (BX = 10 BY = 10) FM = (BX = 10 BY = 10) � 7

  8. MAIN mode (some elementary beam lines) ! Now define beam lines: ! ! short sections for sexts: LINE SLF = (LX03 SF LX03) SLD = (LX03 SD LX03) ! Arc "5*FODO" with non-interleaved sextupole pairs: FODOARC = (F1 QF SLF B1 LX03 QD LSX B1 LX03 QF LSX B1 LX03 QD LSX B1 LX03 QF SLF B1 LX03 QD SLD B1 LX03 QF LSX B1 LX03 QD LSX B1 LX03 QF LSX B1 LX03 QD SLD B1 LX03) SUPPA = (-F1 ! A negative sign means the reverse orientation; alpha, etap, zetap, R2, R3, dpx, dpy are reversed LSA QSA1 LX03 B1 LX03 QSA2 LLA QSA3 LLA QSA4 LLA QSA5 -FM) ! Suppressor from IR to arc SUPPB = ( F1 QF LSB QSB1 LX03 B1 LX03 QSB2 LLB QSB3 LLB QSB4 LLB QSB5 FR) ! Suppressor from arc to RF FODOIR = (FM LM QMF LM QMD ) FODORF = (FR LRF CAV LRF QRF LRF CAV LRF QRD ) IRSTR = (SUPPA 16*FODOIR LM QMF LM -SUPPA F1) ! A negative sign means the reverse ordering ! -(A B C) = (-C -B -A) RFSTR = (SUPPB 16*FODORF LRF CAV LRF QRF LRF CAV LRF -SUPPB) � 8

  9. FFS mode for optics and more… FFS; ! Entering "FFS" mode for all calculations, scripting, etc. *** SADScript Initialization: /Users/oide/SAD/oldsad/Packages/init.n *** *** Run time Environment: /Users/oide/SAD/oldsad/Packages/init.local.n *** RFSW RADCOD RAD FLUC INTRA POL COD DAPER EMIOU K64 FOURI SMEAR F F F T F F T F F T F T ! ! Define a function to output the CPU time. CPU[]:=Print["CPU time so far =",TimeUsed[]," sec"]; CPU[]; CPU time so far =.02376299910247326 sec dr:=FFS["DRAW BX BY & EX EY {QS}*;"]; ! define a command to draw optics. MOMENTUM=182.5e9; ! design momentum CONVERGENCE=1e-20; ! the goal convergence for matching rhoarc=13137; ! average bending radius of the arc (given). lrf=1600; ! length of full RF section (given). lir=1568; ! length of full IR (given). sigz0=2.5e-3; ! equilibrium bunch length MINCOUP=0.01; ! minimum emittance ratio NPARA=8; ! number of parallel processes * The cpu time is by MacBook Pro 2018, 6 core, 2.6 GHz � 9

  10. FFS syntax ( expression | command [ arg1 ,…] ) [ ; ] • Expression is an any expression to be evaluated in SAD Script. • Commands are FFS commands such as CALC, GO, FIT, FREE, FIX, etc. • FFS commands are context-oriented to take args as far as they are meaningful until the end of line. Then ; is necessary to terminate the command intentionally before the end of line. • The result of expression is printed out to the terminal unless followed by ; . • A word in the input stream is first evaluated as an expression. If it does not have a defined value, it is interpreted as a command. � 10

  11. Optics functions Functions below are used for FIT, Twiss, DRAW, OpticsPlot , etc. • Functions AZ, BZ, NZ, ZX, ZPX, ZY, ZPY are calculated/matched only with CALC6D . • (“R”+function name) refers the reference value defined by the REF command. • (“D”+function name) refers the difference between the reference (relative difference for β s). • functions meaning remarks α x , α y , α z AX, AY, AZ β x , β y , β z BX, BY, BZ (1 for 1 revolution) for FIT NX, NY, NZ phase advances in radian for Twiss EX, EPX, EY, EPY momentum dispersions in the x-y decoupled space ZX, ZPX, ZY, ZPY z-dispersions. PEX, PEPX,…, PZX, PZPX,… dispersions in physical space R1, R2, R3, R4, DETR x-y coupling parameters units are 1, m, 1/m, 1, 1 6D orbit DX, DPX, DY, DPY, DZ, DDP � 11

Recommend


More recommend