mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 05:35:49 -04:00
Expand activation test to cover all cases for FluxCollapseHelper
This commit is contained in:
parent
35f8f03f10
commit
7e48637c1d
1 changed files with 11 additions and 4 deletions
|
|
@ -40,8 +40,16 @@ def model():
|
|||
return model
|
||||
|
||||
|
||||
@pytest.mark.parametrize("reaction_rate_mode", ["direct", "flux"])
|
||||
def test_activation(run_in_tmpdir, model, reaction_rate_mode):
|
||||
ENERGIES = np.logspace(log10(1e-5), log10(2e7), 100)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("reaction_rate_mode,reaction_rate_opts", [
|
||||
("direct", {}),
|
||||
("flux", {'energies': ENERGIES}),
|
||||
("flux", {'energies': ENERGIES, 'reactions': ['(n,gamma)']}),
|
||||
("flux", {'energies': ENERGIES, 'reactions': ['(n,gamma)'], 'nuclides': ['W186']}),
|
||||
])
|
||||
def test_activation(run_in_tmpdir, model, reaction_rate_mode, reaction_rate_opts):
|
||||
# Determine (n.gamma) reaction rate using initial run
|
||||
sp = model.run()
|
||||
with openmc.StatePoint(sp) as sp:
|
||||
|
|
@ -56,12 +64,11 @@ def test_activation(run_in_tmpdir, model, reaction_rate_mode):
|
|||
chain.export_to_xml('test_chain.xml')
|
||||
|
||||
# Create transport operator
|
||||
energies = np.logspace(log10(1e-5), log10(2e7), 100)
|
||||
op = openmc.deplete.Operator(
|
||||
model.geometry, model.settings, 'test_chain.xml',
|
||||
normalization_mode="source-rate",
|
||||
reaction_rate_mode=reaction_rate_mode,
|
||||
reaction_rate_opts={'energies': energies},
|
||||
reaction_rate_opts=reaction_rate_opts,
|
||||
)
|
||||
|
||||
# To determine the source rate necessary to reduce W186 density in half, we
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue