proc_LUKE_forMHD

PURPOSE ^

SYNOPSIS ^

function proc_LUKE_forMHD(filestr)

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function proc_LUKE_forMHD(filestr)
0002 %
0003 filename = ['LUKE_DATA_',filestr,'.mat'];
0004 %
0005 if exist(filename,'file'),
0006     load(filename,'output');
0007 else
0008     filename = ['LUKE_RESULTS_',filestr,'.mat'];
0009     output = load(filename,'dke_out','equilDKE','momentumDKE','Zbouncecoef','mksa','dkeparam');
0010 end
0011 %
0012 [qe,me] = pc_dke_yp;
0013 %
0014 if isfield(dke_out,'dkeparam')
0015     dkeparam = dke_out.dkeparam;
0016 end
0017 %
0018 mhd.luke_simul = output.dke_out.simul;
0019 %
0020 if ~isfield(dke_out,'XXf0'),
0021     mhd.Xf0 = legendre2f_yp(dkeparam,momentumDKE,dke_out.XXf0_interp);%restore the distribution from its projection on the Legendre polynomial basis
0022 else
0023     mhd.XF0 = output.dke_out.XXf0;
0024 end
0025 %
0026 if ~isfield(dke_out,'XXfM'),
0027     mhd.XfM = legendre2f_yp(dkeparam,momentumDKE,dke_out.XXfM_interp);%restore the distribution from its projection on the Legendre polynomial basis
0028 else
0029     mhd.XFM = output.dke_out.XXfM;
0030 end
0031 %
0032 mhd.equil.Rp = output.equilDKE.Rp;
0033 mhd.equil.ap = output.equilDKE.ap;
0034 mhd.equil.Bt = output.equilDKE.Bax;
0035 mhd.equil.xrho = output.equilDKE.xrho;
0036 mhd.equil.xdV_2piRp_dke = output.equilDKE.xdV_2piRp_dke;
0037 mhd.equil.xBp0 = output.equilDKE.xBp0;
0038 mhd.equil.Bax = output.equilDKE.Bax;
0039 %
0040 mhd.equil.xTe = output.equilDKE.xTe;
0041 mhd.equil.xne = output.equilDKE.xne;
0042 mhd.equil.xzTi = output.equilDKE.xzTi;
0043 mhd.equil.xzni = output.equilDKE.xzni;
0044 mhd.equil.zZi = output.equilDKE.zZi;
0045 %
0046 mhd.equil.pn = output.momentumDKE.pn;
0047 mhd.equil.mhu = output.momentumDKE.mhu;
0048 %
0049 mhd.equil.xq = output.Zbouncecoef.xq*output.equilDKE.ap/output.equilDKE.Rp;
0050 %
0051 mhd.equil.E_ref = output.mksa.Te_ref*1e3*qe/me;
0052 mhd.equil.n_ref = output.mksa.ne_ref;
0053 %
0054 locstr = input('Enter an optional string to add to the MHD filename (or leave empty) : ','s');
0055 %
0056 if ~isempty(locstr),
0057     locstr = ['_',locstr];
0058 end
0059 %
0060 mhdstr = ['MHD_DATA_',filestr,locstr,'.mat'];
0061 %
0062 save(mhdstr,'mhd')
0063 
0064 
0065 
0066

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