diff --git a/matlab/compile_results.m b/matlab/compile_results.m index e744f98923eb61341c9d0de39856a6ecc139f9e9..dcecd1eb9a0d89a4677d2fae410e79ce3364d219 100644 --- a/matlab/compile_results.m +++ b/matlab/compile_results.m @@ -62,7 +62,7 @@ while(CONTINUE) % Loading from output file % CPUTIME = h5readatt(filename,'/data/input','cpu_time'); % DT_SIM = h5readatt(filename,'/data/input','dt'); - [Pe, Je, Pi, Ji, kx, ky, z] = load_grid_data(filename); + [P, J, kx, ky, z] = load_grid_data(filename); W_GAMMA = strcmp(h5readatt(filename,'/data/input','write_gamma'),'y'); W_HF = strcmp(h5readatt(filename,'/data/input','write_hf' ),'y'); W_PHI = strcmp(h5readatt(filename,'/data/input','write_phi' ),'y'); @@ -78,8 +78,8 @@ while(CONTINUE) BETA = 0; end % Check polynomials degrees - Pe_new= numel(Pe); Je_new= numel(Je); - Pi_new= numel(Pi); Ji_new= numel(Ji); + Pe_new= numel(P); Je_new= numel(J); + Pi_new= numel(P); Ji_new= numel(J); if(Pe_max < Pe_new); Pe_max = Pe_new; end; if(Je_max < Je_new); Je_max = Je_new; end; if(Pi_max < Pi_new); Pi_max = Pi_new; end; @@ -305,13 +305,13 @@ else DATA.PSI = PSI_; DATA.KIN_E=KIN_E; % grids - DATA.Pe = Pe; DATA.Pi = Pi; - DATA.Je = Je; DATA.Ji = Ji; + DATA.Pe = P; DATA.Pi = P; + DATA.Je = J; DATA.Ji = J; DATA.kx = kx; DATA.ky = ky; DATA.z = z; DATA.Npol = -z(1)/pi; DATA.x = x; DATA.y = y; DATA.ikx0 = ikx0; DATA.iky0 = iky0; DATA.Nx = Nx; DATA.Ny = Ny; DATA.Nz = Nz; DATA.Nkx = Nkx; DATA.Nky = Nky; - DATA.Pmaxe = numel(Pe); DATA.Pmaxi = numel(Pi); DATA.Jmaxe = numel(Je); DATA.Jmaxi = numel(Ji); + DATA.Pmaxe = numel(P); DATA.Pmaxi = numel(P); DATA.Jmaxe = numel(J); DATA.Jmaxi = numel(J); DATA.dir = DIRECTORY; DATA.localdir = DIRECTORY; DATA.param_title=['$\nu_{',DATA.CONAME,'}=$', num2str(DATA.NU), ... diff --git a/matlab/compute/mode_growth_meter.m b/matlab/compute/mode_growth_meter.m index 9c53fe171a521cd2cf8f4642ec3ae7f9a89128a4..ab5736b4f47592164e2158576a322d4c088c1d71 100644 --- a/matlab/compute/mode_growth_meter.m +++ b/matlab/compute/mode_growth_meter.m @@ -159,7 +159,7 @@ for i = 1:2 lb_= '\gamma'; end errorbar(x_,y_,e_,'-ok',... - 'LineWidth',1.5,... + 'LineWidth',1.5,'MarkerSize',10,... 'DisplayName',... ['$\gamma$, (',num2str(DATA.inputs.PMAX),',',num2str(DATA.inputs.JMAX),')']); hold on; @@ -171,8 +171,8 @@ for i = 1:2 end % ylabel('$\gamma$'); % yyaxis("right") - errorbar(k(MODES),imag(omega(ik)),imag(err(ik)),'--ok',... - 'LineWidth',1.5,... + errorbar(k(MODES),imag(omega(ik)),imag(err(ik)),'*k',... + 'LineWidth',1.5,'MarkerSize',10,... 'DisplayName',... ['$\omega$, (',num2str(DATA.inputs.PMAX),',',num2str(DATA.inputs.JMAX),')']); hold on; diff --git a/src/auxval.F90 b/src/auxval.F90 index 64cdf8b34101fa492437363a46eb5c15cb54c1f2..e6e6ec1aa7b9305dd7c4a86ff638b31c093e7f04 100644 --- a/src/auxval.F90 +++ b/src/auxval.F90 @@ -59,7 +59,7 @@ subroutine auxval CALL mpi_barrier(MPI_COMM_WORLD, ierr) IF (my_id .EQ. i_) THEN IF (my_id .EQ. 0) WRITE(*,*) '' - IF (my_id .EQ. 0) WRITE(*,*) '--------- Parallel environement ----------' + IF (my_id .EQ. 0) WRITE(*,*) '--------- Parallel environment ----------' IF (my_id .EQ. 0) WRITE(*,'(A12,I3)') 'n_procs ', num_procs IF (my_id .EQ. 0) WRITE(*,'(A12,I3,A14,I3,A14,I3)') 'num_procs_p = ', num_procs_p, ', num_procs_ky = ', num_procs_ky, ', num_procs_z = ', num_procs_z IF (my_id .EQ. 0) WRITE(*,*) '' diff --git a/src/geometry_mod.F90 b/src/geometry_mod.F90 index cf3adae4259d686581839b48b0c03b3cabde3af2..13d0ab5e8a1333e06aba155aaba85e0baf8f2159 100644 --- a/src/geometry_mod.F90 +++ b/src/geometry_mod.F90 @@ -88,6 +88,10 @@ CONTAINS READ(lu_in,geometry) PB_PHASE = .false. IF(shear .GT. 0._xp) SHEARED = .TRUE. + SELECT CASE(geom) + CASE('z-pinch','Z-pinch','zpinch','Zpinch') + parallel_bc = 'shearless' + END SELECT SELECT CASE(parallel_bc) CASE ('dirichlet') CASE ('periodic') diff --git a/testcases/DIII-D_triangularity_fast_nonlinear/fort_00.90 b/testcases/DIII-D_triangularity_fast_nonlinear/fort_00.90 index 1879e0c7c7dbd8fa41f016b23b4b5d905fb7f422..90e45a7cdbb2c74ac42e454abe06f16760bb79a8 100644 --- a/testcases/DIII-D_triangularity_fast_nonlinear/fort_00.90 +++ b/testcases/DIII-D_triangularity_fast_nonlinear/fort_00.90 @@ -1,7 +1,7 @@ &BASIC nrun = 100000000 - dt = 0.025 - tmax = 300 + dt = 0.03 + tmax = 100 maxruntime = 43000 job2load = -1 / @@ -35,7 +35,7 @@ dtsave_0d = 0.5 dtsave_1d = -1 dtsave_2d = -1 - dtsave_3d = 2.0 + dtsave_3d = 0.5 dtsave_5d = 20 write_doubleprecision = .false. write_gamma = .true. @@ -51,10 +51,10 @@ LINEARITY = 'nonlinear' RM_LD_T_EQ= .false. Na = 1 ADIAB_E = .t. - mu_x = 1.0 - mu_y = 1.0 + mu_x = 0.0 + mu_y = 0.0 N_HD = 4 - mu_z = 5.0 + mu_z = 2.0 HYP_V = 'hypcoll' mu_p = 0 mu_j = 0 diff --git a/testcases/DIII-D_triangularity_fast_nonlinear/fort_01.90 b/testcases/DIII-D_triangularity_fast_nonlinear/fort_01.90 new file mode 100644 index 0000000000000000000000000000000000000000..c3da074814613ebc5e58afbcc423e53038d0435c --- /dev/null +++ b/testcases/DIII-D_triangularity_fast_nonlinear/fort_01.90 @@ -0,0 +1,105 @@ +&BASIC + nrun = 100000000 + dt = 0.05 + tmax = 150 + maxruntime = 43000 + job2load = 0 +/ +&GRID + pmax = 2 + jmax = 1 + Nx = 128 + Lx = 300 + Ny = 32 + Ly = 150 + Nz = 32 + SG = .false. + Nexc = 0 +/ +&GEOMETRY + geom = 'miller' + q0 = 4.8 + shear = 2.55 + eps = 0.3 + kappa = 1.57 + s_kappa = 0.48 + delta =-0.40 + s_delta =-0.25 + zeta = 0.00 + s_zeta = 0.00 + parallel_bc = 'dirichlet' + shift_y = 0 + Npol = 1 +/ +&DIAGNOSTICS + dtsave_0d = 0.5 + dtsave_1d = -1 + dtsave_2d = -1 + dtsave_3d = 0.5 + dtsave_5d = 20 + write_doubleprecision = .false. + write_gamma = .true. + write_hf = .true. + write_phi = .true. + write_Na00 = .true. + write_Napj = .true. + write_dens = .true. + write_temp = .true. +/ +&MODEL +LINEARITY = 'nonlinear' +RM_LD_T_EQ= .false. + Na = 1 + ADIAB_E = .t. + mu_x = 0.0 + mu_y = 0.0 + N_HD = 4 + mu_z = 2.0 + HYP_V = 'hypcoll' + mu_p = 0 + mu_j = 0 + nu = 1.0 + beta = 0.00 + ExBrate = 0 + MHD_PD = .true. +/ +&CLOSURE + !hierarchy_closure='truncation' + !dmax =-1 + hierarchy_closure='max_degree' + dmax = 2 + nonlinear_closure='truncation' + nmax =-1 +/ +&SPECIES + name_ = 'ions' + tau_ = 0.001!1 + sigma_ = 1 + q_ = 1.0 + K_N_ = 00!2.79 + K_T_ = 1400!5.15 +/ +&SPECIES + name_ = 'electrons' + tau_ = 1 + sigma_ = 0.023 + q_ = -1 + K_N_ = 2.79 + K_T_ = 17.3 +/ +&COLLISION + collision_model = 'DG' + GK_CO = .true. + INTERSPECIES = .true. + mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5' + collision_kcut = 1 +/ +&INITIAL + INIT_OPT = 'blob' + init_background = 0 + init_noiselvl = 1e-05 + iseed = 42 +/ +&TIME_INTEGRATION + numerical_scheme = 'RK3' +/ diff --git a/testcases/HEL_DIII-D_triangularity/fort_00.90 b/testcases/HEL_DIII-D_triangularity/fort_00.90 new file mode 100644 index 0000000000000000000000000000000000000000..5b740d8222c9384b122b5142c4fde84c86afd823 --- /dev/null +++ b/testcases/HEL_DIII-D_triangularity/fort_00.90 @@ -0,0 +1,105 @@ +&BASIC + nrun = 100000000 + dt = 0.05 + tmax = 150 + maxruntime = 43000 + job2load = -1 +/ +&GRID + pmax = 2 + jmax = 1 + Nx = 128 + Lx = 300 + Ny = 32 + Ly = 150 + Nz = 32 + SG = .false. + Nexc = 0 +/ +&GEOMETRY + geom = 'miller' + q0 = 4.8 + shear = 2.55 + eps = 0.3 + kappa = 1.57 + s_kappa = 0.48 + delta =-0.40 + s_delta =-0.25 + zeta = 0.00 + s_zeta = 0.00 + parallel_bc = 'dirichlet' + shift_y = 0 + Npol = 1 +/ +&DIAGNOSTICS + dtsave_0d = 1.0 + dtsave_1d = -1 + dtsave_2d = -1 + dtsave_3d = 1.0 + dtsave_5d = 20 + write_doubleprecision = .false. + write_gamma = .true. + write_hf = .true. + write_phi = .true. + write_Na00 = .true. + write_Napj = .true. + write_dens = .true. + write_temp = .true. +/ +&MODEL +LINEARITY = 'nonlinear' +RM_LD_T_EQ= .false. + Na = 1 + ADIAB_E = .t. + mu_x = 0.0 + mu_y = 0.0 + N_HD = 4 + mu_z = 2.0 + HYP_V = 'hypcoll' + mu_p = 0 + mu_j = 0 + nu = 1.0 + beta = 0.00 + ExBrate = 0 + MHD_PD = .true. +/ +&CLOSURE + !hierarchy_closure='truncation' + !dmax =-1 + hierarchy_closure='max_degree' + dmax = 2 + nonlinear_closure='truncation' + nmax =-1 +/ +&SPECIES + name_ = 'ions' + tau_ = 0.001!1 + sigma_ = 1 + q_ = 1.0 + K_N_ = 00!2.79 + K_T_ = 1000!5.15 +/ +&SPECIES + name_ = 'electrons' + tau_ = 1 + sigma_ = 0.023 + q_ = -1 + K_N_ = 2.79 + K_T_ = 17.3 +/ +&COLLISION + collision_model = 'DG' + GK_CO = .true. + INTERSPECIES = .true. + mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5' + collision_kcut = 1 +/ +&INITIAL + INIT_OPT = 'blob' + init_background = 0 + init_noiselvl = 1e-05 + iseed = 42 +/ +&TIME_INTEGRATION + numerical_scheme = 'RK3' +/ diff --git a/testcases/cyclone_example/fort_99.90 b/testcases/cyclone_example/fort.90 similarity index 97% rename from testcases/cyclone_example/fort_99.90 rename to testcases/cyclone_example/fort.90 index 0dc0b781ae5aeda6b65f468334238babbd9705d6..cd59e47f8a2d402ad68f7176827736709a4646e3 100644 --- a/testcases/cyclone_example/fort_99.90 +++ b/testcases/cyclone_example/fort.90 @@ -1,16 +1,16 @@ &BASIC nrun = 99999999 dt = 0.01 - tmax = 50 + tmax = 1 maxruntime = 72000 job2load = -1 / &GRID pmax = 2 jmax = 1 - Nx = 8 + Nx = 64 Lx = 120 - Ny = 6 + Ny = 48 Ly = 120 Nz = 16 SG = .f. diff --git a/testcases/cyclone_example/fort_01.90 b/testcases/cyclone_example/fort_01.90 new file mode 100644 index 0000000000000000000000000000000000000000..8b79aedbc5b91a761504c1ee9ebd59d742dcd422 --- /dev/null +++ b/testcases/cyclone_example/fort_01.90 @@ -0,0 +1,96 @@ +&BASIC + nrun = 1!99999999 + dt = 0.01 + tmax = 2 + maxruntime = 72000 + job2load = 0 +/ +&GRID + pmax = 2 + jmax = 1 + Nx = 64 + Lx = 120 + Ny = 48 + Ly = 120 + Nz = 16 + SG = .f. + Nexc = 0 +/ +&GEOMETRY + geom = 's-alpha' + !geom = 'miller' + q0 = 1.4 + shear = 0.8 + eps = 0.18 + kappa = 1.0 + s_kappa= 0.0 + delta = 0.0 + s_delta= 0.0 + zeta = 0.0 + s_zeta = 0.0 + parallel_bc = 'dirichlet' + shift_y= 0.0 +/ +&DIAGNOSTICS + dtsave_0d = 1 + dtsave_1d = -1 + dtsave_2d = -1 + dtsave_3d = 1 + dtsave_5d = 20 + write_doubleprecision = .f. + write_gamma = .t. + write_hf = .t. + write_phi = .t. + write_Na00 = .t. + write_Napj = .t. + write_dens = .t. + write_fvel = .t. + write_temp = .t. +/ +&MODEL + LINEARITY = 'nonlinear' + Na = 1 ! number of species + mu_x = 0.0 + mu_y = 0.0 + N_HD = 4 + mu_z = 1.0 + HYP_V = 'hypcoll' + mu_p = 0.0 + mu_j = 0.0 + nu = 0.05 + beta = 0.0 + ADIAB_E = .t. +/ +&CLOSURE + hierarchy_closure='truncation' + dmax = -1 + nonlinear_closure='truncation' + nmax = 0 +/ +&SPECIES + ! ions + name_ = 'ions' + tau_ = 1.0 + sigma_= 1.0 + q_ = 1.0 + k_N_ = 2.22 + k_T_ = 6.96 +/ + +&COLLISION + collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau) + GK_CO = .f. + INTERSPECIES = .true. + mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5' +/ +&INITIAL + INIT_OPT = 'blob' + ACT_ON_MODES = 'donothing' + init_background = 0.0 + init_noiselvl = 0.005 + iseed = 42 +/ +&TIME_INTEGRATION + !numerical_scheme = 'RK4' + numerical_scheme = 'SSP_RK3' +/ diff --git a/testcases/zpinch_example/G23_out_00.txt b/testcases/zpinch_example/G23_out_00.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d549fa5de4f93eb2acd169aa6b54491e0762585 --- /dev/null +++ b/testcases/zpinch_example/G23_out_00.txt @@ -0,0 +1,269 @@ + MPI initialized +Start at 13/11/2023 13:25:50.674 + Load basic data... + Reading input fort_00.90 ... + ...basic data loaded. + Read input parameters... + Parallel BC : shearless + Time integration with RK4 + ...input parameters read + Calculate auxval... + === Set auxiliary values === + FFTW3 y-grid distribution + Z-pinch geometry + --Reset kx grid according to Cyq0_x0 factor-- + -- done -- + + --------- Parallel environement ---------- + n_procs 4 +num_procs_p 1, num_procs_ky 4, num_procs_z 1 + +my_id = 0, rank_p 0, rank_ky 0, rank_z 0 + local_np = 2, offset = 0 + local_nj = 2, offset = 0 + local_nkx = 128, offset = 0 + local_nky = 7, offset = 0 + local_nz = 1, offset = 0 + +my_id = 1, rank_p 0, rank_ky 1, rank_z 0 + local_np = 2, offset = 0 + local_nj = 2, offset = 0 + local_nkx = 128, offset = 0 + local_nky = 7, offset = 7 + local_nz = 1, offset = 0 + +my_id = 2, rank_p 0, rank_ky 2, rank_z 0 + local_np = 2, offset = 0 + local_nj = 2, offset = 0 + local_nkx = 128, offset = 0 + local_nky = 7, offset = 14 + local_nz = 1, offset = 0 + +my_id = 3, rank_p 0, rank_ky 3, rank_z 0 + local_np = 2, offset = 0 + local_nj = 2, offset = 0 + local_nkx = 128, offset = 0 + local_nky = 4, offset = 21 + Truncation closure + ...auxval calculated + Create initial state... + local_nz = 1, offset = 0 + ------------------------------------------ + Init noisy phi + Apply closure + Ghosts communication + Computing fluid moments and transport + ...initial state created + Initial diagnostics... + outputs_00.h5 created +|t = 0.00| Pxi = 0.00 | Qxi = 0.00 | Pxe = 0.00 | Qxe = 0.00 | + ...initial diagnostics done + (0.24E-01 [s]) + Time integration loop.. +|t = 1.00| Pxi = 0.163E-07| Qxi = 0.876E-08| Pxe = 0.163E-07| Qxe = 0.184E-08| +|t = 2.00| Pxi = 0.151E-07| Qxi = 0.132E-07| Pxe = 0.151E-07| Qxe = 0.124E-07| +|t = 3.00| Pxi = 0.229E-07| Qxi = 0.175E-07| Pxe = 0.229E-07| Qxe = 0.163E-07| +|t = 4.00| Pxi = 0.445E-07| Qxi = 0.330E-07| Pxe = 0.445E-07| Qxe = 0.332E-07| +|t = 5.00| Pxi = 0.102E-06| Qxi = 0.729E-07| Pxe = 0.102E-06| Qxe = 0.655E-07| +|t = 6.00| Pxi = 0.251E-06| Qxi = 0.177E-06| Pxe = 0.251E-06| Qxe = 0.174E-06| +|t = 7.00| Pxi = 0.650E-06| Qxi = 0.448E-06| Pxe = 0.650E-06| Qxe = 0.421E-06| +|t = 8.00| Pxi = 0.176E-05| Qxi = 0.120E-05| Pxe = 0.176E-05| Qxe = 0.116E-05| +|t = 9.00| Pxi = 0.488E-05| Qxi = 0.329E-05| Pxe = 0.488E-05| Qxe = 0.313E-05| +|t = 10.00| Pxi = 0.139E-04| Qxi = 0.932E-05| Pxe = 0.139E-04| Qxe = 0.890E-05| +|t = 11.00| Pxi = 0.400E-04| Qxi = 0.266E-04| Pxe = 0.400E-04| Qxe = 0.256E-04| +|t = 12.00| Pxi = 0.117E-03| Qxi = 0.773E-04| Pxe = 0.117E-03| Qxe = 0.736E-04| +|t = 13.00| Pxi = 0.345E-03| Qxi = 0.227E-03| Pxe = 0.345E-03| Qxe = 0.218E-03| +|t = 14.00| Pxi = 0.103E-02| Qxi = 0.673E-03| Pxe = 0.103E-02| Qxe = 0.644E-03| +|t = 15.00| Pxi = 0.308E-02| Qxi = 0.201E-02| Pxe = 0.308E-02| Qxe = 0.192E-02| +|t = 16.00| Pxi = 0.928E-02| Qxi = 0.604E-02| Pxe = 0.928E-02| Qxe = 0.578E-02| +|t = 17.00| Pxi = 0.281E-01| Qxi = 0.182E-01| Pxe = 0.281E-01| Qxe = 0.175E-01| +|t = 18.00| Pxi = 0.853E-01| Qxi = 0.552E-01| Pxe = 0.853E-01| Qxe = 0.529E-01| +|t = 19.00| Pxi = 0.259 | Qxi = 0.167 | Pxe = 0.259 | Qxe = 0.160 | +|t = 20.00| Pxi = 0.774 | Qxi = 0.498 | Pxe = 0.774 | Qxe = 0.478 | +|t = 21.00| Pxi = 2.24 | Qxi = 1.44 | Pxe = 2.24 | Qxe = 1.38 | +|t = 22.00| Pxi = 6.08 | Qxi = 3.88 | Pxe = 6.08 | Qxe = 3.77 | +|t = 23.00| Pxi = 14.3 | Qxi = 9.12 | Pxe = 14.3 | Qxe = 9.09 | +|t = 24.00| Pxi = 19.3 | Qxi = 11.6 | Pxe = 19.3 | Qxe = 12.7 | +|t = 25.00| Pxi = 4.82 | Qxi = -0.381 | Pxe = 4.82 | Qxe = -0.306 | +|t = 26.00| Pxi = 4.80 | Qxi = 1.28 | Pxe = 4.80 | Qxe = 3.10 | +|t = 27.00| Pxi = 4.29 | Qxi = 1.78 | Pxe = 4.29 | Qxe = 1.91 | +|t = 28.00| Pxi = 3.90 | Qxi = 1.07 | Pxe = 3.90 | Qxe = 0.951 | +|t = 29.00| Pxi = 4.03 | Qxi = 1.75 | Pxe = 4.03 | Qxe = 1.00 | +|t = 30.00| Pxi = 4.49 | Qxi = 1.73 | Pxe = 4.49 | Qxe = 3.18 | +|t = 31.00| Pxi = 4.76 | Qxi = 2.19 | Pxe = 4.76 | Qxe = 2.06 | +|t = 32.00| Pxi = 4.87 | Qxi = 2.03 | Pxe = 4.87 | Qxe = 2.74 | +|t = 33.00| Pxi = 5.12 | Qxi = 1.94 | Pxe = 5.12 | Qxe = 2.43 | +|t = 34.00| Pxi = 6.45 | Qxi = 3.07 | Pxe = 6.45 | Qxe = 2.96 | +|t = 35.00| Pxi = 6.58 | Qxi = 2.94 | Pxe = 6.58 | Qxe = 3.00 | +|t = 36.00| Pxi = 7.07 | Qxi = 4.19 | Pxe = 7.07 | Qxe = 3.47 | +|t = 37.00| Pxi = 6.96 | Qxi = 4.33 | Pxe = 6.96 | Qxe = 2.97 | +|t = 38.00| Pxi = 6.78 | Qxi = 2.85 | Pxe = 6.78 | Qxe = 4.07 | +|t = 39.00| Pxi = 7.06 | Qxi = 3.88 | Pxe = 7.06 | Qxe = 3.67 | +|t = 40.00| Pxi = 6.97 | Qxi = 3.76 | Pxe = 6.97 | Qxe = 2.82 | +|t = 41.00| Pxi = 6.26 | Qxi = 3.08 | Pxe = 6.26 | Qxe = 3.69 | +|t = 42.00| Pxi = 7.02 | Qxi = 3.57 | Pxe = 7.02 | Qxe = 2.95 | +|t = 43.00| Pxi = 7.22 | Qxi = 3.04 | Pxe = 7.22 | Qxe = 4.63 | +|t = 44.00| Pxi = 6.33 | Qxi = 2.54 | Pxe = 6.33 | Qxe = 2.90 | +|t = 45.00| Pxi = 6.21 | Qxi = 2.86 | Pxe = 6.21 | Qxe = 1.71 | +|t = 46.00| Pxi = 7.62 | Qxi = 3.21 | Pxe = 7.62 | Qxe = 4.90 | +|t = 47.00| Pxi = 7.26 | Qxi = 3.11 | Pxe = 7.26 | Qxe = 2.62 | +|t = 48.00| Pxi = 6.49 | Qxi = 2.37 | Pxe = 6.49 | Qxe = 2.49 | +|t = 49.00| Pxi = 7.72 | Qxi = 3.69 | Pxe = 7.72 | Qxe = 4.04 | +|t = 50.00| Pxi = 7.81 | Qxi = 4.44 | Pxe = 7.81 | Qxe = 3.32 | +|t = 51.00| Pxi = 8.21 | Qxi = 3.52 | Pxe = 8.21 | Qxe = 3.73 | +|t = 52.00| Pxi = 7.03 | Qxi = 3.55 | Pxe = 7.03 | Qxe = 4.35 | +|t = 53.00| Pxi = 6.04 | Qxi = 2.35 | Pxe = 6.04 | Qxe = 1.55 | +|t = 54.00| Pxi = 6.24 | Qxi = 2.01 | Pxe = 6.24 | Qxe = 2.82 | +|t = 55.00| Pxi = 6.51 | Qxi = 3.18 | Pxe = 6.51 | Qxe = 2.80 | +|t = 56.00| Pxi = 5.90 | Qxi = 1.27 | Pxe = 5.90 | Qxe = 2.76 | +|t = 57.00| Pxi = 6.91 | Qxi = 2.90 | Pxe = 6.91 | Qxe = 4.31 | +|t = 58.00| Pxi = 7.17 | Qxi = 5.24 | Pxe = 7.17 | Qxe = 2.57 | +|t = 59.00| Pxi = 6.35 | Qxi = 2.14 | Pxe = 6.35 | Qxe = 4.83 | +|t = 60.00| Pxi = 6.50 | Qxi = 2.33 | Pxe = 6.50 | Qxe = 4.34 | +|t = 61.00| Pxi = 5.97 | Qxi = 3.87 | Pxe = 5.97 | Qxe = 0.586 | +|t = 62.00| Pxi = 5.63 | Qxi = 2.31 | Pxe = 5.63 | Qxe = 3.13 | +|t = 63.00| Pxi = 5.25 | Qxi = 2.25 | Pxe = 5.25 | Qxe = 2.77 | +|t = 64.00| Pxi = 5.71 | Qxi = 2.95 | Pxe = 5.71 | Qxe = 2.54 | +|t = 65.00| Pxi = 6.11 | Qxi = 3.00 | Pxe = 6.11 | Qxe = 2.73 | +|t = 66.00| Pxi = 6.35 | Qxi = 2.38 | Pxe = 6.35 | Qxe = 3.55 | +|t = 67.00| Pxi = 6.61 | Qxi = 3.65 | Pxe = 6.61 | Qxe = 2.94 | +|t = 68.00| Pxi = 6.68 | Qxi = 3.22 | Pxe = 6.68 | Qxe = 3.86 | +|t = 69.00| Pxi = 6.97 | Qxi = 4.14 | Pxe = 6.97 | Qxe = 3.85 | +|t = 70.00| Pxi = 6.33 | Qxi = 2.67 | Pxe = 6.33 | Qxe = 2.45 | +|t = 71.00| Pxi = 6.14 | Qxi = 2.88 | Pxe = 6.14 | Qxe = 3.12 | +|t = 72.00| Pxi = 5.69 | Qxi = 2.27 | Pxe = 5.69 | Qxe = 4.53 | +|t = 73.00| Pxi = 5.68 | Qxi = 2.89 | Pxe = 5.68 | Qxe = 2.65 | +|t = 74.00| Pxi = 4.70 | Qxi = 2.76 | Pxe = 4.70 | Qxe = 0.886 | +|t = 75.00| Pxi = 4.78 | Qxi = 3.50 | Pxe = 4.78 | Qxe = 2.52 | +|t = 76.00| Pxi = 4.28 | Qxi = 0.496 | Pxe = 4.28 | Qxe = 3.08 | +|t = 77.00| Pxi = 3.70 | Qxi = 1.47 | Pxe = 3.70 | Qxe = 1.36 | +|t = 78.00| Pxi = 4.39 | Qxi = 2.20 | Pxe = 4.39 | Qxe = 2.26 | +|t = 79.00| Pxi = 4.93 | Qxi = 2.29 | Pxe = 4.93 | Qxe = 2.30 | +|t = 80.00| Pxi = 4.57 | Qxi = 1.92 | Pxe = 4.57 | Qxe = 2.65 | +|t = 81.00| Pxi = 4.79 | Qxi = 2.16 | Pxe = 4.79 | Qxe = 2.45 | +|t = 82.00| Pxi = 5.21 | Qxi = 2.51 | Pxe = 5.21 | Qxe = 2.56 | +|t = 83.00| Pxi = 5.17 | Qxi = 2.46 | Pxe = 5.17 | Qxe = 2.18 | +|t = 84.00| Pxi = 5.19 | Qxi = 2.36 | Pxe = 5.19 | Qxe = 3.05 | +|t = 85.00| Pxi = 5.68 | Qxi = 3.19 | Pxe = 5.68 | Qxe = 2.89 | +|t = 86.00| Pxi = 5.72 | Qxi = 2.55 | Pxe = 5.72 | Qxe = 3.90 | +|t = 87.00| Pxi = 4.65 | Qxi = 2.13 | Pxe = 4.65 | Qxe = 2.02 | +|t = 88.00| Pxi = 5.72 | Qxi = 3.85 | Pxe = 5.72 | Qxe = 1.97 | +|t = 89.00| Pxi = 4.95 | Qxi = 1.87 | Pxe = 4.95 | Qxe = 3.61 | +|t = 90.00| Pxi = 5.20 | Qxi = 2.99 | Pxe = 5.20 | Qxe = 3.88 | +|t = 91.00| Pxi = 4.72 | Qxi = 2.45 | Pxe = 4.72 | Qxe = 0.507 | +|t = 92.00| Pxi = 4.59 | Qxi = 2.33 | Pxe = 4.59 | Qxe = 3.29 | +|t = 93.00| Pxi = 3.94 | Qxi = 1.86 | Pxe = 3.94 | Qxe = 2.40 | +|t = 94.00| Pxi = 4.34 | Qxi = 2.22 | Pxe = 4.34 | Qxe = 2.84 | +|t = 95.00| Pxi = 4.55 | Qxi = 1.50 | Pxe = 4.55 | Qxe = 2.25 | +|t = 96.00| Pxi = 4.69 | Qxi = 2.92 | Pxe = 4.69 | Qxe = 1.89 | +|t = 97.00| Pxi = 5.43 | Qxi = 3.13 | Pxe = 5.43 | Qxe = 3.40 | +|t = 98.00| Pxi = 4.79 | Qxi = 0.838 | Pxe = 4.79 | Qxe = 3.10 | +|t = 99.00| Pxi = 4.76 | Qxi = 3.13 | Pxe = 4.76 | Qxe = 2.42 | +|t = 100.00| Pxi = 5.52 | Qxi = 3.18 | Pxe = 5.52 | Qxe = 2.63 | +|t = 101.00| Pxi = 5.19 | Qxi = 2.73 | Pxe = 5.19 | Qxe = 4.06 | +|t = 102.00| Pxi = 4.80 | Qxi = 2.41 | Pxe = 4.80 | Qxe = 2.14 | +|t = 103.00| Pxi = 5.26 | Qxi = 2.33 | Pxe = 5.26 | Qxe = 4.30 | +|t = 104.00| Pxi = 5.42 | Qxi = 1.90 | Pxe = 5.42 | Qxe = 1.53 | +|t = 105.00| Pxi = 3.92 | Qxi = 2.38 | Pxe = 3.92 | Qxe = -0.235 | +|t = 106.00| Pxi = 5.71 | Qxi = 3.59 | Pxe = 5.71 | Qxe = 4.21 | +|t = 107.00| Pxi = 5.87 | Qxi = 3.09 | Pxe = 5.87 | Qxe = 2.81 | +|t = 108.00| Pxi = 5.46 | Qxi = 2.97 | Pxe = 5.46 | Qxe = 2.71 | +|t = 109.00| Pxi = 4.19 | Qxi = 2.15 | Pxe = 4.19 | Qxe = 2.06 | +|t = 110.00| Pxi = 4.63 | Qxi = 2.52 | Pxe = 4.63 | Qxe = 1.48 | +|t = 111.00| Pxi = 4.94 | Qxi = 1.41 | Pxe = 4.94 | Qxe = 3.37 | +|t = 112.00| Pxi = 5.08 | Qxi = 2.97 | Pxe = 5.08 | Qxe = 2.83 | +|t = 113.00| Pxi = 5.18 | Qxi = 2.66 | Pxe = 5.18 | Qxe = 2.51 | +|t = 114.00| Pxi = 4.42 | Qxi = 2.25 | Pxe = 4.42 | Qxe = 1.01 | +|t = 115.00| Pxi = 5.20 | Qxi = 2.33 | Pxe = 5.20 | Qxe = 3.05 | +|t = 116.00| Pxi = 4.71 | Qxi = 2.31 | Pxe = 4.71 | Qxe = 2.36 | +|t = 117.00| Pxi = 4.62 | Qxi = 2.69 | Pxe = 4.62 | Qxe = 2.34 | +|t = 118.00| Pxi = 4.69 | Qxi = 2.81 | Pxe = 4.69 | Qxe = 2.03 | +|t = 119.00| Pxi = 4.13 | Qxi = 1.68 | Pxe = 4.13 | Qxe = 4.04 | +|t = 120.00| Pxi = 4.84 | Qxi = 3.03 | Pxe = 4.84 | Qxe = 2.44 | +|t = 121.00| Pxi = 4.02 | Qxi = 1.91 | Pxe = 4.02 | Qxe = 2.66 | +|t = 122.00| Pxi = 4.25 | Qxi = 1.79 | Pxe = 4.25 | Qxe = 2.68 | +|t = 123.00| Pxi = 3.98 | Qxi = 1.51 | Pxe = 3.98 | Qxe = 1.99 | +|t = 124.00| Pxi = 4.14 | Qxi = 2.24 | Pxe = 4.14 | Qxe = 0.104E-01| +|t = 125.00| Pxi = 4.21 | Qxi = 2.29 | Pxe = 4.21 | Qxe = 2.53 | +|t = 126.00| Pxi = 4.68 | Qxi = 2.01 | Pxe = 4.68 | Qxe = 4.78 | +|t = 127.00| Pxi = 5.24 | Qxi = 3.25 | Pxe = 5.24 | Qxe = 1.81 | +|t = 128.00| Pxi = 5.14 | Qxi = 2.48 | Pxe = 5.14 | Qxe = 2.64 | +|t = 129.00| Pxi = 5.18 | Qxi = 2.80 | Pxe = 5.18 | Qxe = 3.31 | +|t = 130.00| Pxi = 4.08 | Qxi = 2.55 | Pxe = 4.08 | Qxe = 1.45 | +|t = 131.00| Pxi = 5.24 | Qxi = 2.29 | Pxe = 5.24 | Qxe = 2.97 | +|t = 132.00| Pxi = 4.43 | Qxi = 1.99 | Pxe = 4.43 | Qxe = 3.02 | +|t = 133.00| Pxi = 4.38 | Qxi = 2.49 | Pxe = 4.38 | Qxe = 2.46 | +|t = 134.00| Pxi = 3.68 | Qxi = 1.94 | Pxe = 3.68 | Qxe = 1.67 | +|t = 135.00| Pxi = 3.49 | Qxi = 1.79 | Pxe = 3.49 | Qxe = 1.63 | +|t = 136.00| Pxi = 3.57 | Qxi = 2.30 | Pxe = 3.57 | Qxe = 2.20 | +|t = 137.00| Pxi = 3.72 | Qxi = 2.03 | Pxe = 3.72 | Qxe = 2.80 | +|t = 138.00| Pxi = 3.60 | Qxi = 1.71 | Pxe = 3.60 | Qxe = 0.847 | +|t = 139.00| Pxi = 3.97 | Qxi = 2.70 | Pxe = 3.97 | Qxe = 2.86 | +|t = 140.00| Pxi = 3.89 | Qxi = 2.07 | Pxe = 3.89 | Qxe = 2.56 | +|t = 141.00| Pxi = 3.31 | Qxi = 1.46 | Pxe = 3.31 | Qxe = 0.825 | +|t = 142.00| Pxi = 3.44 | Qxi = 1.96 | Pxe = 3.44 | Qxe = 2.38 | +|t = 143.00| Pxi = 3.88 | Qxi = 1.73 | Pxe = 3.88 | Qxe = 1.87 | +|t = 144.00| Pxi = 3.09 | Qxi = 1.34 | Pxe = 3.09 | Qxe = 1.71 | +|t = 145.00| Pxi = 3.86 | Qxi = 2.22 | Pxe = 3.86 | Qxe = 2.42 | +|t = 146.00| Pxi = 3.71 | Qxi = 1.92 | Pxe = 3.71 | Qxe = 2.63 | +|t = 147.00| Pxi = 3.77 | Qxi = 1.72 | Pxe = 3.77 | Qxe = 2.84 | +|t = 148.00| Pxi = 2.82 | Qxi = 1.80 | Pxe = 2.82 | Qxe = 0.738 | +|t = 149.00| Pxi = 2.77 | Qxi = 0.745 | Pxe = 2.77 | Qxe = 1.94 | +|t = 150.00| Pxi = 3.22 | Qxi = 2.26 | Pxe = 3.22 | Qxe = 1.37 | +|t = 151.00| Pxi = 3.16 | Qxi = 1.28 | Pxe = 3.16 | Qxe = 2.01 | +|t = 152.00| Pxi = 3.09 | Qxi = 1.28 | Pxe = 3.09 | Qxe = 0.613 | +|t = 153.00| Pxi = 3.21 | Qxi = 1.47 | Pxe = 3.21 | Qxe = 2.99 | +|t = 154.00| Pxi = 3.57 | Qxi = 1.55 | Pxe = 3.57 | Qxe = 1.70 | +|t = 155.00| Pxi = 2.93 | Qxi = 1.13 | Pxe = 2.93 | Qxe = 1.22 | +|t = 156.00| Pxi = 3.67 | Qxi = 1.35 | Pxe = 3.67 | Qxe = 1.71 | +|t = 157.00| Pxi = 3.34 | Qxi = 1.61 | Pxe = 3.34 | Qxe = 2.86 | +|t = 158.00| Pxi = 3.89 | Qxi = 2.08 | Pxe = 3.89 | Qxe = 1.86 | +|t = 159.00| Pxi = 3.08 | Qxi = 2.09 | Pxe = 3.08 | Qxe = 2.59 | +|t = 160.00| Pxi = 3.79 | Qxi = 0.866 | Pxe = 3.79 | Qxe = 1.80 | +|t = 161.00| Pxi = 3.67 | Qxi = 2.71 | Pxe = 3.67 | Qxe = 3.36 | +|t = 162.00| Pxi = 3.83 | Qxi = 1.11 | Pxe = 3.83 | Qxe = 1.75 | +|t = 163.00| Pxi = 3.16 | Qxi = 1.59 | Pxe = 3.16 | Qxe = 1.39 | +|t = 164.00| Pxi = 3.65 | Qxi = 1.35 | Pxe = 3.65 | Qxe = 2.76 | +|t = 165.00| Pxi = 3.65 | Qxi = 2.01 | Pxe = 3.65 | Qxe = 1.79 | +|t = 166.00| Pxi = 4.17 | Qxi = 1.74 | Pxe = 4.17 | Qxe = 2.69 | +|t = 167.00| Pxi = 3.35 | Qxi = 1.71 | Pxe = 3.35 | Qxe = 1.60 | +|t = 168.00| Pxi = 4.62 | Qxi = 2.89 | Pxe = 4.62 | Qxe = 2.95 | +|t = 169.00| Pxi = 3.93 | Qxi = 1.68 | Pxe = 3.93 | Qxe = 2.37 | +|t = 170.00| Pxi = 3.88 | Qxi = 1.63 | Pxe = 3.88 | Qxe = 1.50 | +|t = 171.00| Pxi = 3.33 | Qxi = 1.02 | Pxe = 3.33 | Qxe = 1.62 | +|t = 172.00| Pxi = 3.61 | Qxi = 1.69 | Pxe = 3.61 | Qxe = 2.33 | +|t = 173.00| Pxi = 3.26 | Qxi = 2.55 | Pxe = 3.26 | Qxe = 1.11 | +|t = 174.00| Pxi = 2.91 | Qxi = 0.667 | Pxe = 2.91 | Qxe = 2.88 | +|t = 175.00| Pxi = 2.49 | Qxi = 1.54 | Pxe = 2.49 | Qxe = 0.862 | +|t = 176.00| Pxi = 2.67 | Qxi = 1.17 | Pxe = 2.67 | Qxe = 2.33 | +|t = 177.00| Pxi = 2.89 | Qxi = 1.21 | Pxe = 2.89 | Qxe = 2.12 | +|t = 178.00| Pxi = 2.22 | Qxi = 1.61 | Pxe = 2.22 | Qxe = 1.47 | +|t = 179.00| Pxi = 2.27 | Qxi = 0.856 | Pxe = 2.27 | Qxe = 1.32 | +|t = 180.00| Pxi = 2.61 | Qxi = 1.70 | Pxe = 2.61 | Qxe = 1.18 | +|t = 181.00| Pxi = 2.34 | Qxi = 1.04 | Pxe = 2.34 | Qxe = 2.03 | +|t = 182.00| Pxi = 2.48 | Qxi = 1.61 | Pxe = 2.48 | Qxe = 1.52 | +|t = 183.00| Pxi = 2.14 | Qxi = 1.00 | Pxe = 2.14 | Qxe = 1.71 | +|t = 184.00| Pxi = 2.16 | Qxi = 1.29 | Pxe = 2.16 | Qxe = 1.51 | +|t = 185.00| Pxi = 2.12 | Qxi = 0.581 | Pxe = 2.12 | Qxe = 1.55 | +|t = 186.00| Pxi = 1.95 | Qxi = 1.36 | Pxe = 1.95 | Qxe = 0.803 | +|t = 187.00| Pxi = 2.16 | Qxi = 1.21 | Pxe = 2.16 | Qxe = 1.39 | +|t = 188.00| Pxi = 2.09 | Qxi = 1.04 | Pxe = 2.09 | Qxe = 1.75 | +|t = 189.00| Pxi = 2.12 | Qxi = 1.22 | Pxe = 2.12 | Qxe = 0.723 | +|t = 190.00| Pxi = 1.84 | Qxi = 0.581 | Pxe = 1.84 | Qxe = 1.64 | +|t = 191.00| Pxi = 1.84 | Qxi = 1.32 | Pxe = 1.84 | Qxe = 1.02 | +|t = 192.00| Pxi = 2.29 | Qxi = 0.372 | Pxe = 2.29 | Qxe = 1.65 | +|t = 193.00| Pxi = 1.94 | Qxi = 1.26 | Pxe = 1.94 | Qxe = 0.479 | +|t = 194.00| Pxi = 2.37 | Qxi = 0.841 | Pxe = 2.37 | Qxe = 2.07 | +|t = 195.00| Pxi = 2.38 | Qxi = 1.13 | Pxe = 2.38 | Qxe = 1.07 | +|t = 196.00| Pxi = 2.31 | Qxi = 0.608 | Pxe = 2.31 | Qxe = 1.73 | +|t = 197.00| Pxi = 2.84 | Qxi = 1.57 | Pxe = 2.84 | Qxe = 1.60 | +|t = 198.00| Pxi = 2.68 | Qxi = 1.23 | Pxe = 2.68 | Qxe = 1.19 | +|t = 199.00| Pxi = 2.71 | Qxi = 1.85 | Pxe = 2.71 | Qxe = 1.92 | +|t = 200.00| Pxi = 2.73 | Qxi = 0.721 | Pxe = 2.73 | Qxe = 2.06 | + TMAX reached + ...time integration done + CPU Time = 22 [s] + Saving last state + Normal exit +Done at 13/11/2023 13:26:13.144 + ..plan Destruction. diff --git a/testcases/zpinch_example/fort_00.90 b/testcases/zpinch_example/fort_00.90 index 2278803d97f633c1b1544d51076c2d8ab16bb13a..08cacadf6f8eb9bfe8673a0fc556d491497a97db 100644 --- a/testcases/zpinch_example/fort_00.90 +++ b/testcases/zpinch_example/fort_00.90 @@ -1,41 +1,30 @@ &BASIC nrun = 99999999 - dt = 0.01 - tmax = 250 + dt = 0.05 + tmax = 200 maxruntime = 72000 job2load = -1 / &GRID pmax = 2 jmax = 1 - Nx = 64 + Nx = 128 Lx = 200 Ny = 48 - Ly = 120 + Ly = 60 Nz = 1 SG = .f. Nexc = 1 / &GEOMETRY geom = 'z-pinch' - q0 = 1.4 - shear = 0.8 - eps = 0.13 - kappa = 1.0 - s_kappa= 0.0 - delta = 0.0 - s_delta= 0.0 - zeta = 0.0 - s_zeta = 0.0 - parallel_bc = 'dirichlet' - shift_y= 0.0 / &DIAGNOSTICS dtsave_0d = 1 dtsave_1d = -1 dtsave_2d = -1 - dtsave_3d = 1 - dtsave_5d = 10 + dtsave_3d = 2 + dtsave_5d = 100 write_doubleprecision = .f. write_gamma = .t. write_hf = .t. @@ -74,7 +63,7 @@ tau_ = 1.0 sigma_= 1.0 q_ = 1.0 - k_N_ = 1.6 + k_N_ = 2.0 k_T_ = 0.4 / &SPECIES @@ -83,18 +72,15 @@ tau_ = 1.0 sigma_= 0.023338 q_ =-1.0 - k_N_ = 1.6 + k_N_ = 2.0 k_T_ = 0.4 / &COLLISION collision_model = 'DG' !DG/SG/PA/LD (dougherty, sugama, pitch angle, landau) GK_CO = .t. - INTERSPECIES = .true. - mat_file = 'gk_sugama_P_20_J_10_N_150_kpm_8.0.h5' / &INITIAL - INIT_OPT = 'blob' !(phi,blob) - ACT_ON_MODES = 'donothing' + INIT_OPT = 'phi' !(phi,blob) init_background = 0.0 init_noiselvl = 0.005 iseed = 42 diff --git a/testcases/zpinch_example/gyacomo23_debug b/testcases/zpinch_example/gyacomo23_debug deleted file mode 120000 index dcb6f58d8624fe5e71697ab17d5f0bb5f64c1c4c..0000000000000000000000000000000000000000 --- a/testcases/zpinch_example/gyacomo23_debug +++ /dev/null @@ -1 +0,0 @@ -../../bin/gyacomo23_debug \ No newline at end of file diff --git a/testcases/zpinch_example/gyacomo23_dp b/testcases/zpinch_example/gyacomo23_dp deleted file mode 120000 index f11ab935431cb2cbfeac04a93dd0231984d8014c..0000000000000000000000000000000000000000 --- a/testcases/zpinch_example/gyacomo23_dp +++ /dev/null @@ -1 +0,0 @@ -../../bin/gyacomo23_dp \ No newline at end of file diff --git a/wk/analysis_demo.m b/wk/analysis_demo.m new file mode 100644 index 0000000000000000000000000000000000000000..11a31c9a4c6471b76d4be68315d7e5dab1ec8a7b --- /dev/null +++ b/wk/analysis_demo.m @@ -0,0 +1,90 @@ +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 +options.RESOLUTION = 256; +% Partition of the computer where the data have to be searched + +J0 = 00; J1 = 10; + +% DATADIR = '/Users/ahoffmann/gyacomo/testcases/DIII-D_triangularity_fast_nonlinear/'; +% DATADIR = '/Users/ahoffmann/gyacomo/testcases/HEL_DIII-D_triangularity/'; +DATADIR = '/Users/ahoffmann/gyacomo/testcases/cyclone_example/'; +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 = '\phi'; % chose your field to plot in spacetime diag (e.g \phi,v_x,G_x) +options.INTERP = 1; +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.BWR = 1; % bluewhitered plot or gray +options.CLIMAUTO = 0; % adjust the colormap auto +options.NAME = '\phi'; +% options.NAME = 'N_i^{00}'; +options.PLAN = 'xy'; +options.COMP = 9; +options.TIME = data.Ts3D(1:2:end); +data.EPS = 0.1; +data.a = data.EPS * 2000; +create_film(data,options,'.gif') +end + +if 0 +%% field snapshots +% Options +[data.Na00, data.Ts3D] = compile_results_3Da(data.folder,J0,J1,'Na00'); +[data.PHI, data.Ts3D] = compile_results_3D(data.folder,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.LOGSCALE = 0; +options.CLIMAUTO = 1; +options.NAME = 'N_i^{00}'; +% options.NAME = 's_{Ey}'; +% options.NAME = '\phi'; +options.PLAN = 'yz'; +options.COMP = 'avg'; +options.TIME = [10 30]; +fig = photomaton(data,options); +colormap(gray) +clim('auto') +% save_figure(data,fig) +end +if 0 +%% Performance profiler +profiler(data) +end + +if 0 +%% 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 = 0; +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 diff --git a/wk/parameters/lin_DIIID_LM_rho90.m b/wk/parameters/lin_DIIID_LM_rho90.m index 9995af00da479279d9fd14fab07431aa0c7780e0..c699e5e9aa6505fb71c4320acdd6f6d80fa341b5 100644 --- a/wk/parameters/lin_DIIID_LM_rho90.m +++ b/wk/parameters/lin_DIIID_LM_rho90.m @@ -1,7 +1,7 @@ %% Reference values % See Neiser et al. 2019 Gyrokinetic GENE simulations of DIII-D near-edge L-mode plasmas %% Set simulation parameters -SIMID = 'lin_DIID_LM_rho90'; % Name of the simulation +SIMID = 'lin_DIIID_LM_rho90'; % Name of the simulation %% Set up physical parameters CLUSTER.TIME = '99:00:00'; % Allocation time hh:mm:ss NU = 1.0; %(0.00235 in GENE) @@ -47,9 +47,9 @@ PB_PHASE = 0; %% TIME PARAMETERS TMAX = 10; % Maximal time unit DT = 5e-4; % Time step -DTSAVE0D = 0.5; % Sampling time for 0D arrays +DTSAVE0D = 0.1; % Sampling time for 0D arrays DTSAVE2D = -1; % Sampling time for 2D arrays -DTSAVE3D = 0.5; % Sampling time for 3D arrays +DTSAVE3D = 0.1; % Sampling time for 3D arrays DTSAVE5D = 100; % Sampling time for 5D arrays JOB2LOAD = -1; % Start a new simulation serie diff --git a/wk/parameters/lin_GASTD.m b/wk/parameters/lin_GASTD.m new file mode 100644 index 0000000000000000000000000000000000000000..14d13da71466a0a8489758cf671db0b36e89e9a4 --- /dev/null +++ b/wk/parameters/lin_GASTD.m @@ -0,0 +1,99 @@ +%% Reference values +% See Staebler et al. 2023 +%% Set simulation parameters +SIMID = 'lin_GASTD'; % Name of the simulation +%% Set up physical parameters +CLUSTER.TIME = '99:00:00'; % Allocation time hh:mm:ss +NU = 0.05; %(0.00235 in GENE) +TAU = 1; % i/e temperature ratio +K_Ne = 1; % ele Density ''' +K_Te = 3; % ele Temperature ''' +K_Ni = 1; % ion Density gradient drive +K_Ti = 3; % ion Temperature ''' +SIGMA_E = 0.0233380;%/sqrt(2); % mass ratio sqrt(m_a/m_i) (correct = 0.0233380) +NA = 2; % number of kinetic species +ADIAB_E = (NA==1); % adiabatic electron model +BETA = 0; % electron plasma beta in prct +MHD_PD = 1; +%% Set up grid parameters +P = 2; +J = P/2;%P/2; +PMAX = P; % Hermite basis size +JMAX = J; % Laguerre basis size +NX = 4; % real space x-gridpoints +NY = 2; % real space y-gridpoints +LX = 2*pi/0.1; % Size of the squared frequency domain in x direction +LY = 2*pi/0.5; % Size of the squared frequency domain in y direction +NZ = 16; % number of perpendicular planes (parallel grid) +SG = 0; % Staggered z grids option +NEXC = 1; % To extend Lx if needed (Lx = Nexc/(kymin*shear)) + +%% GEOMETRY +% GEOMETRY= 's-alpha'; +GEOMETRY= 'miller'; +Q0 = 2; % safety factor +SHEAR = 1; % magnetic shear +EPS = 1/3; % inverse aspect ratio +KAPPA = 1.0; % elongation +S_KAPPA = 0; +DELTA = 0; % triangularity +S_DELTA = 0; +ZETA = 0; % squareness +S_ZETA = 0; +PARALLEL_BC = 'dirichlet'; % Boundary condition for parallel direction ('dirichlet','periodic','shearless','disconnected') +SHIFT_Y = 0.0; % Shift in the periodic BC in z +NPOL = 1; % Number of poloidal turns +PB_PHASE = 0; +%% TIME PARAMETERS +TMAX = 20; % Maximal time unit +DT = 1e-2; % Time step +DTSAVE0D = 1.0; % Sampling time for 0D arrays +DTSAVE2D = -1; % Sampling time for 2D arrays +DTSAVE3D = 1.0; % Sampling time for 3D arrays +DTSAVE5D = 100; % Sampling time for 5D arrays +JOB2LOAD = -1; % Start a new simulation serie + +%% OPTIONS +LINEARITY = 'linear'; % activate non-linearity (is cancelled if KXEQ0 = 1) +CO = 'DG'; % Collision operator (LB:L.Bernstein, DG:Dougherty, SG:Sugama, LR: Lorentz, LD: Landau) +GKCO = 1; % Gyrokinetic operator +ABCO = 1; % INTERSPECIES collisions +INIT_ZF = 0; % Initialize zero-field quantities +HRCY_CLOS = 'truncation'; % Closure model for higher order moments +DMAX = -1; +NLIN_CLOS = 'truncation'; % Nonlinear closure model for higher order moments +NMAX = 0; +KERN = 0; % Kernel model (0 : GK) +INIT_OPT = 'phi'; % Start simulation with a noisy mom00/phi/allmom +NUMERICAL_SCHEME = 'RK4'; % Numerical integration scheme (RK2,SSPx_RK2,RK3,SSP_RK3,SSPx_RK3,IMEX_SSP2,ARK2,RK4,DOPRI5) + +%% OUTPUTS +W_DOUBLE = 1; % Output flag for double moments +W_GAMMA = 1; % Output flag for gamma (Gyrokinetic Energy) +W_HF = 1; % Output flag for high-frequency potential energy +W_PHI = 1; % Output flag for potential +W_NA00 = 1; % Output flag for nalpha00 (density of species alpha) +W_DENS = 1; % Output flag for total density +W_TEMP = 1; % Output flag for temperature +W_NAPJ = 1; % Output flag for nalphaparallel (parallel momentum of species alpha) +W_SAPJ = 0; % Output flag for saparallel (parallel current of species alpha) + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% UNUSED PARAMETERS +% These parameters are usually not to play with in linear runs +MU = 0.0; % Hyperdiffusivity coefficient +MU_X = MU; % Hyperdiffusivity coefficient in x direction +MU_Y = MU; % Hyperdiffusivity coefficient in y direction +N_HD = 4; % Degree of spatial-hyperdiffusivity +MU_Z = 5.0; % Hyperdiffusivity coefficient in z direction +HYP_V = 'hypcoll'; % Kinetic-hyperdiffusivity model +MU_P = 0.0; % Hyperdiffusivity coefficient for Hermite +MU_J = 0.0; % Hyperdiffusivity coefficient for Laguerre +LAMBDAD = 0.0; % Lambda Debye +NOISE0 = 1.0e-5; % Initial noise amplitude +BCKGD0 = 0.0e-5; % Initial background +k_gB = 1.0; % Magnetic gradient strength +k_cB = 1.0; % Magnetic curvature strength +COLL_KCUT = 1; % Cutoff for collision operator +ADIAB_I = 0; % adiabatic ion model \ No newline at end of file