From 1e849fe16239883531c1bb27ce80d826f4583dad Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 13 Jul 2022 11:09:35 -0500 Subject: [PATCH] Apply @JoffreyDorville suggestions from code review Co-authored-by: Joffrey Dorville <54550047+JoffreyDorville@users.noreply.github.com> --- openmc/data/kalbach_mann.py | 6 +++--- tests/unit_tests/test_data_kalbach_mann.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openmc/data/kalbach_mann.py b/openmc/data/kalbach_mann.py index 02403b3ccc..a036da6949 100644 --- a/openmc/data/kalbach_mann.py +++ b/openmc/data/kalbach_mann.py @@ -133,7 +133,7 @@ def _separation_energy(compound, nucleus, particle): N_a = nucleus.n # Determine breakup energy of incident particle (ENDF-6 Formats Manual, - # Appendix H, Table 3) + # Appendix H, Table 3) in MeV za_to_breaking_energy = { 1: 0.0, 1001: 0.0, @@ -142,7 +142,7 @@ def _separation_energy(compound, nucleus, particle): 2003: 7.718043, 2004: 28.29566 } - I_b = za_to_breaking_energy[particle.za] + I_a = za_to_breaking_energy[particle.za] # Eq. 4 in in doi:10.1103/PhysRevC.37.2350 or ENDF-6 Formats Manual section # 6.2.3.2 @@ -153,7 +153,7 @@ def _separation_energy(compound, nucleus, particle): 33.22 * ((N_c - Z_c)**2 / A_c**(4./3.) - (N_a - Z_a)**2 / A_a**(4./3.)) - 0.717 * (Z_c**2 / A_c**(1./3.) - Z_a**2 / A_a**(1./3.)) + 1.211 * (Z_c**2 / A_c - Z_a**2 / A_a) - - I_b + I_a ) diff --git a/tests/unit_tests/test_data_kalbach_mann.py b/tests/unit_tests/test_data_kalbach_mann.py index 931e236bd0..3b837af7da 100644 --- a/tests/unit_tests/test_data_kalbach_mann.py +++ b/tests/unit_tests/test_data_kalbach_mann.py @@ -75,7 +75,7 @@ def test_atomic_representation(neutron, triton, b10, c12, c13, na23): assert triton.n == 2 assert triton.za == 1003 - # Test instanciation errors + # Test instantiation errors with pytest.raises(ValueError): _AtomicRepresentation(z=5, a=1) with pytest.raises(ValueError): @@ -129,7 +129,7 @@ def test_kalbach_slope(): ('Hg204.h5', 'n-080_Hg_204.endf') ] ) -def test_comparison_slope_hdf5(hdf5_filename, endf_type, endf_filename): +def test_comparison_slope_hdf5(hdf5_filename, endf_filename): """Test the calculation of the Kalbach-Mann slope done by OpenMC by comparing it to HDF5 data. The test is based on the first product of MT=5 (neutron). The isotopes tested have been selected because the