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 = 2;
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 = 'Zero_test';
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 = 'PARTIAL_VISUAL';
0038 path_display = '';
0039
0040 id_ohm = 'OHM_p005_flat';
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
0061 if exist('dmumpsmex');dkeparam.invproc = -2;end
0062
0063 dkeparam.psin_S = psin_S;
0064 dkeparam.rho_S = rho_S;
0065
0066 transpfaste.Dr0 = 5;
0067
0068 [Znorm_p,Zcurr_p,ZP0_p,dke_out_p,radialDKE,equilDKE,momentumDKE,gridDKE,Zmomcoef,Zbouncecoef,Zmripple,mksa,XXsinksource] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0069
0070 ohm.epsi = -ohm.epsi;
0071 waves{1}.rays{1}.sNpar = -waves{1}.rays{1}.sNpar;
0072 [Znorm_m,Zcurr_m,ZP0_m,dke_out_m] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0073
0074 figure(1),clf,graph1D_jd(equilDKE.xrho,Zcurr_p.x_tot_fsav,0,0,'\rho','Current density','',NaN,'','','-','none','r',2,20,gca,1,0.6,0.6);hold on
0075 graph1D_jd(equilDKE.xrho,Zcurr_m.x_tot_fsav,0,0,'\rho','Current density','',NaN,'','','-','none','b',2,20,gca,1,0.6,0.6);hold on
0076 graph1D_jd(equilDKE.xrho,Zcurr_p.x_tot_fsav+Zcurr_m.x_tot_fsav,0,0,'\rho','Current density','',NaN,'','','none','*','g',2,20,gca,1,0.6,0.6);
0077 legend('N_{||} > 0, E_{field} > 0','N_{||}< 0, E_{field} < 0','Sum')
0078 print_jd(p_opt,'profcurr_testzero')
0079
0080 figure(2),clf,graph1D_jd(equilDKE.xrho,ZP0_p.x_rf_fsav,0,0,'','','',NaN,'','','-','none','r',2,20,gca,1,0.6,0.6);hold on
0081 graph1D_jd(equilDKE.xrho,ZP0_p.x_c_fsav,0,0,'','','',NaN,'','','--','none','r',2,20,gca,1,0.6,0.6);hold on
0082 graph1D_jd(equilDKE.xrho,ZP0_m.x_rf_fsav,0,0,'','','',NaN,'','','none','+','b',2,20,gca,1,0.6,0.6);
0083 graph1D_jd(equilDKE.xrho,ZP0_m.x_c_fsav,0,0,'\rho','Power','',NaN,'','','none','*','b',2,20,gca,1,0.6,0.6);
0084 legend('P_{LH}: N_{||} > 0, E_{field} > 0','P_{coll}: N_{||} > 0, E_{field} > 0','P_{LH}: N_{||} < 0, E_{field} < 0','P_{coll}: N_{||} < 0, E_{field} < 0')
0085 print_jd(p_opt,'profP_testzero')
0086
0087 figure(3),clf,graph1D_jd(equilDKE.xrho,Znorm_p.x_0_fsav,0,0,'','','',NaN,'','','-','none','r',2,20,gca,1,0.6,0.6);hold on
0088 graph1D_jd(equilDKE.xrho,Znorm_m.x_0_fsav,0,0,'\rho','Density','',NaN,'','','none','*','b',2,20,gca,1,0.6,0.6);
0089 legend('N_{||} > 0, E_{field} > 0','N_{||} < 0, E_{field} < 0')
0090 print_jd(p_opt,'profne_testzero')
0091
0092
0093 eval(['save ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);
0094 info_dke_yp(2,['Data saved in ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);