Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSMC: Add impact ionization #5654

Open
wants to merge 40 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7890b50
Activate DMSC for ionization
RemiLehe Oct 10, 2024
9b11492
Read name of the ionization species
RemiLehe Oct 11, 2024
1ac2c44
Create ionization executors
RemiLehe Oct 11, 2024
014fded
Move ionization into the same vector as the other processes
RemiLehe Oct 11, 2024
202fab0
Update number of collisions
RemiLehe Oct 11, 2024
f6a3d80
Fix test: use electrons
RemiLehe Oct 11, 2024
b291097
Attempt to generalize DSMC
RemiLehe Oct 11, 2024
12a5de4
Outline implementation
RemiLehe Oct 11, 2024
b5ebe92
Continue outline
RemiLehe Oct 11, 2024
c024977
Implement creation of products of ionization
RemiLehe Oct 11, 2024
cfc9a9b
Modify velocity of the electron
RemiLehe Oct 11, 2024
d29b23f
Fix compilation errors
RemiLehe Oct 11, 2024
4638112
Merge branch 'development' into ionization_dsmc
RemiLehe Dec 3, 2024
3b2001a
Update Source/Particles/Collision/BinaryCollision/DSMC/SplitAndScatte…
RemiLehe Dec 12, 2024
aa9ab75
Update Source/Particles/Collision/BinaryCollision/BinaryCollision.H
RemiLehe Dec 16, 2024
55e0a7d
Merge branch 'development' into ionization_dsmc
RemiLehe Dec 18, 2024
5e28a12
Merge branch 'ionization_dsmc' of github.com:RemiLehe/WarpX into ioni…
RemiLehe Dec 18, 2024
1b1f158
Added ionization_dsmc CI test
oshapoval Dec 20, 2024
0b7be80
Clean-up
oshapoval Dec 20, 2024
36578a5
Merge remote-tracking branch 'origin/development' into ionization_dsm…
oshapoval Dec 20, 2024
ac4b357
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 20, 2024
5f9aae5
Updated CI: splited checksum analysis from test analysis
oshapoval Dec 20, 2024
ee07159
Merge branch 'ionization_dsmc' of https://github.com/RemiLehe/WarpX i…
oshapoval Dec 20, 2024
0073b1c
Merge branch 'ionization_dsmc_ci' into HEAD
oshapoval Dec 20, 2024
a912445
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 20, 2024
22bc06e
Add link to default regression analysis script
oshapoval Dec 20, 2024
d5c1b77
Remove duplicate function from analysis script
oshapoval Dec 20, 2024
e21b1c5
Updated benchmarks for ionization_dsmc CI test
oshapoval Dec 20, 2024
106a22f
Revert CI test
RemiLehe Dec 20, 2024
c51fc58
Fix clang issues
RemiLehe Dec 20, 2024
857c99f
Remove the created neutral particle
RemiLehe Dec 20, 2024
0150519
Merge remote-tracking branch 'upstream/development' into dsmc_ionization
roelof-groenewald Feb 10, 2025
ab34229
some more progress on DSMC impact ionization
roelof-groenewald Feb 10, 2025
1995ae3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Feb 11, 2025
d045dc1
update DSMC ionization test with new input parameters
roelof-groenewald Feb 11, 2025
82a47b5
use DSMC ionization in DSMC version of capacitive discharge test
roelof-groenewald Feb 11, 2025
b100ca5
ensure momentum conservation during ionization scattering
roelof-groenewald Feb 12, 2025
cffe860
fix CI tests; update checksums
roelof-groenewald Feb 12, 2025
9ce073c
address clang-tidy issues
roelof-groenewald Feb 12, 2025
0e35924
second attempt to fix clang-tidy issue
roelof-groenewald Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions Examples/Physics_applications/capacitive_discharge/analysis_dsmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@

