Transport
Neutrons react in the detector; recoils, alphas and fission fragments are tracked step by step, and every ionization electron is recorded at birth.
Geant4 Linked Electron–Ion Plasma, Neutron Interaction & Response
GLEIPNIR simulates what happens inside a neutron-irradiated gas detector, from the first neutron down to every ionization electron and the pulse on the readout electrode. BIFROST lets you watch it happen in the browser.
The pipeline
Each stage hands a well-defined data product to the next. A single JSON file describes geometry, materials, source, physics and numerics for all of them, and every stage closes its own energy or charge ledger.
Neutrons react in the detector; recoils, alphas and fission fragments are tracked step by step, and every ionization electron is recorded at birth.
Ionization becomes charge density on a mesh (cloud-in-cell); the Poisson equation gives the bias + space-charge potential on a conforming annulus mesh.
Every electron is degraded through the gas (elastic, excitation, ionization, attachment, Penning transfer) until it thermalizes, escapes or attaches.
Optional recombination, applied as a survival chain in timescale order: geminate, columnar, then volume. Off means an exact pass-through.
Carrier motion induces current on the readout electrode; an idealized instrumentation chain turns it into waveforms and pulse observables.
Three example detectors ship with it, a gas box, an ionization chamber and a fission chamber, and every run is deterministic for a fixed seed.
The electron engine
Non-equilibrium Ionization & Degradation of High-energy electrons in Gaseous Geometries
Stage 3 of GLEIPNIR, and a complete code in its own right. Give it electrons with positions, times and energies inside a gas volume, and it follows every one of them, and every electron they knock free, until each one thermalizes, escapes or is captured.
“Something is eating my electrons.”
That is how the name began. Charge born in the gas kept going missing before it reached the electrode: captured, recombined, gone. And when the electron paths were finally drawn, they did not fly. They slithered, thousands of short flights broken by collisions, coiling through the gas like a snake. In Norse myth the serpent gnawing in the dark at the roots of the world tree is Níðhöggr. The name fit.
Swarm codes (Magboltz)
NIDHOGG
Time-sampled over the whole degradation, which is unbiased because null-collision flights end uniformly in time. Bundled demo: 60 electrons of 1–200 eV in P-10 at 200 V/cm, run with both cross-section sets.
Energy handed to the gas, by channel, for the same demo with each cross-section set. Ionization thresholds take more than half; methane's low vibrational levels take roughly a sixth to a fifth.
Why electron degradation is expensive: slow electrons bounce elastically again and again, losing a tiny fraction each time, while ionizations are rare. Logarithmic scale.
Same electrons, same seed, two cross-section sets.
NIDHOGG has its own command line and knows nothing about GLEIPNIR: a gas and a list of electrons in, results out. Anything can feed it: Geant4, another transport code, or a hand-written file. It may be useful to:
In
Out
Results
A coaxial chamber with a 2 µm U₃O₈ deposit (90 % ²³⁵U) on a 3 mm anode at +300 V, P-10 out to r = 25 mm, and a thermal neutron beam. 10 000 neutrons, seed 12345. Every number below comes from the project's committed run.
Deviation of each simulated quantity from its reference, with the accepted tolerance band. Tolerances are set before the comparison and never widened afterwards. All eight are inside their band. This is benchmarking and verification, not validation (see V&V).
Induced charge for each fission event, without and with recombination (EIR). Columnar recombination removes a larger share of the bigger pulses.
Reference event 1714: 101.6 MeV deposited in the gas. Ion pairs reaching the signal stage, split into what recombination removes and what survives.
Geant4 HP fission with fragment ions from G4NDL yields.
22 mm of P-10 stops a fragment, so the pair count follows the whole fragment energy.
P-10, 152 V/cm, 760 Torr, 20 °C: the drift-velocity plateau.
The visualizer
Bridged Interactive Framework for Rendering, Observation & Simulation Telemetry
A bidirectional visualizer that runs in the browser. It shows a simulation while it runs, in 3-D and in live charts, and it talks back: which case to run, with which settings, and when to start, pause, resume or stop. A finished run replays the same way.
Live while the run goes, or replayed from a finished run.
Before anything runs, Draw fields solves the bias field of the chosen case in seconds and paints the potential on cut planes through the chamber: two axial half-planes and a mid-plane disc, over the translucent anode, U₃O₈ coating, fill gas and housing. Here the fc-600V case, from 0 to 600 V.
After the run, Draw tracks shows what happened in the gas: all 3 632 heavy charged tracks, with fission fragments bursting out of the coated anode, and an even sample of 50 000 of the 847 717 secondary electrons, where they were born. The same fc-600V run, 10 000 neutrons.
GLEIPNIR aggregates its virtual detectors as the run goes and BIFROST charts them live on the Detectors tab. For this fc-600V run of 10 000 neutrons: 1492 MeV deposited, 126 events with a deposit, 37 neutron-induced fissions; then per-event energy and pulse-height spectra, energy by volume and by particle, neutron interactions by process, heavy charged tracks by class, electron energy and birth radius, the run's history, and heavy-track length against energy. Each chart carries one sentence on what it measures. Scroll inside the frame to see all fifteen.
Figures
Drawn by the project's own analysis from the committed run, and shown in the page's theme. Click a figure to enlarge it.
Honest by construction
Testing, verification, benchmarking and validation answer different questions. The repository uses each one strictly, labels every claim with one of them, and states its gaps.
Does the code do what its author intended?
~380 unit, integration, golden-output and determinism tests across the packages.
Are the mathematics solved correctly?
Energy ledger closed to < 10⁻⁹, Ramo closure, exact EIR bookkeeping, analytic field laws.
Does it agree with other codes and published numbers?
W-value, drift velocity, fission TKE and mass peaks, ion pairs per fragment.
Does it agree with independent experimental measurements?
Needs tier-1 experimental input; every Set-A record today is tier 2.
GLEIPNIR has, at present, no validated component. The P-10 W-value, scored against a population of published values under ISO 13528, sits just outside the band at Eₙ = −1.24. The project says so openly rather than widening a tolerance to hide it: it is work in progress, and the first thing we are improving.
Direction
GLEIPNIR was designed as a general response model for gas volumes under irradiation. So far one configuration has been driven end to end. This is the distance between the two, and the plan for closing it.
A general response model for any gas volume under irradiation: fission chambers, ionization chambers, gas targets, beam-pumped gas cells. Nothing about a detector is compiled in. A chamber is a JSON file, and every stage after Geant4 reads positions, times and energies, never what produced them.
Three example configurations ship with the code. One of them, the fission chamber above, has been driven through every stage with its results committed and benchmarked. The other two exercise the first stages. Everything else the design allows is, so far, untested ground.
From the shipped configurations and the committed results. The state is spelled out in every cell, not carried by colour.
| configuration | Transport | Space charge | NIDHOGG | EIR | Signal | Benchmarks |
|---|---|---|---|---|---|---|
| Gas box10 cm P-10 cube · 2.45 MeV neutrons | runs | runs | runs | not yet | not yet | not yet |
| Ionization chamberair · 30 mm parallel plate · 300 V | runs | runs | not yet | not yet | not yet | not yet |
| Fission chamberP-10 coax · U₃O₈ · thermal neutrons | committed results | committed results | committed results | committed results | committed results | committed results |
ISO 13528 En compares a value with the consensus of the reference data using expanded (k = 2) uncertainties; |En| ≤ 1 passes. Three pass. The W-value, NIDHOGG's own gas physics, sits just outside the band at En = −1.24, 6 % low: it is work in progress and our clearest area for improvement, shown below. And because every reference record is still tier 2, even a pass is benchmarking, not validation.
Everything exercised so far fits in these six lines. High flux, current mode, other gases, magnetic fields, sub-millimetre gaps and ultra-high dose rates all lie outside.
Every pulse starts from one division: ion pairs = deposited energy ÷ W. The Eₙ test above shows where that division can get better, and the numbers below show the gain is within reach.
NIDHOGG gives 24.64 eV per ion pair in P-10, 6 % below the 26.21 eV consensus of the reference data, so today it counts about 6 % too many pairs per MeV. The main lever is a single, well-understood number, the Penning transfer probability, now set to a mid-range literature value. Pinning it against primary W measurements needs data, not new code.
How much energy a fission fragment leaves in the gas, and how far it travels, is set by its stopping power. Geant4 ships no tabulated stopping power for a fission fragment in any gas, so today that energy loss is an extrapolation from lighter ions.
We are working on our own stopping model for fission fragments in gas.
The committed reference event (101.6 MeV in the gas), rescaled with N = E/W to the consensus W. A rescaling, not a new run; the pulse is taken to scale with its pairs.
The first step has a written plan. The order after it is a reading of the backlog, the validation plan and the FLASH note, sorted by what each step unblocks.
A fission fragment's stopping power decides how much energy it leaves in the gas and how far it gets, and so, divided by W, how many ion pairs every pulse starts from. Geant4 has no tabulated stopping power for a fission fragment in any gas, and today's energy loss is an extrapolation from lighter ions. We are building our own model to replace it.
Today the source is hard-wired to neutrons. A pluggable source adds electron and ion beams with a pulse time structure, selected in the configuration. Then one gas, one geometry, one seed, run twice with only the source changed: fission fragments and a fast electron beam deposit the same energy with very different track structure, and the difference becomes a measurement.
Should match
Should differ
An electron beam through a foil window is something an ordinary laboratory has; a reactor is not. The gate comes first: the neutron path must not move by one digit.
Each names an observable, the measurement to obtain, and what the code would need. None is claimed done.
| observable | needs | |
|---|---|---|
| V1 | W-value of P-10 for fast electrons, from primary measurements | data only |
| V2 | drift velocity against E/p, as a curve | data only |
| V3 | EEDF, mean energy and transverse diffusion at matched E/N | data only |
| V4 | fission-fragment ionization yield: the pulse-height defect | code change |
| V5 | collected charge and pulse-height spectrum of a published chamber | matched config |
| V6 | collection efficiency against field: saturation curves | code change |
| V7 | fragment energy loss and range in argon | data only |
V1–V3 need only data files and would give the first honest “validated” label, to the Stage-3 swarm physics. V4 and V6 are where the physics is genuinely uncertain, and where validation would move the results most.
FLASH radiotherapy delivers dose at ultra-high rates, with single microsecond pulses of up to several gray where conventional beams deliver about a milligray. At that dose per pulse the air-filled ionization chambers of clinical dosimetry lose charge to recombination before it is collected, and the Boag correction the protocols rely on stops being accurate.
For GLEIPNIR that is an opening. Collection efficiency against dose per pulse is published for standard commercial chambers by several groups: exactly the independent experimental observable the project lacks. Most of the chain already has the right shape: an air-chamber config, Boag's model in EIR, the MFEM field solve, and charge collection. Six things stand in the way:
In Boag's model the recombination parameter grows with the square of the electrode gap, u ∝ d². Against a 1 mm Advanced Markus chamber, the shipped 30 mm configuration has 900 times the u.
The main line draws geometry and records and replays sessions. The development branches go much further:
Its core loops move one at a time into a native engine, each behind a bit-exact parity gate; the first is done. The whole engine moves only once every loop has.
option3 and option4 against the default: a config-only change, and the cheapest cross-code check available.
CATIMA, an independent heavy-ion stopping code, to test our own stopping model against before it replaces today's extrapolation.