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

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.

1 participant