# fmt: off
ref_density = np.array([
1.27942709e+14, 2.23579371e+14, 2.55384387e+14, 2.55660663e+14,
2.55830911e+14, 2.55814337e+14, 2.55798906e+14, 2.55744891e+14,
2.55915585e+14, 2.56083194e+14, 2.55942354e+14, 2.55833026e+14,
2.56036175e+14, 2.56234141e+14, 2.56196179e+14, 2.56146141e+14,
2.56168022e+14, 2.56216909e+14, 2.56119961e+14, 2.56065167e+14,
2.56194764e+14, 2.56416398e+14, 2.56465239e+14, 2.56234337e+14,
2.56234503e+14, 2.56316003e+14, 2.56175023e+14, 2.56030269e+14,
2.56189301e+14, 2.56286379e+14, 2.56130396e+14, 2.56295225e+14,
2.56474082e+14, 2.56340375e+14, 2.56350864e+14, 2.56462330e+14,
2.56469391e+14, 2.56412726e+14, 2.56241788e+14, 2.56355650e+14,
2.56650599e+14, 2.56674748e+14, 2.56642480e+14, 2.56823508e+14,
2.57025029e+14, 2.57110614e+14, 2.57042364e+14, 2.56950884e+14,
2.57051822e+14, 2.56952148e+14, 2.56684016e+14, 2.56481130e+14,
2.56277073e+14, 2.56065774e+14, 2.56190033e+14, 2.56411074e+14,
2.56202418e+14, 2.56128368e+14, 2.56227002e+14, 2.56083004e+14,
2.56056768e+14, 2.56343831e+14, 2.56443659e+14, 2.56280541e+14,
2.56191572e+14, 2.56147304e+14, 2.56342794e+14, 2.56735473e+14,
2.56994680e+14, 2.56901500e+14, 2.56527131e+14, 2.56490824e+14,
2.56614730e+14, 2.56382744e+14, 2.56588214e+14, 2.57160270e+14,
2.57230435e+14, 2.57116530e+14, 2.57065771e+14, 2.57236507e+14,
2.57112865e+14, 2.56540177e+14, 2.56416828e+14, 2.56648954e+14,
2.56625594e+14, 2.56411003e+14, 2.56523754e+14, 2.56841108e+14,
2.56856368e+14, 2.56757912e+14, 2.56895134e+14, 2.57144419e+14,
2.57001944e+14, 2.56371759e+14, 2.56179404e+14, 2.56541905e+14,
2.56715727e+14, 2.56851681e+14, 2.57114458e+14, 2.57001739e+14,
2.56825690e+14, 2.56879682e+14, 2.56699673e+14, 2.56532841e+14,
2.56479582e+14, 2.56630989e+14, 2.56885996e+14, 2.56694637e+14,
2.56250819e+14, 2.56045278e+14, 2.56366075e+14, 2.56693733e+14,
2.56618530e+14, 2.56580918e+14, 2.56812781e+14, 2.56754216e+14,
2.56444736e+14, 2.56473391e+14, 2.56538398e+14, 2.56626551e+14,
2.56471950e+14, 2.56274969e+14, 2.56489423e+14, 2.56645266e+14,
2.56611124e+14, 2.56344324e+14, 2.56244156e+14, 2.24183727e+14,
1.27909856e+14
1.27939695e+14, 2.23589080e+14, 2.55400046e+14, 2.55652603e+14,
2.55810704e+14, 2.55816145e+14, 2.55810457e+14, 2.55743643e+14,
2.55908052e+14, 2.56076623e+14, 2.55948081e+14, 2.55841574e+14,
2.56029524e+14, 2.56320511e+14, 2.56608595e+14, 2.56755504e+14,
2.56699377e+14, 2.56700767e+14, 2.56497253e+14, 2.56481560e+14,
2.56832303e+14, 2.57064841e+14, 2.57023000e+14, 2.56614315e+14,
2.56368670e+14, 2.56370666e+14, 2.56227710e+14, 2.56240281e+14,
2.56673842e+14, 2.56837209e+14, 2.56625623e+14, 2.56729845e+14,
2.56975973e+14, 2.56801701e+14, 2.56491181e+14, 2.56516559e+14,
2.56468688e+14, 2.56251727e+14, 2.56243466e+14, 2.56484137e+14,
2.56637978e+14, 2.56448971e+14, 2.56140684e+14, 2.56117358e+14,
2.56274706e+14, 2.56233588e+14, 2.56047578e+14, 2.56087060e+14,
2.56365128e+14, 2.56357745e+14, 2.56269776e+14, 2.56419914e+14,
2.56392856e+14, 2.56202826e+14, 2.56363244e+14, 2.56572545e+14,
2.56351695e+14, 2.56393353e+14, 2.56759784e+14, 2.56767115e+14,
2.56700246e+14, 2.56618056e+14, 2.56234915e+14, 2.56237788e+14,
2.56606031e+14, 2.56520133e+14, 2.56316818e+14, 2.56184858e+14,
2.56246807e+14, 2.56626394e+14, 2.56747253e+14, 2.56630112e+14,
2.56518940e+14, 2.56358089e+14, 2.56249884e+14, 2.56271535e+14,
2.56420396e+14, 2.56704340e+14, 2.56912250e+14, 2.56823163e+14,
2.56694985e+14, 2.56822690e+14, 2.56736406e+14, 2.56438911e+14,
2.56359312e+14, 2.56356028e+14, 2.56415261e+14, 2.56408702e+14,
2.56267048e+14, 2.56274807e+14, 2.56494202e+14, 2.56789842e+14,
2.56939719e+14, 2.56875327e+14, 2.56831776e+14, 2.56827482e+14,
2.56698383e+14, 2.56712727e+14, 2.56879409e+14, 2.56629297e+14,
2.56322165e+14, 2.56377317e+14, 2.56277894e+14, 2.56112364e+14,
2.56171697e+14, 2.56370929e+14, 2.56855124e+14, 2.57621107e+14,
2.57656000e+14, 2.56760729e+14, 2.56449741e+14, 2.56716250e+14,
2.56721224e+14, 2.56506121e+14, 2.56236691e+14, 2.56270200e+14,
2.56745053e+14, 2.56940581e+14, 2.56539958e+14, 2.56403313e+14,
2.56600509e+14, 2.56776206e+14, 2.56884434e+14, 2.56755321e+14,
2.56558818e+14, 2.56400159e+14, 2.56223931e+14, 2.23879043e+14,
1.27601051e+14
])
# fmt: on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,32 +268,55 @@ def setup_run(self):
#######################################################################

