source: PSPA/madxPSPA/tests/test-twiss-7/test-twiss-7.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.3 KB
Line 
1beam, SEQUENCE=Machine ,PARTICLE=electron, energy=3, RADIATE=True;
2option, RBARC=FALSE;
3OPTION, -ECHO, -WARN, INFO;
4call, file= "ALBA-25.4th.madx";
5OPTION, ECHO, WARN, INFO;
6
7
8! Put the RF cavity
9RFC: RFCAVITY, L=0.5, VOLT=3.6, LAG=0.480,HARMON=448;
10L_IDRF : DRIFT, L=L_ID->L-RFC->L;
11L_ID   : LINE =(RFC, L_IDRF);
12
13
14use, period=Machine;
15twiss;
16EMIT,DELTAP=0.0 ;
17
18!The result of H emittance computed this way is: 0.11212603E-02 [pi micro m]
19!But it is wrong due to the fact that the variations of the twiss functions inside
20!the bendings  are not taken into account. To solve this the best thing to do
21!is to slice the sbends in thick slices as follows:
22
23B1in:  SBEND, L=B1->L/28, ANGLE=B1->ANGLE/28, K1=B1->K1, E1=B1->ANGLE/2, E2=0.0;
24B1i:  SBEND, L=B1->L/28, ANGLE=B1->ANGLE/28, K1=B1->K1, E1=0.0, E2=0.0;
25B1out: SBEND, L=B1->L/28, ANGLE=B1->ANGLE/28, K1=B1->K1, E1=0.0            , E2=B1->ANGLE/2;
26BE: LINE=(B1in,B1i,B1i,B1i,B1i,B1i,B1i,B1i,&
27          B1i, B1i,B1i,B1i,B1i,B1i,B1i,B1i,&
28          B1i,B1i,B1i,B1i,B1i,B1i,B1i,B1i, &
29          B1i,B1i,B1i,B1out);
30
31use, period=Machine;
32twiss;
33EMIT,DELTAP=0.0 ;
34!
35!Now the emittance is correct: 0.44845315E-02
36!
37
38SELECT, FLAG=TWISS, CLEAR;
39SELECT, FLAG=TWISS, CLASS=QUADRUPOLE, COLUMN=NAME,S,BETX,BETY;
40
41USE, SEQUENCE=Machine;
42TWISS, SEQUENCE=Machine, FILE="twiss1";
43
44stop;
Note: See TracBrowser for help on using the repository browser.