This script generates the data file of an ideal circular equilibrium based on equilibrium profile parameters for reverse field pinch (based on MST machine at Madison, Wisconsin, USA) By J. Decker <joan.decker@cea.fr> and Y. Peysson <yves.peysson@cea.fr>
0001 function [] = make_equil_RFP 0002 % 0003 % This script generates the data file of an ideal circular equilibrium based on 0004 % equilibrium profile parameters for reverse field pinch (based on MST machine at Madison, Wisconsin, USA) 0005 % 0006 % By J. Decker <joan.decker@cea.fr> and Y. Peysson <yves.peysson@cea.fr> 0007 % 0008 npsi = 101;% number of points in psi grid 0009 ntheta = 65;% number of points in theta grid 0010 % 0011 % Equilibrium parameters 0012 % 0013 ap = 0.5;% Plasma minor radius on LFS midplane (m) 0014 Rp = 1.5;% Plasma major radius on axis (m) 0015 Zp = 0;% Global plasma vertical shift (m) 0016 % 0017 Ip = 0.3;% Plasma current (MA) 0018 % 0019 Bt = 0.2;% Toroidal magnetic field on the magnetic axis (T) 0020 lambda = 2.2;%BFM magnetic equilbrium model for RFP 0021 % 0022 Zi = [1,1,1,6];% Ion types: (1) H/D/T, (2) He, ..., (6) C [1,p] (WARNING: Zi must be [1,1,1,imp1,imp2] for hydrogen plasmas) 0023 mi = [1,2,3,12];% Ion mass (uma) [1,p] (WARNING: Zi must be [1,2,3,mimp1,mimp2] for hydrogen plasmas) 0024 fi = [0,1,0];% Hydrogen isotopic fraction (H/D/T) [1,3] (WARNING: only used when hydrogen plasmas are considered) 0025 % 0026 Te0 = 1.3;% Core electron temperature (keV) 0027 Tea = 0.1*Te0;% Edge electron temperature (keV) 0028 eTe = 1.1;% Exponent for Te profile (Te(r) = (Te0-Tea)*(1-(r/a)^2)^eTe + Tea) 0029 % 0030 ne0 = 1.4e19;% Core electron density (m-3) 0031 nea = 0.24*ne0;% Edge electron density (m-3) 0032 ene = 1.3;% Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^2)^ene + nea) 0033 % 0034 Ti0 = 0.35;% Core ion temperature (keV) 0035 Tia = 0.1*Ti0;% Edge ion temperature (keV) 0036 eTi = 1.1;% Exponent for Ti profile (Ti(r) = (Ti0-Tia)*(1-(r/a)^2)^eTi + Tia) 0037 % 0038 Zeff0 = 2.0;% Core effective charge (a.u.) 0039 Zeffa = 2.0;% Edge effective charge (a.u.) 0040 eZeff = 0;% Exponent for the effective charge (Zeff(r) = (Zeff0-Zeffa)*(1-(r/a)^2)^eZeff + Zeffa) 0041 % 0042 % Plasma parameters 0043 % 0044 [prho,equil_prof.pTe,equil_prof.pne,equil_prof.pzTi,equil_prof.pzni,equil_prof.zZi,equil_prof.zmi,equil_prof.fi,pkin] = idealprof_yp(Zi,mi,fi,Te0,Tea,2,eTe,ne0,nea,2,ene,Ti0,Tia,2,eTi,Zeff0,Zeffa,eZeff,NaN,npsi);%Profiles 0045 % 0046 %Magnetic equilibrium 0047 % 0048 [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,[],[],[],npsi,ntheta,lambda);%Cylindrical magnetic equilibrium 0049 % 0050 equil_mag.Rp = Rp; 0051 equil_mag.Zp = Zp; 0052 % 0053 equil = conc_struct_jd(equil_mag,equil_prof); 0054 equil.id = 'RFP';% scenario identification 0055 % 0056 filename = ['EQUIL_',equil.id,'.mat']; 0057 % 0058 eval(['save ',filename,' equil']) 0059 0060