-
Notifications
You must be signed in to change notification settings - Fork 196
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
base: development
Are you sure you want to change the base?
Conversation
// 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: |
There was a problem hiding this comment.
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.
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); |
There was a problem hiding this comment.
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
I've written a test script for this feature (attached) 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: Here, 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
|
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). |
Note: could we do binary charge exchange in the same way?
TODO:
SplitAndScatter
functor