Repository navigation
0.19 activation-to-transport handoff - #4
Conversation
|
Added a real-data validation path in Real-data check — OpenMC 0.16.0 + caller-mounted NNDC HDF5 (
This is a normalization/data-loading check with real data, not a dose or transport benchmark. The probe never vendors or downloads the caller's data. Demo — the interactive page now uses a 2×2×1 mesh with four 1 cm³ voxels and four photon groups (0–0.1, 0.1–0.5, 0.5–2, 2–10 MeV), shows per-voxel totals as bars, and fits the narrow docs column without clipping. Local full Chromium E2E: 27/27 pass. |
|
Real-data validation extended to photon transport using the same NNDC library ( |
|
Renamed |
Summary
Implements the 0.19 activation-to-transport handoff on
feat/0.19-activation-transport:nucleide.openmc.normalize_flux. Distinguishes volume-integrated/averaged from per-source-particle/source-rate-scaled OpenMC tallies, rejects double scaling, preserves relative errors, and records units/source-rate/input state. CSV interchange moves to v2 with v1 backward reads asunknown.crates/r2s/src/source.rsregular-mesh source with ascending eV edges, C-order voxels, integrated photons/s, density conversion once, joint voxel/group probabilities, per-voxel spectra, sparse-grid restoration, exact cooling selection, checked totals, and a bounded stable-code validation report.nucleide.openmc.mesh_sourcewith explicit C-order → Fortran-order mapping, per-element differential histogram densities, absolute photons/s strengths, zero-voxel handling, and self-containedsettings.xmlexport.activation-to-transporttutorial, interactivetransport-sourceWASM demo, desktop/narrow-layout/error Playwright coverage, and a 1k/10k/100k × 24-group criterion benchmark.W0 portable wheels were already fixed on
mainin 0.18.1; no duplicate packaging work here.Real vs. synthetic data
[4, 9] × 10 / 2 = [20, 45],[[100, 0], [0, 300]]joint probabilities).openmc_transport_probe.pywas run with a caller-mounted NNDC HDF5 library, including both photon (photon/H,O,Fe) and neutron (H1,O16,Fe56) data. OpenMC 0.16 transport in 10 cm water/iron spheres, 20k particles × 5 batches, source strengths 1 and 10. Photon tally ratio9.999999999999988, per-source/rate-scaled relative difference1.26e-15; neutron ratio10.000000000000014, relative difference1.33e-15; iron and water fluxes differed for both, proving the real cross sections were loaded. This is a normalization/data-loading check, not a dose or transport validation.Validation
cargo fmt --check— cleancargo clippy --all-targets -- -D warnings— cleancargo test --workspace— passingpytest tests/— 746 passed, 3 skipped, 98% coverageruff format --check/ruff check— cleanmypy— cleanpython3 scripts/gen-reference.py --check— freshformat:check/check/build/ full Chromium E2E — 27 passedvalidation/openmc_handoff_probe.py— 25/25 checks pass in the pinned OpenMC imagevalidation/openmc_transport_probe.py— PASS with caller-mounted NNDC HDF5 photon and neutron data (real OpenMC transport + packagenormalize_flux)Performance
Criterion baseline on the development host (i5-8400, 24 groups, 2.4M values at 100k voxels):
Work is linear in represented voxel/group entries. The contract and adapter are not zero-copy: source construction clones caller arrays and the OpenMC adapter creates one source object per voxel. OpenMC object/XML costs are tracked separately and no regression threshold is claimed yet.
Review notes / limitations
normalize_fluxdeliberately refuses to infer normalization; a caller must declare the state, and physical input is rejected to prevent double scaling.