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

Nuclear fusion algorithm modifications #5133

Merged
merged 10 commits into from
Aug 18, 2024

Conversation

JustinRayAngus
Copy link
Contributor

@JustinRayAngus JustinRayAngus commented Aug 13, 2024

This PR makes changes to the Nuclear Fusion algorithm that allows for better control of the particle weights.

The current implentation uses an effective fusion_multiplier equal to max(NA,NB)/min(NA,NB), where NA and NB are, respectively, the number of macro-particles in a cell for species A and species B. The probability of a collision is enhanced by Nmax/Nmin, and the weight of the fusion products is decreased by the same factor to keep the physical number of particles created correct. This implementation does not permit maintaining equally-weighted particles for the incident species.

The new implementation introduced in this PR only uses the fusion_multiplier specified in the input file. If that value is set to 1, and the particles are equally-weighted, then the particles of the colliding species will remain equally-weighted.

Below are results from a mono-energetic Deuterium beam incident on a cold stationary Tritium background. The density of the beam is 10X less than the stationary Tritium background. The number of particles per cell for the deuterium beam is 160 and that for the tritium background is 1600. Thus, the particles have equal weights initially. The total weight of deuterium particles decays exponentially for this problem.

Results using this PR (fusion branch) with fusion_multiplier = 1 is shown in the top right panel. It agrees with the analytic solution until the number of macro particle becomes close to zero. Results from the new branch with fusion_multiplier = 10 (lower left) are identical to results obtained using the development branch (upper left) with fusion_multiplier = 1.

The total number of macro particles in the simulation, shown in the lower right panel of the figure, remains roughly fixed using this PR with fusion_multiplier = 1. The only reason it is not strictly fixed is because the alpha particle produced in the fusion reaction is split into two to maintain local charge conservation.

development_vs_fusion_4x4

@JustinRayAngus JustinRayAngus requested a review from ax3l August 13, 2024 05:47
@JustinRayAngus JustinRayAngus added the component: collisions Anything related to particle collisions label Aug 13, 2024
@roelof-groenewald
Copy link
Member

roelof-groenewald commented Aug 14, 2024

Besides the checksum values the pB11 test checks several aspects of the fusion products against theory, so the checksum values can be reset without worry and if the rest of the analysis for that test passes it would be further motivation that the collision statistics are correct.

roelof-groenewald added a commit to roelof-groenewald/WarpX that referenced this pull request Aug 14, 2024
@JustinRayAngus JustinRayAngus force-pushed the fusion branch 3 times, most recently from 29e7959 to c36b44b Compare August 16, 2024 21:53
Copy link
Member

@roelof-groenewald roelof-groenewald left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the algorithm upgrades!

@roelof-groenewald roelof-groenewald merged commit bb7d243 into ECP-WarpX:development Aug 18, 2024
47 checks passed
ax3l pushed a commit that referenced this pull request Aug 19, 2024
* initial changes to reaction weight calculation following #5133

* remove weight reduction logic in `SplitAndScatterFunc.H`

Signed-off-by: roelof-groenewald <regroenewald@gmail.com>

* update 1d DSMC example to be runable on NVIDIA GPU (uses `cupy`)

* add `m_isSameSpecies` member variable to `DSMCFunc`; reduce code duplication

* reset DSMC test checksum values

---------

Signed-off-by: roelof-groenewald <regroenewald@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: collisions Anything related to particle collisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants