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

renamed inital background and noise variables

parent 1a41c14b
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@ params.Rphi = 0.0; % Major Radius * normalized kperp / Backg
params.betae = 1e-6; % Electron Beta plasma.
params.rhostar = 1e-5; % sound Larmor Radius/Major Radius ~ sqrt(Te)/(R_0*B).
params.n0 = INITIAL.initback_moments; % initial density perturbation
params.n0 = INITIAL.init_background; % initial density perturbation
params.gradB = MODEL.eta_B; % Magnetic field gradient
params.curvB = MODEL.eta_B; % Curvature of B
......
......@@ -102,7 +102,7 @@ params.Rphi = 0.0; % Major Radius * normalized kperp / Backg
params.betae = 1e-6; % Electron Beta plasma.
params.rhostar = 1e-5; % sound Larmor Radius/Major Radius ~ sqrt(Te)/(R_0*B).
params.n0 = INITIAL.initback_moments; % initial density perturbation
params.n0 = INITIAL.init_background; % initial density perturbation
params.gradB = MODEL.eta_B; % Magnetic field gradient
params.curvB = MODEL.eta_B; % Curvature of B
......
......@@ -102,7 +102,7 @@ params.Rphi = 0.0; % Major Radius * normalized kperp / Backg
params.betae = 1e-6; % Electron Beta plasma.
params.rhostar = 1e-5; % sound Larmor Radius/Major Radius ~ sqrt(Te)/(R_0*B).
params.n0 = INITIAL.initback_moments; % initial density perturbation
params.n0 = INITIAL.init_background; % initial density perturbation
params.gradB = MODEL.eta_B; % Magnetic field gradient
params.curvB = MODEL.eta_B; % Curvature of B
......
......@@ -39,8 +39,8 @@ MODEL.lambdaD = LAMBDAD;
% Time integration and intialization parameters
TIME_INTEGRATION.numerical_scheme = '''RK4''';
if INIT_PHI; INITIAL.init_noisy_phi = '.true.'; else; INITIAL.init_noisy_phi = '.false.';end;
INITIAL.initback_moments = 0.0e-5;
INITIAL.initnoise_moments = NOISE0;
INITIAL.init_background = 0.0e-5;
INITIAL.init_noiselvl = NOISE0;
INITIAL.iseed = 42;
INITIAL.selfmat_file = '''null''';
INITIAL.eimat_file = '''null''';
......
......@@ -46,6 +46,7 @@ fprintf(fid,[' CO = ', num2str(MODEL.CO),'\n']);
fprintf(fid,[' CLOS = ', num2str(MODEL.CLOS),'\n']);
fprintf(fid,[' NL_CLOS = ', num2str(MODEL.NL_CLOS),'\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_p = ', num2str(MODEL.mu_p),'\n']);
fprintf(fid,[' mu_j = ', num2str(MODEL.mu_j),'\n']);
......@@ -64,8 +65,9 @@ fprintf(fid,'/\n');
fprintf(fid,'&INITIAL_CON\n');
fprintf(fid,[' INIT_NOISY_PHI =', INITIAL.init_noisy_phi,'\n']);
fprintf(fid,[' initback_moments =', num2str(INITIAL.initback_moments),'\n']);
fprintf(fid,[' initnoise_moments =', num2str(INITIAL.initnoise_moments),'\n']);
fprintf(fid,[' INIT_ZF_PHI =', INITIAL.init_noisy_phi,'\n']);
fprintf(fid,[' init_background =', num2str(INITIAL.init_background),'\n']);
fprintf(fid,[' init_noiselvl =', num2str(INITIAL.init_noiselvl),'\n']);
fprintf(fid,[' iseed =', num2str(INITIAL.iseed),'\n']);
fprintf(fid,[' selfmat_file =', INITIAL.selfmat_file,'\n']);
fprintf(fid,[' eimat_file =', INITIAL.eimat_file,'\n']);
......
......@@ -96,7 +96,7 @@ SUBROUTINE init_moments
DO ikr=ikrs,ikre
DO ikz=ikzs,ikze
CALL RANDOM_NUMBER(noise)
moments_e( ip,ij, ikr,ikz, :) = (initback_moments + initnoise_moments*(noise-0.5_dp))
moments_e( ip,ij, ikr,ikz, :) = (init_background + init_noiselvl*(noise-0.5_dp))
END DO
END DO
......@@ -115,7 +115,7 @@ SUBROUTINE init_moments
DO ikr=ikrs,ikre
DO ikz=ikzs,ikze
CALL RANDOM_NUMBER(noise)
moments_i( ip,ij, ikr,ikz, :) = (initback_moments + initnoise_moments*(noise-0.5_dp))
moments_i( ip,ij, ikr,ikz, :) = (init_background + init_noiselvl*(noise-0.5_dp))
END DO
END DO
......@@ -179,7 +179,7 @@ SUBROUTINE init_phi
DO ikr=ikrs,ikre
DO ikz=ikzs,ikze
CALL RANDOM_NUMBER(noise)
phi(ikr,ikz) = (initback_moments + initnoise_moments*(noise-0.5_dp))*AA_r(ikr)*AA_z(ikz)
phi(ikr,ikz) = (init_background + init_noiselvl*(noise-0.5_dp))*AA_r(ikr)*AA_z(ikz)
END DO
END DO
......
......@@ -6,11 +6,13 @@ MODULE initial_par
PRIVATE
! Initial background level
REAL(dp), PUBLIC, PROTECTED :: initback_moments=0._dp
! Initial background level
REAL(dp), PUBLIC, PROTECTED :: init_background=0._dp
! Initialization through a noisy phi
LOGICAL, PUBLIC, PROTECTED :: INIT_NOISY_PHI = .false.
! Initialization through a zonal flow phi
LOGICAL, PUBLIC, PROTECTED :: INIT_ZF_PHI = .false.
! Initial background noise amplitude
REAL(dp), PUBLIC, PROTECTED :: initnoise_moments=1E-6_dp
REAL(dp), PUBLIC, PROTECTED :: init_noiselvl=1E-6_dp
! Initialization for random number generator
INTEGER, PUBLIC, PROTECTED :: iseed=42
......@@ -37,8 +39,9 @@ CONTAINS
IMPLICIT NONE
NAMELIST /INITIAL_CON/ INIT_NOISY_PHI
NAMELIST /INITIAL_CON/ initback_moments
NAMELIST /INITIAL_CON/ initnoise_moments
NAMELIST /INITIAL_CON/ INIT_ZF_PHI
NAMELIST /INITIAL_CON/ init_background
NAMELIST /INITIAL_CON/ init_noiselvl
NAMELIST /INITIAL_CON/ iseed
NAMELIST /INITIAL_CON/ selfmat_file
NAMELIST /INITIAL_CON/ iemat_file
......@@ -61,9 +64,9 @@ CONTAINS
CALL attach(fidres, TRIM(str), "INIT_NOISY_PHI", INIT_NOISY_PHI)
CALL attach(fidres, TRIM(str), "initback_moments", initback_moments)
CALL attach(fidres, TRIM(str), "init_background", init_background)
CALL attach(fidres, TRIM(str), "initnoise_moments", initnoise_moments)
CALL attach(fidres, TRIM(str), "init_noiselvl", init_noiselvl)
CALL attach(fidres, TRIM(str), "iseed", iseed)
......
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