From 1a0c3bee1660a5eb36acb502327b3f84ce7962f0 Mon Sep 17 00:00:00 2001
From: Antoine Hoffmann <antoine.hoffmann@epfl.ch>
Date: Fri, 1 Jul 2022 11:52:44 +0200
Subject: [PATCH] scripts update

---
 .../plot_radial_transport_and_spacetime.m     |  2 +-
 wk/analysis_HeLaZ.m                           |  8 ++---
 wk/header_3D_results.m                        |  2 +-
 wk/quick_run.m                                | 29 ++++++++++---------
 4 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/matlab/plot/plot_radial_transport_and_spacetime.m b/matlab/plot/plot_radial_transport_and_spacetime.m
index 968f8765..5c21b786 100644
--- a/matlab/plot/plot_radial_transport_and_spacetime.m
+++ b/matlab/plot/plot_radial_transport_and_spacetime.m
@@ -55,7 +55,7 @@ mvm = @(x) movmean(x,OPTIONS.NMVA);
     FIGURE.fig = figure; FIGURE.FIGNAME = ['ZF_transport_drphi','_',DATA.PARAMS]; set(gcf, 'Position',  [100, 100, 1000, 600])
     subplot(311)
 %     yyaxis left
-%         plot(mvm(DATA.Ts0D),mvm(DATA.PGAMMA_RI*SCALE),'DisplayName','$\langle n_i \partial_y\phi \rangle_y$'); hold on;
+        plot(mvm(DATA.Ts0D),mvm(DATA.PGAMMA_RI*SCALE),'DisplayName','$\langle n_i \partial_y\phi \rangle_y$'); hold on;
 %         plot(mvm(DATA.Ts3D),mvm(Gx_t_mtlb),'DisplayName','matlab comp.'); hold on;
 %         plot(DATA.Ts0D(its0D:ite0D),ones(ite0D-its0D+1,1)*Gx_infty_avg, '-k',...
 %             'DisplayName',['$\Gamma^{\infty} = $',num2str(Gx_infty_avg),'$\pm$',num2str(Gx_infty_std)]);
diff --git a/wk/analysis_HeLaZ.m b/wk/analysis_HeLaZ.m
index 942bd849..3565c3d4 100644
--- a/wk/analysis_HeLaZ.m
+++ b/wk/analysis_HeLaZ.m
@@ -11,7 +11,7 @@ system(['mkdir -p ',LOCALDIR]);
 CMD = ['rsync ', LOCALDIR,'outputs* ',MISCDIR]; disp(CMD);
 system(CMD);
 % Load outputs from jobnummin up to jobnummax
-JOBNUMMIN = 00; JOBNUMMAX = 01;
+JOBNUMMIN = 03; JOBNUMMAX = 20;
 data = compile_results(MISCDIR,JOBNUMMIN,JOBNUMMAX); %Compile the results from first output found to JOBNUMMAX if existing
 data.localdir = LOCALDIR;
 data.FIGDIR   = LOCALDIR;
@@ -55,7 +55,7 @@ options.PLAN      = 'xy';
 % options.PLAN      = 'sx';
 options.COMP      = 1;
 % options.TIME      = data.Ts5D(end-30:end);
-options.TIME      = [0:500];
+options.TIME      =  data.Ts3D(1:end);
 % options.TIME      = [350:600];
 data.EPS          = 0.1;
 data.a = data.EPS * 2000;
@@ -74,11 +74,11 @@ options.NAME      = '\phi';
 % options.NAME      = 'T_i';
 % options.NAME      = '\Gamma_x';
 % options.NAME      = 'k^2n_e';
-options.PLAN      = 'xy';
+options.PLAN      = 'kxky';
 % options.NAME      'f_i';
 % options.PLAN      = 'sx';
 options.COMP      = 1;
-options.TIME      = [40 80 100 200];
+options.TIME      = [20 100 200 600 1900];
 data.a = data.EPS * 2e3;
 fig = photomaton(data,options);
 % save_figure(data,fig)
