Upload
zaide
View
24
Download
0
Tags:
Embed Size (px)
DESCRIPTION
PTC Variables and (some) Maps. Piotr Skowroński. Variables. There are 2 sets of variables depending on TIME flag TIME=falseTIME=true To switch the time flag use the following in MADX script ptc_setswitch , time=true;. General Hamiltonian. - PowerPoint PPT Presentation
Citation preview
PTCVariables and (some) Maps
Piotr Skowroński
25 November 2013MADX Meeting1
MADX Meeting
VariablesThere are 2 sets of variables depending on TIME flag
TIME=false TIME=true
To switch the time flag use the following in MADX scriptptc_setswitch, time=true; 25 November 20132
General Hamiltonian
25 November 20133 MADX Meeting
Integration of straight elements (rectangular bend, quad) uses Cartesian coordinates. It is not done along arc.
MADX Meeting
SYMPLECTIC INTEGRATOR3 Integration algorithms method 2: the naive 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 withptc_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
25 November 20134
MADX Meeting
Integration models
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;
25 November 20135
MADX Meeting
Hamiltonians
25 November 20136
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
PTC Settings
Want to be safe, always use
ptc_create_layout, exact=true, model=2, method=6,resplit, xbend;
It willTake exact hamiltonians, Use matrix in between kicksUse 6th order Yoshida methodAutomatically adjusts methods and number of steps for each element
Default isptc_create_layout, exact=false, model=1, method=2;
25 November 20137
MADX Meeting
Quadrupole
25 November 20138
EXACT EXPANDEDModel=1Drift-Kick-Drift STREX_caseDKD DKD2
Model=2Matrix-Kick-Matrix TKTF TKTF
Model=3 Kick-SixTrack-Kick KTK KTK
MADX Meeting
SBEND & default RBEND
Curved reference frame
25 November 20139
EXACT EXPANDEDModel=1Drift-Kick-Drift TEAPOT DKD2
Model=2Matrix-Kick-Matrix TEAPOT TKTF
Model=3 Kick-SixTrack-Kick TEAPOT KTK
MADX Meeting
RBEND, ptcrbend=true;
Straight reference frame
25 November 201310
EXACT EXPANDEDModel=1Drift-Kick-Drift STREX_caseDKD DKD2
Model=2Matrix-Kick-Matrix STREX_caseMKM TKTF
Model=3 Kick-SixTrack-Kick STREX_caseMKM KTK
MADX Meeting
STREX
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);
25 November 201311
Model=1
Model=2
MADX Meeting
STREX
25 November 201312
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*BYWpy=py+l*BXWif(model1) px=px+l*b1
MADX Meeting
STREX
25 November 201313
Drift (model=1): DRIFT TIME=false TIME=true
MADX Meeting
STREX
25 November 201314
Matrix (model=2): SPAR
TIME=false time=true
MADX Meeting
TEAPOT
25 November 201315
RBEND, SBEND in all models
Hamiltonian:
Docu: CERN-SL-2012-044, Section K.4.9
Implemented in Sh_def_kind.h: INTEP_TEAPOTField strengths needs to renormalized to always provide the requested bending angle
Model=1
Model=2
MADX Meeting
TEAPOTKick: 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)
25 November 201316
px=px-l*BYpy=py+l*BX
MADX Meeting
TEAPOT Drift (model=1): SPROT
TIME=false
25 November 201317
MADX Meeting
TEAPOT Matrix (model=2): SSEC
TIME=false
25 November 201318
MADX Meeting
TKTF
25 November 201319
Quad in model=2
Hamiltonian:
Docu: CERN-SL-2012-044, Section K.4.7
Implemented in Sh_def_kind.h: INTEP_TKTF
PUSHTKT7(L/2);KICKPATH(L/2);KICKTKT7(L);KICKPATH(L/2);PUSHTKT7(L/2)
MADX Meeting
TKTF
Matrix: PUSHTKT7 (matrix defined in GETMAT7)
25 November 201320
MADX Meeting
TKTF
KICKPATHTIME=false TIME=true
25 November 201321
MADX Meeting
TKTF
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 = BYWTENDDO px = px - l*(BYW - b1_0 - b2*x)py = py + l*(BXW - b2*y)
25 November 201322
MADX Meeting
Quad and Multipole FringeHard 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
25 November 201323
Sx, Cx,…, are the sin-like and cos-like solutions
In hard edge quad model
MADX Meeting
Summary
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 trajectoryTKTF 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.4The code is in Sh_def_kind.f90, usually called INTEP_X, where X is STREX, KTK, CAV4, etc.
25 November 201324
MADX Meeting 25 November 201325
MADX Meeting
Quad and Multipole FringeLee-Whitting coefficients
25 November 201326
MADX Meeting
Quad and Multipole FringeLee-Whitting coefficients
25 November 201327
MADX Meeting
Quad and Multipole FringeHard 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-
482It uses Lee-Whiting Formula G.E. Lee-Whiting, Nucl. Instr. and Meth. 83 (1970) 232
25 November 201328
MADX Meeting
Quad and Multipole FringeHard 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-
482It uses Lee-Whiting Formula G.E. Lee-Whiting, Nucl. Instr. and Meth. 83 (1970) 232
25 November 201329
MADX Meeting
Quad and Multipole Fringe
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
25 November 201330