# ---------------------------------------------------------------------------------------- # SIMULATION PARAMETERS FOR THE PIC-CODE SMILEI # ---------------------------------------------------------------------------------------- import math, random #Te_keV = 1. # electron temperature in keV #Te = Te_keV/511. # Te normalised in mec^2 (code units) #vth = math.sqrt(Te) # normalised thermal velocity #Ld = vth # Debye length in normalised units #dx = Ld/10. # spatial resolution l0 = 1.0 # Reference length corresponding to the electron plasma skin depth Lsim = 256.0* l0 # simulation length tsim = 10000. # duration of the simulation dx = 0.05 mi = 100.0 # ion mass (use reduced one to accelerate computation) #cs = math.sqrt(Te/mi) # ion acoustic velocity (normalised to c) #Uion = mi*cs*cs # mean energy used to compute the ion spectrum Main( geometry = "1Dcartesian", interpolation_order = 2, timestep = 0.95*dx, simulation_time = tsim, cell_length = [dx], grid_length = [Lsim], number_of_patches = [ 512 ], EM_boundary_conditions = [ ['silver-muller','silver-muller'] ] , # random_seed = int(random.getrandbits(32))+smilei_mpi_rank ) Species( name = 'eon', position_initialization = 'regular', momentum_initialization = 'mj', particles_per_cell = 65536, mass = 1.0, charge = -1.0, number_density = 1.0, #number_density = trapezoidal(1.0, xplateau=Lsim,xvacuum=0.0,xslope1=0.0,xslope2=0.0), mean_velocity = [0.05,0.0,0.0], temperature = [1.56e-4], boundary_conditions = [ ["remove", "reflective"],], #thermal_boundary_temperature = [7.98e-2], #thermal_boundary_velocity = [0.0498,0.,0.0498], ) ParticleInjector( name = "Inj_eon", species = "eon", box_side = "xmin", number_density= 1.0, particles_per_cell = 65536, # number_density = trapezoidal(1., xplateau=30.*l0), #time_envelope = trapezoidal(start=0, duration=10., order=4), # Parameters inherited from the associated `species` by default position_initialization = 'regular', #momentum_initialization = "rectangular", # mean_velocity = [0.5,0.,-0.05], # temperature = [1.5e-4], #number_density = 1, #particles_per_cell = 16, ) Species( name = 'ion', position_initialization = 'regular', momentum_initialization = 'mj', particles_per_cell = 65536, mass = mi, charge = 1.0, number_density = 1.0, #number_density = trapezoidal(1.0, xplateau=Lsim, xvacuum=0.0,xslope1=0.0,xslope2=0.0), mean_velocity = [0.05,0.0,0.0], temperature = [1.56e-4], boundary_conditions = [ ["remove", "reflective"],], #thermal_boundary_temperature = [7.98e-2], #thermal_boundary_velocity = [0.0498,0.,0.0498], ) ParticleInjector( name = "Inj_ion", species = "ion", box_side = "xmin", number_density= 1.0, # # time_envelope = trapezoidal(start=0, duration=10., order=4), # number_density = trapezoidal(1.0, xplateau=30.*l0), # # Parameters inherited from the associated `species` by default position_initialization = "Inj_eon", #momentum_initialization = "rectangular", # mean_velocity = [0.05,0.,-0.05], #temperature = [1e-30], #number_density = 1, particles_per_cell = 65536, # temperature = [1.5e-4], ) PartWall( kind = "reflective", x = Lsim, ) ExternalField( field = "Ey", profile = constant(0.035*0.05, xvacuum=-10.0) ) ExternalField( field = "Bz", profile = constant(0.035, xvacuum=-10.0) ) ExternalField( field = "Bx", profile = constant(0.035, xvacuum=-10.0) ) LoadBalancing( every = 100 ) #DiagFields( # every = 10, # time_average = 10, #fields = ['Rho_ion','Rho_eon'] #) DiagProbe( every = 10, origin = [0], corners = [[0.99*Lsim]], number = [100], fields = ['Rho_eon', 'Rho_ion','Ex', 'Ey', 'Bz', 'Bx'] ) DiagParticleBinning( deposited_quantity = "weight", every = 10, species = ["eon"], time_average = 1, axes = [ ["x", 0, Lsim, 100], ["px", -5, 5, 100] ] ) DiagParticleBinning( deposited_quantity = "weight", every = 10, time_average = 1, species = ["ion"], axes = [ ["x", 0, Lsim, 100], ["px", -10, 10, 100] ] )