0001
0002
0003
0004 clear all
0005 clear mex
0006 clear functions
0007 close all
0008 warning off
0009 global nfig
0010
0011 p_opt = -1;
0012
0013 permission = test_permissions_yp;
0014
0015 if ~permission
0016 disp('Please move the script to a local folder where you have write permission before to run it')
0017 return;
0018 end
0019
0020
0021
0022 id_simul = 'LH_karney_transp_bounce_JETh77';
0023 path_simul = '';
0024
0025 psin_S = [];
0026 rho_S = [0.05:0.02:0.2,0.22:0.03:0.6,0.62:0.05:0.95];
0027
0028 id_path = '';
0029 path_path = '';
0030
0031 id_equil = 'JETh77';
0032 path_equil = '';
0033
0034 id_dkeparam = 'BOUNCE3D_MUMPS';
0035 path_dkeparam = '';
0036
0037 id_display = 'NO_DISPLAY';
0038 path_display = '';
0039
0040 id_ohm = '';
0041 path_ohm = '';
0042
0043 ids_wave = {'LH_karney_offaxis_2'};
0044 paths_wave = {''};
0045
0046 id_transpfaste = 'nomagneticturbulence';
0047 path_transpfaste = '';
0048
0049 id_ripple = '';
0050 path_ripple = '';
0051
0052
0053
0054
0055
0056 [dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple] = load_structures_yp('dkepath',id_path,path_path,'equil',id_equil,path_equil,'dkeparam',id_dkeparam,path_dkeparam,'dkedisplay',id_display,path_display,'ohm',id_ohm,path_ohm,'waves',ids_wave,paths_wave,'transpfaste',id_transpfaste,path_transpfaste,'ripple',id_ripple,path_ripple);
0057
0058
0059
0060 if exist('dmumpsmex');dkeparam.invproc = -2;end
0061
0062 dkeparam.psin_S = psin_S;
0063 dkeparam.rho_S = rho_S;
0064
0065 equil.pTe = equil.pTe(1) + equil.pTe*0;
0066 equil.pne = equil.pne(1) + equil.pne*0;
0067 equil.pzni(1,:) = equil.pzni(1,1) + equil.pzni(1,:)*0;
0068 equil.pzni(2,:) = equil.pzni(2,1) + equil.pzni(2,:)*0;
0069 equil.pzni(3,:) = equil.pzni(3,1) + equil.pzni(3,:)*0;
0070 equil.pzni(4,:) = equil.pzni(4,1) + equil.pzni(4,:)*0;
0071 equil.pzTi(1,:) = equil.pzTi(1,1) + equil.pzTi(1,:)*0;
0072 equil.pzTi(2,:) = equil.pzTi(2,1) + equil.pzTi(2,:)*0;
0073 equil.pzTi(3,:) = equil.pzTi(3,1) + equil.pzTi(3,:)*0;
0074 equil.pzTi(4,:) = equil.pzTi(4,1) + equil.pzTi(4,:)*0;
0075
0076 transpfaste.Dr0 = 0;
0077 [Znorm0,Zcurr0,ZP0_0,dke_out0,radialDKE,equilDKE,momentumDKE,gridDKE,Zmomcoef,Zbouncecoef,Zmripple,mksa,XXsinksource] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0078 disp('D=0 m2/s done');
0079 transpfaste.Dr0 = 0.1;
0080 [Znorm01,Zcurr01,ZP0_01,dke_out01] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0081 disp('D=0.1 m2/s done');
0082 transpfaste.Dr0 = 1;
0083 [Znorm1,Zcurr1,ZP0_1,dke_out1] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0084 disp('D=1 m2/s done');
0085 transpfaste.Dr0 = 10;
0086 [Znorm10,Zcurr10,ZP0_10,dke_out10] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0087 disp('D=10 m2/s done');
0088
0089 vparmin = round(1/(waves{1}.rays{1}.sNpar(1)+imag(waves{1}.rays{1}.sdNpar(1))/2)/mksa.betath_ref);
0090 vparmax = round(1/(waves{1}.rays{1}.sNpar(1)-imag(waves{1}.rays{1}.sdNpar(1))/2)/mksa.betath_ref);
0091
0092 figure(1),clf,graph1D_jd(equilDKE.xrho,Zcurr0.x_tot_fsav,0,0,'','','',NaN,'','','-','none','r',2,20,gca,1,0.6,0.6);hold on
0093 graph1D_jd(equilDKE.xrho,Zcurr01.x_tot_fsav,0,0,'','','',NaN,'','','-','none','m',1,20,gca,1,0.6,0.6);hold on
0094 graph1D_jd(equilDKE.xrho,Zcurr1.x_tot_fsav,0,0,'','','',NaN,'','','-','none','m',1,20,gca,1,0.6,0.6);hold on
0095 graph1D_jd(equilDKE.xrho,Zcurr10.x_tot_fsav,0,0,'\rho','J_{LH}',['v_{||min} = ',num2str(vparmin),', v_{||max} = ',num2str(vparmax),', D_{|| ||LH} = ',num2str(2)],NaN,'','','--','none','b',1,20,gca,1,0.6,0.6);hold on
0096 legend('D_{\psi\psi} = 0 (m^{2}/s)','D_{\psi\psi} = 0.1 (m^{2}/s)','D_{\psi\psi} = 1 (m^{2}/s)','D_{\psi\psi} = 10 (m^{2}/s)')
0097
0098 print_jd(p_opt,'fig_profcurr_Dpsipsi')
0099
0100
0101 eval(['save ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);
0102 info_dke_yp(2,['Data saved in ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);
0103
0104 proc_rundke_yp(1,'DKE_RESULTS_JETh77_LH_karney_transp_bounce_JETh77.mat',1,1)
0105 proc_rundke_yp(1,'DKE_RESULTS_JETh77_LH_karney_transp_bounce_JETh77.mat',14,1)
0106 proc_rundke_yp(1,'DKE_RESULTS_JETh77_LH_karney_transp_bounce_JETh77.mat',24,1)