This script generates the data file of an ideal circular equilibrium based on equilibrium profile parameters By J. Decker <joan.decker@cea.fr> and Y. Peysson <yves.peysson@cea.fr>
0001 function [] = make_equil_TRIAM_1M 0002 % 0003 % 0004 % This script generates the data file of an ideal circular equilibrium based on 0005 % equilibrium profile parameters 0006 % 0007 % By J. Decker <joan.decker@cea.fr> and Y. Peysson <yves.peysson@cea.fr> 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 = 0.83;% Plasma major radius on axis (m) 0017 ap = 0.11;% Plasma minor radius on axis (m) 0018 Zp = 0.0; 0019 Ip = 0.072891566267144;% Signed value of the plasma current (MA) (with x:R,y:Z,z:phi direct) 0020 Bt = 3.0;% Signed value of the toroidal magnetic field on the magnetic axis (T) (with x:R,y:Z,z:phi direct) 0021 % 0022 qmin_Rpap = 1*Rp/ap;% Safety factor q0 at plasma center normalized to Rp/ap 0023 eq = 2;% Exponent for q radial profile 0024 qopt = 1;%Option for q profile. (0): constant (default, uniform current, psi=rho^2), (1): from qmin and eq, (2): from j proportional to (1-rho^2)^eq 0025 % 0026 Zi = [1,1,1];% Ion types: (1) H/D/T, (2) He, ..., (6) C [1,p] (WARNING: Zi must be [1,1,1,imp1,imp2] for hydrogen plasmas) 0027 mi = [1,2,3];% Ion mass (uma) [1,p] (WARNING: Zi must be [1,2,3,mimp1,mimp2] for hydrogen plasmas) 0028 fi = [1,0,0];% Hydrogen isotopic fraction (H/D/T) [1,3] (WARNING: only used when hydrogen plasmas are considered) 0029 % 0030 Te0 = 1.0;% Core electron temperature (keV) 0031 Tea = 0.1;% Edge electron temperature (keV) 0032 eTe = 2;% Exponent for Te profile (Te(r) = (Te0-Tea)*(1-(r/a)^2)^eTe + Tea) 0033 % 0034 ne0 = 1.0e19;% Core electron density (m-3) 0035 nea = 7.4341e16;% Edge electron density (m-3) 0036 ene1 = 3.0;% Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^ene1)^ene2 + nea) 0037 ene2 = 1.0;% Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^ene1)^ene2 + nea) 0038 % 0039 Ti0 = Te0;% Core ion temperature (keV) 0040 Tia = Tea;% Edge ion temperature (keV) 0041 eTi = eTe;% Exponent for Ti profile (Ti(r) = (Ti0-Tia)*(1-(r/a)^2)^eTi + Tia) 0042 % 0043 Zeff0 = 1;% Core effective charge (a.u.) 0044 Zeffa = 1;% Edge effective charge (a.u.) 0045 eZeff = 0;% Exponent for the effective charge (Zeff(r) = (Zeff0-Zeffa)*(1-(r/a)^2)^eZeff + Zeffa) 0046 % 0047 % Plasma parameters 0048 % 0049 [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,ene1,ene2,Ti0,Tia,2,eTi,Zeff0,Zeffa,eZeff,NaN,npsi);%Profiles 0050 % 0051 %Magnetic equilibrium 0052 % 0053 [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 0054 % 0055 equil_mag.Rp = Rp; 0056 equil_mag.Zp = Zp; 0057 % 0058 equil = conc_struct_jd(equil_mag,equil_prof); 0059 equil.id = 'TRIAM_1M';% scenario identification (see paper Plasma Phys. Control. Fusion 41 (1999) 1231 - J.A. Heikkinen et al.) 0060 % 0061 filename = ['EQUIL_',equil.id,'.mat']; 0062 % 0063 eval(['save ',filename,' equil']) 0064 0065 0066 0067