make_equil_PLTtest

PURPOSE ^

SYNOPSIS ^

function [] = make_equil_PLTtest

DESCRIPTION ^

   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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [] = make_equil_PLTtest
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 qopt = 1;%Option for q profile. (0): constant (default, uniform current, psi=rho^2),
0014 %                               (1): linear (psi=rho),
0015 %                               (2):  from qmin and eq
0016 %
0017 % Equilibrium parameters
0018 %
0019 Rp = 1.32;%Plasma major radius on axis (m)
0020 Zp = 0.0; 
0021 ap = 0.303*Rp;%  Inverse aspect ratio
0022 Ip = 0.2;% Signed value of the plasma current (MA) (with R,Z,phi direct)
0023 Bt = 3.1;%  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_Rpap = 1*Rp/ap;%  Safety factor q0 at plasma center
0030 eq = 2;%  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)
0031 %
0032 Te0 = 1.5;%  Core electron temperature (keV)
0033 Tea = 0.03;%  Edge electron temperature (keV)
0034 eTe = 3.99;%  Exponent for Te profile (Te(r) = (Te0-Tea)*(1-(r/a)^2)^eTe + Tea)
0035 %
0036 ne0 = 0.5625e19;%  Core electron density (m-3)
0037 nea = 0.5625e18;%  Edge electron density (m-3)
0038 ene = -0.571;%  Exponent for ne profile (ne(r) = (ne0-nea)*(1-(r/a)^2)^ene + nea)
0039 %
0040 Ti0 = 0.5;%  Core ion temperature (keV)
0041 Tia = 0.03;%  Edge ion temperature (keV)
0042 eTi = 2.90;%  Exponent for Ti profile (Ti(r) = (Ti0-Tia)*(1-(r/a)^2)^eTi + Tia)
0043 %
0044 Zeff0 = 4;%  Core effective charge (a.u.)
0045 Zeffa = 4;%  Edge effective charge (a.u.)
0046 eZeff = 0;%  Exponent for the effective charge (Zeff(r) = (Zeff0-Zeffa)*(1-(r/a)^2)^eZeff + Zeffa)
0047 %
0048 % Plasma parameters
0049 %
0050 [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,eTe,NaN,ne0,nea,ene,NaN,Ti0,Tia,eTi,NaN,Zeff0,Zeffa,eZeff,NaN,npsi);%Profiles
0051 %
0052 %Magnetic equilibrium
0053 %
0054 [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
0055 %
0056 equil_mag.Rp = Rp;
0057 equil_mag.Zp = Zp;
0058 %
0059 equil = conc_struct_jd(equil_mag,equil_prof);
0060 equil.id = 'PLTtest';% scenario identification (see paper Plasma Phys. Control. Fusion 41 (1999) 1231 - J.A. Heikkinen et al.)
0061 %
0062 filename = ['EQUIL_',equil.id,'.mat'];
0063 %
0064 eval(['save ',filename,' equil'])

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