Skip to content
Snippets Groups Projects
Commit 59fa6653 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann
Browse files

Added ZF initialization option

parent 4a6a43b6
No related branches found
No related tags found
No related merge requests found
...@@ -46,7 +46,6 @@ fprintf(fid,[' CO = ', num2str(MODEL.CO),'\n']); ...@@ -46,7 +46,6 @@ fprintf(fid,[' CO = ', num2str(MODEL.CO),'\n']);
fprintf(fid,[' CLOS = ', num2str(MODEL.CLOS),'\n']); fprintf(fid,[' CLOS = ', num2str(MODEL.CLOS),'\n']);
fprintf(fid,[' NL_CLOS = ', num2str(MODEL.NL_CLOS),'\n']); fprintf(fid,[' NL_CLOS = ', num2str(MODEL.NL_CLOS),'\n']);
fprintf(fid,[' NON_LIN = ', MODEL.NON_LIN,'\n']); fprintf(fid,[' NON_LIN = ', MODEL.NON_LIN,'\n']);
fprintf(fid,[' ZF_DAMP = ', MODEL.ZF_DAMP,'\n']);
fprintf(fid,[' mu = ', num2str(MODEL.mu),'\n']); fprintf(fid,[' mu = ', num2str(MODEL.mu),'\n']);
fprintf(fid,[' mu_p = ', num2str(MODEL.mu_p),'\n']); fprintf(fid,[' mu_p = ', num2str(MODEL.mu_p),'\n']);
fprintf(fid,[' mu_j = ', num2str(MODEL.mu_j),'\n']); fprintf(fid,[' mu_j = ', num2str(MODEL.mu_j),'\n']);
...@@ -65,7 +64,7 @@ fprintf(fid,'/\n'); ...@@ -65,7 +64,7 @@ fprintf(fid,'/\n');
fprintf(fid,'&INITIAL_CON\n'); fprintf(fid,'&INITIAL_CON\n');
fprintf(fid,[' INIT_NOISY_PHI =', INITIAL.init_noisy_phi,'\n']); fprintf(fid,[' INIT_NOISY_PHI =', INITIAL.init_noisy_phi,'\n']);
fprintf(fid,[' INIT_ZF_PHI =', INITIAL.init_noisy_phi,'\n']); fprintf(fid,[' INIT_ZF_PHI =', INITIAL.INIT_ZF_PHI,'\n']);
fprintf(fid,[' init_background =', num2str(INITIAL.init_background),'\n']); fprintf(fid,[' init_background =', num2str(INITIAL.init_background),'\n']);
fprintf(fid,[' init_noiselvl =', num2str(INITIAL.init_noiselvl),'\n']); fprintf(fid,[' init_noiselvl =', num2str(INITIAL.init_noiselvl),'\n']);
fprintf(fid,[' iseed =', num2str(INITIAL.iseed),'\n']); fprintf(fid,[' iseed =', num2str(INITIAL.iseed),'\n']);
......
...@@ -211,6 +211,18 @@ SUBROUTINE init_phi ...@@ -211,6 +211,18 @@ SUBROUTINE init_phi
ENDDO ENDDO
ENDDO ENDDO
ELSEIF(INIT_ZF_PHI .GT. 0)
!**** Zonal Flow initialization *******************************************
! Every mode is zero
DO ikr=ikrs,ikre
DO ikz=ikzs,ikze
phi(ikr,ikz) = 0._dp
END DO
END DO
! Except at ikr = mode number + 1, symmetry is already included since kr>=0
phi(INIT_ZF_PHI+1,ikz_0) = -init_background * imagu/2._dp
ELSE ! we compute phi from noisy moments and poisson ELSE ! we compute phi from noisy moments and poisson
CALL poisson CALL poisson
......
...@@ -5,13 +5,13 @@ MODULE initial_par ...@@ -5,13 +5,13 @@ MODULE initial_par
IMPLICIT NONE IMPLICIT NONE
PRIVATE PRIVATE
! Initial background level
REAL(dp), PUBLIC, PROTECTED :: init_background=0._dp
! Initialization through a noisy phi ! Initialization through a noisy phi
LOGICAL, PUBLIC, PROTECTED :: INIT_NOISY_PHI = .false. LOGICAL, PUBLIC, PROTECTED :: INIT_NOISY_PHI = .false.
! Initialization through a zonal flow phi ! Initialization through a zonal flow phi
LOGICAL, PUBLIC, PROTECTED :: INIT_ZF_PHI = .false. INTEGER, PUBLIC, PROTECTED :: INIT_ZF_PHI = 0
! Initial background noise amplitude ! Initial background level
REAL(dp), PUBLIC, PROTECTED :: init_background=0._dp
! Initial noise amplitude
REAL(dp), PUBLIC, PROTECTED :: init_noiselvl=1E-6_dp REAL(dp), PUBLIC, PROTECTED :: init_noiselvl=1E-6_dp
! Initialization for random number generator ! Initialization for random number generator
INTEGER, PUBLIC, PROTECTED :: iseed=42 INTEGER, PUBLIC, PROTECTED :: iseed=42
...@@ -64,6 +64,8 @@ CONTAINS ...@@ -64,6 +64,8 @@ CONTAINS
CALL attach(fidres, TRIM(str), "INIT_NOISY_PHI", INIT_NOISY_PHI) CALL attach(fidres, TRIM(str), "INIT_NOISY_PHI", INIT_NOISY_PHI)
CALL attach(fidres, TRIM(str), "INIT_ZF_PHI", INIT_ZF_PHI)
CALL attach(fidres, TRIM(str), "init_background", init_background) CALL attach(fidres, TRIM(str), "init_background", init_background)
CALL attach(fidres, TRIM(str), "init_noiselvl", init_noiselvl) CALL attach(fidres, TRIM(str), "init_noiselvl", init_noiselvl)
......
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