Photon source handoff
Validate a photon source, allocate spectra across mixed voxels, and select exact cooling offsets.
The activation-to-transport handoff keeps three things separate: the raw Monte Carlo tally, the physical group flux, and the integrated photon source a transport code samples. This demo exercises the shared Rust source contract — the same validator, density conversion and joint-probability kernel the Python package uses.
Voxel spectra and units
The mesh is a regular (2, 2, 1) grid with four 1 cm³ voxels and four photon
groups spanning 0–0.1, 0.1–0.5, 0.5–2 and 2–10 MeV. The table shows
integrated photons/s per group, not a density and not a probability.
Change a value and select Evaluate source; the shared validator reports
stable issue codes and keeps modelling assumptions separate from errors.
Negative values, non-finite cells, nonascending edges and mismatched dimensions raise clear errors. A zero-source voxel contributes no samples. An all-zero source remains valid data and has no sampling distribution.
Joint voxel/group sampling
The probability table is the joint distribution over voxel/group pairs. It is not the product of a spatial marginal and an energy marginal: independent sampling would invent cross-pairs that carry no source. The declared assumptions are uniform photon density per eV inside each group and uniform position inside each voxel.
Allocate spectra in mixed voxels
In Mixed-voxel allocation, zone A spans two 2 cm³ voxels. Zone B also occupies part of the first voxel. Select Allocate mixed source to see how the supplied intersection volumes distribute each zone’s group strengths. The default overlap volumes send 10 and 30 photons/s from zone A to the two voxels. Zone B contributes 60 photons/s to the first voxel in a different energy group.
Edit the declared zone volumes, group strengths or intersection volumes to try another allocation. The shared kernel checks the mapped volume of each emitting zone and the total occupancy of each voxel. The result treats unassigned volume as source-free before distributing the assigned source uniformly throughout the voxel.
For a transport model, one possible input is OpenMC’s material volume per mesh cellopenmc-mesh-material-volumes. Supply the mapping from those material IDs to your activation zones.
Cooling times
The three buttons are declared snapshots at 0 s, 3600 s and 7200 s; the browser does not compute decay physics. The cooling-selection check calls the shared exact-match kernel. Requested offsets must match an available offset exactly, duplicates are rejected, and a near match is not substituted.
Python adds the transport-facing pieces: OpenMC MeshSource export, batch
files, and reproducibility manifests. See
Activation to transport for the full
workflow.
The browser snapshots are synthetic because no nuclear data or transport
engine is shipped to the page. The shared kernel is checked against real
OpenMC 0.16 photon and neutron transport with a caller-mounted NNDC HDF5
library in validation/openmc_transport_probe.py; that check covers
normalization, source-strength scaling and data loading, not dose or
transport accuracy.
| External check (OpenMC 0.16 + NNDC HDF5) | Photon | Neutron |
|---|---|---|
| strength-10 / strength-1 tally ratio | 9.999999999999988 | 10.000000000000014 |
| per-source vs rate-scaled flux difference | 1.26e-15 | 1.33e-15 |
| water flux, 1/(cm²·s) | 0.027611 | 0.031235 |
| iron flux, 1/(cm²·s) | 0.019920 | 0.041691 |
The runs use 10 cm water/iron spheres, a centered 2 MeV photon or 14 MeV neutron point source, and 20 000 particles × 5 batches with a fixed seed. The water and iron fluxes differ because the real cross sections are loaded; the checks do not establish a dose or transport-accuracy claim.
Voxel spectra
Integrated photons/s. Regular 2×2×1 mesh (four 1 cm³ cells); group edges 0, 100000, 500000, 2000000, 10000000 eV.
| Voxel | 0–0.1MeV | 0.1–0.5MeV | 0.5–2MeV | 2–10MeV |
|---|---|---|---|---|
| V0 | ||||
| V1 | ||||
| V2 | ||||
| V3 |
Loading the live demo…
Checks
Evaluate to run the shared validator.
Mixed-voxel allocation
Two 2 cm³ voxels at 3600 s. Use 0 for a zone absent from a voxel.
| Zone | Declared cm³ | 0–1 MeV | 1–3 MeV |
|---|---|---|---|
| A | |||
| B |
| Voxel | Zone A | Zone B |
|---|---|---|
| V0 | ||
| V1 |
Exact cooling selection
Requested offsets must match exactly; duplicates and near matches fail.