0001 function [ohm] = ohm_profile_yp(equil,epsi0,epsia,eepsi,norm_ref)
0002
0003
0004
0005
0006
0007
0008 if nargin < 2 | (nargin > 2 & nargin < 5),
0009 error('Wrong number of input arguments in ohm_profile_yp');
0010 end
0011 if nargin == 2,
0012 ohm = ohm_flat(equil,epsi0);
0013 return
0014 end
0015
0016 [equilDKE] = equilibrium_jd(equil);
0017 [qe,me,mp,mn,e0,mu0,re,mc2,clum,alpha] = pc_dke_yp;
0018
0019 Te_ref = equilDKE.xTe(1);
0020 ne_ref = equilDKE.xne(1);
0021
0022 Ten_ref = Te_ref/mc2;
0023 betath_ref = sqrt(Ten_ref);
0024 lnc_e_ref = 31.3 - 0.5*log(ne_ref) + log(Te_ref*1000);
0025 nhu_ref = qe^4*ne_ref*lnc_e_ref/(4*pi*e0^2*me^2*(clum*betath_ref)^3);
0026
0027 pTe_norm = equilDKE.xTe/Te_ref;
0028 pzTi_norm = equilDKE.xzTi/Te_ref;
0029 pne_norm = equilDKE.xne/ne_ref;
0030 pzni_norm = equilDKE.xzni/ne_ref;
0031
0032 pTen = equilDKE.xTe/mc2;
0033 pzTin = equilDKE.xzTi/mc2;
0034
0035 pbetath = sqrt(pTen);
0036 plnc_e = 31.3 - 0.5*log(equilDKE.xne) + log(equilDKE.xTe*1000);
0037 pnhu = qe^4*equilDKE.xne.*plnc_e./(4*pi*e0^2*me^2.*(clum*pbetath).^3);
0038
0039 if norm_ref == 0,
0040 prbetath = pbetath/betath_ref;
0041 prnhuth = pnhu/nhu_ref;
0042 else
0043 prbetath = ones(size(equilDKE.xpsin));
0044 prnhuth = ones(size(equilDKE.xpsin));
0045 end
0046
0047 Edreicer_ref = me*clum*betath_ref*nhu_ref/qe;
0048
0049
0050
0051 ohm.rho = psi2rho_jd(equil,equilDKE.xpsin);
0052 ohm.epsi = ((epsi0 - epsia)*(1.0-ohm.rho.^2).^eepsi + epsia).*prbetath.*prnhuth*Edreicer_ref;
0053
0054
0055