1 / 30

PTC Variables and (some) Maps

PTC Variables and (some) Maps. Piotr Skowroński. Variables. There are 2 sets of variables depending on TIME flag TIME=false TIME=true To switch the time flag use the following in MADX script ptc_setswitch , time=true;. General Hamiltonian.

zaide
Download Presentation

PTC Variables and (some) Maps

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PTCVariables and (some) Maps Piotr Skowroński MADX Meeting

  2. Variables MADX Meeting There are 2 sets of variables depending on TIME flag TIME=false TIME=true To switch the time flag use the following in MADX script ptc_setswitch, time=true;

  3. General Hamiltonian MADX Meeting Integration of straight elements (rectangular bend, quad) uses Cartesian coordinates. It is not done along arc.

  4. SYMPLECTIC INTEGRATOR MADX Meeting 3 Integration algorithms • method 2: the naïve 2nd order method, 1 kick per integration step • method 4: the Ruth-Neri-Yoshida 4th order method, 3 kicks / step • method 6: the Yoshida 6th order method, 7 kicks / step • Controlled with: ptc_create_layout, method=XX; PTC has a hook so user defined algorithm can be hooked in • Each element can be integrated with different algorithm Magnets are split into smaller slices • Number of slices (integration steps) is controlled with ptc_twiss, nst=NN; ptc_normal, nst=NN; Automatic “resplit” sets method (and adjusts also nst), • method 2 for drifts (1 step) • method 6 for quads and strong bends • Method 4 for weak bends

  5. Integration models MADX Meeting In practice, this integration is applying special maps at different positions Transport between the kicks can be done • As in drift: model 1 = DRIFT-KICK-DRIFT • Via matrix: model 2 = MATRIX-KICK-MATRIX • Like in SixTrack: model 3 = KICK-SIXTRACK-KICK Controlled with: ptc_create_layout, model=NN;

  6. Hamiltonians • Different Hamiltonians • Expanded • Exact • Each has different flavors • different “splittings” • different reference frames • Depending on the user requirements • Precision • Price of computation time, of course • Which flavor is preferred • Controlled with: ptc_create_layout, exact=T/F; MADX Meeting

  7. PTC Settings MADX Meeting Want to be safe, always use ptc_create_layout, exact=true, model=2, method=6, resplit, xbend; • It will • Take exact hamiltonians, • Use matrix in between kicks • Use 6th order Yoshida method • Automatically adjusts methods and number of steps for each element Default is ptc_create_layout, exact=false, model=1, method=2;

  8. Quadrupole MADX Meeting

  9. SBEND & default RBEND MADX Meeting Curved reference frame

  10. RBEND, ptcrbend=true; MADX Meeting Straight reference frame

  11. STREX Model=1 Model=2 MADX Meeting Quad in model=1 & RBEND, ptcrbend=true; Hamiltonian: Docu: CERN-SL-2012-044, Section K.4.12 Implemented in Sh_def_kind.h: INTEP_STREX (example method 2) • Case DKD (model1): DRIFT(L/2); KICKEX(L); DRIFT(L/2); • Case MKM (model2): SPAR(L/2); KICKEX(L); SPAR(L/2);

  12. STREX MADX Meeting Kick: KICKEX BYW=bNMUL BXW=aNMUL DO J=NMUL-1,1,-1 BYWT=x*BYW-y*BXW+bJ BXW=y*BYW+x*BXW+aJ BYW=BYWT ENDDO px=px-l*BYW py=py+l*BXW if(model1) px=px+l*b1

  13. STREX MADX Meeting Drift (model=1): DRIFT TIME=false TIME=true

  14. STREX MADX Meeting Matrix (model=2): SPAR TIME=false time=true

  15. TEAPOT Model=1 Model=2 MADX Meeting RBEND, SBEND in all models Hamiltonian: Docu: CERN-SL-2012-044, Section K.4.9 Implemented in Sh_def_kind.h: INTEP_TEAPOT Field strengths needs to renormalized to always provide the requested bending angle

  16. TEAPOT px=px-l*BY py=py+l*BX MADX Meeting Kick: SKICK m=NMULIPOLES-1 do a=m,1,-1 do j=m-a,1,-1 i=i+1 BTX= (BTX+BF_X(i))*Y BTY= (BTY+BF_Y(i))*Y enddo i=i+1 BTX= (BTX+EL%BF_X(i)) BTY= (BTY+EL%BF_Y(i)) BX= (BX+BTX)*X BY= (BY+BTY)*X enddo BTX=0; BTY=0 do j=m,1,-1 i=i+1 BTX= (BTX+EL%BF_X(i))*Y BTY= (BTY+EL%BF_Y(i))*Y enddo i=i+1 BX= BX+BTX+BF_X(i) BY= BY+BTY+BF_Y(i)

  17. TEAPOT MADX Meeting Drift (model=1): SPROT TIME=false

  18. TEAPOT MADX Meeting Matrix (model=2): SSEC TIME=false

  19. TKTF PUSHTKT7(L/2);KICKPATH(L/2);KICKTKT7(L);KICKPATH(L/2);PUSHTKT7(L/2) MADX Meeting Quad in model=2 Hamiltonian: Docu: CERN-SL-2012-044, Section K.4.7 Implemented in Sh_def_kind.h: INTEP_TKTF

  20. TKTF MADX Meeting Matrix: PUSHTKT7(matrix defined in GETMAT7)

  21. TKTF MADX Meeting KICKPATH TIME=false TIME=true

  22. TKTF MADX Meeting Kick: KICKTKT7 BYW=bNMUL BXW=aNMUL DO J=NMUL-1,1,-1 BYWT = x*BYW - y*BXW + bJ BXW = y*BYW + x*BXW + aJ BYWc = BYWT ENDDO px = px - l*(BYW - b1_0 - b2*x) py = py + l*(BXW - b2*y)

  23. Quad and Multipole Fringe In hard edge quad model Sx, Cx,…, are the sin-like and cos-like solutions MADX Meeting Hard edge fringe fields effects exact in (1 + s) and consistent with maxwell's equations for rectilinear magnets • Forest et.al, NIM in Physics Research A269 (1988) 474-482 It uses Lee-Whiting Formula • G.E. Lee-Whiting, Nucl. Instr. and Meth. 83 (1970) 232 Implemented in Sh_def_kind.f90 multipole_fringep

  24. Summary MADX Meeting DKD2 handles only the expanded Hamiltonian elements. The exact integration are handled by types STREX, TEAPOT, KTK, and TKTF. STREX handles straight elements of all types. TEAPOT handles bends of “cyclotronic” symmetry, i.e., mostly invariant along the ideal trajectory TKTF and KTK handle straight elements without any ideal bending using a different split from STREX, namely the kick-matrix splits. CAV4 is cavity Hamiltonians can be found in CERN-SL-2012-044 Section K.4 The code is in Sh_def_kind.f90, usually called INTEP_X, where X is STREX, KTK, CAV4, etc.

  25. MADX Meeting

  26. Quad and Multipole FringeLee-Whitting coefficients MADX Meeting

  27. Quad and Multipole FringeLee-Whitting coefficients MADX Meeting

  28. Quad and Multipole Fringe MADX Meeting Hard edge fringe fields effects exact in (1 + s) and consistent with maxwell's equations for rectilinear magnets • Forest et.al, NIM in Physics Research A269 (1988) 474-482 It uses Lee-Whiting Formula • G.E. Lee-Whiting, Nucl. Instr. and Meth. 83 (1970) 232

  29. Quad and Multipole Fringe MADX Meeting Hard edge fringe fields effects exact in (1 + s) and consistent with maxwell's equations for rectilinear magnets • Forest et.al, NIM in Physics Research A269 (1988) 474-482 It uses Lee-Whiting Formula • G.E. Lee-Whiting, Nucl. Instr. and Meth. 83 (1970) 232

  30. Quad and Multipole Fringe MADX Meeting Implemented in Sh_def_kind.f90 multipole_fringep DEL=1/(1+delta) A=1-FX_X*DEL B= -FY_X*DEL D=1-FY_Y*DEL C= -FX_Y*DEL x=x-FX*DEL X2=(D*px-B*py)/(A*D-B*C) py=(A*py-C*px)/(A*D-B*C) px=X2 y=y-FY*DEL if(k%TIME) then ct=ct-(1/beta0+pt)*(px*FX+py*FY)*DEL**3 else s=s-(px*FX+py*FY)*DEL**2 endif

More Related