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

Fix bug with DSMC collisions in RZ #5622

Merged

Conversation

roelof-groenewald
Copy link
Member

I realized there is a bug in the DSMC module for RZ geometry where the velocity vectors for the colliding pair was not rotated so that a proper center-of-momentum calculation could be done. This PR fixes the bug.

To check that the fix in this PR works, I compared the azimuthal velocity distribution for energetic ions created from NBI with finite impact parameter (such that a net rotation should be imparted on the ions), when simulated in 3d versus RZ:

3d result:
image

RZ result:
image

@roelof-groenewald roelof-groenewald added bug Something isn't working bug: affects latest release Bug also exists in latest release version component: collisions Anything related to particle collisions labels Jan 31, 2025
@ax3l ax3l added the geometry: RZ axisymmetric 2D and quasi-3D label Feb 4, 2025
Copy link
Contributor

@JustinRayAngus JustinRayAngus left a comment

Choose a reason for hiding this comment

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

Good catch!. The changes look good to me.

@JustinRayAngus JustinRayAngus merged commit 57f6317 into ECP-WarpX:development Feb 4, 2025
35 of 37 checks passed
@roelof-groenewald roelof-groenewald deleted the bugfix/rz_dsmc branch February 4, 2025 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version bug Something isn't working component: collisions Anything related to particle collisions geometry: RZ axisymmetric 2D and quasi-3D
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants