Merge pull request #3 from pshriwise/centre_for_cylinder_spherical_meshes

Naming tally in activation unit test
This commit is contained in:
Rémi Delaporte-Mathurin 2022-10-12 09:43:34 +02:00 committed by GitHub
commit 9ecaafad7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ def model():
)
model.settings.run_mode = 'fixed source'
rx_tally = openmc.Tally()
rx_tally = openmc.Tally(name='activation tally')
rx_tally.scores = ['(n,gamma)']
model.tallies.append(rx_tally)
@ -53,7 +53,8 @@ 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:
tally = sp.tallies[1]
print(sp.tallies)
tally = sp.get_tally(name='activation tally')
capture_rate = tally.mean.flat[0]
# Create one-nuclide depletion chain