forked from ECP-WarpX/WarpX
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add semi-implicit CI test (ECP-WarpX#4565)
* Add semi-implicit CI test * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update CI benchmark values --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
5cff5e0
commit 2444f15
Showing
4 changed files
with
133 additions
and
1 deletion.
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
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,81 @@ | ||
################################# | ||
############ CONSTANTS ############# | ||
################################# | ||
|
||
my_constants.n0 = 1.e30 # plasma densirty, m^-3 | ||
my_constants.nz = 40 # number of grid cells | ||
my_constants.Ti = 100. # ion temperature, eV | ||
my_constants.Te = 100. # electron temperature, eV | ||
my_constants.wpe = q_e*sqrt(n0/(m_e*epsilon0)) # electron plasma frequency, radians/s | ||
my_constants.de0 = clight/wpe # skin depth, m | ||
my_constants.nppcz = 100 # number of particles/cell in z | ||
my_constants.dt = 0.1/wpe # time step size, s | ||
|
||
################################# | ||
####### GENERAL PARAMETERS ###### | ||
################################# | ||
|
||
max_step = 100 | ||
amr.n_cell = nz | ||
amr.max_level = 0 | ||
|
||
geometry.dims = 1 | ||
geometry.prob_lo = 0.0 | ||
geometry.prob_hi = 10.*de0 | ||
boundary.field_lo = periodic | ||
boundary.field_hi = periodic | ||
boundary.particle_lo = periodic | ||
boundary.particle_hi = periodic | ||
|
||
################################# | ||
############ NUMERICS ########### | ||
################################# | ||
|
||
warpx.const_dt = dt | ||
algo.evolve_scheme = semi_implicit_picard | ||
algo.max_picard_iterations = 5 | ||
algo.picard_iteration_tolerance = 0. | ||
algo.current_deposition = esirkepov | ||
algo.field_gathering = energy-conserving | ||
algo.particle_shape = 2 | ||
warpx.use_filter = 0 | ||
|
||
################################# | ||
############ PLASMA ############# | ||
################################# | ||
|
||
particles.species_names = electrons protons | ||
|
||
electrons.species_type = electron | ||
electrons.injection_style = "NUniformPerCell" | ||
electrons.num_particles_per_cell_each_dim = nppcz | ||
electrons.profile = constant | ||
electrons.density = n0 | ||
electrons.momentum_distribution_type = gaussian | ||
electrons.ux_th = sqrt(Te*q_e/m_e)/clight | ||
electrons.uy_th = sqrt(Te*q_e/m_e)/clight | ||
electrons.uz_th = sqrt(Te*q_e/m_e)/clight | ||
|
||
protons.species_type = proton | ||
protons.injection_style = "NUniformPerCell" | ||
protons.num_particles_per_cell_each_dim = nppcz | ||
protons.profile = constant | ||
protons.density = n0 | ||
protons.momentum_distribution_type = gaussian | ||
protons.ux_th = sqrt(Ti*q_e/m_p)/clight | ||
protons.uy_th = sqrt(Ti*q_e/m_p)/clight | ||
protons.uz_th = sqrt(Ti*q_e/m_p)/clight | ||
|
||
# Diagnostics | ||
diagnostics.diags_names = diag1 | ||
diag1.intervals = 100 | ||
diag1.diag_type = Full | ||
diag1.fields_to_plot = Ex Ey Ez Bx By Bz jx jy jz rho divE | ||
diag1.electrons.variables = w ux uy uz | ||
diag1.protons.variables = w ux uy uz | ||
|
||
warpx.reduced_diags_names = particle_energy field_energy | ||
particle_energy.type = ParticleEnergy | ||
particle_energy.intervals = 1 | ||
field_energy.type = FieldEnergy | ||
field_energy.intervals = 1 |
29 changes: 29 additions & 0 deletions
29
Regression/Checksum/benchmarks_json/SemiImplicitPicard_1d.json
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,29 @@ | ||
{ | ||
"lev=0": { | ||
"Bx": 3559.0541122456157, | ||
"By": 1685.942868827529, | ||
"Bz": 0.0, | ||
"Ex": 796541204346.5195, | ||
"Ey": 961740397927.6577, | ||
"Ez": 3528140764527.8877, | ||
"divE": 2.0829159085076083e+21, | ||
"jx": 7.683674095607745e+17, | ||
"jy": 1.4132459141738875e+18, | ||
"jz": 1.350650739310074e+18, | ||
"rho": 18442528652.19583 | ||
}, | ||
"protons": { | ||
"particle_momentum_x": 5.231109104020749e-19, | ||
"particle_momentum_y": 5.367985047933474e-19, | ||
"particle_momentum_z": 5.253213505843665e-19, | ||
"particle_position_x": 0.00010628272743703473, | ||
"particle_weight": 5.314093261582036e+22 | ||
}, | ||
"electrons": { | ||
"particle_momentum_x": 1.196357181461066e-20, | ||
"particle_momentum_y": 1.2271903040162696e-20, | ||
"particle_momentum_z": 1.2277743615209627e-20, | ||
"particle_position_x": 0.0001064956905491333, | ||
"particle_weight": 5.314093261582036e+22 | ||
} | ||
} |
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