Correct normalization of thermal elastic in non standard ENDF-6 files (#3234)

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Jose Ignacio Marquez Damian 2025-02-12 01:12:52 +01:00 committed by GitHub
parent 04393200cc
commit e9ddf885e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 85 additions and 58 deletions

View file

@ -41,7 +41,7 @@ def hzrh():
"""H in ZrH thermal scattering data."""
endf_data = os.environ['OPENMC_ENDF_DATA']
filename = os.path.join(endf_data, 'thermal_scatt', 'tsl-HinZrH.endf')
return openmc.data.ThermalScattering.from_endf(filename)
return openmc.data.ThermalScattering.from_endf(filename, divide_incoherent_elastic=True)
@pytest.fixture(scope='module')
@ -64,7 +64,7 @@ def sio2():
"""SiO2 thermal scattering data."""
endf_data = os.environ['OPENMC_ENDF_DATA']
filename = os.path.join(endf_data, 'thermal_scatt', 'tsl-SiO2.endf')
return openmc.data.ThermalScattering.from_endf(filename)
return openmc.data.ThermalScattering.from_endf(filename, divide_incoherent_elastic=True)
def test_h2o_attributes(h2o):
@ -144,7 +144,7 @@ def test_continuous_dist(h2o_njoy):
def test_h2o_endf():
endf_data = os.environ['OPENMC_ENDF_DATA']
filename = os.path.join(endf_data, 'thermal_scatt', 'tsl-HinH2O.endf')
h2o = openmc.data.ThermalScattering.from_endf(filename)
h2o = openmc.data.ThermalScattering.from_endf(filename, divide_incoherent_elastic=True)
assert not h2o.elastic
assert h2o.atomic_weight_ratio == pytest.approx(0.99917)
assert h2o.energy_max == pytest.approx(3.99993)