mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-25 20:45:35 -04:00
Write neutron fission-less heating coefficient to HDF5
Mark reaction 999 as one to be kept during the export process
This commit is contained in:
parent
d81aaeca98
commit
81c6259289
2 changed files with 8 additions and 2 deletions
|
|
@ -453,7 +453,7 @@ class IncidentNeutron(EqualityMixin):
|
|||
if rx.redundant:
|
||||
photon_rx = any(p.particle == 'photon' for p in rx.products)
|
||||
keep_mts = (4, 16, 103, 104, 105, 106, 107,
|
||||
203, 204, 205, 206, 207, 301, 444)
|
||||
203, 204, 205, 206, 207, 301, 444, 999)
|
||||
if not (photon_rx or rx.mt in keep_mts):
|
||||
continue
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ def test_derived_products(am244):
|
|||
|
||||
|
||||
def test_heating(run_in_tmpdir, am244):
|
||||
assert 999 in am244.reactions # TBD
|
||||
assert 999 in am244.reactions
|
||||
strT = min(am244.reactions[1].xs.keys())
|
||||
total_xs = am244.reactions[1].xs[strT].y
|
||||
fission_xs = am244.reactions[18].xs[strT].y
|
||||
|
|
@ -215,6 +215,12 @@ def test_heating(run_in_tmpdir, am244):
|
|||
heating_number = total_heating / total_xs
|
||||
assert no_fission_heating == pytest.approx(
|
||||
heating_number * (total_xs - fission_xs))
|
||||
# Re-read to ensure data is written
|
||||
am244.export_to_hdf5("Am244.h5")
|
||||
new = openmc.data.IncidentNeutron.from_hdf5("Am244.h5")
|
||||
assert 999 in new.reactions
|
||||
new_rxn = new.reactions[999].xs[strT].y
|
||||
assert (new_rxn == no_fission_heating).all()
|
||||
|
||||
|
||||
def test_urr(pu239):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue