source: PSPA/madxPSPA/tests/test-aperture/test-aperture.madx @ 430

Last change on this file since 430 was 430, checked in by touze, 11 years ago

import madx-5.01.00

File size: 1.8 KB
Line 
1title,'LHC Cell APERTURE exemple, BJ Aug2009';
2
3REAL CONST ANGLE.MB = TWOPI/8/(23*6+2*2*4);
4
5REAL CONST l.MB = 14.30;
6REAL CONST l.MQ = 3.10;
7
8REAL CONST drift1 = 3.67;
9REAL CONST drift2 = 1.02;
10REAL CONST drift3 = 1.74;
11
12len_half_cell = l.MQ+drift1+3*l.MB+2*drift2+drift3;
13value, len_half_cell;
14
15!!!! apertures
16a=0.022; b=0.018; h=0.022; v=0.022;
17!!!! tolerances
18th=0.001; tv=0.0005; tr=0.001;
19
20MB: SBEND, L := l.MB, angle = ANGLE.MB;
21MQ: QUADRUPOLE, L := l.MQ, apertype=rectellipse,aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
22
23kqf =  0.008703550815;
24kqd = -0.008705002933;
25
26LHCCELL: SEQUENCE, refer = ENTRY, L = 2*len_half_cell;
27 
28  MQ1: MQ, k1:= kqf, at= 0.;
29
30  MB1: MB,  at= l.MQ+drift1 ,
31            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
32  MB2: MB,  at= l.MQ+drift1+l.mb+drift2,
33            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
34  MB3: MB,  at= l.MQ+drift1+2*(l.mb+drift2),
35            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
36
37  MQ2: MQ, k1 := kqd,  at=  len_half_cell;
38
39  MB4: MB,  at= len_half_cell + l.MQ+drift1 ,
40            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
41  MB5: MB,  at= len_half_cell + l.MQ+drift1+l.mb+drift2,
42            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
43  MB6: MB,  at= len_half_cell + l.MQ+drift1+2*(l.mb+drift2),
44            apertype=rectellipse, aperture = {a,b,h,v}, aper_tol = {th,tv,tr};
45
46endsequence;
47
48beam,particle=proton,energy=450.0;
49
50set, format="9.5f";
51use,period=LHCCELL;
52select, flag=twiss, clear;
53select, flag=twiss, column=name,s,l,betx,bety,alfx,alfy,dx,dpx,mux,muy,n1;
54twiss, sequence=LHCCELL;
55
56!!! uses default beam and halo data (lhc at injection)
57select, flag=aperture, clear;
58select, flag=aperture, column=name,s,betx,bety,dx,x,y,n1,apertype,xtol,ytol,rtol;
59aperture,offsetelem="offset.tfs",file="ap.tfs";
Note: See TracBrowser for help on using the repository browser.