source: MML/trunk/machine/SOLEIL/Booster/applications/chrom.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 1.3 KB
Line 
1%  calcul chrom avec foucault
2
3
4
5pi=3.14159;
6mu0=4*pi*1e-07;
7sig=1.3e+06;
8h=0.011;
9ep=0.001;
10bro=9.175;
11rho=12.377;
12B0=0.740;
13E0=2750;
14Einj=110;
15delta0=0.01;
16mfouc0=(mu0*sig*ep)/(h*rho);
17
18mx=7.72;
19mz=-11.30;
20m1=[3.39 0.38 ; -1.32 -3.5]; %chromp versus sextu (HL/BRHO)
21m2=inv(m1);                  %sextu versus chrom
22
23w=2*pi*50/17;
24t=0.0219:0.0001:0.170;
25B=B0/2*(1-cos(w*t));
26Bdot=B0/2*(w*sin(w*t));
27R=  (Bdot)./(B)  ;
28R=R*25/R(1);
29E=E0/2*(1-cos(w*t));
30delta=(delta0*Einj)./E;
31mfouc=mfouc0*R;
32chix0=-1.23;
33chiz0=-1.34;
34md = -1.7/rho;
35mr = -2.1/rho*Einj./E;
36chix=(chix0 + (md+mr+mfouc)*mx);
37chiz=(chiz0 + (md+mr+mfouc)*mz);
38sext=-m2*[chix ; chiz];
39chic=m1*[sext(1,:) ; sext(2,:)];
40
41I1=0.;
42I2=0.;
43chic1=m1*[I1*0.2/B(1)/rho ;-I2*0.2/B(1)/rho ];
44
45
46chixr=chix + chic1(1)*Einj./E;
47chizr=chiz + chic1(2)*Einj./E;
48
49
50dnux=chixr.*delta*6.8;
51dnuz=chizr.*delta*4.8;
52sprintf('Brho = %g ', B(1)*rho)
53sprintf('chix = %g  chiz = %g', chix(1), chiz(2))
54sprintf('HF/Brho = %g  HD/Brho = %g', sext(1,1), sext(2,1))
55Ihf=sext(1,:).*B*rho/0.2;
56Ihd=-sext(2,:).*B*rho/0.2;
57sprintf('I_HF = %g A   I_HD = %g  A', Ihf(1), Ihd(1))
58plot(t, Ihf , t , Ihd)
59figure(1)
60subplot(3,1,1)
61plot(t, R)
62subplot(3,1,2)
63plot(t, Ihf, t , Ihd)
64subplot(3,1,3)
65plot(t, dnux, t , dnuz)
66
67%Ihf=sext(1)*B(1)*rho/0.2
68%Ihf*0.2/rho/B(1)
Note: See TracBrowser for help on using the repository browser.