make_equil_JETliketest_cyl

PURPOSE ^

SYNOPSIS ^

function [] = make_equil_JETliketest_cyl

DESCRIPTION ^

   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>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = make_equil_JETliketest_cyl
0002 %
0003 %   This script generates the data file of an ideal circular equilibrium based on
0004 %   equilibrium profile parameters
0005 %
0006 %   By J. Decker <joan.decker@cea.fr> and Y. Peysson <yves.peysson@cea.fr>
0007 %
0008 [qe,me,mp,mn,e0,mu0,re,mc2,clum] = pc_dke_yp;
0009 %
0010 npsi = 101;% number of points in psi grid
0011 ntheta = 65;% number of points in theta grid
0012 %
0013 % Equilibrium parameters
0014 %
0015 Rp = Inf;%  Plasma major radius on axis (m)
0016 ap = 0.95;%  Plasma minor radius on axis (m)
0017 Zp = 0.0;
0018 Ip = 3.5;% Signed value of the plasma current (MA) (with x:R,y:Z,z:phi direct)
0019 Bt = 3.2;%  Signed value of the toroidal magnetic field on the magnetic axis (T) (with x:R,y:Z,z:phi direct)
0020 %
0021 qmin_Rpap = NaN;%  Safety factor q0 at plasma center normalized to Rp/ap
0022 eq = 1;%  Exponent for q radial profile
0023 qopt = 2;%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
0024 %
0025 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)
0026 mi = [1,2,3];%  Ion mass (uma) [1,p] (WARNING: Zi must be [1,2,3,mimp1,mimp2] for hydrogen plasmas)
0027 fi = [1,0,0];%  Hydrogen isotopic fraction (H/D/T) [1,3] (WARNING: only used when hydrogen plasmas are considered)
0028 %
0029 Te0 = 6.0;%  Core electron temperature (keV)
0030 Tea = 0.1;%  Edge electron temperature (keV)
0031 eTe = 1.5;%  Exponent for Te profile (Te(r) = (Te0-Tea)*(1-(r/a)^2)^eTe + Tea)
0032 %
0033 ne0 = 5.0e19;%  Core electron density (m-3)
0034 nea = 0.01e19;%  Edge electron density (m-3)
0035 ene = 1.0;%  Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^2)^ene + nea)
0036 %
0037 Ti0 = Te0;%  Core ion temperature (keV)
0038 Tia = Tea;%  Edge ion temperature (keV)
0039 eTi = eTe;%  Exponent for Ti profile (Ti(r) = (Ti0-Tia)*(1-(r/a)^2)^eTi + Tia)
0040 %
0041 Zeff0 = 1;%  Core effective charge (a.u.)
0042 Zeffa = 1;%  Edge effective charge (a.u.)
0043 eZeff = 0;%  Exponent for the effective charge (Zeff(r) = (Zeff0-Zeffa)*(1-(r/a)^2)^eZeff + Zeffa)
0044 %
0045 % Plasma parameters
0046 %
0047 [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
0048 %
0049 %Magnetic equilibrium
0050 %
0051 [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
0052 %
0053 equil_mag.Rp = Rp;
0054 equil_mag.Zp = Zp;
0055 %
0056 equil = conc_struct_jd(equil_mag,equil_prof);
0057 equil.id = 'JETliketest_cyl';% scenario identification (see paper Plasma Phys. Control. Fusion 41 (1999) 1231 - J.A. Heikkinen et al.)
0058 %
0059 filename = ['EQUIL_',equil.id,'.mat'];
0060 %
0061 eval(['save ',filename,' equil'])

Community support and wiki are available on Redmine. Last update: 18-Apr-2019.