WarpX icon indicating copy to clipboard operation
WarpX copied to clipboard

Use `BinaryCollision` instance for DSMC with custom collision functor

Open roelof-groenewald opened this issue 1 year ago • 0 comments

Currently Coulomb collisions and nuclear fusion are handled as instances of the BinaryCollision class with special CollisionFunctorTypes and CopyTransformFunctorTypes used to initialize the BinaryCollision class in each collision instance (different fusion reactions for example). In contrast, DSMC is handled through an instance of the special class DSMC.

It would be good to have the overlapping functionality used for all binary collisions.

The "issue" we currently face in having DSMC use the same approach as the other binary collisions is the following. The way BinaryCollision is currently set up it assumes two distinct types of collisions:

  1. Collisions that do not produce any product species but simply alter the momentum of the colliding particles (ex. Coulomb collisions).
  2. Collisions that consume the colliding particles and create products (ex. p + B -> 3 \alpha).

The DSMC collisions generally land in a third category where the mismatch between weights of the colliding particles require the splitting of the higher weight particle, and therefore, DSMC collisions require the copying of at least one of the incoming particles even though that particle is not a product of the collision.

We can deal with this in a number of ways.

  1. Merge the "new" particle with the "old" one immediately after scattering thereby avoiding the need to copy one of the colliding particles.
  2. Expand the BinaryCollision class to handle splitting of uneven weight colliding pairs.
  3. ...

roelof-groenewald avatar Feb 26 '24 06:02 roelof-groenewald