Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
gyacomodir = pwd; gyacomodir = gyacomodir(1:end-2); % get code directory
addpath(genpath([gyacomodir,'matlab'])) % ... add
addpath(genpath([gyacomodir,'matlab/plot'])) % ... add
addpath(genpath([gyacomodir,'matlab/compute'])) % ... add
addpath(genpath([gyacomodir,'matlab/load'])) % ... add
default_plots_options
% Partition of the computer where the data have to be searched
PARTITION = '/misc/gyacomo23_outputs/';
% PARTITION = '/home/ahoffman/gyacomo/';
%% Tests
% resdir = 'test_stepon_AA/CBC_stepon_AA';
% resdir = 'test_stepon_AA/CBC_no_stepon_AA'; % No clear conclusions
%% CBC benchmark
% resdir = 'paper_2_GYAC23/CBC/3x2x128x64x24';
% resdir = 'paper_2_GYAC23/CBC/3x2x128x64x24_nu_5e-2';
% resdir = 'paper_2_GYAC23/CBC/5x3x128x64x24';
% resdir = 'paper_2_GYAC23/CBC/7x4x128x64x24';
% resdir = 'paper_2_GYAC23/CBC/21x6x192x96x24';
%% low precision kT scan
% resdir = 'paper_2_GYAC23/local_runs/1x2x64x48x16/CBC';
% resdir = 'paper_2_GYAC23/local_runs/1x2x64x48x16/CBC_dp';
% resdir = 'paper_2_GYAC23/local_runs/1x2x128x64x16/CBC';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/5x2x64x48x16/kT_3.5';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/5x2x64x48x16/kT_4.0';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/5x2x64x48x16/kT_4.5';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/5x2x64x48x16/kT_5.3';
% resdir = 'paper_2_GYAC23/local_runs/5x2x64x48x16/CBC';
% resdir = 'paper_2_GYAC23/local_runs/5x2x64x48x16/CBC_noise_init';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/9x2x64x48x16/kT_3.5';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/9x2x64x48x16/kT_4.0';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/9x2x64x48x16/kT_4.5';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/9x2x64x48x16/kT_5.3';
% resdir = 'paper_2_GYAC23/local_runs/9x2x64x48x16/CBC';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/11x2x64x48x16/kT_4.0';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/11x2x64x48x16/kT_4.5';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/11x2x64x48x16/kT_5.3';
% resdir = 'paper_2_GYAC23/local_runs/nu=0.05/11x2x64x48x16/CBC';
% resdir = 'paper_2_GYAC23/local_runs/11x2x64x48x16/CBC';
%% Collision scan
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_CBC/7x2x64x48x16/nu_0.1';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_CBC/9x2x64x48x16/nu_0.1';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_CBC/9x2x64x48x16/nu_0.1';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/9x5x128x64x24/nu_0.5';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/5x3x128x64x24/nu_0.5';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/9x5x128x64x24/nu_0.5';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/9x5x128x64x24_Lx200/nu_0.5';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/9x5x128x64x24/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/11x6x192x96x24/nu_0.1';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/9x5x192x96x24/nu_0.2';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/17x9x192x96x24/nu_0.2';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/17x9x192x96x24/nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/17x9x192x96x24/nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/9x5x192x96x24/nu_0.2';
% resdir = 'paper_2_GYAC23/collision_study/nuDGGK_scan_kT_5.3/17x9x192x96x24/continue_SG_nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/5x3x192x96x24/nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/9x5x192x96x24/nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/17x9x192x96x24/nu_0.02';
% resdir = 'paper_2_GYAC23/collision_study/nuSGGK_scan_kT_5.3/17x9x192x96x24/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/5x3x192x96x24/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/9x5x192x96x24/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/17x9x128x64x24/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/17x9x128x64x24_large_box/nu_0.005';
% resdir = 'paper_2_GYAC23/collision_study/nuLDGK_scan_kT_5.3/17x9x128x64x24_ckcut_0.8/nu_0.005';
%% kT eff study
% resdir = 'paper_2_GYAC23/kT_eff_study/1x3x128x64x24_kT_3.0/Lx120';
% resdir = 'paper_2_GYAC23/kT_eff_study/1x3x128x64x24_kT_3.0/Lx240';
% resdir = 'paper_2_GYAC23/kT_eff_study/3x3x128x64x24_kT_3.4/Lx120';
% resdir = 'paper_2_GYAC23/kT_eff_study/3x3x128x64x24_kT_3.4/Lx240';
% resdir = 'paper_2_GYAC23/kT_eff_study/5x3x128x64x24_kT_3.5';
% resdir = 'paper_2_GYAC23/kT_eff_study/7x3x128x64x24_kT_3.6/truncation';
% resdir = 'paper_2_GYAC23/kT_eff_study/7x3x128x64x24_kT_3.6/dmax';
%% dev
PARTITION='';
% resdir = '/home/ahoffman/gyacomo/testcases/zpinch_3D';
% resdir = '/home/ahoffman/gyacomo/results/dev/3D_kine_zpinch_test';
%% CBC benchmark
% resdir = '/misc/gyacomo23_outputs/paper_2_GYAC23/kT_scan_nu_1e-3/3x2x128x64x24/kT_7.0';
% resdir = '/misc/gyacomo23_outputs/paper_2_GYAC23/kT_scan_nu_1e-3/5x3x128x64x24/kT_7.0';
% resdir = '/misc/gyacomo23_outputs/paper_2_GYAC23/kT_scan_nu_1e-3/9x5x128x64x24/kT_7.0';
% resdir = '/misc/gyacomo23_outputs/paper_2_GYAC23/kT_scan_nu_1e-3/17x9x128x64x24/kT_7.0';
% resdir = '/misc/gyacomo23_outputs/paper_2_GYAC23/kT_scan_nu_1e-3/31x16x128x64x24/kT_7.0';
%% Paper 3
resdir = '/misc/gyacomo23_outputs/paper_3_GYAC23/CBC_kine';
%%
J0 = 00; J1 = 20;
% Load basic info (grids and time traces)
DATADIR = [PARTITION,resdir,'/'];
data = {};
data = compile_results_low_mem(data,DATADIR,J0,J1);
if 1
%% Plot transport and phi radial profile
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
options.TAVG_0 = 100;
options.TAVG_1 = 1000;
options.NCUT = 5; % Number of cuts for averaging and error estimation
options.NMVA = 1; % Moving average for time traces
% options.ST_FIELD = '\Gamma_x'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x)
options.ST_FIELD = '\phi'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x)
options.INTERP = 0;
options.RESOLUTION = 256;
plot_radial_transport_and_spacetime(data,options);
end
if 0
%% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Options
% [data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
% [data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
% data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
options.INTERP = 1;
options.POLARPLOT = 0;
options.NAME = '\phi';
% options.NAME = '\phi^{NZ}';
% options.NAME = '\omega_z';
% options.NAME = 'N_i^{00}';
% options.NAME = 's_{Ey}';
% options.NAME = 'n_i^{NZ}';
% options.NAME = 'Q_x';
% options.NAME = 'n_i';
% options.NAME = 'n_i-n_e';
options.PLAN = 'yz';
% options.NAME = 'f_i';
% options.PLAN = 'sx';
options.COMP = 'avg';
% options.TIME = data.Ts5D(end-30:end);
options.TIME = data.Ts3D(1:1:end);
% options.TIME = [0:1500];
data.EPS = 0.1;
data.a = data.EPS * 2000;
options.RESOLUTION = 256;
create_film(data,options,'.gif')
end
if 0
%% fields snapshots
% Options
[data.Na00, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Na00');
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
data.Ni00 = reshape(data.Na00(1,:,:,:,:),data.grids.Nky,data.grids.Nkx,data.grids.Nz,numel(data.Ts3D));
options.INTERP = 0;
options.POLARPLOT = 0;
options.AXISEQUAL = 0;
options.NORMALIZE = 0;
% options.NAME = 'N_i^{00}';
options.NAME = '\phi';
options.PLAN = 'kxky';
options.COMP = 'avg';
options.TIME = [0:0.02:0.14];
% options.TIME = data.Ts3D(1:2:end);
options.RESOLUTION = 256;
fig = photomaton(data,options);
% save_figure(data,fig)
end
if 0
%% Performance profiler
profiler(data)
end
if 1
%% Hermite-Laguerre spectrum
[data.Napjz, data.Ts3D] = compile_results_3Da(DATADIR,J0,J1,'Napjz');
% [data.Napjz, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'Nipjz');
options.ST = 1;
options.NORMALIZED = 0;
options.LOGSCALE = 1;
options.FILTER = 0; %filter the 50% time-average of the spectrum from
options.TAVG_2D = 0; %Show a 2D plot of the modes, 50% time averaged
options.TAVG_2D_CTR= 0; %make it contour plot
fig = show_moments_spectrum(data,options);
end
if 0
%% Mode evolution
[data.PHI, data.Ts3D] = compile_results_3D(DATADIR,J0,J1,'phi');
options.NORMALIZED = 0;
options.TIME = [000:9000];
options.KX_TW = [30 40]; %kx Growth rate time window
options.KY_TW = [10 20]; %ky Growth rate time window
options.NMA = 1;
options.NMODES = 800;
options.iz = 'avg'; % avg or index
options.ik = 1; % sum, max or index
options.fftz.flag = 0;
fig = mode_growth_meter(data,options);
% save_figure(data,fig,'.png')
end
if 0
%% Study singular values
[data.SV_ky_pj, data.Ts2D] = compile_results_2D(DATADIR,J0,J1,'sv_ky_pj');
nSV = data.grids.Np * data.grids.Nj;
colors_ = jet(nSV);
figure
for i = 1:nSV
sv = squeeze(data.SV_ky_pj(i,:));
semilogy(data.Ts2D,sv,...
'color',colors_(i,:),'DisplayName',['SV ',num2str(i)]);hold on
end
legend('show');
end