This script generates the data file of an ideal circular equilibrium based on equilibrium profile parameters By J. Decker <jodecker@alum.mit.edu> and Y. Peysson <yves.peysson@cea.fr> Created Feb. 17, 2004
0001 function [] = make_equil_RTtest_vacuum 0002 % 0003 % This script generates the data file of an ideal circular equilibrium based on 0004 % equilibrium profile parameters 0005 % 0006 % By J. Decker <jodecker@alum.mit.edu> and Y. Peysson <yves.peysson@cea.fr> 0007 % Created Feb. 17, 2004 0008 % 0009 [qe,me,mp,mn,e0,mu0,re,mc2,clum] = pc_dke_yp; 0010 % 0011 npsi = 101;% number of points in psi grid 0012 ntheta = 65;% number of points in theta grid 0013 % 0014 % Equilibrium parameters 0015 % 0016 Rp = 3.0;% Plasma major radius on axis (m) 0017 Zp = 0.0; 0018 ap = 0.3*Rp;% Inverse aspect ratio 0019 Ip = 1;% Signed value of the plasma current (MA) (with R,Z,phi direct) 0020 Bt = 3.0;% Signed value of the toroidal magnetic field on the magnetic axis (T) (with R,Z,phi direct) 0021 % 0022 qmin_Rpap = 1/0.3;%Safety factor q0_Rpap at plasma center normalized to Rp/ap 0023 eq = 2;% Exponent for q_Rpap radial profile (q = (qmax - qmin)*(r/a).^eq + qmin, qmax calaculated by the Ampere's theorem at the plasma edge with a circular plasma cross-section) 0024 qopt = 1;%Option for q profile. 0025 % 0026 equil_prof.theta = linspace(0,2*pi,ntheta);% Uniform theta grid 0027 % 0028 % Plasma parameters 0029 % 0030 equil_prof.zZi = [];%[1,ni] 0031 equil_prof.zmi = [];%[1,ni] 0032 equil_prof.fi = [];%[1,3] 0033 equil_prof.pTe = [];% Electron temperature (keV) 0034 equil_prof.pne = [];% Electron density (m-3) 0035 equil_prof.pzTi = [];% Same temperature for all ion species 0036 equil_prof.pzni = []; 0037 % 0038 %Magnetic equilibrium 0039 % 0040 [ppsin,equil_mag.psi_apRp,equil_mag.theta,equil_mag.ptx,equil_mag.pty,equil_mag.ptBx,equil_mag.ptBy,equil_mag.ptBPHI,pBpp,pq_Rpap,pj,pmag,Ip_test] = idealequilcyl_yp(ap,Rp,Zp,Bt,Ip,qmin_Rpap,eq,qopt,npsi,ntheta);%Cylindrical magnetic equilibrium 0041 % 0042 equil_mag.Rp = Rp; 0043 equil_mag.Zp = Zp; 0044 % 0045 equil = conc_struct_jd(equil_mag,equil_prof); 0046 equil.id = 'RTtest_vacuum';% 0047 % 0048 filename = ['EQUIL_',equil.id,'.mat']; 0049 % 0050 eval(['save ',filename,' equil']) 0051 %