@@ -11,28 +11,21 @@ Species Definition Requirements
1111-------------------------------
1212All species participating in fusion reactions must be defined with ``massRatio `` and ``chargeRatio `` flags. These are mandatory for the fusion algorithms to function correctly.
1313
14- To simplify defining particle masses relative to the electron mass, PIConGPU provides a constant for the atomic mass unit (``amu ``). This constant is the ratio of one atomic mass unit to the electron rest mass. You can use it in `` speciesDefinition.param `` as follows :
14+ To simplify defining particle masses relative to the electron mass, you can define an atomic mass unit (``amu ``) constant . This constant is the ratio of one atomic mass unit to the electron rest mass:
1515
16- .. code-block :: cpp
17-
18- #include "picongpu/unitless/simulation.unitless"
19-
20- // Atomic mass unit in electron masses (amu/me)
21- constexpr float_X amu = 1.0_X / sim.fusion.electronMassAMU;
22-
23- // Deuteron species
24- value_identifier(float_X, MassRatioDeuterons, 2.013553212745*amu);
25- value_identifier(float_X, ChargeRatioDeuterons, 1.0);
16+ .. literalinclude :: ../../../../share/picongpu/tests/Fusion/include/picongpu/param/speciesDefinition.param
17+ :language: cpp
18+ :start-after: doc-include-start: amu-definition
19+ :end-before: doc-include-end: amu-definition
20+ :dedent:
2621
27- using ParticleFlagsDeuterons = MakeSeq_t<
28- particlePusher<UsedParticlePusher>,
29- shape<UsedParticleShape>,
30- interpolation<UsedField2Particle>,
31- massRatio<MassRatioDeuterons>, // Required for fusion
32- chargeRatio<ChargeRatioDeuterons> // Required for fusion
33- >;
22+ Example species definition for deuterons:
3423
35- using PIC_Deuterons = Particles<PMACC_CSTRING("d"), ParticleFlagsDeuterons, DefaultParticleAttributes>;
24+ .. literalinclude :: ../../../../share/picongpu/tests/Fusion/include/picongpu/param/speciesDefinition.param
25+ :language: cpp
26+ :start-after: doc-include-start: deuteron-definition
27+ :end-before: doc-include-end: deuteron-definition
28+ :dedent:
3629
3730Important: Mass ratios must be as precise as possible since fusion energy release is calculated from the mass deficit between reactants and products.
3831
@@ -92,92 +85,34 @@ This is the easiest fusion reaction to achieve and is commonly used in fusion en
9285The cross-section parameters are based on the Bosch-Hale parameterization from experimental data
9386(Source: https://hdl.handle.net/11858/00-001M-0000-0027-6535-1, page 29).
9487
95- .. code-block :: cpp
96-
97- struct DT
98- {
99- //! Reactant species: Deuterium and Tritium
100- using reactants = pmacc::mp_list<Pair<PIC_Tritons, PIC_Deuterons>>;
101-
102- //! Filter for reactants (mandatory for ColliderFromStruct)
103- //! Use filter::All to include all particles, or define custom filters
104- using FilterPair = OneFilter<filter::All>;
105-
106- //! Product species: Neutron and Helium-4
107- using products = pmacc::mp_list<Pair<PIC_Neutrons, PIC_He4>>;
108-
109- /** Cross-section parameters for D-T fusion */
110- struct Params
111- {
112- //! Gamow constant: BG = π·α·Z₁·Z₂·√(2·μ·c²) in keV^(1/2)
113- //! where α is the fine structure constant, Z₁,Z₂ are charges, μ is reduced mass
114- static constexpr float_X BG = 34.3827_X;
115-
116- //! Bosch-Hale parameterization coefficients for D-T cross-section
117- //! These coefficients fit experimental cross-section data
118- static constexpr float_X A1 = 6.927e4_X;
119- static constexpr float_X A2 = 7.454e8_X;
120- static constexpr float_X A3 = 2.050e6_X;
121- static constexpr float_X A4 = 5.2002e4_X;
122- static constexpr float_X A5 = 0.0_X;
123-
124- //! Additional Bosch-Hale coefficients
125- static constexpr float_X B1 = 6.38e1_X;
126- static constexpr float_X B2 = -9.95e-1_X;
127- static constexpr float_X B3 = 6.981e-5_X;
128- static constexpr float_X B4 = 1.728e-4_X;
129- };
130-
131- //! Cross-section calculation using Bosch-Hale parameterization
132- //! Returns cross-section in milli-barns
133- using CrossSectionInterpolator = relativistic::FusionFunctor<Params>;
134- };
88+ .. literalinclude :: ../../../../share/picongpu/tests/Fusion/include/picongpu/param/fusion.param
89+ :language: cpp
90+ :start-after: doc-include-start: DT-reaction
91+ :end-before: doc-include-end: DT-reaction
92+ :dedent:
13593
136942) Configure the fusion pipeline
13795
138- .. code-block :: cpp
139-
140- // Single reaction
141- using FusionPipeline = pmacc::mp_list<ColliderFromStruct<DT>>;
142-
143- // Multiple reactions (processed sequentially)
144- using FusionPipeline = pmacc::mp_list<
145- ColliderFromStruct<DT>,
146- ColliderFromStruct<DD_branch1>,
147- ColliderFromStruct<DD_branch2>
148- >;
149-
150- .. note :: Alternative explicit form
96+ .. literalinclude :: ../../../../share/picongpu/tests/Fusion/include/picongpu/param/fusion.param
97+ :language: cpp
98+ :start-after: doc-include-start: fusion-pipeline
99+ :end-before: doc-include-end: fusion-pipeline
100+ :dedent:
151101
152- You can also define the fusion pipeline using the explicit `` Collider `` template:
102+ .. note :: Multiple reactions
153103
154- .. code-block :: cpp
155-
156- using FusionPipeline = pmacc::mp_list<
157- Collider<DT_He4n::CrossSectionInterpolator, DT_He4n::reactants, DT_He4n::products, OneFilter<filter::All>>,
158- Collider<DD_Tp::CrossSectionInterpolator, DD_Tp::reactants, DD_Tp::products, OneFilter<filter::All>>,
159- Collider<DD_He3n::CrossSectionInterpolator, DD_He3n::reactants, DD_He3n::products, OneFilter<filter::All>>,
160- Collider<He3D_He4p::CrossSectionInterpolator, He3D_He4p::reactants, He3D_He4p::products, OneFilter<filter::All>>,
161- Collider<He3T_He4D::CrossSectionInterpolator, He3T_He4D::reactants, He3T_He4D::products, OneFilter<filter::All>>,
162- Collider<TT_He4nn::CrossSectionInterpolator, TT_He4nn::reactants, TT_He4nn::products, OneFilter<filter::All>>,
163- Collider<Bp_He4He4::CrossSectionInterpolator, Bp_He4He4::reactants, Bp_He4He4::products, OneFilter<filter::All>>
164- >;
104+ You can add multiple reactions to the pipeline by defining additional reaction structs
105+ and adding them to the ``FusionPipeline `` list. The reactions are processed sequentially
106+ in the order they appear.
165107
166108Simulation Parameters
167109---------------------
168110
169- .. code-block :: cpp
170-
171- // Memory allocation control
172- constexpr uint32_t cellListChunkSize = TYPICAL_PARTICLES_PER_CELL;
173-
174- // Product weighting thresholds
175- constexpr float_X productMinWeighting = 16.1;
176- constexpr uint32_t maxFmult = 1e6;
177-
178- // Debug flags
179- constexpr bool debugFusion = false;
180- constexpr bool alwaysFuseQ = false; // Force 100% fusion probability
111+ .. literalinclude :: ../../../../share/picongpu/tests/Fusion/include/picongpu/param/fusion.param
112+ :language: cpp
113+ :start-after: doc-include-start: simulation-parameters
114+ :end-before: doc-include-end: simulation-parameters
115+ :dedent:
181116
182117.. note :: Fusion production multiplier (Fmult)
183118
0 commit comments