Skip to content

Commit 13f00ca

Browse files
roelof-groenewaldKZhu-MEax3l
authored
Clean up input files for tests with MCC (#2552)
* Added embedded_circle test * Add embedded_circle test files * Removed diag files * removed PICMI input file * Update to use default regression analysis * Added line breaks for spacing Co-authored-by: Axel Huebl <[email protected]> * Added description * Added Ar and Xe to pre-defined particle types * added Boltzmann's constant to pre-defined constants and cleaned up the MCC CI test input * Added Boltzmann's constant to warpx parser * cleaned up embedded circle CI test input * Remove duplicate entry. Co-authored-by: kzhu-ME <[email protected]> Co-authored-by: Kevin Z. Zhu <[email protected]> Co-authored-by: Axel Huebl <[email protected]>
1 parent c1876b2 commit 13f00ca

File tree

7 files changed

+71
-82
lines changed

7 files changed

+71
-82
lines changed

Docs/source/usage/parameters.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ m_u unified atomic mass unit (Dalton)
453453
epsilon0 vacuum permittivity
454454
mu0 vacuum permeability
455455
clight speed of light
456+
kb Boltzmann's constant (J/K)
456457
pi math constant pi
457-
kb Boltzmann constant (J/K)
458458
======== ===================
459459

460460
See ``Source/Utils/WarpXConst.H`` for the values.

Examples/Physics_applications/capacitive_discharge/PICMI_inputs_2d.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
N_INERT = 9.64e20 # m^-3
2424
T_INERT = 300.0 # K
2525

26-
FREQ = 13.56e6 # MHz
26+
FREQ = 13.56e6 # Hz
2727

2828
VOLTAGE = 450.0
2929

@@ -292,6 +292,7 @@ def solve(self):
292292

293293
grid = picmi.Cartesian2DGrid(
294294
number_of_cells = [nx, ny],
295+
warpx_max_grid_size=128,
295296
lower_bound = [xmin, ymin],
296297
upper_bound = [xmax, ymax],
297298
bc_xmin = 'dirichlet',

Examples/Physics_applications/capacitive_discharge/analysis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414

1515
my_check = checksumAPI.evaluate_checksum(
1616
'background_mcc', 'Python_background_mcc_plt00050',
17-
do_particles=True, rtol=7.5e-2
17+
do_particles=True, rtol=2.5e-3
1818
)

Examples/Physics_applications/capacitive_discharge/inputs_2d

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Input file for MCC testing. This runs an eighth of a voltage input period
22
# of the first benchmark case of Turner et al. (2013).
33

4+
my_constants.Ngas = 9.64e+20 # m^-3
5+
my_constants.Tgas = 300 # K
6+
my_constants.Nplasma = 2.56e14 # m^-3
7+
my_constants.freq = 13.56e6 # Hz
8+
my_constants.Mion = 6.67e-27 # kg
9+
410
max_step = 50
511
warpx.verbose = 0
6-
warpx.const_dt = 1.8436578171091445e-10
12+
warpx.const_dt = 1.0/(400*freq)
713
warpx.do_electrostatic = labframe
814
warpx.self_fields_required_precision = 1e-06
915
warpx.use_filter = 0
@@ -18,56 +24,44 @@ geometry.prob_hi = 0.067 0.0041875
1824

1925
boundary.field_lo = pec periodic
2026
boundary.field_hi = pec periodic
21-
boundary.potential_hi_x = 450.0*sin(2*pi*13.56e6*t)
27+
boundary.potential_hi_x = 450.0*sin(2*pi*freq*t)
2228

2329
# Order of particle shape factors
2430
algo.particle_shape = 1
2531

2632
particles.species_names = electrons he_ions
27-
electrons.mass = m_e
28-
electrons.charge = -q_e
33+
electrons.species_type = electron
2934
electrons.injection_style = nuniformpercell
3035
electrons.initialize_self_fields = 0
3136
electrons.num_particles_per_cell_each_dim = 32 16
3237
electrons.profile = constant
33-
electrons.density = 2.56e14
34-
electrons.momentum_distribution_type = gaussian
35-
electrons.ux_m = 0.0
36-
electrons.uy_m = 0.0
37-
electrons.uz_m = 0.0
38-
electrons.ux_th = 0.0022492462021094224
39-
electrons.uy_th = 0.0022492462021094224
40-
electrons.uz_th = 0.0022492462021094224
38+
electrons.density = Nplasma
39+
electrons.momentum_distribution_type = maxwell_boltzmann
40+
electrons.theta = (kb*30000/(m_e*clight^2))
4141

42-
he_ions.mass = 6.67e-27
42+
he_ions.species_type = helium
4343
he_ions.charge = q_e
4444
he_ions.injection_style = nuniformpercell
4545
he_ions.initialize_self_fields = 0
4646
he_ions.num_particles_per_cell_each_dim = 32 16
4747
he_ions.profile = constant
48-
he_ions.density = 2.56e14
49-
he_ions.momentum_distribution_type = gaussian
50-
he_ions.ux_m = 0.0
51-
he_ions.uy_m = 0.0
52-
he_ions.uz_m = 0.0
53-
he_ions.ux_th = 2.6332116917541573e-06
54-
he_ions.uy_th = 2.6332116917541573e-06
55-
he_ions.uz_th = 2.6332116917541573e-06
48+
he_ions.density = Nplasma
49+
he_ions.momentum_distribution_type = maxwell_boltzmann
50+
he_ions.theta = (kb*Tgas/(Mion*clight^2))
5651

5752
collisions.collision_names = coll_elec coll_ion
5853
coll_ion.type = background_mcc
5954
coll_ion.species = he_ions
60-
coll_ion.background_density = 9.64e+20
61-
coll_ion.background_temperature = 300
55+
coll_ion.background_density = Ngas
56+
coll_ion.background_temperature = Tgas
6257
coll_ion.scattering_processes = elastic back
6358
coll_ion.elastic_cross_section = ../../../../warpx-data/MCC_cross_sections/He/ion_scattering.dat
6459
coll_ion.back_cross_section = ../../../../warpx-data/MCC_cross_sections/He/ion_back_scatter.dat
6560

6661
coll_elec.type = background_mcc
6762
coll_elec.species = electrons
68-
coll_elec.background_density = 9.64e+20
69-
coll_elec.background_temperature = 300
70-
coll_elec.background_mass = 6.67e-27
63+
coll_elec.background_density = Ngas
64+
coll_elec.background_temperature = Tgas
7165
coll_elec.scattering_processes = elastic excitation1 excitation2 ionization
7266
coll_elec.elastic_cross_section = ../../../../warpx-data/MCC_cross_sections/He/electron_scattering.dat
7367
coll_elec.excitation1_energy = 19.82

Examples/Tests/embedded_circle/inputs_2d

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This is a 2D electrostatic simulation containing a circle embedded boundary at
2-
# the center of the grid domain, pre -seeded with equal density of argon ions
2+
# the center of the grid domain, pre-seeded with equal density of argon ions
33
# and electrons.
44

55
max_step = 11
@@ -28,24 +28,19 @@ boundary.particle_hi = absorbing periodic
2828
algo.particle_shape = 1
2929

3030
particles.species_names = electrons ar_ions
31-
electrons.mass = m_e
32-
electrons.charge = -q_e
31+
electrons.species_type = electron
3332
electrons.injection_style = nuniformpercell
3433
electrons.initialize_self_fields = 1
3534
electrons.num_particles_per_cell_each_dim = 2 2
3635
electrons.density = 10.2e16
37-
electrons.momentum_distribution_type = gaussian
3836
electrons.profile = constant
39-
electrons.ux_m = 0.0
40-
electrons.uy_m = 0.0
41-
electrons.uz_m = 0.0
42-
electrons.ux_th = 0.0022492462021094224
43-
electrons.uy_th = 0.0022492462021094224
44-
electrons.uz_th = 0.0022492462021094224
37+
electrons.momentum_distribution_type = maxwell_boltzmann
38+
electrons.theta = (kb*30000/(m_e*clight^2))
4539
electrons.save_particles_at_zlo = 1
4640
electrons.save_particles_at_zhi = 1
4741
electrons.save_particles_at_eb = 1
48-
ar_ions.mass = 6.633520326333601e-26
42+
43+
ar_ions.species_type = argon
4944
ar_ions.charge = q_e
5045
ar_ions.injection_style = nuniformpercell
5146
ar_ions.initialize_self_fields = 1
@@ -66,9 +61,8 @@ ar_ions.save_particles_at_eb = 1
6661
collisions.collision_names = coll_electrons coll_ar_ions
6762
coll_electrons.type = background_mcc
6863
coll_electrons.species = electrons
69-
coll_electrons.background_density = 2.1458888524486985e+23
70-
coll_electrons.background_temperature = 450.00000000000006
71-
coll_electrons.background_mass = 6.633520326333601e-26
64+
coll_electrons.background_density = 2.15e+23
65+
coll_electrons.background_temperature = 450
7266
coll_electrons.scattering_processes = excitation1 elastic ionization
7367
coll_electrons.excitation1_cross_section = ../../../../warpx-data/MCC_cross_sections/Ar/excitation_1.dat
7468
coll_electrons.excitation1_energy = 11.5
@@ -78,8 +72,8 @@ coll_electrons.ionization_energy = 15.7596112
7872
coll_electrons.ionization_species = ar_ions
7973
coll_ar_ions.type = background_mcc
8074
coll_ar_ions.species = ar_ions
81-
coll_ar_ions.background_density = 2.1458888524486985e+23
82-
coll_ar_ions.background_temperature = 450.00000000000006
75+
coll_ar_ions.background_density = 2.15e+23
76+
coll_ar_ions.background_temperature = 450
8377
coll_ar_ions.scattering_processes = back elastic charge_exchange
8478
coll_ar_ions.back_cross_section = ../../../../warpx-data/MCC_cross_sections/Ar/ion_back_scatter.dat
8579
coll_ar_ions.elastic_cross_section = ../../../../warpx-data/MCC_cross_sections/Ar/ion_scattering.dat
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"electrons": {
3-
"particle_cpu": 190617.0,
4-
"particle_id": 58601432186.0,
5-
"particle_momentum_x": 1.008747465656768e-18,
6-
"particle_momentum_y": 2.799754668819323e-19,
7-
"particle_momentum_z": 2.792680383829936e-19,
8-
"particle_position_x": 17149.64926526631,
9-
"particle_position_y": 940.0852322133724,
10-
"particle_weight": 61513602111.81641
3+
"particle_cpu": 190805.0,
4+
"particle_id": 58572159554.0,
5+
"particle_momentum_x": 1.0096555379894353e-18,
6+
"particle_momentum_y": 2.792308861947816e-19,
7+
"particle_momentum_z": 2.7912608371353956e-19,
8+
"particle_position_x": 17158.992965684767,
9+
"particle_position_y": 941.2938975939338,
10+
"particle_weight": 61532370208.74024
1111
},
1212
"he_ions": {
13-
"particle_cpu": 262683.0,
14-
"particle_id": 206652536825.0,
15-
"particle_momentum_x": 2.843447398515225e-18,
16-
"particle_momentum_y": 2.206898408374442e-18,
17-
"particle_momentum_z": 2.20679498286358e-18,
18-
"particle_position_x": 17598.68900871454,
19-
"particle_position_y": 1099.660397150414,
20-
"particle_weight": 71950444915.7715
13+
"particle_cpu": 262726.0,
14+
"particle_id": 206636597294.0,
15+
"particle_momentum_x": 2.8337541918025354e-18,
16+
"particle_momentum_y": 2.194599746445289e-18,
17+
"particle_momentum_z": 2.1971043484994987e-18,
18+
"particle_position_x": 17599.236953657848,
19+
"particle_position_y": 1099.5894721489742,
20+
"particle_weight": 71945924133.3008
2121
},
2222
"lev=0": {
23-
"rho_electrons": 0.03589657270088979,
24-
"rho_he_ions": 0.04191032436797355
23+
"rho_electrons": 0.03590777765584312,
24+
"rho_he_ions": 0.041907813459370793
2525
}
2626
}
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"ar_ions": {
3-
"particle_cpu": 31740.0,
4-
"particle_id": 3219770578.0,
5-
"particle_momentum_x": 2.661332598290843e-18,
6-
"particle_momentum_y": 2.6484537197836753e-18,
7-
"particle_momentum_z": 2.6446763485694346e-18,
8-
"particle_position_x": 3.174118714858889,
9-
"particle_position_y": 3.174074331596828,
10-
"particle_weight": 988031616.2109375
3+
"particle_cpu": 31744.0,
4+
"particle_id": 3220043046.0,
5+
"particle_momentum_x": 2.673023392216285e-18,
6+
"particle_momentum_y": 2.6733267061000188e-18,
7+
"particle_momentum_z": 2.667060599749979e-18,
8+
"particle_position_x": 3.1743018682048367,
9+
"particle_position_y": 3.1742959462007088,
10+
"particle_weight": 988093872.0703125
1111
},
1212
"electrons": {
13-
"particle_cpu": 30737.0,
14-
"particle_id": 1041042475.0,
15-
"particle_momentum_x": 3.014851468379113e-20,
16-
"particle_momentum_y": 3.016132024233842e-20,
17-
"particle_momentum_z": 3.0169481587733156e-20,
18-
"particle_position_x": 3.0760407489559514,
19-
"particle_position_y": 3.072305059445631,
20-
"particle_weight": 956794738.7695312
13+
"particle_cpu": 30724.0,
14+
"particle_id": 1040144086.0,
15+
"particle_momentum_x": 2.991377867057318e-20,
16+
"particle_momentum_y": 3.014091741533624e-20,
17+
"particle_momentum_z": 3.022811783218703e-20,
18+
"particle_position_x": 3.0722092755241888,
19+
"particle_position_y": 3.072232836690298,
20+
"particle_weight": 956467895.5078125
2121
},
2222
"lev=0": {
23-
"phi": 56888.72655917703,
24-
"rho_ar_ions": 257.78992245244984,
25-
"rho_electrons": 250.2854445348176
23+
"phi": 56898.52308944405,
24+
"rho_ar_ions": 257.80642870099507,
25+
"rho_electrons": 250.17704417223325
2626
}
2727
}

0 commit comments

Comments
 (0)