Skip to content

Commit 13723e0

Browse files
committed
Add CI test case
1 parent 555588b commit 13723e0

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

Examples/Tests/energy_conserving_thermal_plasma/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,13 @@ add_warpx_test(
1010
"analysis_default_regression.py --path diags/diag1000500" # checksum
1111
OFF # dependency
1212
)
13+
14+
add_warpx_test(
15+
test_1d_energy_conserving_thermal_plasma # name
16+
1 # dims
17+
2 # nprocs
18+
inputs_test_1d_energy_conserving_thermal_plasma # inputs
19+
"analysis.py" # analysis
20+
"analysis_default_regression.py --path diags/diag1000500" # checksum
21+
OFF # dependency
22+
)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#################################
2+
####### GENERAL PARAMETERS ######
3+
#################################
4+
max_step = 500
5+
amr.n_cell = 8
6+
amr.max_level = 0
7+
geometry.dims = 1
8+
9+
warpx.do_electrostatic = labframe
10+
algo.field_gathering = energy-conserving
11+
algo.particle_shape = 2
12+
warpx.use_filter = 0
13+
14+
#################################
15+
############ CONSTANTS #############
16+
#################################
17+
my_constants.n0 = 1.e30 # plasma density, m^-3
18+
my_constants.Ti = 100. # ion temperature, eV
19+
my_constants.Te = 100. # electron temperature, eV
20+
my_constants.wpe = q_e*sqrt(n0/(m_e*epsilon0)) # electron plasma frequency, radians/s
21+
my_constants.de0 = clight/wpe # skin depth, m
22+
my_constants.dt = ( 0.2 )/wpe # time step size, s
23+
warpx.const_dt = dt
24+
25+
#################################
26+
####### GENERAL PARAMETERS ######
27+
#################################
28+
geometry.prob_lo = 0.0
29+
geometry.prob_hi = 10.*de0
30+
warpx.serialize_initial_conditions = 1
31+
warpx.verbose = 1
32+
33+
#################################
34+
###### BOUNDARY CONDITIONS ######
35+
#################################
36+
boundary.field_lo = periodic
37+
boundary.field_hi = periodic
38+
boundary.particle_lo = periodic
39+
boundary.particle_hi = periodic
40+
41+
#################################
42+
############ PLASMA #############
43+
#################################
44+
particles.species_names = electrons protons
45+
46+
electrons.species_type = electron
47+
electrons.injection_style = "NUniformPerCell"
48+
electrons.num_particles_per_cell_each_dim = 4
49+
electrons.profile = constant
50+
electrons.density = n0
51+
electrons.momentum_distribution_type = gaussian
52+
electrons.ux_th = sqrt(Te*q_e/m_e)/clight
53+
electrons.uy_th = sqrt(Te*q_e/m_e)/clight
54+
electrons.uz_th = sqrt(Te*q_e/m_e)/clight
55+
electrons.xmin = 0
56+
electrons.xmax = 10.*de0
57+
electrons.zmin = 0
58+
electrons.zmax =10.*de0
59+
60+
protons.species_type = proton
61+
protons.injection_style = "NUniformPerCell"
62+
protons.num_particles_per_cell_each_dim = 4
63+
protons.profile = constant
64+
protons.density = n0
65+
protons.momentum_distribution_type = gaussian
66+
protons.ux_th = sqrt(Ti*q_e/m_p)/clight
67+
protons.uy_th = sqrt(Ti*q_e/m_p)/clight
68+
protons.uz_th = sqrt(Ti*q_e/m_p)/clight
69+
protons.xmin = 0
70+
protons.xmax = 10.*de0
71+
protons.zmin = 0
72+
protons.zmax =10.*de0
73+
74+
diagnostics.diags_names = diag1
75+
diag1.intervals = 500
76+
diag1.diag_type = Full
77+
78+
warpx.reduced_diags_names = EP EF
79+
EP.type = ParticleEnergy
80+
EP.intervals = 100
81+
EF.type = FieldEnergy
82+
EF.intervals =100
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"lev=0": {
3+
"Bx": 0.0,
4+
"By": 0.0,
5+
"Bz": 0.0,
6+
"Ex": 14828575152586.377,
7+
"Ey": 0.0,
8+
"Ez": 15137612617490.05,
9+
"jx": 5.540159304744141e+18,
10+
"jy": 7.091120321535793e+18,
11+
"jz": 6.642877913575798e+18
12+
},
13+
"electrons": {
14+
"particle_momentum_x": 7.607254284466359e-22,
15+
"particle_momentum_y": 8.024587486899746e-22,
16+
"particle_momentum_z": 8.135084188617331e-22,
17+
"particle_position_x": 6.882297195442962e-06,
18+
"particle_position_y": 6.860835757956751e-06,
19+
"particle_weight": 2823958725036869.5
20+
},
21+
"protons": {
22+
"particle_momentum_x": 3.1874892788353723e-20,
23+
"particle_momentum_y": 3.3975490969622645e-20,
24+
"particle_momentum_z": 3.3005745860923366e-20,
25+
"particle_position_x": 6.805298104444865e-06,
26+
"particle_position_y": 6.8011432681640676e-06,
27+
"particle_weight": 2823958725036869.5
28+
}
29+
}

0 commit comments

Comments
 (0)