0001 function [mksa] = mksacoefbuilder_dke_yp(dkeparam,display,equilDKE,radialDKE)
0002
0003
0004
0005
0006
0007 [qe,me,mp,mn,e0,mu0,re,mc2,clum,alpha] = pc_dke_yp;
0008
0009
0010
0011 if isfield(dkeparam,'Te_ref') && isfield(dkeparam,'ne_ref'),
0012 Te_ref = dkeparam.Te_ref;
0013 ne_ref = dkeparam.ne_ref;
0014 elseif length(radialDKE.r_dke) > 1 || dkeparam.ref_mode == 0,
0015 Te_ref = max(equilDKE.xTe);
0016 ne_ref = max(equilDKE.xne);
0017 if display.display_mode >= 1
0018 info_dke_yp(2,'Core reference temperature and density');
0019 disp('-------------------------------------------------------------------------------------------------------------------');
0020 end
0021 else
0022 if dkeparam.dke_mode == 0,
0023 Te_ref = equilDKE.xTe(1);
0024 ne_ref = equilDKE.xne(1);
0025 if display.display_mode >= 1
0026 info_dke_yp(2,'Local reference temperature and density');
0027 disp('-------------------------------------------------------------------------------------------------------------------');
0028 end
0029 else
0030 Te_ref = equilDKE.xTe(2);
0031 ne_ref = equilDKE.xne(2);
0032 if display.display_mode >= 1
0033 info_dke_yp(2,'Local reference temperature and density');
0034 disp('-------------------------------------------------------------------------------------------------------------------');
0035 end
0036 end
0037 end
0038
0039 mksa.betath_ref = sqrt(Te_ref/mc2);
0040 mksa.Te_ref = Te_ref;
0041 mksa.ne_ref = ne_ref;
0042 mksa.lnc_e_ref = 31.3 - 0.5*log(ne_ref) + log(Te_ref*1000);
0043 mksa.nhu_ref = qe^4*ne_ref*mksa.lnc_e_ref/(4*pi*e0^2*me^2*(clum*mksa.betath_ref)^3);
0044 mksa.xftp_norm_ref = me*clum*mksa.betath_ref*equilDKE.ap*(1 + equilDKE.xx0/equilDKE.Rp).*equilDKE.xBT0./equilDKE.xB0/qe/equilDKE.psia_apRp;
0045 mksa.j_ref = -qe*clum*mksa.betath_ref*mksa.ne_ref/1e6;
0046 mksa.P_ref = me*(clum*mksa.betath_ref)^2*mksa.nhu_ref*mksa.ne_ref/1e6;
0047 mksa.dpdt_ref = me*clum*mksa.betath_ref*mksa.nhu_ref*mksa.ne_ref;
0048 mksa.Edreicer_ref = me*clum*mksa.betath_ref*mksa.nhu_ref/qe;
0049 mksa.wpe_ref = sqrt(ne_ref*qe^2/me/e0);
0050 mksa.wmabs2 = me*mksa.lnc_e_ref*mksa.wpe_ref^2/(4*pi^2);
0051 mksa.wce_ref = equilDKE.xB0(1,1)*qe/me;
0052 mksa.taur_ref = 3*mksa.lnc_e_ref*mksa.wpe_ref^2/(2*mksa.betath_ref^3*mksa.wce_ref^2);
0053
0054 mksa.vde_ref = mksa.betath_ref*mksa.betath_ref*me*clum*clum/2/pi/abs(qe)/equilDKE.xB0(1,1)/equilDKE.Rp;
0055 mksa.taude_ref = equilDKE.ap/mksa.vde_ref;