Repository navigation
Description
Bug Description
Two kinds of neutron are banked as SourceSites and started again later, although they continue the generation of the neutron that produced them:
- the extra neutrons of an (n,xn) reaction with an integral yield, banked by
create_secondary()ininelastic_scatter(); - the neutrons made by
split()inapply_weight_window().
Both lose two pieces of state that the iterated fission probability (IFP) method reads.
- The lifetime clock.
Particle::from_source()(src/particle.cpp) setslifetime() = 0.0for every particle it starts, while it restorestime()from the site. These neutrons therefore lose the time from the birth of their generation to the reaction or the split.ifp()(src/ifp.cpp) storesp.lifetime()with each fission site, so every fission they cause is scored byifp-time-numeratorwith a lifetime that is too short. The generation time is biased low. - The delayed group.
split()andcreate_secondary()do not copydelayed_groupinto the banked site, andfrom_source()restores the site's default of 0. In continuous-energy mode, nothing changes a neutron'sdelayed_group()during transport, so it is the neutron's birth tag.ifp()stores it with each fission site, andifp-beta-numeratorcounts a fission when the tag of its ancestor is nonzero. A split copy of a delayed neutron is therefore counted as a prompt neutron when its progeny are scored. beta_eff is biased low.
The two (n,xn) paths of inelastic_scatter() also disagree. For a non-integral yield, the weight of the incident neutron is multiplied, and that neutron keeps its clock and its delayed group. For an integral yield, the copies lose both.
Size of the effect:
- Weight windows. In the example below, most fission neutrons are split. With weight windows the generation time is about 14 % lower and beta_eff about 25 % lower than without.
- (n,xn), generation time. The
ifp/totalregression model (a bare U-235 sphere) gives anifp-time-numerator1.3e-4 too low with the NNDC data. A U-235/Be-9 mixture with 0.03 (n,2n) reactions per source neutron gives a generation time 3.2e-3 too low. - (n,xn), beta_eff. Small in most systems. The ENDF/B-VII.1 delayed-neutron spectra of U-235 and U-238 end at 3.0 MeV, under the (n,2n) thresholds of U-235 (5.3 MeV) and U-238 (6.2 MeV). Beryllium, with an (n,2n) threshold of about 1.75 MeV, is an exception.
k-effective and ifp-denominator are not affected.
Steps to Reproduce
The model is the U-235 sphere of tests/regression_tests/ifp.
- A weight window is scaled by the ratio of the particle's birth weight to the centre of its birth window, so a window that is uniform in space never splits a weight-1 neutron.
- Here, every fourth cell of a 20 x 20 x 20 mesh has the window [0.05, 0.1], and the other cells have none (-1).
- A neutron born in a cell without a window takes 1 as its reference weight. At its first collision in a cell with a window, it is split into 10.
import numpy as np
import openmc
model = openmc.Model()
material = openmc.Material()
material.add_nuclide('U235', 1.0)
material.set_density('g/cm3', 16.0)
sphere = openmc.Sphere(r=10.0, boundary_type='vacuum')
cell = openmc.Cell(region=-sphere, fill=material)
model.geometry = openmc.Geometry([cell])
model.settings.particles = 50000
model.settings.batches = 30
model.settings.inactive = 10
model.settings.ifp_n_generation = 1
model.settings.source = openmc.IndependentSource(
space=openmc.stats.Box(*cell.bounding_box),
constraints={'fissionable': True})
tally = openmc.Tally()
tally.scores = ['ifp-time-numerator', 'ifp-beta-numerator', 'ifp-denominator']
model.tallies = [tally]
mesh = openmc.RegularMesh()
mesh.lower_left = (-10.0, -10.0, -10.0)
mesh.upper_right = (10.0, 10.0, 10.0)
mesh.dimension = (20, 20, 20)
i, j, k = np.indices(mesh.dimension)
has_window = (i + j + k) % 4 == 0
ww = openmc.WeightWindows(
mesh,
lower_ww_bounds=np.where(has_window, 0.05, -1.0),
upper_ww_bounds=np.where(has_window, 0.1, -1.0),
energy_bounds=[0.0, 2.0e7],
particle_type='neutron')
generation_time = {}
beta_eff = {}
for ww_on in (False, True):
if ww_on:
model.settings.weight_windows = [ww]
model.settings.weight_windows_on = True
with openmc.StatePoint(model.run()) as sp:
kinetics = sp.get_kinetics_parameters()
generation_time[ww_on] = kinetics.generation_time.nominal_value
beta_eff[ww_on] = kinetics.beta_effective.nominal_value
print('generation time', generation_time,
generation_time[True] / generation_time[False])
print('beta_eff', beta_eff, beta_eff[True] / beta_eff[False])Result at develop 3cded0f:
| data | quantity | no weight windows | weight windows | ratio |
|---|---|---|---|---|
| ENDF/B-VII.1 | generation time (s) | 6.267e-9 | 5.446e-9 | 0.869 |
| ENDF/B-VII.1 | beta_eff | 0.006607 | 0.004947 | 0.749 |
| NNDC | generation time (s) | 6.301e-9 | 5.401e-9 | 0.857 |
Over 5 seeds per arm with ENDF/B-VII.1 data:
- the generation time ratio is 0.866 on average (Welch t = -104 between the arms);
- the mean beta_eff is 23.9 % lower with weight windows (Welch t = -15.4).
Expected behavior. Weight-window splitting is unbiased, so both quantities should agree within statistics with and without weight windows.
- A neutron made by an (n,xn) reaction or by splitting continues the generation of the neutron that produced it. It should keep that neutron's lifetime clock and its delayed group, as the weight branch for non-integral yields already does.
- MCNP's adjoint-weighted kinetics (KOPTS) treats (n,2n) reactions and splitting as branches within the original generation (B. C. Kiedrowski, LA-UR-10-01700, section 2).
- A fission neutron starts a new generation. It should start its clock at zero and carry the delayed group of its own emission, as it does now.
Environment
- OpenMC
developat 3cded0f (0.16.1-dev48), built from source with-DCMAKE_BUILD_TYPE=RelWithDebInfo -DOPENMC_ENABLE_STRICT_FP=on, OpenMP on, MPI off. - Ubuntu 24.04.5, GCC 13.3.0, HDF5 1.10.10.
- Nuclear data: the NNDC HDF5 library used by the OpenMC CI (
tools/ci/download-xs.sh), and a local ENDF/B-VII.1 HDF5 library. OMP_NUM_THREADS=2.
A fix is proposed in a pull request: SourceSite gets a lifetime field, and create_secondary() and split() copy the clock and the delayed group for neutrons, which from_source() restores.
Activity