diff --git a/wk/header_3D_results.m b/wk/header_3D_results.m
index fda0a9d0..f87810f5 100644
--- a/wk/header_3D_results.m
+++ b/wk/header_3D_results.m
@@ -26,6 +26,6 @@ helazdir = '/home/ahoffman/HeLaZ/';
 
 % outfile = 'shearless_cyclone/64x32x16x5x3_CBC_CO/64x32x16x5x3_CBC_LRGK';
 %% ZPINCH
-outfile ='Zpinch_rerun/Kn_2.0_200x48x5x3';
+outfile ='Zpinch_rerun/Kn_2.5_200x48x5x3';
 
 run analysis_HeLaZ
diff --git a/wk/quick_run.m b/wk/quick_run.m
index 4ae97e8a..af5aee9b 100644
--- a/wk/quick_run.m
+++ b/wk/quick_run.m
@@ -13,31 +13,32 @@ EXECNAME = 'helaz3';
 CLUSTER.TIME  = '99:00:00'; % allocation time hh:mm:ss
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% PHYSICAL PARAMETERS
-NU      = 0.1;   % Collision frequency
+NU      = 0.0;   % Collision frequency
 TAU     = 1.0;    % e/i temperature ratio
-K_N     = 2.22;   % Density gradient drive
-K_T     = 6.96;   % Temperature '''
+K_N     = 2.0;   % Density gradient drive
+K_T     = 0.5;   % Temperature '''
 K_E     = 0.0;   % Electrostat '''
-SIGMA_E = 0.05196152422706632;%0.0233380;   % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
-KIN_E   = 0;     % 1: kinetic electrons, 2: adiabatic electrons
+% SIGMA_E = 0.05196152422706632;   % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
+SIGMA_E = 0.0233380;   % mass ratio sqrt(m_a/m_i) (correct = 0.0233380)
+KIN_E   = 1;     % 1: kinetic electrons, 2: adiabatic electrons
 %% GRID PARAMETERS
 PMAXE   = 4;     % Hermite basis size of electrons
 JMAXE   = 2;     % Laguerre "
 PMAXI   = 4;     % " ions
 JMAXI   = 2;     % "
-NX      = 20;    % real space x-gridpoints
-NY      = 2;     %     ''     y-gridpoints
+NX      = 1;    % real space x-gridpoints
+NY      = 32;     %     ''     y-gridpoints
 LX      = 100;   % Size of the squared frequency domain
-LY      = 62.8319;     % Size of the squared frequency domain
-NZ      = 32;     % number of perpendicular planes (parallel grid)
+LY      = 60;     % Size of the squared frequency domain
+NZ      = 1;     % number of perpendicular planes (parallel grid)
 NPOL    = 1;
 SG      = 0;     % Staggered z grids option
 %% GEOMETRY
 % GEOMETRY= 'Z-pinch'; % Z-pinch overwrites q0, shear and eps
 GEOMETRY= 's-alpha';
-Q0      = 1.4;    % safety factor
-SHEAR   = 0.8;    % magnetic shear (Not implemented yet)
-EPS     = 0.18;    % inverse aspect ratio
+Q0      = 1.0;    % safety factor
+SHEAR   = 0.0;    % magnetic shear (Not implemented yet)
+EPS     = 0.0;    % inverse aspect ratio
 %% TIME PARMETERS
 TMAX    = 50;  % Maximal time unit
 DT      = 1e-2;   % Time step
@@ -48,7 +49,7 @@ SPS5D   = 1;    % Sampling per time unit for 5D arrays
 SPSCP   = 0;    % Sampling per time unit for checkpoints
 JOB2LOAD= -1;
 %% OPTIONS
-SIMID   = 'linear_CBC';  % Name of the simulation
+SIMID   = 'dbg';  % Name of the simulation
 LINEARITY = 'linear';   % activate non-linearity (is cancelled if KXEQ0 = 1)
 % Collision operator
 % (LB:L.Bernstein, DG:Dougherty, SG:Sugama, LR: Lorentz, LD: Landau)
@@ -162,7 +163,7 @@ save_figure(gbms_dat,fig)
 end
 
 
-if 1
+if 0
 %% RH TEST
 ikx = 2; t0 = 0; t1 = data.Ts3D(end);
 [~, it0] = min(abs(t0-data.Ts3D));[~, it1] = min(abs(t1-data.Ts3D));
-- 
GitLab