Skip to content
Snippets Groups Projects
Commit fda646ff authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

scripts save

parent 674e340b
No related branches found
No related tags found
No related merge requests found
...@@ -48,14 +48,14 @@ for jt = 1:numel(DATA.Ts3D) ...@@ -48,14 +48,14 @@ for jt = 1:numel(DATA.Ts3D)
t = DATA.Ts3D(jt); t = DATA.Ts3D(jt);
[~, it] = min(abs(DATA.Ts3D-t)); [~, it] = min(abs(DATA.Ts3D-t));
% %
% tmp = h5read([folder,momfile],['/mom_ions/dens/',sprintf('%10.10d',it-1)]); tmp = h5read([folder,momfile],['/mom_ions/dens/',sprintf('%10.10d',it-1)]);
% DATA.DENS_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; DATA.DENS_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary;
% %
% tmp = h5read([folder,momfile],['/mom_ions/T_par/',sprintf('%10.10d',it-1)]); tmp = h5read([folder,momfile],['/mom_ions/T_par/',sprintf('%10.10d',it-1)]);
% DATA.TPAR_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; DATA.TPAR_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary;
% %
% tmp = h5read([folder,momfile],['/mom_ions/T_perp/',sprintf('%10.10d',it-1)]); tmp = h5read([folder,momfile],['/mom_ions/T_perp/',sprintf('%10.10d',it-1)]);
% DATA.TPER_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; DATA.TPER_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary;
tmp = h5read([folder,phifile],['/field/phi/',sprintf('%10.10d',it-1)]); tmp = h5read([folder,phifile],['/field/phi/',sprintf('%10.10d',it-1)]);
DATA.PHI(:,:,:,it) = tmp.real + 1i*tmp.imaginary; DATA.PHI(:,:,:,it) = tmp.real + 1i*tmp.imaginary;
......
function [ FIGURE ] = spectrum_1D( data, options ) function [ FIGURE ] = spectrum_1D( data, options )
options.PLAN = 'kxky'; options.PLAN = 'kxky';
options.COMP = 'avg'; options.COMP = 1;
options.INTERP = 0; options.INTERP = 0;
options.POLARPLOT = 0; options.POLARPLOT = 0;
options.AXISEQUAL = 1; options.AXISEQUAL = 1;
......
gyacomodir = '/home/ahoffman/gyacomo/'; gyacomodir = '/home/ahoffman/gyacomo/';
% EXECNAME = 'gyacomo_1.0'; addpath(genpath([gyacomodir,'matlab'])) % ... add
addpath(genpath([gyacomodir,'matlab/plot'])) % ... add
addpath(genpath([gyacomodir,'matlab/compute'])) % ... add
addpath(genpath([gyacomodir,'matlab/load'])) % ... add% EXECNAME = 'gyacomo_1.0';
% EXECNAME = 'gyacomo_dbg'; % EXECNAME = 'gyacomo_dbg';
EXECNAME = 'gyacomo'; EXECNAME = 'gyacomo';
%% %%
NU_a = [0.005 0.01:0.01:0.1]; NU_a = [0.005 0.01:0.01:0.1];
% P_a = [2 4 6 8 10 12 16]; % P_a = [2 4 6 8 10 12 16];
% NU_a = 0.05; % NU_a = 0.1;
P_a = [10]; P_a = [2 4 8 10 12 16 20];
CO = 'SG'; CO = 'SG';
...@@ -19,7 +22,7 @@ kymin = 0.05; ...@@ -19,7 +22,7 @@ kymin = 0.05;
Ny = 40; Ny = 40;
SIMID = 'linear_CBC_nu+PJ_scan_kT_6.96_SGGK'; % Name of the simulation SIMID = 'linear_CBC_nu+PJ_scan_kT_6.96_SGGK'; % Name of the simulation
% SIMID = 'linear_CBC_nu_scan_kT_11_ky_0.3_DGGK'; % Name of the simulation % SIMID = 'linear_CBC_nu_scan_kT_11_ky_0.3_DGGK'; % Name of the simulation
RUN = 1; RUN = 0;
g_ky = zeros(numel(NU_a),numel(P_a),Ny/2); g_ky = zeros(numel(NU_a),numel(P_a),Ny/2);
g_avg= g_ky*0; g_avg= g_ky*0;
...@@ -56,7 +59,7 @@ for NU = NU_a ...@@ -56,7 +59,7 @@ for NU = NU_a
ZETA = 0.0; % squareness ZETA = 0.0; % squareness
NEXC = 1; % To extend Lx if needed (Lx = Nexc/(kymin*shear)) NEXC = 1; % To extend Lx if needed (Lx = Nexc/(kymin*shear))
EPS = 0.18; % inverse aspect ratio EPS = 0.18; % inverse aspect ratio
SPS0D = 1; SPS2D = 0; SPS3D = 1;SPS5D= 1/5; SPSCP = 0; SPS0D = 1; SPS2D = -1; SPS3D = 1;SPS5D= 1/5; SPSCP = 0;
JOB2LOAD= -1; JOB2LOAD= -1;
LINEARITY = 'linear'; % activate non-linearity (is cancelled if KXEQ0 = 1) LINEARITY = 'linear'; % activate non-linearity (is cancelled if KXEQ0 = 1)
GKCO = 1; % gyrokinetic operator GKCO = 1; % gyrokinetic operator
...@@ -65,7 +68,7 @@ for NU = NU_a ...@@ -65,7 +68,7 @@ for NU = NU_a
CLOS = 0; % Closure model (0: =0 truncation, 1: v^Nmax closure (p+2j<=Pmax))s CLOS = 0; % Closure model (0: =0 truncation, 1: v^Nmax closure (p+2j<=Pmax))s
NL_CLOS = 0; % nonlinear closure model (-2:nmax=jmax; -1:nmax=jmax-j; >=0:nmax=NL_CLOS) NL_CLOS = 0; % nonlinear closure model (-2:nmax=jmax; -1:nmax=jmax-j; >=0:nmax=NL_CLOS)
KERN = 0; % Kernel model (0 : GK) KERN = 0; % Kernel model (0 : GK)
INIT_OPT= 'phi'; % Start simulation with a noisy mom00/phi/allmom INIT_OPT= 'mom00'; % Start simulation with a noisy mom00/phi/allmom
W_DOUBLE = 1; W_DOUBLE = 1;
W_GAMMA = 1; W_HF = 1; W_GAMMA = 1; W_HF = 1;
W_PHI = 1; W_NA00 = 1; W_PHI = 1; W_NA00 = 1;
...@@ -86,6 +89,7 @@ for NU = NU_a ...@@ -86,6 +89,7 @@ for NU = NU_a
setup setup
if RUN if RUN
system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 6 ',gyacomodir,'bin/',EXECNAME,' 2 3 1 0; cd ../../../wk']) system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 6 ',gyacomodir,'bin/',EXECNAME,' 2 3 1 0; cd ../../../wk'])
% system(['cd ../results/',SIMID,'/',PARAMS,'/; mpirun -np 1 ',gyacomodir,'bin/',EXECNAME,' 1 1 1 0; cd ../../../wk'])
end end
% Load results % Load results
...@@ -130,24 +134,28 @@ for i = 1:numel(idx_) ...@@ -130,24 +134,28 @@ for i = 1:numel(idx_)
e_ = g_std(:,:,idx_(i)); e_ = g_std(:,:,idx_(i));
end end
colors_ = summer(numel(NU_a));
subplot(121) subplot(121)
for i = 1:numel(NU_a) for i = 1:numel(NU_a)
errorbar(P_a,y_(i,:),e_(i,:),... errorbar(P_a,y_(i,:),e_(i,:),...
'LineWidth',1.2,... 'LineWidth',1.2,...
'DisplayName',['$\nu=$',num2str(NU_a(i))]); 'DisplayName',['$\nu=$',num2str(NU_a(i))],...
'color',colors_(i,:));
hold on; hold on;
end end
title(['$\kappa_T=$',num2str(K_Ti),' $k_y=k_y^{max}$']); title(['$\kappa_T=$',num2str(K_Ti),' $k_y=k_y^{max}$']);
legend('show'); xlabel('$P$, $J=P/2$'); ylabel('$\gamma$'); legend('show'); xlabel('$P$, $J=P/2$'); ylabel('$\gamma$');
colors_ = jet(numel(P_a));
subplot(122) subplot(122)
for j = 1:numel(P_a) for j = 1:numel(P_a)
errorbar(NU_a,y_(:,j),e_(:,j),... errorbar(NU_a,y_(:,j),e_(:,j),...
'LineWidth',1.2,... 'LineWidth',1.2,...
'DisplayName',['(',num2str(P_a(j)),',',num2str(P_a(j)/2),')']); 'DisplayName',['(',num2str(P_a(j)),',',num2str(P_a(j)/2),')'],...
'color',colors_(j,:));
hold on; hold on;
end end
title(['$\kappa_T=$',num2str(K_Ti),' $k_y=$',num2str(data.ky(idx_))]); title(['$\kappa_T=$',num2str(K_Ti),' $k_y=k_y^{max}$']);
legend('show'); xlabel(['$\nu_{',CO,'}$']); ylabel('$\gamma$'); legend('show'); xlabel(['$\nu_{',CO,'}$']); ylabel('$\gamma$');
end end
......
...@@ -13,15 +13,15 @@ addpath(genpath([gyacomodir,'matlab/load'])) % ... add ...@@ -13,15 +13,15 @@ addpath(genpath([gyacomodir,'matlab/load'])) % ... add
% folder = '/misc/gene_results/shearless_cyclone/LD_s_alpha_output_1.0/'; % folder = '/misc/gene_results/shearless_cyclone/LD_s_alpha_output_1.0/';
% folder = '/misc/gene_results/shearless_cyclone/LD_s_alpha_output_0.8/'; % folder = '/misc/gene_results/shearless_cyclone/LD_s_alpha_output_0.8/';
% folder = '/misc/gene_results/Z-pinch/HP_fig_2a_mu_1e-2/'; % folder = '/misc/gene_results/Z-pinch/HP_fig_2a_mu_1e-2/';
folder = '/misc/gene_results/Z-pinch/HP_fig_2b_mu_5e-2/'; % folder = '/misc/gene_results/Z-pinch/HP_fig_2b_mu_5e-2/';
% folder = '/misc/gene_results/Z-pinch/HP_fig_2c_mu_5e-2/'; % folder = '/misc/gene_results/Z-pinch/HP_fig_2c_mu_5e-2/';
% folder = '/misc/gene_results/LD_zpinch_1.6/'; % folder = '/misc/gene_results/LD_zpinch_1.6/';
% folder = '/misc/gene_results/ZP_HP_kn_1.6_nuv_3.2/'; % folder = '/misc/gene_results/ZP_HP_kn_1.6_nuv_3.2/';
% folder = '/misc/gene_results/ZP_HP_kn_1.6_nuv_3.2/'; % folder = '/misc/gene_results/ZP_HP_kn_1.6_nuv_3.2/';
% folder = '/misc/gene_results/Z-pinch/ZP_HP_kn_1.6_HRES/'; % folder = '/misc/gene_results/Z-pinch/ZP_HP_kn_1.6_HRES/';
% folder = '/misc/gene_results/ZP_kn_2.5_large_box/'; % folder = '/misc/gene_results/ZP_kn_2.5_large_box/';
% folder = '/misc/gene_results/Z-pinch/kN_2.0_HD_transport_spectrum_00/'; folder = '/misc/gene_results/Z-pinch/kN_2.0_HD_transport_spectrum_01/';
% folder = '/misc/gene_results/Z-pinch/kN_2.5_HD_transport_spectrum_00/'; % folder = '/misc/gene_results/Z-pinch/kN_2.5_HD_transport_spectrum_01/';
% folder = '/misc/gene_results/CBC/128x64x16x24x12/'; % folder = '/misc/gene_results/CBC/128x64x16x24x12/';
% folder = '/misc/gene_results/CBC/196x96x20x32x16_02/'; % folder = '/misc/gene_results/CBC/196x96x20x32x16_02/';
...@@ -43,6 +43,7 @@ options.NMVA = 1; % Moving average for time traces ...@@ -43,6 +43,7 @@ options.NMVA = 1; % Moving average for time traces
options.ST_FIELD = '\phi'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x, Q_x) options.ST_FIELD = '\phi'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x, Q_x)
options.INTERP = 1; options.INTERP = 1;
options.NCUT = 4; % Number of cuts for averaging and error estimation options.NCUT = 4; % Number of cuts for averaging and error estimation
options.RESOLUTION = 256;
gene_data.FIGDIR = folder; gene_data.FIGDIR = folder;
fig = plot_radial_transport_and_spacetime(gene_data,options); fig = plot_radial_transport_and_spacetime(gene_data,options);
save_figure(gene_data,fig,'.png') save_figure(gene_data,fig,'.png')
...@@ -80,15 +81,16 @@ if 0 ...@@ -80,15 +81,16 @@ if 0
% Options % Options
options.INTERP = 1; options.INTERP = 1;
options.POLARPLOT = 0; options.POLARPLOT = 0;
options.NAME = '\phi'; % options.NAME = '\phi';
% options.NAME = 'v_y'; % options.NAME = 'v_y';
% options.NAME = '\Gamma_x'; % options.NAME = '\Gamma_x';
% options.NAME = 'n_i'; options.NAME = 'n_i';
options.PLAN = 'kxky'; options.PLAN = 'xy';
% options.NAME = 'f_e'; % options.NAME = 'f_e';
% options.PLAN = 'sx'; % options.PLAN = 'sx';
options.COMP = 'avg'; options.COMP = 'avg';
options.TIME = gene_data.Ts3D; options.TIME = gene_data.Ts3D;
options.RESOLUTION= 256;
gene_data.a = data.EPS * 2000; gene_data.a = data.EPS * 2000;
create_film(gene_data,options,'.gif') create_film(gene_data,options,'.gif')
end end
...@@ -134,7 +136,7 @@ end ...@@ -134,7 +136,7 @@ end
if 0 if 0
%% Time averaged spectrum %% Time averaged spectrum
options.TIME = [60 10000]; options.TIME = [600 5000];
options.NORM =1; options.NORM =1;
% options.NAME = '\phi'; % options.NAME = '\phi';
% options.NAME = 'n_i'; % options.NAME = 'n_i';
......
...@@ -35,7 +35,7 @@ gyacomodir = '/home/ahoffman/gyacomo/'; ...@@ -35,7 +35,7 @@ gyacomodir = '/home/ahoffman/gyacomo/';
% resdir = 'CBC/96x96x16x3x2_Nexc_6'; % resdir = 'CBC/96x96x16x3x2_Nexc_6';
% resdir = 'CBC/128x96x16x3x2'; % resdir = 'CBC/128x96x16x3x2';
% resdir = 'CBC/192x96x16x3x2'; % resdir = 'CBC/192x96x16x3x2';
% resdir = 'CBC/192x96x24x13x7'; resdir = 'CBC/192x96x24x13x7';
% resdir = 'CBC/kT_11_128x64x16x5x3'; % resdir = 'CBC/kT_11_128x64x16x5x3';
% resdir = 'CBC/kT_9_256x128x16x3x2'; % resdir = 'CBC/kT_9_256x128x16x3x2';
% resdir = 'CBC/kT_4.5_128x64x16x13x3'; % resdir = 'CBC/kT_4.5_128x64x16x13x3';
...@@ -60,7 +60,7 @@ gyacomodir = '/home/ahoffman/gyacomo/'; ...@@ -60,7 +60,7 @@ gyacomodir = '/home/ahoffman/gyacomo/';
%% Linear CBC %% Linear CBC
% resdir = 'linear_CBC/20x2x32_21x11_Lx_62.8319_Ly_31.4159_q0_1.4_e_0.18_s_0.8_kN_2.22_kT_5.3_nu_1e-02_DGDK_adiabe'; % resdir = 'linear_CBC/20x2x32_21x11_Lx_62.8319_Ly_31.4159_q0_1.4_e_0.18_s_0.8_kN_2.22_kT_5.3_nu_1e-02_DGDK_adiabe';
% resdir = 'testcases/miller_example'; % resdir = 'testcases/miller_example';
resdir = 'Miller/128x256x3x2_CBC_dt_5e-3'; % resdir = 'Miller/128x256x3x2_CBC_dt_5e-3';
% resdir = ['results/',resdir]; resdir = ['results/',resdir];
JOBNUMMIN = 00; JOBNUMMAX = 10; JOBNUMMIN = 00; JOBNUMMAX = 10;
run analysis_gyacomo run analysis_gyacomo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment