# ---------------------------------------------------------------------------------------- # 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 = 102.4 # simulation length tsim = 6000. # duration of the simulation dx = 0.1 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 = [ 128 ], EM_boundary_conditions = [ ['silver-muller','silver-muller'] ] , # random_seed = int(random.getrandbits(32))+smilei_mpi_rank ) Species( name = 'eon', position_initialization = 'random', momentum_initialization = 'mj', particles_per_cell = 16, mass = 1.0, charge = -1.0, mean_velocity = [0.0498,0.0,0.0498], number_density = trapezoidal(1.0, xvacuum=0.0, xplateau=Lsim), temperature = [1.56e-4], boundary_conditions = [ ["remove", "remove"],], ) Species( name = 'ion', position_initialization = 'random', momentum_initialization = 'mj', particles_per_cell = 16, mass = mi, charge = 1.0, mean_velocity = [0.0498,0.0,0.0498], number_density = trapezoidal(1.0, xvacuum=0.0, xplateau=Lsim), temperature = [1.56e-4], boundary_conditions = [ ["remove", "remove"],], ) ParticleInjector( name = "Inj_eon", species = "eon", box_side = "xmax", ) ParticleInjector( name = "Inj_ion", species = "ion", box_side = "xmax", ) #ExternalField( # field = "Bx", # profile = constant(0.035, xvacuum=-3.0*dx) #) #ExternalField( # field = "Bz", # profile = constant(0.035, xvacuum=-3.0*dx) #) 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'] ) DiagParticleBinning( deposited_quantity = "weight", every = 10, time_average = 1, species = ["eon"], axes = [ ["x", 0., Lsim, 100] ] ) DiagParticleBinning( deposited_quantity = "weight", every = 10, time_average = 1, species = ["ion"], axes = [ ["x", 0., Lsim, 100] ] )