0001
0002 qe=1.602176620e-19;
0003 partmass = 9.10938356e-31;
0004 E=6.04e9;
0005 me=0.5109989461e6;
0006 gamma=E/me;
0007 beta_rel=sqrt(1-1/gamma^2);
0008 clight=3e8;
0009
0010 circ = 844.3907;
0011 current = .005;
0012
0013 wakefact = -qe^2/(partmass*gamma*beta_rel^2*clight^2);
0014 intensity = current*circ/(clight*beta_rel*qe);
0015
0016 nslice = 51;
0017
0018
0019
0020 xr = 0.1;
0021 table_length = 201;
0022 freqx = 10;
0023 freqy = 10;
0024 freqz = 10;
0025 qx = 1;
0026 qy = 1;
0027 qz = 1;
0028 rx = .5;
0029 ry = 2;
0030 rz = .01;
0031
0032 [ s,bbrx,bbry,bbrz ] = bbr_gentab(xr,table_length,freqx,freqy,freqz,qx,qy,qz,rx,ry,rz);
0033
0034
0035
0036 betax_obs = 1;
0037 betay_obs = 1;
0038
0039 imp_tab_elem=atbaselem('imp_tab','impedance_tablePass');
0040 imp_tab_elem.Nslice = nslice;
0041 imp_tab_elem.Intensity = intensity;
0042 imp_tab_elem.Wakefact = wakefact;
0043 imp_tab_elem.Nelem = table_length;
0044 imp_tab_elem.WakeT = s;
0045 imp_tab_elem.WakeDX = bbrx;
0046 imp_tab_elem.WakeDY = bbry;
0047 imp_tab_elem.WakeQX = zeros(table_length,1);
0048 imp_tab_elem.WakeQY = zeros(table_length,1);
0049 imp_tab_elem.WakeZ = bbrz;
0050 imp_tab_elem.On_x = 0.0;
0051 imp_tab_elem.On_y = 0.0;
0052 imp_tab_elem.On_z = 1.0;
0053 imp_tab_elem.On_qx = 0.0;
0054 imp_tab_elem.On_qy = 0.0;
0055 imp_tab_elem.Normfactx=1.0/betax_obs;
0056 imp_tab_elem.Normfacty=1.0/betay_obs;
0057
0058
0059
0060
0061 ring=esrf;
0062 indcav=findcells(ring,'Class','RFCavity');
0063 cav=ring(indcav(1));
0064 ring(indcav(:))=[];
0065 ring=[cav;ring];
0066
0067 ring=atsetcavity(ring,8e6,1,992);
0068
0069 [fastring,fastringrad]=atfastring(ring);
0070 fastringBBR=[fastringrad;imp_tab_elem];