0001
0002
0003
0004 clear all
0005 clear mex
0006 clear functions
0007 close all
0008 warning off
0009 global nfig
0010
0011 permission = test_permissions_yp;
0012
0013 if ~permission
0014 disp('Please move the script to a local folder where you have write permission before to run it')
0015 return;
0016 end
0017
0018
0019
0020 id_simul = 'Thermal_Ti';
0021 path_simul = '';
0022
0023 psin_S = [];
0024 rho_S = [0.5];
0025
0026 id_path = '';
0027 path_path = '';
0028
0029 id_equil = 'TScyl';
0030 path_equil = '';
0031
0032 id_dkeparam = 'UNIFORM10010020';
0033 path_dkeparam = '';
0034
0035 id_display = 'NO_DISPLAY';
0036 path_display = '';
0037
0038 id_ohm = '';
0039 path_ohm = '';
0040
0041 ids_wave = {''};
0042 paths_wave = {''};
0043
0044 id_transpfaste = '';
0045 path_transpfaste = '';
0046
0047 id_ripple = '';
0048 path_ripple = '';
0049
0050
0051
0052
0053
0054 [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);
0055
0056
0057
0058 if exist('dmumpsmex');dkeparam.invproc = -2;end
0059
0060 dtn = 10000;
0061 tnmax = 100000;
0062
0063 dkeparam.coll_mode = 2;
0064 dkeparam.dtn = dtn;
0065 dkeparam.tn = tnmax;
0066 dkeparam.prec0_f = 0;
0067
0068 dkeparam.psin_S = psin_S;
0069 dkeparam.rho_S = rho_S;
0070
0071 pzTi = equil.pzTi;
0072 Tifac_list = logspace(-2,2,21);
0073
0074 for iTi = 1:length(Tifac_list);
0075
0076 equil.pzTi = pzTi*Tifac_list(iTi);
0077
0078
0079
0080 dkeparam.boundary_mode_f = 0;
0081 dkeparam.norm_mode_f = 0;
0082
0083 [dummy,dummy,dummy,dke_out] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0084 normf0_final_0(iTi) = dke_out.normf0{end}(end);
0085 residue_final_0(iTi) = dke_out.residu_f{end}(end);
0086
0087
0088
0089 dkeparam.boundary_mode_f = 1;
0090 dkeparam.norm_mode_f = 0;
0091
0092 [dummy,dummy,dummy,dke_out] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0093 normf0_final_1(iTi) = dke_out.normf0{end}(end);
0094 residue_final_1(iTi) = dke_out.residu_f{end}(end);
0095
0096
0097
0098 dkeparam.boundary_mode_f = 0;
0099 dkeparam.norm_mode_f = 1;
0100
0101 [dummy,dummy,dummy,dke_out] = main_dke_yp(id_simul,dkepath,equil,dkeparam,dkedisplay,ohm,waves,transpfaste,ripple,[],[]);
0102 normf0_final_2(iTi) = dke_out.normf0{end}(end);
0103 residue_final_2(iTi) = dke_out.residu_f{end}(end);
0104 end
0105
0106 figure(1),clf
0107
0108 leg = {'Free Mode','Fixed point','Normalization'};
0109 xlim = 10.^[-2,2];
0110 ylim = [-4,4]*1e-2;
0111 xlab = 'T_i/T_e';
0112 ylab = '\Deltan/n_0';
0113 tit = '';
0114 colors = {'r','b','g','m'};
0115 siz = 20+14i;
0116
0117 graph1D_jd(Tifac_list,normf0_final_0-1,1,0,xlab,ylab,tit,NaN,xlim,ylim,'-','none',colors{1},2,siz,gca,0.9,0.7,0.7);
0118 graph1D_jd(Tifac_list,normf0_final_1-1,1,0,'','','',NaN,xlim,ylim,'-','none',colors{2},2,siz,gca);
0119 graph1D_jd(Tifac_list,normf0_final_2-1,1,0,'','','',leg,xlim,ylim,'-','none',colors{3},2,siz,gca);
0120
0121 set(gca,'xtick',[0.01,0.1,1,10,100])
0122 set(gca,'XMinorGrid','off')
0123 set(gca,'XMinorTick','on')
0124 set(gca,'ytick',[-4:2:4]*1e-2)
0125
0126 figure(2),clf
0127
0128 ylim = 10.^[-23,-21];
0129 ylab = 'Legendre convergence parameter';
0130
0131 graph1D_jd(Tifac_list,residue_final_0,1,1,xlab,ylab,tit,NaN,xlim,ylim,'-','+',colors{1},2,siz,gca,0.9,0.7,0.7);
0132 graph1D_jd(Tifac_list,residue_final_1,1,1,'','','',NaN,xlim,ylim,'-','+',colors{2},2,siz,gca);
0133 graph1D_jd(Tifac_list,residue_final_2,1,1,'','','',leg,xlim,ylim,'-','+',colors{3},2,siz,gca);
0134
0135 set(gca,'xtick',[0.01,0.1,1,10,100])
0136 set(gca,'XMinorGrid','off')
0137 set(gca,'XMinorTick','on')
0138 set(gca,'ytick',10.^[-23:21])
0139 set(gca,'YMinorGrid','off')
0140 set(gca,'YMinorTick','off')
0141
0142 print_jd(2,'fig_thermal_Ti_deltan','./figures',1)
0143 print_jd(2,'fig_thermal_Ti_residue','./figures',2)
0144
0145
0146
0147 eval(['save ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);
0148 info_dke_yp(2,['Data saved in ',path_simul,'DKE_RESULTS_',id_equil,'_',id_simul,'.mat']);