1 / 13

PTC Modules in Mad-X

PTC Modules in Mad-X. PTC for the Module Writer Goal of the PTC Module Duplicates PTC_twiss module PTC_track PTC_normal. PTC for the Module Writer. PTC is basically a symplectic particle tracker and it provides a library of Normal Form techniques.

bliss
Download Presentation

PTC Modules in Mad-X

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. PTC Modules in Mad-X PTC for the Module Writer Goal of the PTC Module Duplicates PTC_twiss module PTC_track PTC_normal Second MAD-X Day

  2. PTC for the Module Writer • PTC is basically a symplectic particle tracker and it provides a library of Normal Form techniques. • A large fraction of an actual module are features (“decorations”) rather than physics that means how input/output is prepared etc. These “decorations” are of course very relevant to the MAD-X user! • PTC will not provide these services and the PTC module keeper will have to learn the specific PTC syntax to provide them. (Example: PTC does not provide beta functions per se as output. However, the tools are at hand to calculate them  PTC_twiss) . • In building the PTC_track module which has many features it proved essential to know subtle details of PTC. • To this end Etienne has provide a checklist of FPP/PTC utilities including examples. More such documentation is needed and will be provided ( EF & FS). • One should remember that PTC is object oriented which makes life easy for the PTC module keeper, since the “physics” can be separated from the “decorations”. (Example: Introducing a new element or upgrading an old one will require no modification whatsoever to the procedure to calculate the beta functions) Second MAD-X Day

  3. Goal of the PTC Module Duplicates The MAD-X proper modules usually have a large amount of features. An attempt is being made to provide all those features in the PTC modules. New features are added when PTC allows to do so. Some of the first PTC modules have a large overlap with standard modules. This gives confidence that both modules give proper results in cases where they should be the same. On the other hand when differences are expected (delta dependence, small machines etc) the applicability limits of MAD-X can be tested. The PTC modules are bound to be slower than the MAD-X proper ones. Therefore, there is an incentive to stay with the standard modules if their results can be trusted. Second MAD-X Day

  4. PTC_twiss Module Provides 3D Twiss parameters à la the late Gerhard Ripken. This is a replacement of the TWISS3 command of MAD8. Results will agree with the normal twiss (Teng/Edwards style) command in the absence of coupling. Twiss with initial conditions Documentation in preparation Examples available Desirable but missing features: Twiss summary, Eigenvectors  Help needed Second MAD-X Day

  5. !TITLE,'Test input for PTC_TWISS'; call, file = "ring.seq"; SAVEBETA, label=TWSSip, place=#E,sequence=fivecell; select,flag=twiss,column=name,s,betx,bety,dx,dy; TWISS,file=twiss_fv9; SHOW,TWSSip; ptc_create_universe; ptc_create_layout,model=2,method=6,nst=10,exact; ptc_align; select,flag=ptc_twiss,column=name,s,beta11,beta21, beta12,beta22,disp1,disp3,x,px,y,py; ptc_twiss,closed_orbit,icase=5,file=twiss_toy,no=1; ptc_normal,closed_orbit,maptable,icase=5,no=1; ptc_end; write,table="map_table",file="map_table"; call, file = "line.seq"; select,flag=ptc_twiss,clear; select,flag=ptc_twiss,column=name,s,beta11,beta21,beta12,beta22,disp1,disp3; ptc_create_universe; ptc_create_layout,model=2,method=6,nst=5,exact; ! Example 1: BETA0 block !!!active!!! ptc_twiss,icase=5,no=1,BETA0=TWSSip, ! Example 2: Input twiss parameters manually !ptc_twiss,icase=5,no=1, !betx=177.6823337,bety=32.05718846,alfx=-2.411683347,alfy=0.4797516839, !dx=2.176379444,dpx=0.02964538223,mux=1.254518853,muy=1.25446531, !x= 8.897806712109201E-05,px=7.283918352660537E-07,y=5.216050332314255E-05, !py=-6.748041062611770E-07, ! Example 3: Read transfer matrix from table !ptc_twiss,icase=5,no=1,initial_matrix_table, ! Example 4: Input transfer matrix coef manually ! ptc_twiss,icase=5,no=1,initial_matrix_manual, !re11=-2.4571122533365,re12=176.79612000630,re13=0.23000824922475E-01, !re14=1.0688611352549,re16=2.3391750911139,re21=-.38675166732927E-01, !re22=2.3757451844819,re23=0.59429549540250E-03,re24=0.21234193844153E-01, !re26=0.44298917404022E-01,re31= -.13869369418419E-01,re32=1.1108843741365, !re33=0.44540891438146,re34=32.763919904586,re36=0.23713296091797E-02, !re41=-.10425674606620E-03,re42=0.18936158169385E-01,re43=-.37799347979450E-01, !re44=-.53503193709587,re46=-.94686370477940E-03, file=ptc_twiss; ptc_end; stop; Second MAD-X Day

  6. PTC_track Module Goal: Same functionality as the thinlens tracking module BUT: Using thick elements in PTC Features: Start, Run command Tracking Data in TFS tables Plotting Normal Coordinates Observation Points Documentation Examples Features in Preparation: Radiation Aperture Second MAD-X Day

  7. track, dump,onepass; start, x=1e-3, px=0, y=1e-3, py=0; start, x=1e-3, px=0, y=1e-3, py=0; start, x=2e-3, px=0, y=2e-3, py=0; start, x=3e-3, px=0, y=3e-3, py=0; start, x=4e-3, px=0, y=4e-3, py=0; start, x=5e-3, px=0, y=5e-3, py=0; start, x=6e-3, px=0, y=6e-3, py=0; start, x=7e-3, px=0, y=7e-3, py=0; run, turns=1000, ffile=1; plot, file="apr07ktr", table=track, haxis=x, vaxis=px, particle=1,2,3,4,5,6,7, colour=100, multiple, symbol=3; plot, file="apr07ktr", table=track, haxis=y, vaxis=py, particle=1,2,3,4,5,6,7, colour=100, multiple, symbol=3; endtrack; ptc_create_universe; ptc_create_layout,model=2,method=6,nst=10,exact; ptc_start, x= 3e-3, px=0,y= 3e-3, py=0; ptc_start, x= 6e-3, px=0, y= 6e-3, py=0; ptc_start, x= 9e-3, px=0, y= 9e-3, py=0; ptc_start, x=12e-3, px=0, y=12e-3, py=0; ptc_start, x=15e-3, px=0, y=15e-3, py=0; ptc_start, x=18e-3, px=0, y=18e-3, py=0; ptc_track,icase=4,closed_orbit,dump, // ptc_radiation, radiation, // radiation_energy_loss, radiation_quad, turns=1000,ffile=1, norm_out, norm_no=1; plot, file="apr07ktrptc",table=track,haxis=x,vaxis=px, particle=1,2,3,4,5,6, colour=1000, multiple, symbol=3; plot, file="apr07ktrptc",table=track,haxis=y,vaxis=py, particle=1,2,3,4,5,6, colour=1000, multiple, symbol=3; ptc_end; Input for MADX Input for MADX-PTC Second MAD-X Day

  8. NORMAL FORM for small amplitudes: Input in STANDARD coordinates; 1000 turns; 4 particles; Output in STANDARD coords; Example for fv9.madx; ptc_create_layout, model=2,method=6,nst=10,exact Second MAD-X Day

  9. Input in STANDARD coordinates; 1000 turns; 4 particles; no=1 (linear); Output in NORMALIZED coords; Example for fv9.madx; ptc_create_layout, model=2,method=6,nst=10,exact Second MAD-X Day

  10. Input in STANDARD coordinates; 1000 turns; 4 particles; no=4 ; Output in NORMALIZED coords; Example for fv9.madx; ptc_create_layout, model=2,method=6,nst=10,exact Second MAD-X Day

  11. Input in STANDARD coordinates; 1000 turns; 4 particles; no=8 (CPU time 4 min); Output in NORMALIZED coords; Example for fv9.madx; ptc_create_layout, model=2,method=6,nst=10,exact Second MAD-X Day

  12. PTC_normal Modules Provides Nonlinear Terms to any Order: Dispersion Chromaticity Anharmonicity Hamiltonian Terms Put to tables for ready use in the matching module (yet to be used!) Documentation in Preparation Example available Important:Parameter Dependence yet to be explored!! Second MAD-X Day

  13. ptc_create_universe; ptc_create_layout,model=1,method=2,nst=1;!,exact; select_ptc_normal, dx=1, dpx=1; select_ptc_normal, dy=1, dpy=1; select_ptc_normal, haml=1,0,0; select_ptc_normal, q1, q2; select_ptc_normal, dq1=1, dq2=1; select_ptc_normal, dq1=2, dq2=2; select_ptc_normal, haml=1,-2,0; select_ptc_normal, anhx=1,0,0; select_ptc_normal, anhy=1,0,0; select_ptc_normamb1l, anhx=1,0,1; select_ptc_normal, haml=-5,0,0; select_ptc_normal, anhy=1,0,1; select_ptc_normal, anhx=0,0,2; select_ptc_normal, anhy=0,0,2; select_ptc_normal, anhx=2,0,0; select_ptc_normal, haml=1,2,0; select_ptc_normal, anhy=2,0,0; select_ptc_normal, anhx=1,1,0; select_ptc_normal, anhy=1,1,0; ptc_normal,closed_orbit,normal,icase=5,no=7; ptc_end; write, table=normal_results; Second MAD-X Day

More Related