-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
geometry.dims = 3 | ||
geometry.prob_lo = 0 0 0 | ||
geometry.prob_hi = 1 1 1 | ||
amr.max_level = 0 | ||
amr.n_cell = 8 8 8 | ||
max_step = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Maximum number of time steps | ||
max_step = 80 | ||
|
||
# number of grid points | ||
amr.n_cell = 128 | ||
|
||
# Maximum allowable size of each subdomain in the problem domain; | ||
# this is used to decompose the domain for parallel calculations. | ||
amr.max_grid_size = 64 | ||
|
||
# Maximum level in hierarchy (for now must be 0, i.e., one level in total) | ||
amr.max_level = 0 | ||
|
||
# Geometry | ||
geometry.dims = 1 | ||
geometry.prob_lo = -20.e-6 # physical domain | ||
geometry.prob_hi = 20.e-6 | ||
|
||
# Boundary condition | ||
boundary.field_lo = periodic | ||
boundary.field_hi = periodic | ||
|
||
warpx.serialize_initial_conditions = 1 | ||
|
||
# Verbosity | ||
warpx.verbose = 1 | ||
|
||
# Algorithms | ||
algo.field_gathering = energy-conserving | ||
algo.current_deposition = esirkepov | ||
warpx.use_filter = 0 | ||
|
||
# Order of particle shape factors | ||
algo.particle_shape = 1 | ||
|
||
# CFL | ||
warpx.cfl = 0.8 | ||
|
||
# Parameters for the plasma wave | ||
my_constants.epsilon = 0.01 | ||
my_constants.n0 = 2.e24 # electron and positron densities, #/m^3 | ||
my_constants.wp = sqrt(2.*n0*q_e**2/(epsilon0*m_e)) # plasma frequency | ||
my_constants.kp = wp/clight # plasma wavenumber | ||
my_constants.k = 2.*pi/20.e-6 # perturbation wavenumber | ||
# Note: kp is calculated in SI for a density of 4e24 (i.e. 2e24 electrons + 2e24 positrons) | ||
# k is calculated so as to have 2 periods within the 40e-6 wide box. | ||
|
||
# Particles | ||
particles.species_names = electrons positrons | ||
|
||
electrons.charge = -q_e | ||
electrons.mass = m_e | ||
electrons.injection_style = "NUniformPerCell" | ||
electrons.num_particles_per_cell_each_dim = 2 | ||
electrons.zmin = -20.e-6 | ||
electrons.zmax = 20.e-6 | ||
|
||
electrons.profile = constant | ||
electrons.density = n0 # number of electrons per m^3 | ||
electrons.momentum_distribution_type = parse_momentum_function | ||
electrons.momentum_function_ux(x,y,z) = "epsilon * k/kp * sin(k*x) * cos(k*y) * cos(k*z)" | ||
electrons.momentum_function_uy(x,y,z) = "epsilon * k/kp * cos(k*x) * sin(k*y) * cos(k*z)" | ||
electrons.momentum_function_uz(x,y,z) = "epsilon * k/kp * cos(k*x) * cos(k*y) * sin(k*z)" | ||
|
||
positrons.charge = q_e | ||
positrons.mass = m_e | ||
positrons.injection_style = "NUniformPerCell" | ||
positrons.num_particles_per_cell_each_dim = 2 | ||
positrons.zmin = -20.e-6 | ||
positrons.zmax = 20.e-6 | ||
|
||
positrons.profile = constant | ||
positrons.density = n0 # number of positrons per m^3 | ||
positrons.momentum_distribution_type = parse_momentum_function | ||
positrons.momentum_function_ux(x,y,z) = "-epsilon * k/kp * sin(k*x) * cos(k*y) * cos(k*z)" | ||
positrons.momentum_function_uy(x,y,z) = "-epsilon * k/kp * cos(k*x) * sin(k*y) * cos(k*z)" | ||
positrons.momentum_function_uz(x,y,z) = "-epsilon * k/kp * cos(k*x) * cos(k*y) * sin(k*z)" | ||
|
||
# Diagnostics | ||
diagnostics.diags_names = diag1 openpmd | ||
diag1.intervals = 40 | ||
diag1.diag_type = Full | ||
diag1.electrons.variables = z w ux uy uz | ||
diag1.positrons.variables = z w ux uy uz | ||
|
||
openpmd.intervals = 40 | ||
openpmd.diag_type = Full | ||
openpmd.format = openpmd |