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

[WIP] Add support for electron impact ionization in binary collisions (DSMC module) #5388

Draft
wants to merge 12 commits into
base: development
Choose a base branch
from

Conversation

RemiLehe
Copy link
Member

@RemiLehe RemiLehe commented Oct 11, 2024

Note: could we do binary charge exchange in the same way?

TODO:

  • Use the proper energy cost: store the energy cost in the SplitAndScatter functor
  • Add a dedicated test for DSMC ionization
  • Add support for excitation in DSMC (right now, it prevents us from running the capacitive discharge)
  • Test on GPU
  • Check physics, esp. assumptions on the velocity of the indident electron after scattering.

// Product species include the ion
// TODO: as an alternative, we could use the runtime attribute `ionization_level` for this species
m_num_product_species = 3;
m_num_products_host.push_back(2); // electron species:
Copy link
Member Author

@RemiLehe RemiLehe Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I attempted to fit impact ionization within the DSMC framework, but I now realize that this is making the book keeping complicated:

The amount of memory to be allocated (in SplitAndScatter) after the first pass (Executor, that checks which type of reaction is occurring for each pair) will depend on the type of reaction for each pair. (Because, if a pair does impact ionization, we need to allocate space for the scattered electron, the produced electron and the ionized species, whereas if a pair does one of the other reactions, we allocate space only for the scattered electron and the scattered target.) As a consequence, the offset (in SplitAndScatter will depend on the type of reaction.)

To simplify things, here I will always allocate space for the ionized species and the new electron, but if the reaction is not impact ionization, I will set the ID of the ionized species and the new electron to invalid.

@RemiLehe RemiLehe marked this pull request as ready for review October 11, 2024 19:38
@RemiLehe RemiLehe marked this pull request as draft October 11, 2024 19:45
auto& e_ux1 = soa_products_data[0].m_rdata[PIdx::ux][product1_index+1];
auto& e_uy1 = soa_products_data[0].m_rdata[PIdx::uy][product1_index+1];
auto& e_uz1 = soa_products_data[0].m_rdata[PIdx::uz][product1_index+1];
ParticleUtils::RandomizeVelocity(e_ux1, e_uy1, e_uz1, up, engine);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to do the transform back to labframe for e_u

@archermarx
Copy link
Contributor

archermarx commented Oct 23, 2024

I've written a test script for this feature (attached)
picmi.py.txt

It should work with both MCC and DSMC, once everything is implemented

In brief, this script sets up a simulation of electrons, ions, and neutrals in a periodic box. Ionization is then allowed to happen for a short time, and the resulting electron density and temperature curves are compared to the output of very simple global model, the equations of which are given below:

image

Here, $\epsilon_{iz}$ is the ionization energy and $k_{iz}$ is the ionization rate coefficient, which the script computes by integrating over the provided cross sections (i.e. those from https://github.com/ECP-WarpX/warpx-data/tree/master/MCC_cross_sections/Xe)


At present, this segfaults when using DSMC after O(10-20) iterations, but completes when using MCC. When MCC is enabled, the global model neglects the depletion of neutrals. Some results obtained when using Xenon at a few electron temperatures, are given below

$T_e$ = 10 eV

Untitled

$T_e$ = 30 eV

Untitled

$T_e$ = 50 eV

Untitled


Overall, the results are close, but seem to be off from the global model in a consistent manner -- namely that WarpX ionizes less than the global model predicts that it should. The relative discrepancy gets smaller as the temperature increases but the absolute value of the temperature difference between the model and WarpX is roughtly constant. I'd appreciate some extra eyes on this to make sure both my physics or my WarpX set up are correct. The script runs fast (~11 seconds on my machine), so hopefully it will be useful for debugging the DSMC implementation. Once energy loss and excitation are added, I can update the script to incorporate those as well.

@jwestern
Copy link
Contributor

Could this functionality be extended to do recombination? Even resulting in the deletion of the recombination product (i.e. back into the neutral "background" gas).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants