From 8eb74ffc67a8cf25424c6ae05e997e6adcea708d Mon Sep 17 00:00:00 2001 From: Francesco Massimo Date: Tue, 21 Nov 2023 11:50:23 +0100 Subject: [PATCH] improve script --- InputNamelist.py | 232 +++++++++--------- .../Laser_waist_theory_vs_Smilei.py | 6 +- 2 files changed, 116 insertions(+), 122 deletions(-) diff --git a/InputNamelist.py b/InputNamelist.py index 20c4b00..90fe017 100755 --- a/InputNamelist.py +++ b/InputNamelist.py @@ -78,28 +78,28 @@ random_seed = smilei_mpi_rank ) -# ######################### Define the laser pulse -# -# #### laser parameters -# laser_fwhm = 25.5*math.sqrt(2)*fs # laser FWHM duration in field, i.e. FWHM duration in intensity*sqrt(2) -# laser_waist = 12*um # laser waist, conversion from um -# center_laser = Lx-1.7*laser_fwhm # laser position at the start of the simulation -# x_focus = (center_laser+0.1*laser_fwhm) # laser focal plane position -# a0 = 1.8 # laser peak field, normalized by E0 defined above -# -# #### Define a Gaussian bunch with Gaussian temporal envelope -# LaserEnvelopeGaussianAM( -# a0 = a0, -# omega = (2.*math.pi/lambda0*c)/reference_frequency, # laser frequency, normalized -# focus = [x_focus,0.], # laser focus, [x,r] position -# waist = laser_waist, # laser waist -# time_envelope = tgaussian(center=center_laser, fwhm=laser_fwhm), # time profile of the laser pulse -# envelope_solver = 'explicit_reduced_dispersion', -# Envelope_boundary_conditions = [ ["reflective"],["PML"] ], -# Env_pml_sigma_parameters = [[0.9 ,2 ],[80.0,2] ,[80.0,2 ]], -# Env_pml_kappa_parameters = [[1.00,1.00,2],[1.00,1.00,2],[1.00,1.00,2]], -# Env_pml_alpha_parameters = [[0.90,0.90,1],[0.65,0.65,1],[0.65,0.65,1]] -# ) +######################### Define the laser pulse + +#### laser parameters +#laser_fwhm = 25.5*math.sqrt(2)*fs # laser FWHM duration in field, i.e. FWHM duration in intensity*sqrt(2) +#laser_waist = 12*um # laser waist, conversion from um +#center_laser = Lx-1.7*laser_fwhm # laser position at the start of the simulation +#x_focus = (center_laser+0.1*laser_fwhm) # laser focal plane position +#a0 = 1.8 # laser peak field, normalized by E0 defined above + +#### Define a Gaussian bunch with Gaussian temporal envelope +#LaserEnvelopeGaussianAM( +# a0 = a0, +# omega = (2.*math.pi/lambda0*c)/reference_frequency, # laser frequency, normalized +# focus = [x_focus,0.], # laser focus, [x,r] position +# waist = laser_waist, # laser waist +# time_envelope = tgaussian(center=center_laser, fwhm=laser_fwhm), # time profile of the laser pulse +# envelope_solver = 'explicit_reduced_dispersion', +# Envelope_boundary_conditions = [ ["reflective"],["PML"] ], +# Env_pml_sigma_parameters = [[0.9 ,2 ],[80.0,2] ,[80.0,2 ]], +# Env_pml_kappa_parameters = [[1.00,1.00,2],[1.00,1.00,2],[1.00,1.00,2]], +# Env_pml_alpha_parameters = [[0.90,0.90,1],[0.65,0.65,1],[0.65,0.65,1]] +#) ######################### Define a moving window @@ -109,97 +109,95 @@ velocity_x = c_normalized, ) -# ######################### Define the plasma -# -# ##### plasma parameters -# plasma_plateau_density_1_ov_cm3 = 1.3e18 -# n0 = plasma_plateau_density_1_ov_cm3*1e6/ncrit # plasma plateau density in units of critical density defined above -# Radius_plasma = 30.*um # Radius of plasma -# Lramp = 15*um # Plasma density upramp length -# Lplateau = 1*mm # Length of density plateau -# Ldownramp = 15*um # Length of density downramp -# x_begin_upramp = Lx # x coordinate of the start of the density upramp -# x_begin_plateau = x_begin_upramp+Lramp # x coordinate of the end of the density upramp / start of density plateau -# x_end_plateau = x_begin_plateau+Lplateau # x coordinate of the end of the density plateau start of the density downramp -# x_end_downramp = x_end_plateau+Ldownramp # x coordinate of the end of the density downramp -# -# #### plasma density profile -# longitudinal_profile = polygonal(xpoints=[x_begin_upramp,x_begin_plateau,x_end_plateau,x_end_downramp],xvalues=[0.,n0,n0,0.]) -# def plasma_density(x,r): -# profile_r = 0. -# if ((r)**2