Skip to content

Conversation

FilipO28555
Copy link
Contributor

@FilipO28555 FilipO28555 commented Sep 18, 2025

This extension is based on papers:
Wu et al
PIC code Chicago
Cannoni
Cross section parametrization:
Bosh, Hale

There is now documentation.

Code flow:

                                                               ┌ IntraCollision.hpp (not yet tested/included - will be in the next PR)
simulation.hpp -> Fusion.x.cpp -> Collider.hpp -> WithPeer.hpp ┤
                                                               └ InterCollision.hpp

Struct InterCollision{} is a combination of algorithm from Collision Extension and Creation Kernel.

                   uses: (particles/fusion/detail) 
InterCollision.hpp --------------------------------> FusionFunctor.hpp -> FusionAlgorithm.hpp

FusionAlgorithm.hpp decides if fusion happens and chooses momenta of new particles.

The setup that works and tests this extension is at: Fusion_Setups/DT-nHe_hal8999

Some preliminary results:
Results/predicted_vs_measured_by_ppc.png
Results/predicted_vs_measured_by_ppc.png

To do in consecutive PRs:

  • Add ci test
  • Add intra-species fusion
  • More cross-section interpolators

@FilipO28555 FilipO28555 changed the title Add fusion implementation similar to: doi.org/10.1063/5.0051178 Fusion Extension implementation - inter-species Sep 18, 2025
@pordyna
Copy link
Member

pordyna commented Sep 19, 2025

Right now this reuses a lot of collision code simply by copying files and also somewhat modifying them. We should unify this, for example, by generalizing the collision kernels. I'm not sure if this should happen before this is merged. @psychocoderHPC what do you think?

@psychocoderHPC
Copy link
Member

Right now this reuses a lot of collision code simply by copying files and also somewhat modifying them. We should unify this, for example, by generalizing the collision kernels. I'm not sure if this should happen before this is merged. @psychocoderHPC what do you think?

we should keep the code first seperate, after merging we have a baseline to validate if we break something. Than we should check what we can unify.
This way requires that we not stop after after it is merged.
Before next week I am most likely not possible to look into this pr.

@BrianMarre
Copy link
Member

@FilipO28555 the CI is still complaining that some source code files are marked as executable, for example,

  • include/picongpu/particles/fusion/detail/ListEntry.hpp
  • include/picongpu/particles/fusion/WithPeer.hpp

only binaries and scripts should be marked as executable, please follow the directions in the CI-job output on how to fix this.

@FilipO28555 FilipO28555 force-pushed the Fusion_interSpecies branch 10 times, most recently from b4a96a1 to 8d7b95a Compare September 26, 2025 16:22
ikbuibui and others added 3 commits September 26, 2025 18:36
Features:
 - binary fusion reactions between two different species
 - choosing product weights depending on particles masses and charge.
 - documentation
@FilipO28555 FilipO28555 force-pushed the Fusion_interSpecies branch 7 times, most recently from 726bc87 to cc1c49c Compare September 26, 2025 18:39
@FilipO28555 FilipO28555 force-pushed the Fusion_interSpecies branch 2 times, most recently from 6af6166 to b23ee4d Compare September 26, 2025 19:20
Copy link
Member

@PrometheusPi PrometheusPi left a comment

Choose a reason for hiding this comment

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

@FilipO28555 This is not yet a full review, but it would be great if you remove unused /comment-out code so that the number of added files gets less scary (right now it's 3.5k lines)

* parameterization from experimental data.
* Source: https://hdl.handle.net/11858/00-001M-0000-0027-6535-1 (page 29)
*/
// struct DT
Copy link
Member

Choose a reason for hiding this comment

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

Please remove uncommented /unused code

Copy link
Contributor

Choose a reason for hiding this comment

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

One option if you want to keep this code is to add it as an example and activate it. That way we get better CI testing as well.

@ikbuibui
Copy link
Contributor

ikbuibui commented Oct 6, 2025

In general, we avoid merge commits
See here and here

@ikbuibui
Copy link
Contributor

ikbuibui commented Oct 6, 2025

Also I'm not sure how/if possible it is anymore but it would have been useful to have a commit at the state where you simply copied code from the collision pipeline and made it compile, and then added the fusion changes on top with separate commits.

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.

6 participants