Repository: openmc-dev/openmc

Issue:
tallied weight w/ WCM resonance scattering
https://github.com/mit-crpg/openmc/blob/37c6d4a0f58a2143a51f7fd47689c6e492fdc024/src/tallies/tally.F90#L1015 needs to tally `wgt` instead of `last_wgt` for WCM resonance scattering to produce the correct fixed source answer for a tally with an elastic scattering score (specified using the MT number 2).  I haven't checked if this is a subset of a larger bug or if this change would adversely affect anything but the case I described.


Discussion:

Resolving patch:
diff --git a/openmc/settings.py b/openmc/settings.py
--- a/openmc/settings.py
+++ b/openmc/settings.py
@@ -11,7 +11,7 @@
 from openmc import VolumeCalculation, Source, Mesh
 
 _RUN_MODES = ['eigenvalue', 'fixed source', 'plot', 'volume', 'particle restart']
-_RES_SCAT_METHODS = ['dbrc', 'wcm', 'ares']
+_RES_SCAT_METHODS = ['dbrc', 'rvs']
 
 
 class Settings(object):
@@ -82,14 +82,13 @@ class Settings(object):
         Settings for resonance elastic scattering. Accepted keys are 'enable'
         (bool), 'method' (str), 'energy_min' (float), 'energy_max' (float), and
         'nuclides' (list). The 'method' can be set to 'dbrc' (Doppler broadening
-        rejection correction), 'wcm' (weight correction method), and 'ares'
-        (accelerated resonance elastic scattering). If not specified, 'ares' is
-        the default method. The 'energy_min' and 'energy_max' values indicate
-        the minimum and maximum energies above and below which the resonance
-        elastic scattering method is to be applied. The 'nuclides' list
-        indicates what nuclides the method should be applied to. In its absence,
-        the method will be applied to all nuclides with 0 K elastic scattering
-        data present.
+        rejection correction) or 'rvs' (relative velocity sampling). If not
+        specified, 'rvs' is the default method. The 'energy_min' and
+        'energy_max' values indicate the minimum and maximum energies above and
+        below which the resonance elastic scattering method is to be
+        applied. The 'nuclides' list indicates what nuclides the method should
+        be applied to. In its absence, the method will be applied to all
+        nuclides with 0 K elastic scattering data present.
     run_mode : {'eigenvalue', 'fixed source', 'plot', 'volume', 'particle restart'}
         The type of calculation to perform (default is 'eigenvalue')
     seed : int


Test patch:
diff --git a/tests/regression_tests/resonance_scattering/inputs_true.dat b/tests/regression_tests/resonance_scattering/inputs_true.dat
--- a/tests/regression_tests/resonance_scattering/inputs_true.dat
+++ b/tests/regression_tests/resonance_scattering/inputs_true.dat
@@ -26,7 +26,7 @@
   </source>
   <resonance_scattering>
     <enable>true</enable>
-    <method>ares</method>
+    <method>rvs</method>
     <energy_min>1.0</energy_min>
     <energy_max>210.0</energy_max>
     <nuclides>U238 U235 Pu239</nuclides>
diff --git a/tests/regression_tests/resonance_scattering/test.py b/tests/regression_tests/resonance_scattering/test.py
--- a/tests/regression_tests/resonance_scattering/test.py
+++ b/tests/regression_tests/resonance_scattering/test.py
@@ -28,7 +28,7 @@ def _build_inputs(self):
             'enable': True,
             'energy_min': 1.0,
             'energy_max': 210.0,
-            'method': 'ares',
+            'method': 'rvs',
             'nuclides': ['U238', 'U235', 'Pu239']
         }
 
diff --git a/tests/unit_tests/test_settings.py b/tests/unit_tests/test_settings.py
--- a/tests/unit_tests/test_settings.py
+++ b/tests/unit_tests/test_settings.py
@@ -40,7 +40,7 @@ def test_export_to_xml(run_in_tmpdir):
     s.trace = (10, 1, 20)
     s.track = [1, 1, 1, 2, 1, 1]
     s.ufs_mesh = mesh
-    s.resonance_scattering = {'enable': True, 'method': 'ares',
+    s.resonance_scattering = {'enable': True, 'method': 'rvs',
                               'energy_min': 1.0, 'energy_max': 1000.0,
                               'nuclides': ['U235', 'U238', 'Pu239']}
     s.volume_calculations = openmc.VolumeCalculation(