You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/postprocessing/python.rst
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,10 @@
3
3
Python
4
4
======
5
5
6
-
.. sectionauthor:: Axel Huebl, Klaus Steiniger
6
+
.. sectionauthor:: Axel Huebl, Klaus Steiniger, Richard Pausch
7
+
8
+
If you are familiar with Python and would like to install the Python libraries that come with PIConGPU, please refer to the install instructions in our :doc:`python utilities section <../usage/python_utils>`.
9
+
7
10
8
11
If you are new to python, get your hands on the tutorials of the following important libraries to get started.
The PIConGPU Fusion Extension enables Monte Carlo simulation of nuclear fusion reactions between macro-particles based on [Wu2021]_ and [Higginson2019]_. The extension implements fully relativistic binary collision algorithms with local charge and (if possible) mass conservation, producing physically accurate fusion products with proper energy-momentum distributions.
- Thermonuclear burn studies in laser-plasma interactions
15
15
16
16
**Key Features:**
17
-
- Relativistic collision algorithm and cross-section evaluation
18
-
- Stoichiometric multiplicity with compile-time weight validation
19
-
- Local charge conservation always; local mass conservation when non-degenerate
20
-
- Support for multiple simultaneous fusion channels
17
+
- Relativistic collision algorithm and cross-section evaluation
18
+
- Stoichiometric multiplicity with compile-time weight validation
19
+
- Local charge conservation always; local mass conservation when non-degenerate
20
+
- Support for multiple simultaneous fusion channels
21
21
22
22
How to Use the Fusion Extension
23
23
===============================
@@ -90,7 +90,7 @@ Configure fusion reactions in ``include/picongpu/param/fusion.param``:
90
90
91
91
Examples:
92
92
93
-
- T + T → n + ⁴He (also covers T + T → ⁴He + 2n): it suffices to write
93
+
- T + T → ⁴He + 2n: it suffices to write
94
94
95
95
.. code-block:: cpp
96
96
@@ -154,23 +154,21 @@ Configure fusion reactions in ``include/picongpu/param/fusion.param``:
154
154
155
155
.. note:: Fusion production multiplier (Fmult)
156
156
157
+
Increasing ``maxFmult`` allows more, lighter products to be created, down to the ``productMinWeighting`` threshold. Decreasing ``maxFmult`` results in fewer, heavier products.
157
158
``Fmult`` controls how the consumed reactant weight (the minimum of the two reactant weights in a pair) is split into multiple product macro-particles while keeping total weight conserved.
- If ``productWeighting < productMinWeighting``, reduce ``Fmult`` to ``max(1, minWeighting / productMinWeighting)`` and recompute ``productWeighting``
164
-
- Guarantees: ``productWeighting ≥ productMinWeighting`` and ``Fmult ≥ 1`` while conserving the total produced weight ``minWeighting``
165
165
166
-
Increasing ``maxFmult`` allows more, lighter products to be created, down to the ``productMinWeighting`` threshold. Decreasing ``maxFmult`` results in fewer, heavier products.
167
-
168
166
The base ``productWeighting`` is then distributed across the two reactant sites and product species using the site fractions ``W₁…W₄`` (see Particle Creation Algorithm). In symmetric cases this often results in roughly half of a species' weight at each reactant site.
169
167
170
168
**Parameter Guidelines:**
171
-
- ``productMinWeighting``: Minimum allowed weight per two created product macro-particles; 16 let's the particle split in half 4 times before hitting the threshold. (see: ''Fusion Particle Creation Algorithm'')
172
-
- ``maxFmult``: Upper bound for how many product macroparticles can be spawned per fused pair; higher values allow more (lighter) products down to ``productMinWeighting``.
173
-
- ``cellListChunkSize``: Use ``TYPICAL_PARTICLES_PER_CELL`` for optimal memory usage.
169
+
- ``productMinWeighting``: Minimum allowed weight per two created product macro-particles; 16 let's the particle split in half 4 times before beeing less than 1. (see: ''Fusion Particle Creation Algorithm'')
170
+
- ``maxFmult``: Upper bound for how many product macroparticles can be spawned per fused pair; higher values allow more (lighter) products down to ``productMinWeighting``. Usually 10~100 times less than typical particle weighting.
171
+
- ``cellListChunkSize``: Use ``TYPICAL_PARTICLES_PER_CELL`` for optimal memory usage.
174
172
175
173
Fusion Particle Creation Algorithm
176
174
==================================
@@ -188,19 +186,19 @@ Problem Definition
188
186
The Fusion algorithm determines the amount of fuel (reactants) to consume in the fusion process. This fuel has an associated weight W_p that represents the total weight of products (of each species) to be created. The fractional weights W₁, W₂, W₃, W₄ are then multiplied by W_p to determine the actual weights of the outgoing particles.
189
187
190
188
**Parameter Definitions:**
191
-
- q₁ = charge of reactant 1
192
-
- q₂ = charge of reactant 2
193
-
- q₃ = charge of product species 1
194
-
- q₄ = charge of product species 2
195
-
- m₁ = mass of reactant 1
196
-
- m₂ = mass of reactant 2
197
-
- m₃ = mass of product species 1
198
-
- m₄ = mass of product species 2
199
-
- W_p = total weight of products (fuel consumption amount)
189
+
- q₁ = charge of reactant 1
190
+
- q₂ = charge of reactant 2
191
+
- q₃ = charge of product species 1
192
+
- q₄ = charge of product species 2
193
+
- m₁ = mass of reactant 1
194
+
- m₂ = mass of reactant 2
195
+
- m₃ = mass of product species 1
196
+
- m₄ = mass of product species 2
197
+
- W_p = total weight of products (fuel consumption amount)
200
198
201
199
**Output:** Four product particles with final weights W₁×W_p, W₂×W_p, W₃×W_p, W₄×W_p
202
-
- Product species 1: weights W₁×W_p at reactant 1 position, W₃×W_p at reactant 2 position
203
-
- Product species 2: weights W₂×W_p at reactant 1 position, W₄×W_p at reactant 2 position
200
+
- Product species 1: weights W₁×W_p at reactant 1 position, W₃×W_p at reactant 2 position
201
+
- Product species 2: weights W₂×W_p at reactant 1 position, W₄×W_p at reactant 2 position
204
202
205
203
Stoichiometric Multiplicity Limits and Invariants
206
204
----------------------------------
@@ -224,10 +222,10 @@ We derive compile-time multiplicity limits (c₃, c₄) from species charges (Z)
Neutral-aware, macro-minimizing case analysis; always respects caps and local charge
313
+
Physical idea
314
+
Within each cell we form unbiased binary encounters by random pairing of two reactant lists following Takizuka–Abe [Takizuka1977]_. If the lists have different sizes, particles from the shorter list are deterministically reused so that all particles participate; see :ref:`model-binaryCollisions::details:duplication` for details. For a broader description of the pairing algorithm, see :ref:`model-binaryCollisions`.
- Local mass conservation when Algorithm 1 is valid
316
+
Algorithm (per cell)
317
+
- Build two filtered lists A and B of reactant indices (intra-collision: A=B; inter-collision: A≠B).
318
+
- Apply random permutations to the longer list.
319
+
- Pair i-th entries up to N_p = min(|A|, |B|): pairs (A[i], B[i]).
320
+
- If |A| ≠ |B|, handle duplicates of the shorter list so each long-list entry has a partner (The weight of a particle from the shorter list is divided; see implementation note below).
324
321
325
-
3. Relativistic Framework
326
-
-------------------------
322
+
Implementation
323
+
- Shuffling and pairing are performed by the collision kernels: ``particles/fusion/InterCollision.hpp`` and ``IntraCollision.hpp``.
324
+
- Deterministic duplication for |A|≠|B|: ``duplicationCorrection()``; randomized ordering via ``detail::shuffle``.
325
+
- Number-density weighting used later is computed per cell to keep correct rates under unequal weights and counts.
327
326
328
-
**Physical Model:** Fully relativistic treatment using Lorentz invariants
327
+
2. Relativistic Kinematics and Fusion Sampling (Cannoni, 2016)
For each candidate pair we compute kinematics using Lorentz-invariant quantities to avoid loss of precision at high γ, following Cannoni’s formulation of invariant relative velocity [Cannoni2016]_. We adopt the metric signature (+, −, −, −) and four-momentum convention :math:`p_i^\mu = (E_i/c, \vec{p}_i)`.
331
332
332
-
**Mandelstam Variable Approach:**
333
-
[Cannoni2016]_
334
-
- Uses Lorentz invariant s = E²_total - (pc)² instead of double transformations
335
-
- Avoids numerical errors in highly relativistic regime
336
-
- Calculates relative velocity through invariant: γᵣ = (s - m₁²c⁴ - m₂²c⁴)/(2m₁m₂c⁴)
333
+
Key kinematic invariants (computed from lab-frame inputs)
0 commit comments