zmin = -20.e-6 rmax = +20.e-6 zmax = +20.e-6 uniform_plasma = picmi.UniformDistribution(density=1.e25, upper_bound=[None, None, 0.], directed_velocity=[0., 0., 0.1]) electrons = picmi.Species(particle_type='electron', name='electrons', initial_distribution=uniform_plasma) grid = picmi.CylindricalGrid( number_of_cells=[nr, nz], lower_bound=[rmin, zmin], upper_bound=[rmax, zmax], lower_boundary_conditions=['dirichlet', 'periodic'], upper_boundary_conditions=['dirichlet', 'periodic'], moving_window_velocity=[0., 0.], warpx_max_grid_size=32) solver = picmi.ElectromagneticSolver(grid=grid, cfl=1.) sim = picmi.Simulation(solver=solver, max_steps=40, verbose=1, warpx_plot_int=1, warpx_current_deposition_algo=3, warpx_charge_deposition_algo=0, warpx_field_gathering_algo=0, warpx_particle_pusher_algo=0)
rmin = 0 rmax = 30e-06 zmin = -56e-06 zmax = 12e-06 # Domain decomposition max_grid_size = 64 blocking_factor = 32 # Create grid grid = picmi.CylindricalGrid( number_of_cells = [nr, nz], n_azimuthal_modes = 2, lower_bound = [rmin, zmin], upper_bound = [rmax, zmax], lower_boundary_conditions = ['none', 'dirichlet'], upper_boundary_conditions = ['dirichlet', 'dirichlet'], lower_boundary_conditions_particles = ['absorbing', 'absorbing'], upper_boundary_conditions_particles = ['absorbing', 'absorbing'], moving_window_velocity = [0., c], warpx_max_grid_size = max_grid_size, warpx_blocking_factor = blocking_factor) # Particles: plasma electrons plasma_density = 2e23 plasma_xmin = -20e-06 plasma_ymin = None plasma_zmin = 10e-06 plasma_xmax = 20e-06 plasma_ymax = None plasma_zmax = None uniform_distribution = picmi.UniformDistribution(
k0=k0, w0=w0, momentum_expressions=momentum_expressions) electrons = picmi.Species(particle_type='electron', name='electrons', initial_distribution=analytic_plasma) protons = picmi.Species(particle_type='proton', name='protons', initial_distribution=uniform_plasma) grid = picmi.CylindricalGrid( number_of_cells=[nr, nz], n_azimuthal_modes=3, lower_bound=[rmin, zmin], upper_bound=[rmax, zmax], lower_boundary_conditions=['dirichlet', 'periodic'], upper_boundary_conditions=['dirichlet', 'periodic'], moving_window_zvelocity=0., warpx_max_grid_size=64) solver = picmi.ElectromagneticSolver(grid=grid, cfl=1.) sim = picmi.Simulation(solver=solver, max_steps=40, verbose=1, warpx_plot_int=40, warpx_current_deposition_algo='esirkepov', warpx_field_gathering_algo='energy-conserving', warpx_particle_pusher_algo='boris')
name='electrons', initial_distribution=analytic_plasma) protons = picmi.Species(particle_type='proton', name='protons', initial_distribution=uniform_plasma) ########################## # numerics components ########################## grid = picmi.CylindricalGrid( number_of_cells=[nr, nz], n_azimuthal_modes=3, lower_bound=[rmin, zmin], upper_bound=[rmax, zmax], lower_boundary_conditions=['none', 'periodic'], upper_boundary_conditions=['none', 'periodic'], lower_boundary_conditions_particles=['absorbing', 'periodic'], upper_boundary_conditions_particles=['absorbing', 'periodic'], moving_window_velocity=[0., 0.], warpx_max_grid_size=64) solver = picmi.ElectromagneticSolver(grid=grid, cfl=1.) ########################## # diagnostics ########################## field_diag1 = picmi.FieldDiagnostic( name='diag1', grid=grid,