From 7b4d9d268d08df1a07873d794f4675aecfc75a73 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 22 May 2019 06:19:59 -0500 Subject: [PATCH] Change calculation of thermal elastic/inelastic xs --- src/thermal.cpp | 4 ++-- .../asymmetric_lattice/results_true.dat | 2 +- tests/regression_tests/cmfd_feed_2g/results_true.dat | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/thermal.cpp b/src/thermal.cpp index 5db578f9d..40bb19e89 100644 --- a/src/thermal.cpp +++ b/src/thermal.cpp @@ -199,7 +199,7 @@ ThermalScattering::calculate_xs(double E, double sqrtkT, int* i_temp, // Calculate S(a,b) inelastic scattering cross section auto& xs = sab.inelastic_sigma_; - *inelastic = (1.0 - f) * xs[i_grid] + f * xs[i_grid + 1]; + *inelastic = xs[i_grid] + f * (xs[i_grid + 1] - xs[i_grid]); // Check for elastic data if (!sab.elastic_e_in_.empty()) { @@ -231,7 +231,7 @@ ThermalScattering::calculate_xs(double E, double sqrtkT, int* i_temp, // Calculate S(a,b) elastic scattering cross section auto& xs = sab.elastic_P_; - *elastic = (1.0 - f) * xs[i_grid] + f * xs[i_grid + 1]; + *elastic = xs[i_grid] + f*(xs[i_grid + 1] - xs[i_grid]); } } else { // No elastic data diff --git a/tests/regression_tests/asymmetric_lattice/results_true.dat b/tests/regression_tests/asymmetric_lattice/results_true.dat index ecc30a056..43f59aa5d 100644 --- a/tests/regression_tests/asymmetric_lattice/results_true.dat +++ b/tests/regression_tests/asymmetric_lattice/results_true.dat @@ -1 +1 @@ -4b75e203d06d0fc1b4c4dfcb8c180d6f3df8fa2bc44e9775b59bbfd8f7a3785f956f9a9f301526f69c0f8a963ce2e553e0c62c7f6c696656ce1d47b415af6076 \ No newline at end of file +4401f503237c94e9d9cfc9f60e0269d5ae5bb67be3225e18c5510ed08616482964e2962a06268751f66a455fac3ddd5faf91555638dfb56fcd09eee60219edff \ No newline at end of file diff --git a/tests/regression_tests/cmfd_feed_2g/results_true.dat b/tests/regression_tests/cmfd_feed_2g/results_true.dat index 8161b2645..4b3dc3c96 100644 --- a/tests/regression_tests/cmfd_feed_2g/results_true.dat +++ b/tests/regression_tests/cmfd_feed_2g/results_true.dat @@ -1,5 +1,5 @@ k-combined: -1.038883E+00 1.017026E-02 +1.038883E+00 1.017030E-02 tally 1: 1.167304E+02 1.362680E+03 @@ -49,7 +49,7 @@ tally 3: 0.000000E+00 2.033842E-02 4.375294E-05 -4.296338E+00 +4.296339E+00 9.280716E-01 3.493776E+00 6.157094E-01 @@ -74,7 +74,7 @@ tally 3: 9.717439E+01 4.724254E+02 8.435691E-01 -3.666151E-02 +3.666152E-02 6.192881E+01 1.924016E+02 0.000000E+00 @@ -82,7 +82,7 @@ tally 3: 1.796382E-02 3.190854E-05 4.343238E+00 -9.514039E-01 +9.514040E-01 3.504683E+00 6.157615E-01 0.000000E+00 @@ -106,7 +106,7 @@ tally 3: 9.885292E+01 4.888720E+02 9.509199E-01 -4.670951E-02 +4.670952E-02 tally 4: 0.000000E+00 0.000000E+00 @@ -383,7 +383,7 @@ cmfd balance 1.08402E-03 1.09178E-03 5.45977E-04 -4.45554E-04 +4.45555E-04 4.01147E-04 3.71025E-04 3.57715E-04