From d81aaeca981e2e10d06adfc560b6726d979f9a6e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 9 Aug 2019 11:25:16 -0500 Subject: [PATCH] Store fission heating IncidentNeutron.from_ace IncidentNeutron.from_ace now computes the fission heating and a fission-less heating coefficient. The fission heating is the product of the heating number and the fission cross section, and stored as MT318. The fission-less heating is the heating from all reactions except fission, computed as heating_number * (total_xs - fission_xs). The MT number for this is taken to be 999 as a temporary value. A test is added for Am244 in test_data_neutron.py to examine the new heating values --- openmc/data/neutron.py | 12 ++++++++++++ tests/unit_tests/test_data_neutron.py | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/openmc/data/neutron.py b/openmc/data/neutron.py index 9c73152d4..e903b6a92 100644 --- a/openmc/data/neutron.py +++ b/openmc/data/neutron.py @@ -633,6 +633,18 @@ class IncidentNeutron(EqualityMixin): rx = Reaction.from_ace(ace, i) data.reactions[rx.mt] = rx + # If present, use fission xs to compute "fission heating" coefficient + fission_reaction = data.reactions.get(18) + if fission_reaction is not None: + fission_xs = fission_reaction.xs[strT].y + + # Compute "fission-less" heating coefficient + no_fission_heating = Reaction(999) + no_fission_heating.xs[strT] = Tabulated1D( + energy, heating_number * (total_xs - fission_xs)) + no_fission_heating.redundant = True + data.reactions[999] = no_fission_heating + # Some photon production reactions may be assigned to MTs that don't # exist, usually MT=4. In this case, we create a new reaction and add # them diff --git a/tests/unit_tests/test_data_neutron.py b/tests/unit_tests/test_data_neutron.py index 3cf036aa2..7fccb33d8 100644 --- a/tests/unit_tests/test_data_neutron.py +++ b/tests/unit_tests/test_data_neutron.py @@ -205,6 +205,18 @@ def test_derived_products(am244): assert total_neutron.yield_(6e6) == pytest.approx(4.2558) +def test_heating(run_in_tmpdir, am244): + assert 999 in am244.reactions # TBD + strT = min(am244.reactions[1].xs.keys()) + total_xs = am244.reactions[1].xs[strT].y + fission_xs = am244.reactions[18].xs[strT].y + total_heating = am244.reactions[301].xs[strT].y + no_fission_heating = am244.reactions[999].xs[strT].y + heating_number = total_heating / total_xs + assert no_fission_heating == pytest.approx( + heating_number * (total_xs - fission_xs)) + + def test_urr(pu239): for T, ptable in pu239.urr.items(): assert T.endswith('K')