Calculation of the thermal x-ray contribution: dN(k)/dt.dk.domega (s-1.keV-1.str-1) Input: - kphot: photon energy (keV) [1,n] - Zeff: effective plasma charge [1,p] - Te: bulk electron temperature [1,p] - ne: bulk electron density [1,p] - ner: fast electron density [1,p] Output: - SXR: line integrated soft x-ray emission (s-1.keV-1.str-1) [n,m] by Y.PEYSSON CEA-DRFC 11/10/1991 <peysson@fedv09.cad.cea.fr> revised for MatLab 4.1 (31/08/1994) [brem_th_out] = bremth_dke_yp(HXR,vschords,xrho,xne_norm,ne_ref,xTe_norm,Te_ref,xZeff_norm,Zeff_ref)
0001 function [brem_th_out] = bremth_dke_yp(HXR,vschords,xrho,xne_norm,ne_ref,xTe_norm,Te_ref,xZeff_norm,Zeff_ref) 0002 % 0003 % Calculation of the thermal x-ray contribution: dN(k)/dt.dk.domega (s-1.keV-1.str-1) 0004 % 0005 % Input: 0006 % 0007 % - kphot: photon energy (keV) [1,n] 0008 % - Zeff: effective plasma charge [1,p] 0009 % - Te: bulk electron temperature [1,p] 0010 % - ne: bulk electron density [1,p] 0011 % - ner: fast electron density [1,p] 0012 % 0013 % Output: 0014 % 0015 % - SXR: line integrated soft x-ray emission (s-1.keV-1.str-1) [n,m] 0016 % 0017 % 0018 %by Y.PEYSSON CEA-DRFC 11/10/1991 <peysson@fedv09.cad.cea.fr> 0019 %revised for MatLab 4.1 (31/08/1994) 0020 % 0021 % 0022 %[brem_th_out] = bremth_dke_yp(HXR,vschords,xrho,xne_norm,ne_ref,xTe_norm,Te_ref,xZeff_norm,Zeff_ref) 0023 % 0024 % 0025 if nargin < 0, 0026 infoyp(2,'Wrong number of input arguments for bremth_dke_yp'); 0027 return; 0028 end 0029 % 0030 [qe,me,mp,mn,e0,mu0,re,mc2,clum,alpha] = pc_dke_yp;%Physics constant 0031 cbremth = 16*sqrt(2*pi*mc2)*alpha*clum*(re^2)/(12*pi*sqrt(3));%Thermal bremsstrahlung constant 0032 % 0033 kphot = [20:10:180];%Photon energy in keV 0034 % 0035 ZZkphot = ones(length(xrho),1)*kphot; 0036 ZZne = xne_norm(:)*ones(1,length(kphot)); 0037 ZZTe = xTe_norm(:)*ones(1,length(kphot)); 0038 ZZZeff = xZeff_norm(:)*ones(1,length(kphot)); 0039 ZZbremth = ne_ref*ne_ref*Zeff_ref*cbremth*ZZZeff.*ZZne.^2.*exp(-ZZkphot./ZZTe/Te_ref)./(ZZkphot.*sqrt(ZZTe*Te_ref)); 0040 % 0041 for ic = 1:size(vschords,3),%loop on each chord 0042 s_mask = ~isnan(vschords(7,:,ic));%Location where chord is inside the plasma 0043 s_length = sum(s_mask);%Number of points along the chord inside the plasma 0044 ir_spsi = vschords(8,s_mask,ic); 0045 it_st = vschords(9,s_mask,ic); 0046 % 0047 brem_bd = ZZbremth(ir_spsi,:);%Local thermal bremsstrahlung emission in the direction of the detector 0048 % 0049 s = vschords(1,s_mask,ic); 0050 s = s - s(1);%s=0 where the chord enter the plasma towards the detector 0051 s1 = repmat(s',[1,length(kphot)]); 0052 % 0053 brem_th_out(ic,:) = sum(s1.*brem_bd,1)*HXR{1,5}(ic);%Integration along the chord and multiplication by the geometrical factor 0054 % 0055 info_dke_yp(2,['Line integration for chord #',int2str(ic),'/',int2str(size(vschords,3)),' done']); 0056 end 0057 0058 0059 0060 0061 0062 0063