From 3020800ba43c82d97825f026df72b42798996d46 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Thu, 15 Sep 2016 10:43:45 -0400 Subject: [PATCH] moved conversion of decay_rate units from tally.F90 to openmc/data/product.py --- openmc/data/product.py | 4 +++- src/tally.F90 | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openmc/data/product.py b/openmc/data/product.py index 753888f6df..d8dc76e0f3 100644 --- a/openmc/data/product.py +++ b/openmc/data/product.py @@ -98,7 +98,9 @@ class Product(EqualityMixin): def decay_rate(self, decay_rate): cv.check_type('product decay rate', decay_rate, Real) cv.check_greater_than('product decay rate', decay_rate, 0.0, True) - self._decay_rate = decay_rate + + # Convert the decay rate from units of inverse shakes to inverse seconds + self._decay_rate = decay_rate * 1.e-8 @distribution.setter def distribution(self, distribution): diff --git a/src/tally.F90 b/src/tally.F90 index c0e8013a3d..765e8c88a2 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -708,7 +708,7 @@ contains score = p % absorb_wgt * yield * & micro_xs(p % event_nuclide) % fission & / micro_xs(p % event_nuclide) % absorption & - * rxn % products(1 + d) % decay_rate * 1.e8_8 + * rxn % products(1 + d) % decay_rate end associate ! Tally to bin @@ -733,7 +733,7 @@ contains ! and not the MAX_DELAYED_GROUPS constant for this loop. do d = 1, size(rxn % products) - 2 - score = score + rxn % products(1 + d) % decay_rate * 1.e8_8 * & + score = score + rxn % products(1 + d) % decay_rate * & p % absorb_wgt * micro_xs(p % event_nuclide) % fission *& nuclides(p % event_nuclide) % nu(E, EMISSION_DELAYED, d)& / micro_xs(p % event_nuclide) % absorption @@ -769,11 +769,9 @@ contains associate (rxn => nuclides(p % event_nuclide) % & reactions(nuclides(p % event_nuclide) % index_fission(1))) - ! determine score based on bank site weight and keff. Note that - ! the units of the decay rate have been converted from inverse - ! shakes to inverse seconds (1 shake = 1.e-8 seconds) + ! determine score based on bank site weight and keff. score = score + keff * fission_bank(n_bank - p % n_bank + k) & - % wgt * rxn % products(1 + g) % decay_rate * 1.e8_8 + % wgt * rxn % products(1 + g) % decay_rate end associate ! if the delayed group filter is present, tally to corresponding