From 7b770777f0a79d0e2c41e83d8dc4cd01698b034a Mon Sep 17 00:00:00 2001 From: Antoine Cyril David Hoffmann <ahoffman@spcpc606.epfl.ch> Date: Mon, 12 Apr 2021 11:20:50 +0200 Subject: [PATCH] scripts update --- matlab/create_gif_1D.m | 4 ++- matlab/setup.m | 6 ++-- matlab/write_fort90_COSOlver.m | 2 +- wk/analysis_2D.m | 57 ++++++++++++++++++++++++++++------ wk/compute_collision_mat.m | 23 ++++++++------ wk/linear_study.m | 31 +++++++++++------- wk/local_run.m | 31 +++++++++--------- wk/marconi_run.m | 36 ++++++++++----------- 8 files changed, 120 insertions(+), 70 deletions(-) diff --git a/matlab/create_gif_1D.m b/matlab/create_gif_1D.m index 5f7369fa..296117f2 100644 --- a/matlab/create_gif_1D.m +++ b/matlab/create_gif_1D.m @@ -20,9 +20,11 @@ fig = figure; in = 1; nbytes = fprintf(2,'frame %d/%d',in,numel(FIELD(1,1,:))); for n = FRAMES % loop over selected frames - scale = max(FIELD(:,n)); + scale = max(FIELD(:,n))*SCALING + (1-SCALING); plot(X,FIELD(:,n)/scale,linestyle); + if (YMIN ~= YMAX && XMIN ~= XMAX) ylim([YMIN,YMAX]); xlim([XMIN,XMAX]); + end title(['$t \approx$', sprintf('%.3d',ceil(T(n))), ', scaling = ',sprintf('%.1e',scale)]); xlabel(XNAME); ylabel(FIELDNAME); drawnow diff --git a/matlab/setup.m b/matlab/setup.m index d9beeda9..e5ac1810 100644 --- a/matlab/setup.m +++ b/matlab/setup.m @@ -87,15 +87,15 @@ elseif (CO == 2) % Write matrice filename for Sugama GK INITIAL.selfmat_file = ... ['''../../../iCa/self_Coll_GKE_1_GKI_1_ESELF_3_ISELF_3_Pmaxe_',num2str(cmat_pmaxe),... '_Jmaxe_',num2str(cmat_jmaxe),'_Pmaxi_',num2str(cmat_pmaxi),'_Jmaxi_',... - num2str(cmat_jmaxi),'_JE_12_NFLR_5_''']; + num2str(cmat_jmaxi),'_JE_12_''']; INITIAL.eimat_file = ... ['''../../../iCa/ei_Coll_GKE_1_GKI_1_ETEST_3_EBACK_3_Pmaxe_',num2str(cmat_pmaxe),... '_Jmaxe_',num2str(cmat_jmaxe),'_Pmaxi_',num2str(cmat_pmaxi),'_Jmaxi_',... - num2str(cmat_jmaxi),'_JE_12_tau_1.0000_mu_0.0233_NFLRe_5_NFLRi_5_''']; + num2str(cmat_jmaxi),'_JE_12_tau_1.0000_mu_0.0233_''']; INITIAL.iemat_file = ... ['''../../../iCa/ie_Coll_GKE_1_GKI_1_ITEST_3_IBACK_3_Pmaxe_',num2str(cmat_pmaxe),... '_Jmaxe_',num2str(cmat_jmaxe),'_Pmaxi_',num2str(cmat_pmaxi),'_Jmaxi_',... - num2str(cmat_jmaxi),'_JE_12_tau_1.0000_mu_0.0233_NFLRe_5_NFLRi_5_''']; + num2str(cmat_jmaxi),'_JE_12_tau_1.0000_mu_0.0233_''']; elseif (CO == 3) % Full Coulomb GK disp('Warning, FCGK not implemented yet') elseif (CO == -1) % DGDK diff --git a/matlab/write_fort90_COSOlver.m b/matlab/write_fort90_COSOlver.m index 46da401e..066f825d 100644 --- a/matlab/write_fort90_COSOlver.m +++ b/matlab/write_fort90_COSOlver.m @@ -27,7 +27,7 @@ fprintf(fid,'\n'); fprintf(fid,'&BASIS_TRANSFORMATION_PAR\n'); fprintf(fid,['T5dir = ','''/misc/coeffs_backup/T5src/''','\n']); fprintf(fid,['T4dir = ','''/misc/T4/NNT4_L000x200_K000x200_P000x200_J000x200/''','\n']); -fprintf(fid,'idxT4max = 30\n'); +fprintf(fid,['idxT4max = ',num2str(COSOLVER.idxT4max),'\n']); fprintf(fid,'idxT5max = 0\n'); fprintf(fid,'IFT4 = .true.\n'); fprintf(fid,'IFT5 = .false.\n'); diff --git a/wk/analysis_2D.m b/wk/analysis_2D.m index 6d43bb33..50769e03 100644 --- a/wk/analysis_2D.m +++ b/wk/analysis_2D.m @@ -1,11 +1,13 @@ %% Load results outfile =''; -if 0 +if 1 %% Load from Marconi outfile =''; -outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.4_eta_0.8_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.8_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; -% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.4_eta_0.7_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.7_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; -% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.4_eta_0.6_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.6_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; +% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.5_eta_0.6_nu_1e-01/200x100_L_120_P_20_J_3_eta_0.6_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; +% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.5_eta_0.8_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.8_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; +% outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.5_eta_0.7_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.7_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; +outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.5_eta_0.6_nu_1e-01/200x100_L_120_P_12_J_6_eta_0.6_nu_1e-01_DGGK_CLOS_0_mu_2e-02/out.txt'; +outfile ='/marconi_scratch/userexternal/ahoffman/HeLaZ/results/HeLaZ_v2.5_eta_0.6_nu_1e-01/200x100_L_120_P_10_J_5_eta_0.6_nu_1e-01_SGGK_CLOS_0_mu_2e-02/out.txt'; BASIC.RESDIR = load_marconi(outfile); end if 0 @@ -196,7 +198,7 @@ set(gcf, 'Position', [100, 100, 900, 800]) lstyle = line_styles(min(ij,numel(line_styles))); plot(Ts2D,phi_max,'DisplayName',plotname); hold on; grid on; xlabel('$t c_s/R$'); ylabel('$\max_{r,z}(\phi)$'); %legend('show'); -% suptitle(['$\nu_{',CONAME,'}=$', num2str(NU), ', $\eta_B=$',num2str(ETAB)]); +suptitle(['$\nu_{',CONAME,'}=$', num2str(NU), ', $\eta_B=$',num2str(ETAB)]); save_figure end @@ -309,7 +311,6 @@ end if 0 %% Hermite energy spectra % tf = Ts2D(end-3); -time_array = [1, 100, 400, 1000]; fig = figure; FIGNAME = ['hermite_spectrum_',PARAMS];set(gcf, 'Position', [100, 100, 1000, 300]); plt = @(x) squeeze(x); for ij = 1:Nji @@ -323,12 +324,42 @@ for ij = 1:Nji end grid on; xlabel('$p$'); - TITLE = ['$\sum |N_i^{p',num2str(Ji(ij)),'}|^2$']; title(TITLE); + TITLE = ['$\sum_{kr,kz} |N_i^{p',num2str(Ji(ij)),'}|^2$']; title(TITLE); end save_figure end +%% +if 0 +%% Laguerre energy spectra +% tf = Ts2D(end-3); +fig = figure; FIGNAME = ['laguerre_spectrum_',PARAMS];set(gcf, 'Position', [100, 100, 500, 400]); +plt = @(x) squeeze(x); +for it5 = 1:2:Ns5D + alpha = it5*1.0/Ns5D; + loglog(Ji,plt(max(epsilon_i_pj(:,:,it5),[],1)),... + 'color',(1-alpha)*[0.8500, 0.3250, 0.0980]+alpha*[0, 0.4470, 0.7410],... + 'DisplayName',['t=',num2str(Ts5D(it5))]); hold on; +end +grid on; +xlabel('$j$'); +TITLE = ['$\max_p\sum_{kr,kz} |N_i^{pj}|^2$']; title(TITLE); +save_figure +end - +%% +no_AA = (2:floor(2*Nkr/3)); +tKHI = 200; +[~,itKHI] = min(abs(Ts2D-tKHI)); +after_KHI = (itKHI:Ns2D); +if 0 +%% Phi frequency space time diagram at kz=0 +fig = figure; FIGNAME = ['phi_freq_diag_',PARAMS];set(gcf, 'Position', [100, 100, 500, 400]); + [TY,TX] = meshgrid(Ts2D(after_KHI),kr(no_AA)); + pclr = pcolor(TX,TY,log10(squeeze(abs(PHI(no_AA,1,(after_KHI)))))); set(pclr, 'edgecolor','none'); colorbar; + ylabel('$t c_s/R$'), xlabel('$0<k_r<2/3 k_r^{\max}$') + legend('$\log|\tilde\phi(k_z=0)|$') + title('Spectrogram of $\phi$') +end %% t0 = 0; [~, it02D] = min(abs(Ts2D-t0)); @@ -368,13 +399,21 @@ create_gif end if 0 %% phi @ z = 0 -GIFNAME = ['phi_r0',sprintf('_%.2d',JOBNUM),'_',PARAMS]; INTERP = 0; +GIFNAME = ['phi_z0',sprintf('_%.2d',JOBNUM),'_',PARAMS]; INTERP = 0; FIELD =(squeeze(real(phi(:,1,:)))); linestyle = '-.'; FRAMES = FRAMES_2D; X = (r); T = Ts2D; YMIN = -1.1; YMAX = 1.1; XMIN = min(r); XMAX = max(r); FIELDNAME = '$\phi(r=0)$'; XNAME = '$r/\rho_s$'; create_gif_1D end if 0 +%% phi @ kz = 0 +GIFNAME = ['phi_kz0',sprintf('_%.2d',JOBNUM),'_',PARAMS]; INTERP = 0; SCALING = 0; +FIELD =squeeze(log10(abs(PHI(no_AA,1,:)))); linestyle = '-.'; FRAMES = FRAMES_2D; +X = kr(no_AA); T = Ts2D; YMIN = -30; YMAX = 6; XMIN = min(kr); XMAX = max(kr); +FIELDNAME = '$|\tilde\phi(k_z=0)|$'; XNAME = '$k_r\rho_s$'; +create_gif_1D +end +if 0 %% Density ion frequency GIFNAME = ['Ni00',sprintf('_%.2d',JOBNUM),'_',PARAMS]; INTERP = 0; FRAMES = FRAMES_2D; FIELD =ifftshift((abs(Ni00)),2); X = fftshift(KR,2); Y = fftshift(KZ,2); T = Ts2D; diff --git a/wk/compute_collision_mat.m b/wk/compute_collision_mat.m index 4696074f..44f96b17 100644 --- a/wk/compute_collision_mat.m +++ b/wk/compute_collision_mat.m @@ -16,12 +16,16 @@ if 0 figure plot(kperp) end -%% Check if the differences btw kperp is larger than naming precision -dkperp = diff(kperp); -warning = sum(dkperp<0.0002); -if warning > 0 - disp('Warning : dkperp < 0.0002'); -end +% %% Check if the differences btw kperp is larger than naming precision +% dkperp = diff(kperp); +% warning = sum(dkperp<0.0002); +% if warning > 0 +% disp('Warning : dkperp < 0.0002'); +% end +%% +%% We compute only on a kperp grid with dk space from 0 to kperpmax +kperp = unique([0:dk:(sqrt(2)*kmax),sqrt(2)*kmax]); +kperpmax = sqrt(2) * kmax; %% n_ = 1; for k_ = kperp @@ -33,8 +37,9 @@ for k_ = kperp COSOLVER.jmaxi = 5; COSOLVER.kperp = k_; - COSOLVER.neFLR = max(5,ceil(COSOLVER.kperp^2)); % rule of thumb for sum truncation - COSOLVER.niFLR = max(5,ceil(COSOLVER.kperp^2)); + COSOLVER.neFLR = min(ceil((2/3*kperpmax)^2),max(5,ceil(COSOLVER.kperp^2))); % rule of thumb for sum truncation + COSOLVER.niFLR = max(5,ceil(COSOLVER.kperp^2)); + COSOLVER.idxT4max = 40; COSOLVER.neFLRs = 0; % ... only for GK abel COSOLVER.npeFLR = 0; % ... only for GK abel @@ -69,7 +74,7 @@ for k_ = kperp else cd ../../Documents/MoliSolver/COSOlver/ disp(['Matrix not found for kperp = ',k_string]); - disp([num2str(n_),'/',Nperp] + disp([num2str(n_),'/',Nperp]) disp('computing...'); CMD = 'mpirun -np 6 bin/CO 2 2 2 > out.txt'; disp(CMD); diff --git a/wk/linear_study.m b/wk/linear_study.m index 9e3b3b6e..9734c390 100644 --- a/wk/linear_study.m +++ b/wk/linear_study.m @@ -1,3 +1,6 @@ +for NU = [1.0 0.1 0.01] +for ETAB = [0.5 0.6 0.7 0.8] +for CO = [-3 -2 -1 0 1 2] %clear all; addpath(genpath('../matlab')) % ... add default_plots_options @@ -6,23 +9,23 @@ default_plots_options CLUSTER.TIME = '99:00:00'; % allocation time hh:mm:ss %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PHYSICAL PARAMETERS -NU = 0.1; % Collision frequency +% NU = 1.0; % Collision frequency TAU = 1.0; % e/i temperature ratio -ETAB = 0.6; +% ETAB = 0.5; ETAN = 1.0; % Density gradient ETAT = 0.0; % Temperature gradient NU_HYP = 0.0; % Hyperdiffusivity coefficient LAMBDAD = 0.0; NOISE0 = 1.0e-5; %% GRID PARAMETERS -N = 10; % Frequency gridpoints (Nkr = N/2) +N = 100; % Frequency gridpoints (Nkr = N/2) L = 120; % Size of the squared frequency domain KREQ0 = 1; % put kr = 0 MU_P = 0.0; % Hermite hyperdiffusivity -mu_p*(d/dvpar)^4 f MU_J = 0.0; % Laguerre hyperdiffusivity -mu_j*(d/dvperp)^4 f %% TIME PARMETERS TMAX = 200; % Maximal time unit -DT = 1e-2; % Time step +DT = 2e-2; % Time step SPS0D = 0.5; % Sampling per time unit for 2D arrays SPS2D = 1; % Sampling per time unit for 2D arrays SPS5D = 1/2; % Sampling per time unit for 5D arrays @@ -30,11 +33,11 @@ SPSCP = 0; % Sampling per time unit for checkpoints RESTART = 0; % To restart from last checkpoint JOB2LOAD= 00; %% OPTIONS -SIMID = 'linear_study_SugamaGK'; % Name of the simulation +SIMID = 'linear_study'; % Name of the simulation NON_LIN = 0 *(1-KREQ0); % activate non-linearity (is cancelled if KREQ0 = 1) % Collision operator % (0 : L.Bernstein, 1 : Dougherty, 2: Sugama, 3 : Full Couloumb ; +/- for GK/DK) -CO = 2; +% CO = 2; CLOS = 0; % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P) NL_CLOS = 0; % nonlinear closure model (0: =0 nmax = jmax, 1: nmax = jmax-j, >1 : nmax = NL_CLOS) KERN = 0; % Kernel model (0 : GK) @@ -50,7 +53,7 @@ W_SAPJ = 0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % unused % DK = 0; % Drift kinetic model (put every kernel_n to 0 except n=0 to 1) -JOBNUM = 00; +JOBNUM = 00; KPAR = 0.0; % Parellel wave vector component HD_CO = 0.5; % Hyper diffusivity cutoff ratio kmax = N*pi/L;% Highest fourier mode @@ -69,7 +72,7 @@ muj_ = MU_J; Nparam = numel(PA); param_name = 'PJ'; gamma_Ni00 = zeros(Nparam,floor(N/2)+1); -gamma_Ni21 = zeros(Nparam,floor(N/2)+1); +gamma_Nipj = zeros(Nparam,floor(N/2)+1); Bohm_transport = zeros(Nparam,1); Ni00_ST = zeros(Nparam,floor(N/2)+1,SPS2D*TMAX); for i = 1:Nparam @@ -93,10 +96,10 @@ for i = 1:Nparam end tend = Ts5D(end); tstart = 0.4*tend; for ikr = 1:N/2+1 - gamma_Ni21(i,ikr) = LinearFit_s(Ts5D,squeeze(abs(Nipj(3,2,ikr,1,:))),tstart,tend); + gamma_Nipj(i,ikr) = LinearFit_s(Ts5D,squeeze(max(max(abs(Nipj(:,:,ikr,1,:)),[],1),[],2)),tstart,tend); end gamma_Ni00(i,:) = real(gamma_Ni00(i,:) .* (gamma_Ni00(i,:)>=0.0)); - gamma_Ni21(i,:) = real(gamma_Ni21(i,:) .* (gamma_Ni21(i,:)>=0.0)); + gamma_Nipj(i,:) = real(gamma_Nipj(i,:) .* (gamma_Nipj(i,:)>=0.0)); % kzmax = abs(kr(ikzmax)); % Bohm_transport(i) = ETAB/ETAN*gmax/kzmax^2; % Clean output @@ -125,13 +128,13 @@ subplot(212) for i = 1:Nparam clr = line_colors(mod(i-1,numel(line_colors(:,1)))+1,:); linestyle = line_styles(floor((i-1)/numel(line_colors(:,1)))+1); - plot(plt(SCALE*kr),plt(gamma_Ni21(i,:)),... + plot(plt(SCALE*kr),plt(gamma_Nipj(i,:)),... 'Color',clr,... 'LineStyle',linestyle{1},... 'DisplayName',['$P=$',num2str(PA(i)),', $J=$',num2str(JA(i))]); hold on; end - grid on; xlabel('$k_z\rho_s^{R}$'); ylabel('$\gamma(N_i^{21})\rho_s/c_s$'); xlim([0.0,max(kr)]); + grid on; xlabel('$k_z\rho_s^{R}$'); ylabel('$\gamma(\max_{pj}N_i^{pj})\rho_s/c_s$'); xlim([0.0,max(kr)]); title(['$\eta_B=',num2str(ETAB),'$, $\nu_{',CONAME,'}=',num2str(NU),'$, ', CLOSNAME]) legend('show') saveas(fig,[SIMDIR,'gamma_Ni_vs_',param_name,'_',PARAMS,'.fig']); @@ -206,4 +209,8 @@ title(['$P_e=',num2str(PMAXE),'$',', $J_e=',num2str(JMAXE),'$',... ', $P_i=',num2str(PMAXE),'$',', $J_i=',num2str(JMAXI),'$']) saveas(fig,[SIMDIR,FIGNAME,'_vs_',param_name,'_',PARAMS,'.fig']); end +%% end +end +end +end \ No newline at end of file diff --git a/wk/local_run.m b/wk/local_run.m index aa822462..a529cd2f 100644 --- a/wk/local_run.m +++ b/wk/local_run.m @@ -4,19 +4,19 @@ addpath(genpath('../matlab')) % ... add CLUSTER.TIME = '99:00:00'; % allocation time hh:mm:ss %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PHYSICAL PARAMETERS -NU = 0.01; % Collision frequency -ETAB = 0.8; % Magnetic gradient +NU = 1.0; % Collision frequency +ETAB = 0.5; % Magnetic gradient ETAN = 1.0; % Density gradient NU_HYP = 1.0; %% GRID PARAMETERS -N = 50; % Frequency gridpoints (Nkr = N/2) -L = 100; % Size of the squared frequency domain -PMAXE = 4; % Highest electron Hermite polynomial degree -JMAXE = 4; % Highest '' Laguerre '' -PMAXI = 4; % Highest ion Hermite polynomial degree -JMAXI = 4; % Highest '' Laguerre '' +N = 200; % Frequency gridpoints (Nkr = N/2) +L = 120; % Size of the squared frequency domain +PMAXE = 10; % Highest electron Hermite polynomial degree +JMAXE = 05; % Highest '' Laguerre '' +PMAXI = 10; % Highest ion Hermite polynomial degree +JMAXI = 05; % Highest '' Laguerre '' %% TIME PARAMETERS -TMAX = 2000; % Maximal time unit +TMAX = 50; % Maximal time unit DT = 2e-2; % Time step SPS0D = 1; % Sampling per time unit for profiler SPS2D = 1/2; % Sampling per time unit for 2D arrays @@ -27,15 +27,11 @@ JOB2LOAD= 0; %% OPTIONS AND NAMING % Collision operator % (0 : L.Bernstein, 1 : Dougherty, 2: Sugama, 3 : Full Couloumb ; +/- for GK/DK) -CO = 1; +CO = 2 ; CLOS = 0; % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P) NL_CLOS = -1; % nonlinear closure model (-2: nmax = jmax, -1: nmax = jmax-j, >=0 : nmax = NL_CLOS) -KERN = 0; % Kernel model (0 : GK) -INIT_PHI= 1; % Start simulation with a noisy phi and moments -% SIMID = ['local_eta_',num2str(ETAB),'_nu_%0.0e']; % Name of the simulation -% SIMID = sprintf(SIMID,NU); -% SIMID = 'test_init_phi'; % Name of the simulation -SIMID = ['test_nonlin_NL_CLOS_',num2str(NL_CLOS)]; % Name of the simulation +SIMID = 'test_SGGK_full_size'; % Name of the simulation +NON_LIN = 1 *(1-KREQ0); % activate non-linearity (is cancelled if KREQ0 = 1) %% OUTPUTS W_DOUBLE = 0; W_GAMMA = 1; @@ -46,11 +42,11 @@ W_SAPJ = 0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% unused +KERN = 0; % Kernel model (0 : GK) KR0KH = 0; A0KH = 0; % Background phi mode to drive Ray-Tay inst. KREQ0 = 0; % put kr = 0 KPAR = 0.0; % Parellel wave vector component LAMBDAD = 0.0; -NON_LIN = 1 *(1-KREQ0); % activate non-linearity (is cancelled if KREQ0 = 1) kmax = N*pi/L;% Highest fourier mode HD_CO = 0.5; % Hyper diffusivity cutoff ratio % kmaxcut = 2.5; @@ -60,6 +56,7 @@ TAU = 1.0; % e/i temperature ratio ETAT = 0.0; % Temperature gradient MU_P = 0.0/PMAXI^2; % Hermite hyperdiffusivity -mu_p*(d/dvpar)^4 f MU_J = 0.0/JMAXI^3; % Laguerre hyperdiffusivity -mu_j*(d/dvperp)^4 f +INIT_PHI= 1; % Start simulation with a noisy phi and moments %% Setup and file management setup system('rm fort.90'); \ No newline at end of file diff --git a/wk/marconi_run.m b/wk/marconi_run.m index 0d5ab395..450f2d11 100644 --- a/wk/marconi_run.m +++ b/wk/marconi_run.m @@ -4,12 +4,12 @@ addpath(genpath('../matlab')) % ... add %% Set Up parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% CLUSTER PARAMETERS -CLUSTER.TIME = '12:00:00'; % allocation time hh:mm:ss -CLUSTER.PART = 'prod'; % dbg or prod +CLUSTER.TIME = '00:10:00'; % allocation time hh:mm:ss +CLUSTER.PART = 'dbg'; % dbg or prod CLUSTER.MEM = '16GB'; % Memory CLUSTER.JNAME = 'gamma_inf';% Job name -NP_P = 2; % MPI processes along p -NP_KR = 24; % MPI processes along kr +NP_P = 1; % MPI processes along p +NP_KR = 1; % MPI processes along kr %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% PHYSICAL PARAMETERS NU = 0.1; % Collision frequency @@ -18,27 +18,27 @@ NU_HYP = 1.0; % Hyperdiffusivity coefficient %% GRID PARAMETERS N = 200; % Frequency gridpoints (Nkr = N/2) L = 120; % Size of the squared frequency domain -P = 10; % Electron and Ion highest Hermite polynomial degree -J = 05; % Electron and Ion highest Laguerre polynomial degree +P = 04; % Electron and Ion highest Hermite polynomial degree +J = 04; % Electron and Ion highest Laguerre polynomial degree MU_P = 0; % Hermite hyperdiffusivity -mu_p*(d/dvpar)^4 f MU_J = 0; % Laguerre hyperdiffusivity -mu_j*(d/dvperp)^4 f %% TIME PARAMETERS -TMAX = 250; % Maximal time unit -DT = 5e-4; % Time step -SPS0D = 1; % Sampling per time unit for profiler -SPS2D = 1; % Sampling per time unit for 2D arrays -SPS5D = 1/50; % Sampling per time unit for 5D arrays -SPSCP = 0; % Sampling per time unit for checkpoints -RESTART = 1; % To restart from last checkpoint -JOB2LOAD= 1; +TMAX = 120; % Maximal time unit +DT = 2e-2; % Time step +SPS0D = 1; % Sampling per time unit for profiler +SPS2D = 1; % Sampling per time unit for 2D arrays +SPS5D = 1/40; % Sampling per time unit for 5D arrays +SPSCP = 0; % Sampling per time unit for checkpoints +RESTART = 0; % To restart from last checkpoint +JOB2LOAD= 0; %% OPTIONS -SIMID = ['HeLaZ_v2.4_eta_',num2str(ETAB),'_nu_%0.0e']; % Name of the simulation -% SIMID = 'Marconi_parallel_scaling_2D'; % Name of the simulation +% SIMID = ['HeLaZ_v2.5_eta_',num2str(ETAB),'_nu_%0.0e']; % Name of the simulation +SIMID = 'test_marconi_sugama'; % Name of the simulation SIMID = sprintf(SIMID,NU); PREFIX =[]; % PREFIX = sprintf('%d_%d_',NP_P, NP_KR); % (0 : L.Bernstein, 1 : Dougherty, 2: Sugama, 3 : Full Couloumb ; +/- for GK/DK) -CO = 1; +CO = 2; CLOS = 0; % Closure model (0: =0 truncation, 1: semi coll, 2: Copy closure J+1 = J, P+2 = P) NL_CLOS = 1; % nonlinear closure model (0: =0 nmax = jmax, 1: nmax = jmax-j, >1 : nmax = NL_CLOS) KERN = 0; % Kernel model (0 : GK) @@ -82,5 +82,5 @@ write_sbash_marconi system('rm fort.90 setup_and_run.sh batch_script.sh'); disp('done'); if(mod(NP_P*NP_KR,48)~= 0) - disp('WARNING : unused cores (ntot cores must be a 24 multiple)'); + disp('WARNING : unused cores (ntot cores must be a 48 multiple)'); end \ No newline at end of file -- GitLab