From c635084221860ee0347ae7699e955e644953aee9 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 22 Jan 2016 11:38:47 -0600 Subject: [PATCH] Add test to cover Watt, N-body phase space, and evaporation spectra. Fix bug with N-body phase space. --- src/ace.F90 | 2 +- tests/test_energy_laws/geometry.xml | 7 +++++++ tests/test_energy_laws/materials.xml | 11 +++++++++++ tests/test_energy_laws/results_true.dat | 2 ++ tests/test_energy_laws/settings.xml | 14 ++++++++++++++ tests/test_energy_laws/test_energy_laws.py | 21 +++++++++++++++++++++ 6 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 tests/test_energy_laws/geometry.xml create mode 100644 tests/test_energy_laws/materials.xml create mode 100644 tests/test_energy_laws/results_true.dat create mode 100644 tests/test_energy_laws/settings.xml create mode 100644 tests/test_energy_laws/test_energy_laws.py diff --git a/src/ace.F90 b/src/ace.F90 index 5b003d4067..1c49262985 100644 --- a/src/ace.F90 +++ b/src/ace.F90 @@ -1033,7 +1033,7 @@ contains ! Read energy law data call get_energy_dist(secondary%distribution(n)%obj, LAW, & - JXS(11), IDAT, nuc%awr, nuc%reactions(i)%Q_value) + JXS(11), IDAT, nuc%awr, nuc%reactions(i + 1)%Q_value) ! <<<<<<<<<<<<<<<<<<<<<<<<<<<< REMOVE THIS <<<<<<<<<<<<<<<<<<<<<<<<<<< ! Before the secondary distribution refactor, when the angle/energy diff --git a/tests/test_energy_laws/geometry.xml b/tests/test_energy_laws/geometry.xml new file mode 100644 index 0000000000..bb0e15d47f --- /dev/null +++ b/tests/test_energy_laws/geometry.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tests/test_energy_laws/materials.xml b/tests/test_energy_laws/materials.xml new file mode 100644 index 0000000000..1a40aeb1db --- /dev/null +++ b/tests/test_energy_laws/materials.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tests/test_energy_laws/results_true.dat b/tests/test_energy_laws/results_true.dat new file mode 100644 index 0000000000..777d0790d4 --- /dev/null +++ b/tests/test_energy_laws/results_true.dat @@ -0,0 +1,2 @@ +k-combined: +2.421637E+00 5.324089E-03 diff --git a/tests/test_energy_laws/settings.xml b/tests/test_energy_laws/settings.xml new file mode 100644 index 0000000000..9f0e8ed05f --- /dev/null +++ b/tests/test_energy_laws/settings.xml @@ -0,0 +1,14 @@ + + + + + 10 + 5 + 1000 + + + + + + + diff --git a/tests/test_energy_laws/test_energy_laws.py b/tests/test_energy_laws/test_energy_laws.py new file mode 100644 index 0000000000..5f436e4694 --- /dev/null +++ b/tests/test_energy_laws/test_energy_laws.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python + +"""The purpose of this test is to provide coverage of Watt, N-body phase space, +and evaporation energy distributions. The only nuclide that uses a Watt fission +spectrum in ENDF/B-VII.1 is U-233. The only nuclide that has a reaction using +the N-body phase space distribution is H-2(n.2n). Several nuclides have +reactions with evaporation spectra. In this test, the material is composed of +U-233, H-2, and Na-23 (which has several reactions with evaporation spectra. + +""" + +import glob +import os +import sys +sys.path.insert(0, os.pardir) +from testing_harness import TestHarness + + +if __name__ == '__main__': + harness = TestHarness('statepoint.10.*') + harness.main()