make_equil_TScyl_lowTene

PURPOSE ^

This script generates the data file of an ideal circular equilibrium based on

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

   This script generates the data file of an ideal circular equilibrium based on
   equilibrium profile parameters

   By J. Decker <DRFC/DSM/IRFM, joan.decker@cea.fr> and Y. Peysson <DRFC/DSM/IRFM, yves.peysson@cea.fr>

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %
0002 %   This script generates the data file of an ideal circular equilibrium based on
0003 %   equilibrium profile parameters
0004 %
0005 %   By J. Decker <DRFC/DSM/IRFM, joan.decker@cea.fr> and Y. Peysson <DRFC/DSM/IRFM, yves.peysson@cea.fr>
0006 %
0007 clear all
0008 %
0009 id = 'TScyl_lowTene';% scenario identification
0010 %
0011 [qe,me,mp,mn,e0,mu0,re,mc2,clum] = pc_dke_yp;
0012 %
0013 npsi = 101;% number of points in psi grid
0014 ntheta = 65;% number of points in theta grid
0015 qopt = 0;%Option for q profile. (0): constant (default, uniform current, psi=rho^2), (1): from qmin and eq
0016 %
0017 % Equilibrium parameters
0018 %
0019 ap = 0.7;%  Plasma minor radius on LFS midplane (m)
0020 Rp = Inf;%  Plasma major radius on axis (m)
0021 Zp = 0;%  Global plasma vertical shift (m)
0022 Ip = 1.0;% Signed value of the plasma current (MA) (with R,Z,phi direct)
0023 Bt = 3.6;%  Signed value of the toroidal magnetic field on the magnetic axis (T) (with R,Z,phi direct)
0024 %
0025 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)
0026 mi = [1,2,3,12];%  Ion mass (uma) [1,p] (WARNING: Zi must be [1,2,3,mimp1,mimp2] for hydrogen plasmas)
0027 fi = [0,1,0];%  Hydrogen isotopic fraction (H/D/T) [1,3] (WARNING: only used when hydrogen plasmas are considered)
0028 %
0029 qmin = NaN;%  Safety factor q0 at plasma center
0030 eq = NaN;%  Exponent for q 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)  multiplied by Rp/ap
0031 %
0032 beta0 = 0.1;%
0033 %
0034 Te0 = 0.1;%  Core electron temperature (keV)
0035 Tea = Te0;%  Edge electron temperature (keV)
0036 eTe = 0;%  Exponent for Te profile (Te(r) = (Te0-Tea)*(1-(r/a)^2)^eTe + Tea)
0037 %
0038 ne0 = 1.0e19;%  Core electron density (m-3)
0039 nea = ne0;%  Edge electron density (m-3)
0040 ene = 0;%  Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^2)^ene + nea)
0041 %
0042 Ti0 = Te0;%  Core ion temperature (keV)
0043 Tia = Ti0;%  Edge ion temperature (keV)
0044 eTi = 0;%  Exponent for Ti profile (Ti(r) = (Ti0-Tia)*(1-(r/a)^2)^eTi + Tia)
0045 %
0046 Zeff0 = 1;%  Core effective charge (a.u.)
0047 Zeffa = 1;%  Edge effective charge (a.u.)
0048 eZeff = 0;%  Exponent for the effective charge (Zeff(r) = (Zeff0-Zeffa)*(1-(r/a)^2)^eZeff + Zeffa)
0049 %
0050 % Plasma parameters
0051 %
0052 [prho,equil_prof.pTe,equil_prof.pne,equil_prof.pzTi,equil_prof.pzni,equil_prof.zZi,equil_prof.zmi,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
0053 %
0054 %Magnetic equilibrium
0055 %
0056 [ppsin,ppsi_apRp,theta,x,y,Bx,By,BPHI,pBpp,pq_Rpap,pj,pmag,Ip_test] = idealequilcyl_yp(ap,Rp,Zp,Bt,Ip,qmin*Rp/ap,eq,qopt,npsi,ntheta);%Cylindrical magnetic equilibrium
0057 %
0058 equil_magnetic.theta = theta;
0059 equil_magnetic.ptx = x;
0060 equil_magnetic.pty = y;
0061 equil_magnetic.ptBx = Bx;
0062 equil_magnetic.ptBy = By;
0063 equil_magnetic.ptBPHI = BPHI;
0064 %
0065 equil_magnetic.psi_apRp = ppsi_apRp; %poloidal flux profile
0066 equil_magnetic.Rp = Rp;
0067 equil_magnetic.Zp = Zp;
0068 %
0069 equil = conc_struct_jd(equil_magnetic,equil_prof);
0070 equil.id = id;
0071 %
0072 filename = ['EQUIL_',equil.id,'.mat'];
0073 %
0074 eval(['save ',filename,' equil'])

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