diff --git a/matlab/load/load_gene_data.m b/matlab/load/load_gene_data.m index 4ef290a..af55df0 100644 --- a/matlab/load/load_gene_data.m +++ b/matlab/load/load_gene_data.m @@ -1,76 +1,76 @@ function [ DATA ] = load_gene_data( folder ) %to load gene data as for HeLaZ results namelist = read_namelist([folder,'parameters.dat']); DATA.namelist = namelist; %% Grid coofile = 'coord.dat.h5'; DATA.vp = h5read([folder,coofile],'/coord/vp'); DATA.Nvp = numel(DATA.vp); DATA.mu = h5read([folder,coofile],'/coord/mu'); DATA.Nmu = numel(DATA.mu); DATA.kx = h5read([folder,coofile],'/coord/kx'); DATA.Nkx = numel(DATA.kx); DATA.Nx = DATA.Nkx; DATA.ky = h5read([folder,coofile],'/coord/ky'); DATA.Nky = numel(DATA.ky); DATA.Ny = DATA.Nky*2-1; DATA.z = h5read([folder,coofile],'/coord/z'); DATA.Nz = numel(DATA.z); dkx = DATA.kx(2); dky = DATA.ky(2); Lx = 2*pi/dkx; Ly = 2*pi/dky; x = linspace(-Lx/2,Lx/2,DATA.Nx+1); x = x(1:end-1); y = linspace(-Ly/2,Ly/2,DATA.Ny+1); y = y(1:end-1); DATA.x = x; DATA.y = y; DATA.Lx = Lx; DATA.Ly = Ly; %% Transport nrgfile = 'nrg.dat.h5'; % nrgfile = 'nrg_1.h5'; DATA.Ts0D = h5read([folder,nrgfile],'/nrgions/time'); DATA.PGAMMA_RI = h5read([folder,nrgfile],'/nrgions/Gamma_es'); DATA.HFLUX_X = h5read([folder,nrgfile],'/nrgions/Q_es'); %% fields and moments phifile = 'field.dat.h5'; % phifile = 'field_1.h5'; DATA.Ts3D = h5read([folder,phifile],'/field/time'); DATA.DENS_I = zeros(DATA.Nkx,DATA.Nky,DATA.Nz,numel(DATA.Ts3D)); DATA.TPER_I = zeros(DATA.Nkx,DATA.Nky,DATA.Nz,numel(DATA.Ts3D)); DATA.TPAR_I = zeros(DATA.Nkx,DATA.Nky,DATA.Nz,numel(DATA.Ts3D)); DATA.PHI = zeros(DATA.Nkx,DATA.Nky,DATA.Nz,numel(DATA.Ts3D)); momfile = 'mom_ions.dat.h5'; % momfile = 'mom_ions_1.h5'; for jt = 1:numel(DATA.Ts3D) t = DATA.Ts3D(jt); [~, it] = min(abs(DATA.Ts3D-t)); % -% tmp = h5read([folder,momfile],['/mom_ions/dens/',sprintf('%10.10d',it-1)]); -% DATA.DENS_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; + tmp = h5read([folder,momfile],['/mom_ions/dens/',sprintf('%10.10d',it-1)]); + DATA.DENS_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; % -% tmp = h5read([folder,momfile],['/mom_ions/T_par/',sprintf('%10.10d',it-1)]); -% DATA.TPAR_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; + tmp = h5read([folder,momfile],['/mom_ions/T_par/',sprintf('%10.10d',it-1)]); + DATA.TPAR_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; % -% tmp = h5read([folder,momfile],['/mom_ions/T_perp/',sprintf('%10.10d',it-1)]); -% DATA.TPER_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; + tmp = h5read([folder,momfile],['/mom_ions/T_perp/',sprintf('%10.10d',it-1)]); + DATA.TPER_I(:,:,:,it) = tmp.real + 1i*tmp.imaginary; tmp = h5read([folder,phifile],['/field/phi/',sprintf('%10.10d',it-1)]); DATA.PHI(:,:,:,it) = tmp.real + 1i*tmp.imaginary; end DATA.TEMP_I = (DATA.TPAR_I + 2*DATA.TPER_I)/3.0 - DATA.DENS_I; DATA.scale = 1; DATA.PARAMS = ['GENE']; DATA.param_title = 'GENE'; DATA.localdir = folder; %% Geometry CMD = ['tail -n ',num2str(namelist.box.nz0),' ',folder,namelist.geometry.magn_geometry{1},'.dat > tmp.txt']; system(CMD); DATA.geo_arrays = load('tmp.txt'); system('rm tmp.txt'); end diff --git a/matlab/plot/spectrum_1D.m b/matlab/plot/spectrum_1D.m index 7288fe1..6591df1 100644 --- a/matlab/plot/spectrum_1D.m +++ b/matlab/plot/spectrum_1D.m @@ -1,167 +1,167 @@ function [ FIGURE ] = spectrum_1D( data, options ) options.PLAN = 'kxky'; -options.COMP = 'avg'; +options.COMP = 1; options.INTERP = 0; options.POLARPLOT = 0; options.AXISEQUAL = 1; switch options.COMPT case 'avg' [~,it0] = min(abs(data.Ts3D-options.TIME(1))); [~,it1] = min(abs(data.Ts3D-options.TIME(end))); options.TIME = data.Ts3D(it0:it1); end toplot = process_field(data,options); t = data.Ts3D; frames = toplot.FRAMES; colors = jet(numel(frames)); switch options.NAME case '\Gamma_x' FIGURE.fig = figure; FIGURE.FIGNAME = ['transp_spectrum_',data.PARAMS]; fieldname = 'transport'; case '\phi' FIGURE.fig = figure; FIGURE.FIGNAME = ['phi_spectrum_',data.PARAMS]; fieldname = 'ES pot.'; case 'n_i' FIGURE.fig = figure; FIGURE.FIGNAME = ['ni_spectrum_',data.PARAMS]; yname = 'n_i'; fieldname = 'ion dens.'; case 'n_e' FIGURE.fig = figure; FIGURE.FIGNAME = ['ne_spectrum_',data.PARAMS]; fieldname = 'elec. dens.'; case 'N_i^{00}' FIGURE.fig = figure; FIGURE.FIGNAME = ['Ni00_spectrum_',data.PARAMS]; fieldname = 'ion gdens.'; end PLOT2D = 0; switch options.COMPXY case 'avg' compx = @(x) mean(x,2); compy = @(x) mean(x,1); ynamecx = ['$\sum_{k_x}',options.NAME,'$']; ynamecy = ['$\sum_{k_y}',options.NAME,'$']; case 'sum' compx = @(x) sum(x,2); compy = @(x) sum(x,1); ynamecx = ['$\sum_{k_x}',options.NAME,'$']; ynamecy = ['$\sum_{k_y}',options.NAME,'$']; case 'max' compx = @(x) max(x,2); compy = @(x) max(x,1); ynamecx = ['$\max_{k_x}',options.NAME,'$']; ynamecy = ['$\max_{k_y}',options.NAME,'$']; case 'zero' compx = @(x) x(:,data.Nx/2); compy = @(x) x(1,:); ynamecx = ['$',options.NAME,'(k_x=',num2str(data.kx(1)),')$']; ynamecy = ['$',options.NAME,'(k_y=',num2str(data.ky(1)),')$']; otherwise compx = @(x) x(:,:); compy = @(x) x(:,:); PLOT2D= 1; end if ~PLOT2D set(gcf, 'Position', [20 50 1200 500]) subplot(1,2,1) k = data.ky; xname = '$k_y$'; nmax = ceil(data.Nkx*2/3); shiftx = @(x) x;%(1:nmax); shifty = @(x) x;%(1:nmax); switch options.COMPT case 'avg' it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); Gk = compx(abs(mean(toplot.FIELD(:,:,:),3))); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); end X = shiftx(k); if options.OK Y = shifty(Gk)./X; else Y = shifty(Gk); end plot(X,Y,'DisplayName','t-averaged') otherwise for it = 1:numel(frames) Gk = compx(abs(toplot.FIELD(:,:,it))); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); end X = shiftx(k); if options.OK Y = shifty(Gk)./X; else Y = shifty(Gk); end plot(X,Y,'DisplayName',['$t=',num2str(t(frames(it))),'$'],... 'Color',colors(it,:)); hold on; end end grid on title(['GM $k_x$ ',fieldname]); % legend('show','Location','eastoutside') xlabel(xname); ylabel(ynamecx) subplot(1,2,2) k = data.kx; xname = '$k_x$'; nmax = floor(data.Nky/2*2/3); switch options.COMPT case 'avg' % it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); Gk = compy(abs(mean(toplot.FIELD(:,:,:),3)))'; Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); end X = k(k>0); X = X(1:end-1); Yp= Gk(k>0); Ym= Gk(k<0); Y = Yp(1:end-1) + Ym(end:-1:1); Y = Y(end:-1:1); plot(X,Y,'DisplayName','t-averaged') otherwise for it = 1:numel(toplot.FRAMES) Gk = compy(abs(toplot.FIELD(:,:,it))); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); end X = k(k>0); X = X(1:end-1); Yp= Gk(k>0); Ym= Gk(k<0); Y = Yp(1:end-1) + Ym(end:-1:1); Y = Y(end:-1:1); plot(X,Y,'DisplayName',['$t=',num2str(t(frames(it))),'$'],... 'Color',colors(it,:)); hold on; end end grid on title(['GM $k_y$ ',fieldname]); % legend('show','Location','eastoutside'); xlabel(xname); ylabel(ynamecy) else % it0 = toplot.FRAMES(1); it1 = toplot.FRAMES(end); Gk = mean(abs(toplot.FIELD(:,:,:)),3); Gk = squeeze(Gk); if options.NORM Gk = Gk./max(max(abs(Gk))); end pclr = pcolor(toplot.X,toplot.Y,Gk); set(pclr, 'edgecolor','none'); xlabel('$k_x$'); ylabel('$k_y$'); title(['GM $|$',fieldname,'$(k_x,k_y)|$ t-averaged']); end diff --git a/wk/CBC_nu_CO_scan.m b/wk/CBC_nu_CO_scan.m index 7f69c60..9a07ac6 100644 --- a/wk/CBC_nu_CO_scan.m +++ b/wk/CBC_nu_CO_scan.m @@ -1,159 +1,167 @@ 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'; %% NU_a = [0.005 0.01:0.01:0.1]; % P_a = [2 4 6 8 10 12 16]; -% NU_a = 0.05; -P_a = [10]; +% NU_a = 0.1; +P_a = [2 4 8 10 12 16 20]; CO = 'SG'; COLL_KCUT = 1.75; K_Ti = 6.96; DT = 1e-2; TMAX = 100; kymin = 0.05; Ny = 40; 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 -RUN = 1; +RUN = 0; g_ky = zeros(numel(NU_a),numel(P_a),Ny/2); g_avg= g_ky*0; g_std= g_ky*0; j = 1; for P = P_a i = 1; for NU = NU_a %Set Up parameters CLUSTER.TIME = '99:00:00'; % allocation time hh:mm:ss TAU = 1.0; % e/i temperature ratio K_Ni = 2.22; K_Ne = K_Ni; K_Te = K_Ti; % Temperature ''' SIGMA_E = 0.0233380; % mass ratio sqrt(m_a/m_i) (correct = 0.0233380) KIN_E = 0; % 1: kinetic electrons, 2: adiabatic electrons BETA = 0e-1; % electron plasma beta J = P/2; % J = 2; PMAXE = P; JMAXE = J; PMAXI = P; JMAXI = J; NX = 2; % real space x-gridpoints NY = Ny; % '' y-gridpoints LX = 2*pi/0.1; % Size of the squared frequency domain LY = 2*pi/kymin; NZ = 16; % number of perpendicular planes (parallel grid) NPOL = 2; SG = 0; GEOMETRY= 's-alpha'; Q0 = 1.4; % safety factor SHEAR = 0.8; % magnetic shear KAPPA = 0.0; % elongation DELTA = 0.0; % triangularity ZETA = 0.0; % squareness NEXC = 1; % To extend Lx if needed (Lx = Nexc/(kymin*shear)) 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; LINEARITY = 'linear'; % activate non-linearity (is cancelled if KXEQ0 = 1) GKCO = 1; % gyrokinetic operator ABCO = 1; % interspecies collisions INIT_ZF = 0; ZF_AMP = 0.0; 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) 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_GAMMA = 1; W_HF = 1; W_PHI = 1; W_NA00 = 1; W_DENS = 1; W_TEMP = 1; W_NAPJ = 1; W_SAPJ = 0; HD_CO = 0.0; % Hyper diffusivity cutoff ratio MU = 0.0; % Hyperdiffusivity coefficient INIT_BLOB = 0; WIPE_TURB = 0; ACT_ON_MODES = 0; MU_X = MU; % MU_Y = MU; N_HD = 4; MU_Z = 0.2; MU_P = 0.0; % MU_J = 0.0; LAMBDAD = 0.0; NOISE0 = 1.0e-5; % Init noise amplitude BCKGD0 = 0.0; % Init background GRADB = 1.0;CURVB = 1.0; %%------------------------------------------------------------------------- % RUN setup 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 1 ',gyacomodir,'bin/',EXECNAME,' 1 1 1 0; cd ../../../wk']) end % Load results filename = [SIMID,'/',PARAMS,'/']; LOCALDIR = [gyacomodir,'results/',filename,'/']; data = compile_results(LOCALDIR,0,0); %Compile the results from first output found to JOBNUMMAX if existing % linear growth rate (adapted for 2D zpinch and fluxtube) options.TRANGE = [0.5 1]*data.Ts3D(end); options.NPLOTS = 0; % 1 for only growth rate and error, 2 for omega local evolution, 3 for plot according to z options.GOK = 0; %plot 0: gamma 1: gamma/k 2: gamma^2/k^3 lg = compute_fluxtube_growth_rate(data,options); [gmax, kmax] = max(lg.g_ky(:,end)); [gmaxok, kmaxok] = max(lg.g_ky(:,end)./lg.ky); msg = sprintf('gmax = %2.2f, kmax = %2.2f',gmax,lg.ky(kmax)); disp(msg); msg = sprintf('gmax/k = %2.2f, kmax/k = %2.2f',gmaxok,lg.ky(kmaxok)); disp(msg); g_ky(i,j,:) = lg.avg_g; g_avg(i,j,:) = lg.avg_g; g_std(i,j,:) = lg.std_g; i = i + 1; end j = j + 1; end if 1 %% Study of the peak growth rate figure y_ = g_avg; e_ = g_std; % filter to noisy data y_ = y_.*(y_-e_>0); e_ = e_ .* (y_>0); [y_,idx_] = max(g_avg,[],3); for i = 1:numel(idx_) e_ = g_std(:,:,idx_(i)); end +colors_ = summer(numel(NU_a)); subplot(121) for i = 1:numel(NU_a) errorbar(P_a,y_(i,:),e_(i,:),... 'LineWidth',1.2,... - 'DisplayName',['$\nu=$',num2str(NU_a(i))]); + 'DisplayName',['$\nu=$',num2str(NU_a(i))],... + 'color',colors_(i,:)); hold on; end title(['$\kappa_T=$',num2str(K_Ti),' $k_y=k_y^{max}$']); legend('show'); xlabel('$P$, $J=P/2$'); ylabel('$\gamma$'); +colors_ = jet(numel(P_a)); subplot(122) for j = 1:numel(P_a) errorbar(NU_a,y_(:,j),e_(:,j),... '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; 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$'); end if 0 %% Pcolor of the peak figure; [XX_,YY_] = meshgrid(NU_a,P_a); pclr=pcolor(XX_,YY_,y_'); set(pclr,'EdgeColor','none'); end \ No newline at end of file diff --git a/wk/analysis_gene.m b/wk/analysis_gene.m index a35d30f..48a6d16 100644 --- a/wk/analysis_gene.m +++ b/wk/analysis_gene.m @@ -1,162 +1,164 @@ gyacomodir = '/home/ahoffman/gyacomo/'; addpath(genpath([gyacomodir,'matlab'])) % ... add addpath(genpath([gyacomodir,'matlab/plot'])) % ... add addpath(genpath([gyacomodir,'matlab/compute'])) % ... add addpath(genpath([gyacomodir,'matlab/load'])) % ... add % folder = '/misc/gene_results/shearless_cyclone/miller_output_1.0/'; % folder = '/misc/gene_results/shearless_cyclone/miller_output_0.8/'; % folder = '/misc/gene_results/shearless_cyclone/s_alpha_output_1.0/'; % folder = '/misc/gene_results/shearless_cyclone/rm_corrections_HF/'; % folder = '/misc/gene_results/shearless_cyclone/linear_s_alpha_CBC_100/'; % folder = '/misc/gene_results/shearless_cyclone/s_alpha_output_0.5/'; % 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/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/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/Z-pinch/ZP_HP_kn_1.6_HRES/'; % 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.5_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_01/'; % folder = '/misc/gene_results/CBC/128x64x16x24x12/'; % folder = '/misc/gene_results/CBC/196x96x20x32x16_02/'; % folder = '/misc/gene_results/CBC/128x64x16x6x4/'; % folder = '/misc/gene_results/CBC/KT_5.3_128x64x16x24x12_01/'; % folder = '/misc/gene_results/CBC/KT_4.5_128x64x16x24x12_01/'; % folder = '/misc/gene_results/CBC/KT_9_128x64x16x24x12/'; % folder = '/misc/gene_results/CBC/KT_13_large_box_128x64x16x24x12/'; % folder = '/misc/gene_results/CBC/Lapillone_Fig6/'; % folder = '/misc/gene_results/Z-pinch/HP_kN_1.6_adapt_mu_01/'; % folder = '/misc/gene_results/miller/'; gene_data = load_gene_data(folder); gene_data = invert_kxky_to_kykx_gene_results(gene_data); if 1 %% Space time diagramm (fig 11 Ivanov 2020) options.TAVG_0 = 0.1*gene_data.Ts3D(end); options.TAVG_1 = gene_data.Ts3D(end); % Averaging times duration 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.INTERP = 1; options.NCUT = 4; % Number of cuts for averaging and error estimation +options.RESOLUTION = 256; gene_data.FIGDIR = folder; fig = plot_radial_transport_and_spacetime(gene_data,options); save_figure(gene_data,fig,'.png') end if 0 %% statistical transport averaging options.T = [100 500]; fig = statistical_transport_averaging(gene_data,options); end if 0 %% 2D snapshots % Options options.INTERP = 1; options.POLARPLOT = 0; options.AXISEQUAL = 0; % options.NAME = 'Q_x'; % options.NAME = '\phi'; options.NAME = 'n_i'; % options.NAME = '\Gamma_x'; % options.NAME = 'k^2n_e'; options.PLAN = 'xy'; % options.NAME ='f_e'; % options.PLAN = 'sx'; options.COMP = 'avg'; options.TIME = [1:10]; gene_data.a = data.EPS * 2000; fig = photomaton(gene_data,options); save_figure(gene_data,fig,'.png') end if 0 %% MOVIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Options options.INTERP = 1; options.POLARPLOT = 0; -options.NAME = '\phi'; +% options.NAME = '\phi'; % options.NAME = 'v_y'; % options.NAME = '\Gamma_x'; -% options.NAME = 'n_i'; -options.PLAN = 'kxky'; +options.NAME = 'n_i'; +options.PLAN = 'xy'; % options.NAME = 'f_e'; % options.PLAN = 'sx'; options.COMP = 'avg'; options.TIME = gene_data.Ts3D; +options.RESOLUTION= 256; gene_data.a = data.EPS * 2000; create_film(gene_data,options,'.gif') end if 0 %% Geometry names = {'$g^{xx}$','$g^{xy}$','$g^{xz}$','$g^{yy}$','$g^{yz}$','$g^{zz}$',... '$B_0$','$\partial_x B_0$','$\partial_y B_0$','$\partial_z B_0$',... '$J$','$R$','$\phi$','$Z$','$\partial_R x$','$\partial_Z x$'}; figure; subplot(311) for i = 1:6 plot(gene_data.z, gene_data.geo_arrays(:,i),'DisplayName',names{i}); hold on; end xlim([min(gene_data.z),max(gene_data.z)]); legend('show'); title('GENE geometry'); subplot(312) for i = 7:10 plot(gene_data.z, gene_data.geo_arrays(:,i),'DisplayName',names{i}); hold on; end xlim([min(gene_data.z),max(gene_data.z)]); legend('show'); subplot(313) for i = 11:16 plot(gene_data.z, gene_data.geo_arrays(:,i),'DisplayName',names{i}); hold on; end xlim([min(gene_data.z),max(gene_data.z)]); legend('show'); end if 0 %% Show f_i(vpar,mu) options.times = 600:5000; options.specie = 'i'; options.PLT_FCT = 'contour'; options.folder = folder; options.iz = 'avg'; options.FIELD = ''; options.ONED = 0; % options.FIELD = 'Q_es'; plot_fa_gene(options); end if 0 %% Time averaged spectrum -options.TIME = [60 10000]; +options.TIME = [600 5000]; options.NORM =1; % options.NAME = '\phi'; % options.NAME = 'n_i'; options.NAME ='\Gamma_x'; options.PLAN = 'kxky'; options.COMPZ = 'avg'; options.OK = 0; options.COMPXY = 'avg'; % avg/sum/max/zero/ 2D plot otherwise options.COMPT = 'avg'; options.PLOT = 'semilogy'; fig = spectrum_1D(gene_data,options); % save_figure(data,fig) end if 0 %% Mode evolution options.NORMALIZED = 0; options.K2PLOT = 1; options.TIME = 1:700; options.NMA = 1; options.NMODES = 15; options.iz = 'avg'; fig = mode_growth_meter(gene_data,options); save_figure(gene_data,fig) end diff --git a/wk/gene_data.FIGDIR b/wk/gene_data.FIGDIR new file mode 100644 index 0000000..e69de29 diff --git a/wk/header_3D_results.m b/wk/header_3D_results.m index 63cb0bf..8a872de 100644 --- a/wk/header_3D_results.m +++ b/wk/header_3D_results.m @@ -1,66 +1,66 @@ % Directory of the code "mypathtoHeLaZ/HeLaZ/" gyacomodir = '/home/ahoffman/gyacomo/'; % Directory of the simulation (from results) % if 1% Local results % resdir ='volcokas/64x32x16x5x3_kin_e_npol_1'; %% Dimits % resdir ='shearless_cyclone/128x64x16x5x3_Dim_90'; % resdir ='shearless_cyclone/128x64x16x9x5_Dim_scan/128x64x16x9x5_Dim_60'; % resdir ='shearless_cyclone/128x64x16x5x3_Dim_scan/128x64x16x5x3_Dim_70'; % resdir ='shearless_cyclone/64x32x16x5x3_Dim_scan/64x32x16x5x3_Dim_70'; %% AVS % resdir = 'volcokas/64x32x16x5x3_kin_e_npol_1'; % resdir = 'volcokas/64x32x16x5x3_kin_e_npol_1'; % resdir = 'shearless_cyclone/64x32x80x5x3_CBC_Npol_5_kine'; % resdir = 'shearless_cyclone/96x32x160x5x3_CBC_Npol_10_kine'; % resdir = 'shearless_cyclone/64x32x160x5x3_CBC_Npol_10_kine'; % resdir = 'shearless_cyclone/96x32x160x5x3_CBC_Npol_10_kine'; %% shearless CBC % resdir ='shearless_cyclone/64x32x16x5x3_CBC_080'; % resdir ='shearless_cyclone/64x32x16x5x3_CBC_scan/64x32x16x5x3_CBC_100'; % resdir ='shearless_cyclone/64x32x16x5x3_CBC_120'; % resdir ='shearless_cyclone/64x32x16x9x5_CBC_080'; % resdir ='shearless_cyclone/64x32x16x9x5_CBC_100'; % resdir ='shearless_cyclone/64x32x16x9x5_CBC_120'; % resdir = 'shearless_cyclone/64x32x16x5x3_CBC_CO/64x32x16x5x3_CBC_LRGK'; %% CBC % resdir = 'CBC/64x32x16x5x3'; % resdir = 'CBC/64x128x16x5x3'; % resdir = 'CBC/128x64x16x5x3'; % resdir = 'CBC/96x96x16x3x2_Nexc_6'; % resdir = 'CBC/128x96x16x3x2'; % resdir = 'CBC/192x96x16x3x2'; -% resdir = 'CBC/192x96x24x13x7'; +resdir = 'CBC/192x96x24x13x7'; % resdir = 'CBC/kT_11_128x64x16x5x3'; % resdir = 'CBC/kT_9_256x128x16x3x2'; % resdir = 'CBC/kT_4.5_128x64x16x13x3'; % resdir = 'CBC/kT_4.5_192x96x24x13x7'; % resdir = 'CBC/kT_4.5_128x64x16x13x7'; % resdir = 'CBC/kT_4.5_128x96x24x15x5'; % resdir = 'CBC/kT_5.3_192x96x24x13x7'; % resdir = 'CBC/kT_13_large_box_128x64x16x5x3'; % resdir = 'CBC/kT_11_96x64x16x5x3_ky_0.02'; % resdir = 'CBC/kT_scan_128x64x16x5x3'; % resdir = 'CBC/kT_scan_192x96x16x3x2'; % resdir = 'CBC/kT_13_96x96x16x3x2_Nexc_6'; % resdir = 'dbg/nexc_dbg'; % resdir = 'CBC/NM_F4_kT_4.5_192x64x24x6x4'; % resdir = 'CBC_Ke_EM/192x96x24x5x3'; % resdir = 'CBC_Ke_EM/96x48x16x5x3'; % resdir = 'CBC_Ke_EM/minimal_res'; %% KBM % resdir = 'NL_KBM/192x64x24x5x3'; %% 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 = 'testcases/miller_example'; -resdir = 'Miller/128x256x3x2_CBC_dt_5e-3'; -% resdir = ['results/',resdir]; +% resdir = 'Miller/128x256x3x2_CBC_dt_5e-3'; +resdir = ['results/',resdir]; JOBNUMMIN = 00; JOBNUMMAX = 10; run analysis_gyacomo