cross_sec_direc = "../../../../warpx-data/MCC_cross_sections/He/"
electron_colls = picmi.MCCCollisions(
name="coll_elec",
species=self.electrons,
background_density=self.gas_density,
background_temperature=self.gas_temp,
background_mass=self.ions.mass,
ndt=self.mcc_subcycling_steps,
scattering_processes={
"elastic": {
"cross_section": cross_sec_direc + "electron_scattering.dat"
},
"excitation1": {
"cross_section": cross_sec_direc + "excitation_1.dat",
"energy": 19.82,
},
"excitation2": {
"cross_section": cross_sec_direc + "excitation_2.dat",
"energy": 20.61,
},
"ionization": {
"cross_section": cross_sec_direc + "ionization.dat",
"energy": 24.55,
"species": self.ions,
},

electron_scattering_processes = {
"elastic": {"cross_section": cross_sec_direc + "electron_scattering.dat"},
"excitation1": {
"cross_section": cross_sec_direc + "excitation_1.dat",
"energy": 19.82,
},
)
"excitation2": {
"cross_section": cross_sec_direc + "excitation_2.dat",
"energy": 20.61,
},
"ionization": {
"cross_section": cross_sec_direc + "ionization.dat",
"energy": 24.55,
"species": self.ions,
},
}
if self.dsmc:
ionization = {"ionization": electron_scattering_processes.pop("ionization")}
ionization["ionization"]["target_species"] = self.neutrals
ionization["ionization"].pop("species")
electron_colls_dsmc = picmi.DSMCCollisions(
name="coll_elec_dsmc",
species=[self.electrons, self.neutrals],
product_species=[self.ions, self.electrons],
ndt=4,
scattering_processes=ionization,
)
electron_colls_mcc = picmi.MCCCollisions(
name="coll_elec",
species=self.electrons,
background_density=self.gas_density,
background_temperature=self.gas_temp,
background_mass=self.ions.mass,
ndt=self.mcc_subcycling_steps,
scattering_processes=electron_scattering_processes,
)
electron_colls = [electron_colls_mcc, electron_colls_dsmc]
else:
electron_colls_mcc = picmi.MCCCollisions(
name="coll_elec",
species=self.electrons,
background_density=self.gas_density,
background_temperature=self.gas_temp,
background_mass=self.ions.mass,
ndt=self.mcc_subcycling_steps,
scattering_processes=electron_scattering_processes,
)
electron_colls = [electron_colls_mcc]

ion_scattering_processes = {
"elastic": {"cross_section": cross_sec_direc + "ion_scattering.dat"},
Expand All @@ -316,6 +339,7 @@ def setup_run(self):
ndt=self.mcc_subcycling_steps,
scattering_processes=ion_scattering_processes,
)
ion_colls = [ion_colls]

#######################################################################
# Initialize simulation #
Expand All @@ -325,7 +349,7 @@ def setup_run(self):
solver=self.solver,
time_step_size=self.dt,
max_steps=self.max_steps,
warpx_collisions=[electron_colls, ion_colls],
warpx_collisions=electron_colls + ion_colls,
verbose=self.test,
)
self.solver.sim = self.sim
Expand Down
1 change: 1 addition & 0 deletions Examples/Tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ add_subdirectory(gaussian_beam)
add_subdirectory(implicit)
add_subdirectory(initial_distribution)
add_subdirectory(initial_plasma_profile)
add_subdirectory(ionization_dsmc)
add_subdirectory(field_ionization)
add_subdirectory(ion_stopping)
add_subdirectory(langmuir)
Expand Down
12 changes: 12 additions & 0 deletions Examples/Tests/ionization_dsmc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Add tests (alphabetical order) ##############################################
#

add_warpx_test(
test_3d_ionization_dsmc # name
3 # dims
2 # nprocs
inputs_test_3d_ionization_dsmc # inputs
"analysis_ionization_dsmc_3d.py" # analysis
"analysis_default_regression.py --path diags/diag1000250" # checksum
OFF # dependency
)
Loading
Loading