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 21 times, most recently from b23ee4d to 25f1789 Compare September 29, 2025 13:51
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, Now the fusion.param is a bare minimum implementation - I moved the examples to documentation

Copy link
Contributor

@ikbuibui ikbuibui Nov 3, 2025

Choose a reason for hiding this comment

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

I see you have really moved all the example code into the documentation.
We avoid doing this because it is easy to overlook updating the docs when something in your implementation changes, and we end up with code in our docs which doesn't compile.
The way we deal with this is to put the param file into an example/test set up under share/picongpu/examples or share/picongpu/tests and then include this code into the doxygen. This way the code is checked for compilation and if something in the code changes, you don't have to separately updated the docs.
You can look at this to see how to include code into doxygen.

@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.

Features:
 - binary fusion reactions between two different species
 - choosing product weights depending on particles masses and charge.
 - documentation
- Remove all verbose comments and examples from fusion.param
- Move complete D-T fusion example to documentation
@BrianMarre
Copy link
Member

@psychocoderHPC any progress on reviewing this PR?

Copy link
Member

@psychocoderHPC psychocoderHPC left a comment

Choose a reason for hiding this comment

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

Please review your own changes a remove hard coded numbers e.g. 1.0 by the correct precision of the value e.g. 1.0_COLL to avoid silent implicit casts.


constexpr uint32_t cellListChunkSize = TYPICAL_PARTICLES_PER_CELL;
constexpr float_X productMinWeighting = 16.1;
constexpr uint32_t maxFmult = 1e6;
Copy link
Member

Choose a reason for hiding this comment

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

please add a doc string and unit, additionally the type is an integral type but you assigned an double value.

@BrianMarre
Copy link
Member

@psychocoderHPC a few CI jobs failed with due to script errors, please restart them

@PrometheusPi
Copy link
Member

CI job restarted

@PrometheusPi
Copy link
Member

I triggered the CI again, we have some connectivity issues:

fatal: unable to access 'https://github.com/ComputationalRadiationPhysics/isaac.git/': Could not resolve host: github.com

@psychocoderHPC psychocoderHPC added the component: core in PIConGPU (core application) label Nov 20, 2025
@psychocoderHPC psychocoderHPC added this to the 0.9.0 / next stable milestone Nov 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: core in PIConGPU (core application)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants