mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
MLBW test added
This commit is contained in:
parent
6b836a199c
commit
27c9d3c772
1 changed files with 35 additions and 0 deletions
|
|
@ -96,6 +96,18 @@ def am244():
|
|||
endf_file = os.path.join(_ENDF_DATA, 'neutrons', 'n-095_Am_244.endf')
|
||||
return openmc.data.IncidentNeutron.from_njoy(endf_file)
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def gd154cov():
|
||||
"""Gd154 ENDF data (contains Reich Moore resonance range)"""
|
||||
filename = os.path.join(_ENDF_DATA, 'neutrons', 'n-064_Gd_154.endf')
|
||||
return openmc.data.IncidentNeutron.from_endf(filename, get_covariance=True)
|
||||
|
||||
@pytest.fixture(scope='module')
|
||||
def ti50():
|
||||
"""Ti50 ENDF data (contains Multi-level Breit-Wigner resonance range)"""
|
||||
filename = os.path.join(_ENDF_DATA, 'neutrons', 'n-022_Ti_050.endf')
|
||||
return openmc.data.IncidentNeutron.from_endf(filename, get_covariance=True)
|
||||
|
||||
|
||||
def test_attributes(pu239):
|
||||
assert pu239.name == 'Pu239'
|
||||
|
|
@ -243,6 +255,29 @@ def test_mlbw(sm150):
|
|||
assert sorted(xs.keys()) == [2, 18, 102]
|
||||
assert np.all(xs[18] == 0.0)
|
||||
|
||||
#FIXME
|
||||
def test_mlbw_cov(ti50):
|
||||
#Testing on first range
|
||||
cov = ti50.res_covariance.ranges[0]
|
||||
res = ti50.resonances.ranges[0]
|
||||
assert cov.parameters['energy'][0] == pytest.approx(-21020.)
|
||||
assert res.parameters['energy'][0] == cov.parameters['energy'][0]
|
||||
assert isinstance(cov, openmc.data.resonance_covariance.MultiLevelBreitWignerCovariance)
|
||||
assert cov.energy_min == pytest.approx(1e-5)
|
||||
assert cov.energy_max == pytest.approx(587000.)
|
||||
assert cov.covariance[0,0] == pytest.approx(1.410177e5)
|
||||
|
||||
cov.res_subset('L',[1,1])
|
||||
subset = cov.parameters_subset
|
||||
assert not subset.empty
|
||||
assert cov.cov_subset is not None
|
||||
assert (subset['L'] == 1).all()
|
||||
cov.sample_resonance_parameters(1)
|
||||
xs = cov.reconstruct([10., 100., 1000.], res, 0)
|
||||
assert sorted(xs.keys()) == [2, 18, 102]
|
||||
|
||||
#FIXME
|
||||
|
||||
|
||||
def test_reichmoore(gd154):
|
||||
res = gd154.resonances
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue