RingCyclotronMatched.in 2.45 KB
Newer Older
1 2 3 4 5 6 7
OPTION, ECHO = FALSE;
OPTION, PSDUMPFREQ  = 1;
OPTION, SPTDUMPFREQ = 1;
OPTION, PSDUMPEACHTURN = FALSE;
OPTION, REPARTFREQ = 20;
OPTION, CZERO = FALSE;
OPTION, TELL = TRUE;
8
Option, CLOTUNEONLY=FALSE;
9
Option, VERSION=10900;
10 11 12

Title,string="OPAL-cycl: test matched distribution PSI Ring";

13 14 15 16 17 18
REAL Edes=.580;
REAL gamma=(Edes+PMASS)/PMASS;
REAL beta=sqrt(1-(1/gamma^2));
REAL gambet=gamma*beta;
REAL P0 = gamma*beta*PMASS;
REAL brho = (PMASS*1.0e9*gambet) / CLIGHT;
19 20 21

//value,{gamma,brho,Edes,beta,gambet};

22 23 24 25 26
REAL phi01=139.4281;
REAL phi02=phi01+180.0;
REAL phi04=phi01;
REAL phi05=phi01+180.0;
REAL phi03=phi01+10.0;
27

28 29
REAL volt1st=0.9;
REAL volt3rd=0.9*4.0*0.112;
30

31 32
REAL turns = 0;
REAL nstep = 0;
33

34 35
REAL frequency=50.650;
REAL frequency3=3.0*frequency;
36

37
ring: Cyclotron, TYPE="RING", CYHARMON=6, PHIINIT=0.0, PRINIT=-0.000174, RINIT=2130.0,
gsell's avatar
gsell committed
38 39
	SYMMETRY=8.0, RFFREQ=frequency,
	FMAPFN="s03av.nar", FMLOWE=72.0, FMHIGHE=590.0;
40

41
rf0: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
gsell's avatar
gsell committed
42 43
	FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=35.0,  PDIS = 416.0,
	GAPWIDTH = 220.0, PHI0=phi01;
44

45
rf1: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
gsell's avatar
gsell committed
46 47
	FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=125.0, PDIS = 416.0,
	GAPWIDTH = 220.0, PHI0=phi02;
48

49
rf2: RFCavity, VOLT=volt3rd, FMAPFN="Cav3.dat", TYPE="SINGLEGAP",
gsell's avatar
gsell committed
50 51
	FREQ=frequency3,RMIN = 1900.0, RMAX = 4500.0, ANGLE=170.0, PDIS = 452.0,
	GAPWIDTH = 250.0, PHI0=phi03;
52

53
rf3: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
gsell's avatar
gsell committed
54 55
	FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=215.0, PDIS = 416.0,
	GAPWIDTH = 220.0, PHI0=phi04;
56

57
rf4: RFCavity, VOLT=volt1st, FMAPFN="Cav1.dat", TYPE="SINGLEGAP",
gsell's avatar
gsell committed
58 59
	FREQ=frequency, RMIN = 1900.0, RMAX = 4500.0, ANGLE=305.0, PDIS = 416.0,
	GAPWIDTH = 220.0, PHI0=phi05;
60 61 62 63

l1:   LINE = (ring,rf0,rf1,rf2,rf3,rf4);


64
Dist1:DISTRIBUTION, TYPE=GAUSSMATCHED, LINE=l1, NSTEPS=1440, SECTOR=FALSE,
gsell's avatar
gsell committed
65 66 67
	EX = 1.0e-06,
	EY = 1.0e-06,
	ET = 1.0e-06;
68 69

/*
70
Dist1:DISTRIBUTION, TYPE=GAUSSMATCHED, LINE=l1, FMAPFN="ring_tc15_sector.dat",
gsell's avatar
gsell committed
71 72 73
	EX = 1.0e-06,
	EY = 1.0e-06,
	ET = 1.0e-06;
74 75
*/

76
Fs1:FIELDSOLVER, FSTYPE=FFT, MX=32, MY=32, MT=16,
gsell's avatar
gsell committed
77 78
	PARFFTX=true, PARFFTY=true, PARFFTT=true,
	BCFFTX=open, BCFFTY=open, BCFFTT=open;
79 80 81 82 83 84 85 86 87

beam1: BEAM, PARTICLE=PROTON, pc=P0, NPART=1e5, BCURRENT=2.2E-3, CHARGE=1.0, BFREQ= frequency;

Select, Line=l1;

TRACK,LINE=l1, BEAM=beam1, MAXSTEPS=nstep*turns, STEPSPERTURN=nstep,TIMEINTEGRATOR="RK-4";
 run, method = "CYCLOTRON-T", beam=beam1, fieldsolver=Fs1, distribution=Dist1;
endtrack;

gsell's avatar
gsell committed
88
Stop;