From 53fc6ff9f27c5639980be8aac11ad6ca5d66053f Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Mon, 14 Sep 2015 20:36:55 -0400 Subject: [PATCH 01/10] Add collision estimator --- src/constants.F90 | 3 +- src/global.F90 | 5 +- src/input_xml.F90 | 12 +++ src/tally.F90 | 253 ++++++++++++++++++++++++++++++++++------------ src/tracking.F90 | 3 +- 5 files changed, 208 insertions(+), 68 deletions(-) diff --git a/src/constants.F90 b/src/constants.F90 index 9a89542afa..e95f944d7f 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -251,7 +251,8 @@ module constants ! Tally estimator types integer, parameter :: & ESTIMATOR_ANALOG = 1, & - ESTIMATOR_TRACKLENGTH = 2 + ESTIMATOR_TRACKLENGTH = 2, & + ESTIMATOR_COLLISION = 3 ! Event types for tallies integer, parameter :: & diff --git a/src/global.F90 b/src/global.F90 index 0c5e382129..adc8f17dab 100644 --- a/src/global.F90 +++ b/src/global.F90 @@ -106,9 +106,11 @@ module global type(SetInt) :: active_analog_tallies type(SetInt) :: active_tracklength_tallies type(SetInt) :: active_current_tallies + type(SetInt) :: active_collision_tallies type(SetInt) :: active_tallies !$omp threadprivate(active_analog_tallies, active_tracklength_tallies, & -!$omp& active_current_tallies, active_tallies) +!$omp& active_current_tallies, active_collision_tallies, & +!$omp& active_tallies) ! Global tallies ! 1) collision estimate of k-eff @@ -487,6 +489,7 @@ contains call active_analog_tallies % clear() call active_tracklength_tallies % clear() call active_current_tallies % clear() + call active_collision_tallies % clear() call active_tallies % clear() ! Deallocate track_identifiers diff --git a/src/input_xml.F90 b/src/input_xml.F90 index 5c939a394f..d5a932ff64 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -3138,6 +3138,18 @@ contains ! Set estimator to track-length estimator t % estimator = ESTIMATOR_TRACKLENGTH + case ('collision') + ! If the estimator was set to an analog estimator, this means the + ! tally needs post-collision information + if (t % estimator == ESTIMATOR_ANALOG) then + call fatal_error("Cannot use collision estimator for tally " & + &// to_str(t % id)) + end if + + ! Set estimator to collision estimator + t % estimator = ESTIMATOR_COLLISION + write(*, *) t % estimator + case default call fatal_error("Invalid estimator '" // trim(temp_str) & &// "' on tally " // to_str(t % id)) diff --git a/src/tally.F90 b/src/tally.F90 index e78e58f284..9f9ae77657 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -81,8 +81,8 @@ contains case (SCORE_FLUX, SCORE_FLUX_YN) if (t % estimator == ESTIMATOR_ANALOG) then ! All events score to a flux bin. We actually use a collision - ! estimator since there is no way to count 'events' exactly for - ! the flux + ! estimator in place of an analog one since there is no way to count + ! 'events' exactly for the flux if (survival_biasing) then ! We need to account for the fact that some weight was already ! absorbed @@ -92,7 +92,8 @@ contains end if score = score / material_xs % total - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then ! For flux, we need no cross section score = flux end if @@ -111,7 +112,8 @@ contains score = p % last_wgt end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then if (i_nuclide > 0) then score = micro_xs(i_nuclide) % total * atom_density * flux else @@ -129,8 +131,9 @@ contains ! reaction rate score = p % last_wgt - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then - ! Note SCORE_SCATTER_N not available for tracklength. + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then + ! Note SCORE_SCATTER_N not available for tracklength/collision. if (i_nuclide > 0) then score = (micro_xs(i_nuclide) % total & - micro_xs(i_nuclide) % absorption) * atom_density * flux @@ -240,7 +243,8 @@ contains score = p % last_wgt end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then if (i_nuclide > 0) then score = micro_xs(i_nuclide) % absorption * atom_density * flux else @@ -271,7 +275,8 @@ contains / micro_xs(p % event_nuclide) % absorption end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then if (i_nuclide > 0) then score = micro_xs(i_nuclide) % fission * atom_density * flux else @@ -314,7 +319,8 @@ contains score = keff * p % wgt_bank end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then if (i_nuclide > 0) then score = micro_xs(i_nuclide) % nu_fission * atom_density * flux else @@ -347,7 +353,8 @@ contains micro_xs(p % event_nuclide) % absorption end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then if (i_nuclide > 0) then score = micro_xs(i_nuclide) % kappa_fission * atom_density * flux else @@ -368,7 +375,8 @@ contains if (p % event_MT /= score_bin) cycle SCORE_LOOP score = p % last_wgt - else if (t % estimator == ESTIMATOR_TRACKLENGTH) then + else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & + t % estimator == ESTIMATOR_COLLISION) then ! Any other cross section has to be calculated on-the-fly. For ! cross sections that are used often (e.g. n2n, ngamma, etc. for ! depletion), it might make sense to optimize this section or @@ -484,7 +492,8 @@ contains case(SCORE_FLUX_YN, SCORE_TOTAL_YN) score_index = score_index - 1 num_nm = 1 - if (t % estimator == ESTIMATOR_ANALOG) then + if (t % estimator == ESTIMATOR_ANALOG .or. & + t % estimator == ESTIMATOR_COLLISION) then uvw = p % last_uvw else if (t % estimator == ESTIMATOR_TRACKLENGTH) then uvw = p % coord(1) % uvw @@ -536,6 +545,59 @@ contains end do SCORE_LOOP end subroutine score_general +!=============================================================================== +! SCORE_ALL_NUCLIDES tallies individual nuclide reaction rates specifically when +! the user requests all. +!=============================================================================== + + subroutine score_all_nuclides(p, i_tally, flux, filter_index) + + type(Particle), intent(in) :: p + integer, intent(in) :: i_tally + real(8), intent(in) :: flux + integer, intent(in) :: filter_index + + integer :: i ! loop index for nuclides in material + integer :: i_nuclide ! index in nuclides array + real(8) :: atom_density ! atom density of single nuclide in atom/b-cm + type(TallyObject), pointer :: t + type(Material), pointer :: mat + + ! Get pointer to tally + t => tallies(i_tally) + + ! Get pointer to current material. We need this in order to determine what + ! nuclides are in the material + mat => materials(p % material) + + ! ========================================================================== + ! SCORE ALL INDIVIDUAL NUCLIDE REACTION RATES + + NUCLIDE_LOOP: do i = 1, mat % n_nuclides + + ! Determine index in nuclides array and atom density for i-th nuclide in + ! current material + i_nuclide = mat % nuclide(i) + atom_density = mat % atom_density(i) + + ! Determine score for each bin + call score_general(p, t, (i_nuclide-1)*t % n_score_bins, filter_index, & + i_nuclide, atom_density, flux) + + end do NUCLIDE_LOOP + + ! ========================================================================== + ! SCORE TOTAL MATERIAL REACTION RATES + + i_nuclide = -1 + atom_density = ZERO + + ! Determine score for each bin + call score_general(p, t, n_nuclides_total*t % n_score_bins, filter_index, & + i_nuclide, atom_density, flux) + + end subroutine score_all_nuclides + !=============================================================================== ! SCORE_ANALOG_TALLY keeps track of how many events occur in a specified cell, ! energy range, etc. Note that since these are "analog" tallies, they are only @@ -819,59 +881,6 @@ contains end subroutine score_tracklength_tally -!=============================================================================== -! SCORE_ALL_NUCLIDES tallies individual nuclide reaction rates specifically when -! the user requests all. -!=============================================================================== - - subroutine score_all_nuclides(p, i_tally, flux, filter_index) - - type(Particle), intent(in) :: p - integer, intent(in) :: i_tally - real(8), intent(in) :: flux - integer, intent(in) :: filter_index - - integer :: i ! loop index for nuclides in material - integer :: i_nuclide ! index in nuclides array - real(8) :: atom_density ! atom density of single nuclide in atom/b-cm - type(TallyObject), pointer :: t - type(Material), pointer :: mat - - ! Get pointer to tally - t => tallies(i_tally) - - ! Get pointer to current material. We need this in order to determine what - ! nuclides are in the material - mat => materials(p % material) - - ! ========================================================================== - ! SCORE ALL INDIVIDUAL NUCLIDE REACTION RATES - - NUCLIDE_LOOP: do i = 1, mat % n_nuclides - - ! Determine index in nuclides array and atom density for i-th nuclide in - ! current material - i_nuclide = mat % nuclide(i) - atom_density = mat % atom_density(i) - - ! Determine score for each bin - call score_general(p, t, (i_nuclide-1)*t % n_score_bins, filter_index, & - i_nuclide, atom_density, flux) - - end do NUCLIDE_LOOP - - ! ========================================================================== - ! SCORE TOTAL MATERIAL REACTION RATES - - i_nuclide = -1 - atom_density = ZERO - - ! Determine score for each bin - call score_general(p, t, n_nuclides_total*t % n_score_bins, filter_index, & - i_nuclide, atom_density, flux) - - end subroutine score_all_nuclides - !=============================================================================== ! SCORE_TL_ON_MESH calculate fluxes and reaction rates based on the track-length ! estimate of the flux specifically for tallies that have mesh filters. For @@ -1119,6 +1128,118 @@ contains end subroutine score_tl_on_mesh +!=============================================================================== +! SCORE_COLLISION_TALLY calculates fluxes and reaction rates based on the +! 1/Sigma_t estimate of the flux. This is triggered after every collision. It +! is invalid for tallies that require post-collison information because it can +! score reactions that didn't actually occur, and we don't a priori know what +! the outcome will be for reactions that we didn't sample. +!=============================================================================== + + subroutine score_collision_tally(p) + + type(Particle), intent(in) :: p + + integer :: i + integer :: i_tally + integer :: j ! loop index for scoring bins + integer :: k ! loop index for nuclide bins + integer :: filter_index ! single index for single bin + integer :: i_nuclide ! index in nuclides array (from bins) + real(8) :: flux ! collision estimate of flux + real(8) :: atom_density ! atom density of single nuclide + ! in atom/b-cm + logical :: found_bin ! scoring bin found? + type(TallyObject), pointer :: t + type(Material), pointer :: mat + + ! Determine collision estimate of flux + if (survival_biasing) then + ! We need to account for the fact that some weight was already absorbed + flux = (p % last_wgt + p % absorb_wgt) / material_xs % total + else + flux = p % last_wgt / material_xs % total + end if + + ! A loop over all tallies is necessary because we need to simultaneously + ! determine different filter bins for the same tally in order to score to it + + TALLY_LOOP: do i = 1, active_collision_tallies % size() + ! Get index of tally and pointer to tally + i_tally = active_collision_tallies % get_item(i) + t => tallies(i_tally) + + ! ======================================================================= + ! DETERMINE SCORING BIN COMBINATION + + call get_scoring_bins(p, i_tally, found_bin) + if (.not. found_bin) cycle + + ! ======================================================================= + ! CALCULATE RESULTS AND ACCUMULATE TALLY + + ! If we have made it here, we have a scoring combination of bins for this + ! tally -- now we need to determine where in the results array we should + ! be accumulating the tally values + + ! Determine scoring index for this filter combination + filter_index = sum((matching_bins(1:t%n_filters) - 1) * t % stride) + 1 + + if (t % all_nuclides) then + if (p % material /= MATERIAL_VOID) then + call score_all_nuclides(p, i_tally, flux, filter_index) + end if + else + + NUCLIDE_BIN_LOOP: do k = 1, t % n_nuclide_bins + ! Get index of nuclide in nuclides array + i_nuclide = t % nuclide_bins(k) + + if (i_nuclide > 0) then + if (p % material /= MATERIAL_VOID) then + ! Get pointer to current material + mat => materials(p % material) + + ! Determine if nuclide is actually in material + NUCLIDE_MAT_LOOP: do j = 1, mat % n_nuclides + ! If index of nuclide matches the j-th nuclide listed in the + ! material, break out of the loop + if (i_nuclide == mat % nuclide(j)) exit + + ! If we've reached the last nuclide in the material, it means + ! the specified nuclide to be tallied is not in this material + if (j == mat % n_nuclides) then + cycle NUCLIDE_BIN_LOOP + end if + end do NUCLIDE_MAT_LOOP + + atom_density = mat % atom_density(j) + else + atom_density = ZERO + end if + end if + + ! Determine score for each bin + call score_general(p, t, (k-1)*t % n_score_bins, filter_index, & + i_nuclide, atom_density, flux) + + end do NUCLIDE_BIN_LOOP + end if + + ! If the user has specified that we can assume all tallies are spatially + ! separate, this implies that once a tally has been scored to, we needn't + ! check the others. This cuts down on overhead when there are many + ! tallies specified + + if (assume_separate) exit TALLY_LOOP + + end do TALLY_LOOP + + ! Reset tally map positioning + position = 0 + + end subroutine score_collision_tally + !=============================================================================== ! GET_SCORING_BINS determines a combination of filter bins that should be scored ! for a tally based on the particle's current attributes. @@ -1873,6 +1994,8 @@ contains call active_analog_tallies % add(i_user_tallies + i) elseif (user_tallies(i) % estimator == ESTIMATOR_TRACKLENGTH) then call active_tracklength_tallies % add(i_user_tallies + i) + elseif (user_tallies(i) % estimator == ESTIMATOR_COLLISION) then + call active_collision_tallies % add(i_user_tallies + i) end if elseif (user_tallies(i) % type == TALLY_SURFACE_CURRENT) then call active_current_tallies % add(i_user_tallies + i) diff --git a/src/tracking.F90 b/src/tracking.F90 index 173babd2f5..81f01b4110 100644 --- a/src/tracking.F90 +++ b/src/tracking.F90 @@ -13,7 +13,7 @@ module tracking use random_lcg, only: prn use string, only: to_str use tally, only: score_analog_tally, score_tracklength_tally, & - score_surface_current + score_collision_tally, score_surface_current use track_output, only: initialize_particle_track, write_particle_track, & add_particle_track, finalize_particle_track @@ -157,6 +157,7 @@ contains ! has occurred rather than before because we need information on the ! outgoing energy for any tallies with an outgoing energy filter + if (active_collision_tallies % size() > 0) call score_collision_tally(p) if (active_analog_tallies % size() > 0) call score_analog_tally(p) ! Reset banked weight during collision From 9ced99197b14e73d0f71909818d3290d0c23a59c Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Wed, 16 Sep 2015 18:04:44 -0400 Subject: [PATCH 02/10] Add collision estimator to PyAPI --- openmc/constants.py | 3 ++- openmc/statepoint.py | 2 +- openmc/tallies.py | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openmc/constants.py b/openmc/constants.py index a6b535e6d1..73da05a71a 100644 --- a/openmc/constants.py +++ b/openmc/constants.py @@ -25,7 +25,8 @@ LATTICE_TYPES = {1: 'rectangular', 2: 'hexagonal'} ESTIMATOR_TYPES = {1: 'analog', - 2: 'tracklength'} + 2: 'tracklength', + 3: 'collision'} FILTER_TYPES = {1: 'universe', 2: 'material', diff --git a/openmc/statepoint.py b/openmc/statepoint.py index 06ed51c18d..e2efef6e0e 100644 --- a/openmc/statepoint.py +++ b/openmc/statepoint.py @@ -310,7 +310,7 @@ class StatePoint(object): # Iterate over all Tallies for tally_key in self._tally_keys: - # Read integer Tally estimator type code (analog or tracklength) + # Read integer Tally estimator type code (analog, tracklength, or collision) estimator_type = self._f['{0}{1}/estimator'.format(base, tally_key)].value # Read the Tally size specifications diff --git a/openmc/tallies.py b/openmc/tallies.py index 003acd9435..c968e68c9d 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -52,7 +52,7 @@ class Tally(object): List of nuclides to score results for scores : list of str List of defined scores, e.g. 'flux', 'fission', etc. - estimator : {'analog', 'tracklength'} + estimator : {'analog', 'tracklength', 'collision'} Type of estimator for the tally triggers : list of openmc.trigger.Trigger List of tally triggers @@ -289,7 +289,8 @@ class Tally(object): @estimator.setter def estimator(self, estimator): - check_value('estimator', estimator, ['analog', 'tracklength']) + check_value('estimator', estimator, + ['analog', 'tracklength', 'collision']) self._estimator = estimator def add_trigger(self, trigger): From 333ce8034086be92ceb9de55047654d30f426526 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 17 Sep 2015 15:50:47 -0400 Subject: [PATCH 03/10] Add collision estimator to docs --- docs/source/usersguide/input.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 93e8236ec1..34d3f7df43 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -1278,14 +1278,16 @@ The ```` element accepts the following sub-elements: *Default*: total :estimator: - The estimator element is used to force the use of either ``analog`` or - ``tracklength`` tally estimation. ''analog'' is generally less efficient - though it can be used with every score type. ''tracklength'' is generally - the most efficient, though its usage is restricted to tallies that do not - score particle information which requires a collision to have occured, such - as a scattering tally which utilizes outgoing energy filters. + The estimator element is used to force the use of either ``analog``, + ``collision``, or ``tracklength`` tally estimation. ``analog`` is generally + the least efficient though it can be used with every score type. + ``tracklength`` is generally the most efficient, but neither ``tracklength`` + nor ``collision`` can be used to score a tally that requires post-collision + information. For example, a scattering tally with outgoing energy filters + cannot be used with ``tracklength`` or ``collision`` because the code will + not know the outgoing energy distribution. - *Default*: ``tracklength`` but will revert to analog if necessary. + *Default*: ``tracklength`` but will revert to ``analog`` if necessary. :scores: A space-separated list of the desired responses to be accumulated. Accepted From 9c3f77fe904dc5b5fd0b995fe298b5e1c85089fb Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 17 Sep 2015 16:20:15 -0400 Subject: [PATCH 04/10] Add collision estimator tests --- tests/test_score_MT/results_true.dat | 66 ++ tests/test_score_MT/tallies.xml | 14 +- tests/test_score_absorption/results_true.dat | 9 + tests/test_score_absorption/tallies.xml | 8 +- tests/test_score_fission/results_true.dat | 9 + tests/test_score_fission/tallies.xml | 8 +- tests/test_score_flux/results_true.dat | 26 + tests/test_score_flux/tallies.xml | 14 +- tests/test_score_flux_yn/results_true.dat | 866 ++++++++++++++++++ tests/test_score_flux_yn/tallies.xml | 12 + .../test_score_kappafission/results_true.dat | 18 + tests/test_score_kappafission/tallies.xml | 14 +- tests/test_score_nufission/results_true.dat | 18 + tests/test_score_nufission/tallies.xml | 14 +- tests/test_score_scatter/results_true.dat | 18 + tests/test_score_scatter/tallies.xml | 14 +- tests/test_score_total/results_true.dat | 18 + tests/test_score_total/tallies.xml | 14 +- tests/test_score_total_yn/results_true.dat | 802 ++++++++++++++++ tests/test_score_total_yn/tallies.xml | 14 + 20 files changed, 1968 insertions(+), 8 deletions(-) diff --git a/tests/test_score_MT/results_true.dat b/tests/test_score_MT/results_true.dat index 248f6657d0..4b1c1af26c 100644 --- a/tests/test_score_MT/results_true.dat +++ b/tests/test_score_MT/results_true.dat @@ -33,3 +33,69 @@ tally 1: 2.080857E-09 6.101318E-02 8.452067E-04 +tally 2: +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +3.000000E-01 +2.440000E-02 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +4.000000E-02 +6.000000E-04 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +tally 3: +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +5.724026E-03 +1.684945E-05 +5.724026E-03 +1.684945E-05 +3.250298E-01 +2.370870E-02 +1.083784E+00 +2.568556E-01 +4.449887E-05 +1.980149E-09 +4.449887E-05 +1.980149E-09 +3.526275E-02 +2.863085E-04 +1.417358E-02 +4.375519E-05 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +5.106469E-05 +8.605176E-10 +6.204277E-02 +8.555398E-04 diff --git a/tests/test_score_MT/tallies.xml b/tests/test_score_MT/tallies.xml index ef7ff8dd82..5e66ae929e 100644 --- a/tests/test_score_MT/tallies.xml +++ b/tests/test_score_MT/tallies.xml @@ -6,4 +6,16 @@ n2n 16 51 102 - \ No newline at end of file + + + n2n 16 51 102 + analog + + + + + n2n 16 51 102 + collision + + + diff --git a/tests/test_score_absorption/results_true.dat b/tests/test_score_absorption/results_true.dat index bacbf26a37..9370a146f5 100644 --- a/tests/test_score_absorption/results_true.dat +++ b/tests/test_score_absorption/results_true.dat @@ -18,3 +18,12 @@ tally 2: 0.000000E+00 4.000000E-01 4.240000E-02 +tally 3: +0.000000E+00 +0.000000E+00 +1.990713E+00 +8.557870E-01 +1.427399E-02 +4.420707E-05 +2.968053E-01 +1.960663E-02 diff --git a/tests/test_score_absorption/tallies.xml b/tests/test_score_absorption/tallies.xml index 8cbcef251c..8b2dc29314 100644 --- a/tests/test_score_absorption/tallies.xml +++ b/tests/test_score_absorption/tallies.xml @@ -12,4 +12,10 @@ absorption - \ No newline at end of file + + + collision + absorption + + + diff --git a/tests/test_score_fission/results_true.dat b/tests/test_score_fission/results_true.dat index 904c0d8895..86b31aaafd 100644 --- a/tests/test_score_fission/results_true.dat +++ b/tests/test_score_fission/results_true.dat @@ -18,3 +18,12 @@ tally 2: 0.000000E+00 9.923196E-01 2.067216E-01 +tally 3: +9.036254E-01 +1.746552E-01 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +9.912744E-01 +2.192705E-01 diff --git a/tests/test_score_fission/tallies.xml b/tests/test_score_fission/tallies.xml index d56614bdfa..a8b57f9116 100644 --- a/tests/test_score_fission/tallies.xml +++ b/tests/test_score_fission/tallies.xml @@ -12,4 +12,10 @@ fission - \ No newline at end of file + + + collision + fission + + + diff --git a/tests/test_score_flux/results_true.dat b/tests/test_score_flux/results_true.dat index 31e1d92926..31ca238d48 100644 --- a/tests/test_score_flux/results_true.dat +++ b/tests/test_score_flux/results_true.dat @@ -13,3 +13,29 @@ tally 1: 2.880575E+01 5.605671E+01 6.804062E+02 +tally 2: +3.077754E+01 +2.017424E+02 +1.172238E+01 +3.139127E+01 +5.231699E+01 +5.870469E+02 +3.259142E+01 +2.336719E+02 +1.040924E+01 +2.432332E+01 +5.709679E+01 +6.978668E+02 +tally 3: +3.077754E+01 +2.017424E+02 +1.172238E+01 +3.139127E+01 +5.231699E+01 +5.870469E+02 +3.259142E+01 +2.336719E+02 +1.040924E+01 +2.432332E+01 +5.709679E+01 +6.978668E+02 diff --git a/tests/test_score_flux/tallies.xml b/tests/test_score_flux/tallies.xml index 30bef71741..bcde40c75d 100644 --- a/tests/test_score_flux/tallies.xml +++ b/tests/test_score_flux/tallies.xml @@ -6,4 +6,16 @@ flux - \ No newline at end of file + + + flux + analog + + + + + flux + collision + + + diff --git a/tests/test_score_flux_yn/results_true.dat b/tests/test_score_flux_yn/results_true.dat index 2e5df97cf4..937f810ea6 100644 --- a/tests/test_score_flux_yn/results_true.dat +++ b/tests/test_score_flux_yn/results_true.dat @@ -446,3 +446,869 @@ tally 2: 1.093913E-01 2.235961E-01 5.449263E-02 +tally 3: +3.077754E+01 +2.017424E+02 +-4.040800E-01 +5.606719E-01 +-5.238239E-01 +4.460714E-01 +1.155164E-01 +1.686786E-01 +-1.972294E-01 +2.912851E-01 +4.908524E-01 +1.374195E-01 +-1.467088E-02 +1.080839E-01 +6.749037E-02 +1.397361E-01 +4.136479E-03 +9.237632E-02 +-3.742305E-01 +9.917374E-02 +5.374208E-01 +2.530961E-01 +2.270996E-01 +9.415721E-02 +-4.568867E-02 +1.277446E-01 +1.581716E-01 +6.217155E-02 +4.667840E-01 +1.143380E-01 +9.684270E-02 +7.302998E-02 +8.366629E-01 +1.797483E-01 +-5.657893E-01 +2.553910E-01 +-2.351441E-02 +4.395513E-02 +7.843306E-01 +1.466478E-01 +4.617856E-02 +1.154681E-02 +1.431343E-01 +3.531062E-02 +4.625825E-01 +6.235642E-02 +-8.837342E-02 +6.231694E-02 +-3.766755E-01 +6.412261E-02 +1.995226E-01 +1.743990E-01 +-2.498625E-02 +8.897536E-02 +-1.039315E-01 +1.868672E-01 +6.712910E-01 +2.084042E-01 +5.805639E-02 +4.049580E-02 +1.603677E-01 +4.280033E-02 +3.909878E-01 +7.726018E-02 +9.878354E-02 +4.630595E-02 +-2.389983E-01 +3.528604E-02 +1.641046E-01 +1.669859E-01 +-2.351986E-02 +1.048794E-02 +1.172238E+01 +3.139127E+01 +-1.057733E+00 +2.820672E-01 +5.708838E-02 +6.224675E-02 +2.492981E-02 +1.827498E-01 +-1.339268E-01 +1.968929E-02 +2.363867E-01 +3.028587E-02 +-2.867841E-01 +2.680318E-02 +-2.352784E-01 +1.895006E-02 +4.365572E-01 +1.883240E-01 +-3.388837E-01 +7.209932E-02 +3.488374E-01 +6.640137E-02 +-3.343893E-01 +4.149634E-02 +-4.575314E-01 +7.461614E-02 +4.436881E-01 +1.325092E-01 +3.394853E-01 +2.987173E-02 +-2.633936E-02 +6.171428E-02 +9.994191E-02 +6.447641E-02 +-1.618840E-01 +3.497845E-02 +-1.290678E-01 +3.735394E-02 +9.852126E-03 +2.963925E-02 +-1.656539E-01 +4.190396E-02 +-2.292763E-01 +7.045480E-02 +-4.616824E-03 +1.926690E-02 +-1.960839E-01 +1.396042E-02 +-2.133526E-02 +5.189823E-02 +2.933136E-01 +5.721356E-02 +-1.084914E-01 +2.448532E-02 +-4.778583E-01 +7.644033E-02 +1.736901E-01 +6.630467E-02 +-5.460801E-02 +1.510381E-02 +1.106093E-01 +1.590306E-02 +1.659501E-01 +5.983218E-02 +1.343781E-02 +2.751294E-02 +2.052693E-01 +3.478581E-02 +-1.006298E-01 +1.815313E-02 +-2.563766E-01 +3.045246E-02 +5.231699E+01 +5.870469E+02 +-6.102587E-01 +5.930968E-01 +1.184182E+00 +1.364433E+00 +-6.362263E-02 +8.852514E-01 +-4.844978E-01 +1.751923E-01 +8.223413E-01 +2.436206E-01 +-9.656506E-01 +3.513566E-01 +2.710494E-01 +7.170772E-01 +4.792482E-01 +2.551569E-01 +-1.266077E-01 +2.824778E-01 +6.389964E-01 +2.501483E-01 +8.915816E-01 +3.557431E-01 +-1.007448E+00 +5.743018E-01 +3.528444E-01 +2.428078E-01 +-5.833000E-01 +3.733648E-01 +-4.660289E-01 +6.567263E-02 +5.856088E-01 +2.336146E-01 +3.836351E-02 +7.665403E-02 +-6.721211E-01 +2.651780E-01 +5.725993E-01 +2.101026E-01 +-2.130594E-01 +1.855350E-02 +2.607168E-01 +1.564288E-01 +-3.399382E-02 +3.067656E-02 +-1.228976E+00 +6.554836E-01 +-2.962235E-01 +1.808511E-01 +5.521675E-01 +1.722073E-01 +-1.658751E-01 +1.994119E-02 +-2.671896E-01 +1.343320E-01 +-2.325282E-01 +4.677656E-02 +-3.380310E-01 +1.703532E-01 +-3.571853E-01 +1.140525E-01 +3.836770E-02 +8.586429E-02 +7.328263E-01 +1.567227E-01 +4.840110E-02 +2.718471E-02 +5.654783E-01 +3.645579E-01 +-3.027585E-01 +1.407867E-01 +3.259142E+01 +2.336719E+02 +3.053294E-01 +2.086257E-01 +-7.563597E-01 +2.816768E-01 +-3.039288E-01 +2.855043E-01 +-2.648323E-01 +1.883784E-01 +2.665933E-01 +1.782353E-01 +1.978960E-01 +1.419567E-01 +1.228712E-01 +1.913946E-01 +-9.152681E-03 +1.324681E-01 +-5.707326E-01 +1.092067E-01 +2.326858E-01 +6.731743E-02 +-5.170241E-01 +1.353439E-01 +-4.064026E-01 +9.715030E-02 +-1.142031E-01 +7.748788E-02 +2.928039E-01 +2.716157E-01 +-1.721186E-01 +1.447738E-01 +6.452116E-01 +1.821975E-01 +-5.697276E-01 +1.047333E-01 +-9.640967E-02 +1.139327E-01 +-4.509832E-01 +2.079493E-01 +-2.134684E-02 +2.907667E-01 +-2.434868E-01 +1.235397E-01 +2.550330E-01 +2.979627E-01 +9.598615E-01 +3.140885E-01 +1.218430E-01 +6.283872E-02 +2.412915E-01 +1.907292E-02 +-2.236667E-01 +4.379414E-02 +2.844474E-01 +2.965692E-02 +1.618860E-01 +8.293785E-03 +-1.265583E-01 +4.515449E-02 +6.356127E-02 +1.358134E-02 +-3.844886E-01 +8.600010E-02 +-1.942739E-01 +7.516022E-02 +1.765511E-01 +3.522611E-02 +-3.433188E-01 +3.456066E-02 +-1.501983E-01 +5.633844E-02 +1.040924E+01 +2.432332E+01 +-4.138270E-01 +1.309129E-01 +-3.151106E-01 +1.286964E-01 +9.213222E-02 +6.189454E-02 +-2.746107E-01 +8.103949E-02 +-9.781742E-02 +3.783736E-02 +-1.178371E-01 +3.242332E-02 +-5.837932E-01 +2.059491E-01 +-7.338223E-03 +8.012203E-02 +5.628994E-02 +2.190669E-02 +8.155585E-02 +1.039007E-01 +6.052048E-02 +4.339463E-02 +-1.157646E-02 +1.839000E-02 +-2.641673E-01 +4.737589E-02 +-8.531135E-02 +5.432766E-02 +6.036555E-01 +1.190329E-01 +-3.149976E-01 +5.735264E-02 +-8.456340E-02 +4.563143E-03 +2.224065E-01 +6.600030E-02 +9.562392E-03 +1.843524E-02 +-2.400599E-01 +3.182217E-02 +-6.534941E-01 +1.180315E-01 +4.371157E-01 +9.076666E-02 +3.257455E-02 +2.936184E-02 +-8.788428E-02 +1.923293E-02 +-2.604776E-01 +3.660313E-02 +-6.315350E-02 +1.503534E-02 +5.609294E-01 +8.783528E-02 +-7.363672E-01 +1.789210E-01 +2.883575E-01 +6.478578E-02 +-3.302954E-02 +1.517946E-02 +-3.234157E-01 +4.418920E-02 +2.846318E-01 +2.712085E-02 +-3.227536E-01 +5.062832E-02 +4.391474E-01 +5.548002E-02 +1.322988E-01 +2.995854E-02 +5.709679E+01 +6.978668E+02 +2.859201E-02 +1.094507E+00 +6.058587E-01 +6.079927E-01 +7.553798E-02 +1.131607E+00 +-5.851206E-01 +1.215663E+00 +8.266012E-02 +9.031287E-01 +-7.088368E-01 +3.984608E-01 +-4.414986E-01 +1.502417E-01 +2.241998E-01 +3.228823E-01 +-7.328574E-01 +2.430448E-01 +-8.070160E-01 +1.767265E-01 +-1.154449E-01 +8.739303E-03 +-3.787161E-01 +4.728756E-01 +-1.743577E-01 +1.091245E-01 +2.878137E-01 +2.724285E-01 +2.128994E-01 +4.440539E-01 +9.495567E-01 +3.622719E-01 +1.422950E-01 +5.309223E-02 +1.323659E-01 +1.911979E-01 +-1.303752E-01 +5.710728E-01 +-4.611294E-02 +4.086632E-02 +5.937879E-01 +1.006156E-01 +-3.558925E-01 +2.998983E-01 +1.175971E+00 +5.323321E-01 +2.426485E-01 +1.497265E-01 +7.805090E-02 +5.060214E-02 +-2.914577E-01 +2.233355E-01 +1.053098E-01 +6.693123E-02 +4.541315E-01 +1.328340E-01 +-6.290732E-02 +8.910616E-02 +7.371592E-01 +1.980732E-01 +5.804701E-01 +1.711949E-01 +-6.642202E-01 +1.131866E-01 +1.779818E-01 +6.530190E-02 +-5.224739E-01 +2.534102E-01 +-1.824905E-01 +2.910309E-02 +tally 4: +3.077754E+01 +2.017424E+02 +-4.040800E-01 +5.606719E-01 +-5.238239E-01 +4.460714E-01 +1.155164E-01 +1.686786E-01 +-1.972294E-01 +2.912851E-01 +4.908524E-01 +1.374195E-01 +-1.467088E-02 +1.080839E-01 +6.749037E-02 +1.397361E-01 +4.136479E-03 +9.237632E-02 +-3.742305E-01 +9.917374E-02 +5.374208E-01 +2.530961E-01 +2.270996E-01 +9.415721E-02 +-4.568867E-02 +1.277446E-01 +1.581716E-01 +6.217155E-02 +4.667840E-01 +1.143380E-01 +9.684270E-02 +7.302998E-02 +8.366629E-01 +1.797483E-01 +-5.657893E-01 +2.553910E-01 +-2.351441E-02 +4.395513E-02 +7.843306E-01 +1.466478E-01 +4.617856E-02 +1.154681E-02 +1.431343E-01 +3.531062E-02 +4.625825E-01 +6.235642E-02 +-8.837342E-02 +6.231694E-02 +-3.766755E-01 +6.412261E-02 +1.995226E-01 +1.743990E-01 +-2.498625E-02 +8.897536E-02 +-1.039315E-01 +1.868672E-01 +6.712910E-01 +2.084042E-01 +5.805639E-02 +4.049580E-02 +1.603677E-01 +4.280033E-02 +3.909878E-01 +7.726018E-02 +9.878354E-02 +4.630595E-02 +-2.389983E-01 +3.528604E-02 +1.641046E-01 +1.669859E-01 +-2.351986E-02 +1.048794E-02 +1.172238E+01 +3.139127E+01 +-1.057733E+00 +2.820672E-01 +5.708838E-02 +6.224675E-02 +2.492981E-02 +1.827498E-01 +-1.339268E-01 +1.968929E-02 +2.363867E-01 +3.028587E-02 +-2.867841E-01 +2.680318E-02 +-2.352784E-01 +1.895006E-02 +4.365572E-01 +1.883240E-01 +-3.388837E-01 +7.209932E-02 +3.488374E-01 +6.640137E-02 +-3.343893E-01 +4.149634E-02 +-4.575314E-01 +7.461614E-02 +4.436881E-01 +1.325092E-01 +3.394853E-01 +2.987173E-02 +-2.633936E-02 +6.171428E-02 +9.994191E-02 +6.447641E-02 +-1.618840E-01 +3.497845E-02 +-1.290678E-01 +3.735394E-02 +9.852126E-03 +2.963925E-02 +-1.656539E-01 +4.190396E-02 +-2.292763E-01 +7.045480E-02 +-4.616824E-03 +1.926690E-02 +-1.960839E-01 +1.396042E-02 +-2.133526E-02 +5.189823E-02 +2.933136E-01 +5.721356E-02 +-1.084914E-01 +2.448532E-02 +-4.778583E-01 +7.644033E-02 +1.736901E-01 +6.630467E-02 +-5.460801E-02 +1.510381E-02 +1.106093E-01 +1.590306E-02 +1.659501E-01 +5.983218E-02 +1.343781E-02 +2.751294E-02 +2.052693E-01 +3.478581E-02 +-1.006298E-01 +1.815313E-02 +-2.563766E-01 +3.045246E-02 +5.231699E+01 +5.870469E+02 +-6.102587E-01 +5.930968E-01 +1.184182E+00 +1.364433E+00 +-6.362263E-02 +8.852514E-01 +-4.844978E-01 +1.751923E-01 +8.223413E-01 +2.436206E-01 +-9.656506E-01 +3.513566E-01 +2.710494E-01 +7.170772E-01 +4.792482E-01 +2.551569E-01 +-1.266077E-01 +2.824778E-01 +6.389964E-01 +2.501483E-01 +8.915816E-01 +3.557431E-01 +-1.007448E+00 +5.743018E-01 +3.528444E-01 +2.428078E-01 +-5.833000E-01 +3.733648E-01 +-4.660289E-01 +6.567263E-02 +5.856088E-01 +2.336146E-01 +3.836351E-02 +7.665403E-02 +-6.721211E-01 +2.651780E-01 +5.725993E-01 +2.101026E-01 +-2.130594E-01 +1.855350E-02 +2.607168E-01 +1.564288E-01 +-3.399382E-02 +3.067656E-02 +-1.228976E+00 +6.554836E-01 +-2.962235E-01 +1.808511E-01 +5.521675E-01 +1.722073E-01 +-1.658751E-01 +1.994119E-02 +-2.671896E-01 +1.343320E-01 +-2.325282E-01 +4.677656E-02 +-3.380310E-01 +1.703532E-01 +-3.571853E-01 +1.140525E-01 +3.836770E-02 +8.586429E-02 +7.328263E-01 +1.567227E-01 +4.840110E-02 +2.718471E-02 +5.654783E-01 +3.645579E-01 +-3.027585E-01 +1.407867E-01 +3.259142E+01 +2.336719E+02 +3.053294E-01 +2.086257E-01 +-7.563597E-01 +2.816768E-01 +-3.039288E-01 +2.855043E-01 +-2.648323E-01 +1.883784E-01 +2.665933E-01 +1.782353E-01 +1.978960E-01 +1.419567E-01 +1.228712E-01 +1.913946E-01 +-9.152681E-03 +1.324681E-01 +-5.707326E-01 +1.092067E-01 +2.326858E-01 +6.731743E-02 +-5.170241E-01 +1.353439E-01 +-4.064026E-01 +9.715030E-02 +-1.142031E-01 +7.748788E-02 +2.928039E-01 +2.716157E-01 +-1.721186E-01 +1.447738E-01 +6.452116E-01 +1.821975E-01 +-5.697276E-01 +1.047333E-01 +-9.640967E-02 +1.139327E-01 +-4.509832E-01 +2.079493E-01 +-2.134684E-02 +2.907667E-01 +-2.434868E-01 +1.235397E-01 +2.550330E-01 +2.979627E-01 +9.598615E-01 +3.140885E-01 +1.218430E-01 +6.283872E-02 +2.412915E-01 +1.907292E-02 +-2.236667E-01 +4.379414E-02 +2.844474E-01 +2.965692E-02 +1.618860E-01 +8.293785E-03 +-1.265583E-01 +4.515449E-02 +6.356127E-02 +1.358134E-02 +-3.844886E-01 +8.600010E-02 +-1.942739E-01 +7.516022E-02 +1.765511E-01 +3.522611E-02 +-3.433188E-01 +3.456066E-02 +-1.501983E-01 +5.633844E-02 +1.040924E+01 +2.432332E+01 +-4.138270E-01 +1.309129E-01 +-3.151106E-01 +1.286964E-01 +9.213222E-02 +6.189454E-02 +-2.746107E-01 +8.103949E-02 +-9.781742E-02 +3.783736E-02 +-1.178371E-01 +3.242332E-02 +-5.837932E-01 +2.059491E-01 +-7.338223E-03 +8.012203E-02 +5.628994E-02 +2.190669E-02 +8.155585E-02 +1.039007E-01 +6.052048E-02 +4.339463E-02 +-1.157646E-02 +1.839000E-02 +-2.641673E-01 +4.737589E-02 +-8.531135E-02 +5.432766E-02 +6.036555E-01 +1.190329E-01 +-3.149976E-01 +5.735264E-02 +-8.456340E-02 +4.563143E-03 +2.224065E-01 +6.600030E-02 +9.562392E-03 +1.843524E-02 +-2.400599E-01 +3.182217E-02 +-6.534941E-01 +1.180315E-01 +4.371157E-01 +9.076666E-02 +3.257455E-02 +2.936184E-02 +-8.788428E-02 +1.923293E-02 +-2.604776E-01 +3.660313E-02 +-6.315350E-02 +1.503534E-02 +5.609294E-01 +8.783528E-02 +-7.363672E-01 +1.789210E-01 +2.883575E-01 +6.478578E-02 +-3.302954E-02 +1.517946E-02 +-3.234157E-01 +4.418920E-02 +2.846318E-01 +2.712085E-02 +-3.227536E-01 +5.062832E-02 +4.391474E-01 +5.548002E-02 +1.322988E-01 +2.995854E-02 +5.709679E+01 +6.978668E+02 +2.859201E-02 +1.094507E+00 +6.058587E-01 +6.079927E-01 +7.553798E-02 +1.131607E+00 +-5.851206E-01 +1.215663E+00 +8.266012E-02 +9.031287E-01 +-7.088368E-01 +3.984608E-01 +-4.414986E-01 +1.502417E-01 +2.241998E-01 +3.228823E-01 +-7.328574E-01 +2.430448E-01 +-8.070160E-01 +1.767265E-01 +-1.154449E-01 +8.739303E-03 +-3.787161E-01 +4.728756E-01 +-1.743577E-01 +1.091245E-01 +2.878137E-01 +2.724285E-01 +2.128994E-01 +4.440539E-01 +9.495567E-01 +3.622719E-01 +1.422950E-01 +5.309223E-02 +1.323659E-01 +1.911979E-01 +-1.303752E-01 +5.710728E-01 +-4.611294E-02 +4.086632E-02 +5.937879E-01 +1.006156E-01 +-3.558925E-01 +2.998983E-01 +1.175971E+00 +5.323321E-01 +2.426485E-01 +1.497265E-01 +7.805090E-02 +5.060214E-02 +-2.914577E-01 +2.233355E-01 +1.053098E-01 +6.693123E-02 +4.541315E-01 +1.328340E-01 +-6.290732E-02 +8.910616E-02 +7.371592E-01 +1.980732E-01 +5.804701E-01 +1.711949E-01 +-6.642202E-01 +1.131866E-01 +1.779818E-01 +6.530190E-02 +-5.224739E-01 +2.534102E-01 +-1.824905E-01 +2.910309E-02 diff --git a/tests/test_score_flux_yn/tallies.xml b/tests/test_score_flux_yn/tallies.xml index 71301d0e7f..e9f08bd4e6 100644 --- a/tests/test_score_flux_yn/tallies.xml +++ b/tests/test_score_flux_yn/tallies.xml @@ -10,5 +10,17 @@ flux-y5 + + + + flux-y5 + analog + + + + + flux-y5 + collision + diff --git a/tests/test_score_kappafission/results_true.dat b/tests/test_score_kappafission/results_true.dat index dadcdd281b..e992b4b682 100644 --- a/tests/test_score_kappafission/results_true.dat +++ b/tests/test_score_kappafission/results_true.dat @@ -9,3 +9,21 @@ tally 1: 0.000000E+00 2.035912E+02 8.999693E+03 +tally 2: +1.765331E+02 +6.974050E+03 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +1.938441E+02 +7.888708E+03 +tally 3: +1.770125E+02 +6.702714E+03 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +1.942246E+02 +8.416720E+03 diff --git a/tests/test_score_kappafission/tallies.xml b/tests/test_score_kappafission/tallies.xml index 1b63fdeeb2..8fe5d5c842 100644 --- a/tests/test_score_kappafission/tallies.xml +++ b/tests/test_score_kappafission/tallies.xml @@ -6,4 +6,16 @@ kappa-fission - \ No newline at end of file + + + kappa-fission + analog + + + + + kappa-fission + collision + + + diff --git a/tests/test_score_nufission/results_true.dat b/tests/test_score_nufission/results_true.dat index 5d0b44662e..33c4ff9fbc 100644 --- a/tests/test_score_nufission/results_true.dat +++ b/tests/test_score_nufission/results_true.dat @@ -9,3 +9,21 @@ tally 1: 0.000000E+00 2.733038E+00 1.616903E+00 +tally 2: +2.296157E+00 +1.167084E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.679940E+00 +1.498454E+00 +tally 3: +2.381373E+00 +1.213497E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +2.607077E+00 +1.513932E+00 diff --git a/tests/test_score_nufission/tallies.xml b/tests/test_score_nufission/tallies.xml index d3e6963f3c..2812a00b55 100644 --- a/tests/test_score_nufission/tallies.xml +++ b/tests/test_score_nufission/tallies.xml @@ -6,4 +6,16 @@ nu-fission - \ No newline at end of file + + + nu-fission + analog + + + + + nu-fission + collision + + + diff --git a/tests/test_score_scatter/results_true.dat b/tests/test_score_scatter/results_true.dat index 5f0ae8b1dd..21d7d83c27 100644 --- a/tests/test_score_scatter/results_true.dat +++ b/tests/test_score_scatter/results_true.dat @@ -9,3 +9,21 @@ tally 1: 1.814004E+00 4.059013E+01 3.609499E+02 +tally 2: +0.000000E+00 +0.000000E+00 +1.169000E+01 +2.915330E+01 +3.200000E+00 +2.342600E+00 +4.064000E+01 +3.595168E+02 +tally 3: +0.000000E+00 +0.000000E+00 +1.172929E+01 +2.935812E+01 +3.185726E+00 +2.323517E+00 +4.074319E+01 +3.614902E+02 diff --git a/tests/test_score_scatter/tallies.xml b/tests/test_score_scatter/tallies.xml index a4425c0f24..b6eb73b506 100644 --- a/tests/test_score_scatter/tallies.xml +++ b/tests/test_score_scatter/tallies.xml @@ -6,4 +6,16 @@ scatter - \ No newline at end of file + + + scatter + analog + + + + + scatter + collision + + + diff --git a/tests/test_score_total/results_true.dat b/tests/test_score_total/results_true.dat index f3aa5d89b1..e782fd9d04 100644 --- a/tests/test_score_total/results_true.dat +++ b/tests/test_score_total/results_true.dat @@ -9,3 +9,21 @@ tally 1: 1.831649E+00 4.088282E+01 3.662539E+02 +tally 2: +0.000000E+00 +0.000000E+00 +1.372000E+01 +4.018980E+01 +3.200000E+00 +2.342600E+00 +4.104000E+01 +3.668254E+02 +tally 3: +0.000000E+00 +0.000000E+00 +1.372000E+01 +4.018980E+01 +3.200000E+00 +2.342600E+00 +4.104000E+01 +3.668254E+02 diff --git a/tests/test_score_total/tallies.xml b/tests/test_score_total/tallies.xml index 815b84c145..02286f96c7 100644 --- a/tests/test_score_total/tallies.xml +++ b/tests/test_score_total/tallies.xml @@ -6,4 +6,16 @@ total - \ No newline at end of file + + + total + analog + + + + + total + collision + + + diff --git a/tests/test_score_total_yn/results_true.dat b/tests/test_score_total_yn/results_true.dat index bcfdb9080f..28a4b1627e 100644 --- a/tests/test_score_total_yn/results_true.dat +++ b/tests/test_score_total_yn/results_true.dat @@ -410,3 +410,805 @@ tally 2: 3.130205E-02 -3.695818E-01 4.703480E-02 +tally 3: +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +7.200000E-01 +1.152000E-01 +-9.800486E-03 +5.637123E-04 +-2.018554E-02 +4.617738E-04 +-6.271657E-03 +8.252833E-04 +-8.231683E-03 +3.035447E-03 +-2.566508E-02 +1.108829E-03 +2.748466E-03 +1.641191E-03 +6.833190E-03 +5.993876E-04 +3.392213E-02 +2.143714E-03 +3.105616E-02 +1.012625E-03 +-5.473567E-02 +1.615531E-03 +-1.435523E-02 +1.095690E-03 +4.579564E-03 +6.451444E-04 +-1.570409E-02 +3.833387E-04 +1.633422E-02 +2.144997E-03 +-7.438775E-03 +6.441846E-04 +5.440025E-04 +1.290719E-04 +-1.687899E-02 +1.606230E-03 +3.315902E-02 +1.061759E-03 +-1.184684E-02 +4.312573E-04 +-4.732586E-02 +1.387994E-03 +-1.563538E-02 +3.316015E-04 +3.681927E-02 +5.403320E-04 +2.928507E-03 +5.761742E-04 +-3.519362E-02 +6.725185E-04 +1.372000E+01 +4.018980E+01 +-2.015212E-01 +1.072884E-01 +-2.606953E-01 +4.894468E-02 +7.537153E-02 +2.216346E-02 +-3.818524E-02 +6.301675E-02 +2.386335E-01 +1.931104E-02 +-1.872805E-02 +1.265896E-02 +3.732943E-02 +2.347696E-02 +-8.857050E-02 +1.636275E-02 +-1.718450E-01 +1.043488E-02 +1.526226E-01 +2.435399E-02 +7.344765E-02 +1.541644E-02 +-9.819186E-03 +1.473467E-02 +-8.215914E-03 +1.463085E-02 +2.197504E-01 +2.244815E-02 +2.521002E-02 +8.206540E-03 +3.677974E-01 +3.982027E-02 +-1.934606E-01 +3.440019E-02 +1.050141E-01 +2.346980E-02 +2.458487E-01 +1.861429E-02 +4.226131E-02 +2.690841E-03 +3.174234E-02 +1.867018E-02 +2.284995E-01 +1.190246E-02 +-7.894573E-03 +3.715471E-03 +-1.593928E-01 +1.391828E-02 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +3.200000E+00 +2.342600E+00 +-2.991985E-01 +1.868406E-02 +4.460301E-02 +4.132113E-03 +-2.190630E-02 +1.023889E-02 +-3.265764E-02 +2.060374E-03 +3.491521E-02 +4.785957E-04 +-3.623623E-02 +5.929111E-04 +-4.962268E-02 +1.814245E-03 +1.406439E-01 +1.174445E-02 +-9.433277E-02 +5.036897E-03 +9.058176E-02 +3.871598E-03 +-1.409089E-01 +6.665385E-03 +-1.062337E-01 +4.771650E-03 +1.155280E-01 +8.020320E-03 +8.348336E-02 +1.633941E-03 +1.475434E-02 +3.411046E-03 +4.474425E-03 +6.049348E-03 +6.716359E-03 +2.898000E-03 +-3.674047E-02 +2.971797E-03 +-2.368070E-02 +9.474965E-04 +-6.109826E-02 +4.846201E-03 +-5.076118E-02 +8.354393E-03 +-1.763594E-02 +1.017310E-03 +-2.941064E-02 +1.044916E-03 +-5.631429E-03 +3.915186E-03 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +4.104000E+01 +3.668254E+02 +-7.832373E-01 +3.913941E-01 +2.281642E-01 +2.669856E-01 +-3.731272E-01 +6.152809E-01 +-3.232973E-01 +7.526283E-02 +3.686513E-01 +9.047618E-02 +-6.018185E-01 +9.140623E-02 +3.848843E-01 +3.431711E-01 +3.397425E-03 +8.879103E-02 +-2.471531E-02 +5.561795E-02 +1.373897E-01 +7.288680E-02 +1.816888E-01 +5.419638E-02 +-3.504404E-01 +1.461853E-01 +1.225356E-01 +3.443595E-02 +-3.109887E-01 +5.492397E-02 +-3.542105E-01 +6.530224E-02 +2.104218E-01 +4.093872E-02 +2.661467E-02 +3.058847E-02 +-3.744331E-01 +6.755739E-02 +1.391218E-01 +4.432842E-02 +1.622041E-01 +6.843992E-03 +4.149973E-02 +1.782398E-02 +2.551752E-01 +2.626972E-02 +-4.706697E-01 +9.193926E-02 +-1.287882E-01 +3.489982E-02 +tally 4: +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +7.652157E-01 +1.242826E-01 +-1.008373E-02 +5.281691E-04 +-1.014715E-02 +2.749212E-04 +-2.506414E-02 +2.613512E-04 +4.320187E-03 +4.316562E-04 +1.439246E-02 +9.138575E-05 +-1.532539E-02 +2.360878E-04 +9.963404E-03 +1.511695E-04 +-6.314554E-03 +2.742799E-05 +7.969329E-03 +1.380329E-04 +-1.298431E-03 +3.287236E-04 +1.441639E-02 +1.409552E-04 +6.516689E-03 +2.511011E-04 +1.294596E-02 +2.249729E-04 +6.983038E-03 +6.334969E-05 +-1.086161E-02 +1.140033E-04 +2.217006E-02 +4.221807E-04 +-6.503276E-03 +2.028281E-04 +2.915180E-02 +3.659182E-04 +-9.080091E-03 +1.503808E-04 +-6.476980E-04 +1.927326E-04 +-1.549603E-02 +3.445843E-04 +2.957508E-02 +1.835035E-04 +6.982790E-03 +1.237342E-04 +-2.653281E-02 +2.606704E-04 +1.372000E+01 +4.018980E+01 +-2.015212E-01 +1.072884E-01 +-2.606953E-01 +4.894468E-02 +7.537153E-02 +2.216346E-02 +-3.818524E-02 +6.301675E-02 +2.386335E-01 +1.931104E-02 +-1.872805E-02 +1.265896E-02 +3.732943E-02 +2.347696E-02 +-8.857050E-02 +1.636275E-02 +-1.718450E-01 +1.043488E-02 +1.526226E-01 +2.435399E-02 +7.344765E-02 +1.541644E-02 +-9.819186E-03 +1.473467E-02 +-8.215914E-03 +1.463085E-02 +2.197504E-01 +2.244815E-02 +2.521002E-02 +8.206540E-03 +3.677974E-01 +3.982027E-02 +-1.934606E-01 +3.440019E-02 +1.050141E-01 +2.346980E-02 +2.458487E-01 +1.861429E-02 +4.226131E-02 +2.690841E-03 +3.174234E-02 +1.867018E-02 +2.284995E-01 +1.190246E-02 +-7.894573E-03 +3.715471E-03 +-1.593928E-01 +1.391828E-02 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +3.200000E+00 +2.342600E+00 +-2.991985E-01 +1.868406E-02 +4.460301E-02 +4.132113E-03 +-2.190630E-02 +1.023889E-02 +-3.265764E-02 +2.060374E-03 +3.491521E-02 +4.785957E-04 +-3.623623E-02 +5.929111E-04 +-4.962268E-02 +1.814245E-03 +1.406439E-01 +1.174445E-02 +-9.433277E-02 +5.036897E-03 +9.058176E-02 +3.871598E-03 +-1.409089E-01 +6.665385E-03 +-1.062337E-01 +4.771650E-03 +1.155280E-01 +8.020320E-03 +8.348336E-02 +1.633941E-03 +1.475434E-02 +3.411046E-03 +4.474425E-03 +6.049348E-03 +6.716359E-03 +2.898000E-03 +-3.674047E-02 +2.971797E-03 +-2.368070E-02 +9.474965E-04 +-6.109826E-02 +4.846201E-03 +-5.076118E-02 +8.354393E-03 +-1.763594E-02 +1.017310E-03 +-2.941064E-02 +1.044916E-03 +-5.631429E-03 +3.915186E-03 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +0.000000E+00 +4.104000E+01 +3.668254E+02 +-7.832373E-01 +3.913941E-01 +2.281642E-01 +2.669856E-01 +-3.731272E-01 +6.152809E-01 +-3.232973E-01 +7.526283E-02 +3.686513E-01 +9.047618E-02 +-6.018185E-01 +9.140623E-02 +3.848843E-01 +3.431711E-01 +3.397425E-03 +8.879103E-02 +-2.471531E-02 +5.561795E-02 +1.373897E-01 +7.288680E-02 +1.816888E-01 +5.419638E-02 +-3.504404E-01 +1.461853E-01 +1.225356E-01 +3.443595E-02 +-3.109887E-01 +5.492397E-02 +-3.542105E-01 +6.530224E-02 +2.104218E-01 +4.093872E-02 +2.661467E-02 +3.058847E-02 +-3.744331E-01 +6.755739E-02 +1.391218E-01 +4.432842E-02 +1.622041E-01 +6.843992E-03 +4.149973E-02 +1.782398E-02 +2.551752E-01 +2.626972E-02 +-4.706697E-01 +9.193926E-02 +-1.287882E-01 +3.489982E-02 diff --git a/tests/test_score_total_yn/tallies.xml b/tests/test_score_total_yn/tallies.xml index ca5dcd2dcb..51cb79c395 100644 --- a/tests/test_score_total_yn/tallies.xml +++ b/tests/test_score_total_yn/tallies.xml @@ -11,5 +11,19 @@ total-y4 U-235 total + + + + total-y4 + U-235 total + analog + + + + + total-y4 + U-235 total + collision + From 4ce7a5b615caded1e10d1b49aaf73dbf38d736f1 Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Thu, 17 Sep 2015 20:41:33 -0400 Subject: [PATCH 05/10] Explain analog = collision for flux score in docs --- docs/source/usersguide/input.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/usersguide/input.rst b/docs/source/usersguide/input.rst index 34d3f7df43..a80c01d14e 100644 --- a/docs/source/usersguide/input.rst +++ b/docs/source/usersguide/input.rst @@ -1298,7 +1298,9 @@ The ```` element accepts the following sub-elements: physical quantities: :flux: - Total flux in particle-cm per source particle. + Total flux in particle-cm per source particle. Note: The ``analog`` + estimator is actually identical to the ``collision`` estimator for the + flux score. :total: Total reaction rate in reactions per source particle. From 04caeb99ba04f92cba484884f8223446c2bc9bee Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Fri, 18 Sep 2015 17:55:52 -0400 Subject: [PATCH 06/10] Minor fixes for #455 --- src/input_xml.F90 | 7 +++---- src/tally.F90 | 24 ++++++++---------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/input_xml.F90 b/src/input_xml.F90 index d5a932ff64..15a08148d2 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -3132,7 +3132,7 @@ contains ! tally needs post-collision information if (t % estimator == ESTIMATOR_ANALOG) then call fatal_error("Cannot use track-length estimator for tally " & - &// to_str(t % id)) + // to_str(t % id)) end if ! Set estimator to track-length estimator @@ -3143,16 +3143,15 @@ contains ! tally needs post-collision information if (t % estimator == ESTIMATOR_ANALOG) then call fatal_error("Cannot use collision estimator for tally " & - &// to_str(t % id)) + // to_str(t % id)) end if ! Set estimator to collision estimator t % estimator = ESTIMATOR_COLLISION - write(*, *) t % estimator case default call fatal_error("Invalid estimator '" // trim(temp_str) & - &// "' on tally " // to_str(t % id)) + // "' on tally " // to_str(t % id)) end select end if diff --git a/src/tally.F90 b/src/tally.F90 index 9f9ae77657..12085b5d27 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -92,8 +92,7 @@ contains end if score = score / material_xs % total - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else ! For flux, we need no cross section score = flux end if @@ -112,8 +111,7 @@ contains score = p % last_wgt end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else if (i_nuclide > 0) then score = micro_xs(i_nuclide) % total * atom_density * flux else @@ -131,8 +129,7 @@ contains ! reaction rate score = p % last_wgt - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else ! Note SCORE_SCATTER_N not available for tracklength/collision. if (i_nuclide > 0) then score = (micro_xs(i_nuclide) % total & @@ -243,8 +240,7 @@ contains score = p % last_wgt end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else if (i_nuclide > 0) then score = micro_xs(i_nuclide) % absorption * atom_density * flux else @@ -275,8 +271,7 @@ contains / micro_xs(p % event_nuclide) % absorption end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else if (i_nuclide > 0) then score = micro_xs(i_nuclide) % fission * atom_density * flux else @@ -319,8 +314,7 @@ contains score = keff * p % wgt_bank end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else if (i_nuclide > 0) then score = micro_xs(i_nuclide) % nu_fission * atom_density * flux else @@ -353,8 +347,7 @@ contains micro_xs(p % event_nuclide) % absorption end if - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else if (i_nuclide > 0) then score = micro_xs(i_nuclide) % kappa_fission * atom_density * flux else @@ -375,8 +368,7 @@ contains if (p % event_MT /= score_bin) cycle SCORE_LOOP score = p % last_wgt - else if (t % estimator == ESTIMATOR_TRACKLENGTH .or. & - t % estimator == ESTIMATOR_COLLISION) then + else ! Any other cross section has to be calculated on-the-fly. For ! cross sections that are used often (e.g. n2n, ngamma, etc. for ! depletion), it might make sense to optimize this section or From 40d38df2449509801874a8e2085269042e11659f Mon Sep 17 00:00:00 2001 From: Sterling Harper Date: Sat, 19 Sep 2015 00:20:27 -0400 Subject: [PATCH 07/10] Assume unspecified surface coeffs = 0 in PyAPI --- openmc/surface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/surface.py b/openmc/surface.py index d5d258fa7a..9502002ffa 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -134,7 +134,7 @@ class Surface(object): element.set("type", self._type) element.set("boundary", self._boundary_type) - element.set("coeffs", ' '.join([str(self._coeffs[key]) + element.set("coeffs", ' '.join([str(self._coeffs.setdefault(key, 0.0)) for key in self._coeff_keys])) return element From 4462db19f3c0c23e40aba02beb26f473935f687b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 20 Sep 2015 08:13:33 +0700 Subject: [PATCH 08/10] Update RELAX NG schema for geometry.xml (outside -> outer) --- src/relaxng/geometry.rnc | 8 ++++---- src/relaxng/geometry.rng | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/relaxng/geometry.rnc b/src/relaxng/geometry.rnc index cebbc5b6a3..82f1f15b32 100644 --- a/src/relaxng/geometry.rnc +++ b/src/relaxng/geometry.rnc @@ -6,7 +6,7 @@ element geometry { (element universe { xsd:int } | attribute universe { xsd:int })? & ( (element fill { xsd:int } | attribute fill { xsd:int }) | - (element material { ( xsd:int | "void" ) } | + (element material { ( xsd:int | "void" ) } | attribute material { ( xsd:int | "void" ) }) ) & (element surfaces { list { xsd:int* } } | attribute surfaces { list { xsd:int* } })? & @@ -18,7 +18,7 @@ element geometry { (element id { xsd:int } | attribute id { xsd:int }) & (element name { xsd:string { maxLength="52" } } | attribute name { xsd:string { maxLength="52" } })? & - (element type { xsd:string { maxLength = "15" } } | + (element type { xsd:string { maxLength = "15" } } | attribute type { xsd:string { maxLength = "15" } }) & (element coeffs { list { xsd:double+ } } | attribute coeffs { list { xsd:double+ } }) & (element boundary { ( "transmit" | "reflective" | "vacuum" ) } | @@ -29,12 +29,12 @@ element geometry { (element id { xsd:int } | attribute id { xsd:int }) & (element name { xsd:string { maxLength="52" } } | attribute name { xsd:string { maxLength="52" } })? & - (element dimension { list { xsd:positiveInteger+ } } | + (element dimension { list { xsd:positiveInteger+ } } | attribute dimension { list { xsd:positiveInteger+ } }) & (element lower_left { list { xsd:double+ } } | attribute lower_left { list { xsd:double+ } }) & (element pitch { list { xsd:double+ } } | attribute pitch { list { xsd:double+ } }) & (element universes { list { xsd:int+ } } | attribute universes { list { xsd:int+ } }) & - (element outside { xsd:int } | attribute outside { xsd:int })? + (element outer { xsd:int } | attribute outer { xsd:int })? }* & element hex_lattice { diff --git a/src/relaxng/geometry.rng b/src/relaxng/geometry.rng index fdbf74cbd5..9bd573b346 100644 --- a/src/relaxng/geometry.rng +++ b/src/relaxng/geometry.rng @@ -282,10 +282,10 @@ - + - + From 1453ec18bd9ada26c7b246d069f48450d19598fa Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 21 Sep 2015 10:48:25 +0700 Subject: [PATCH 09/10] Added short section on DBRC in documentation. Closes #433. --- docs/source/methods/physics.rst | 38 +++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index d0a6a2c992..7eedc4e6ed 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -1027,14 +1027,19 @@ probability distribution function can be found by integrating equation Let us call the normalization factor in the denominator of equation :eq:`target-pdf-1` :math:`C`. -It is normally assumed that :math:`\sigma (v_r)` is constant over the range of + +Contant Cross Section Model +--------------------------- + +It is often assumed that :math:`\sigma (v_r)` is constant over the range of relative velocities of interest. This is a good assumption for almost all cases since the elastic scattering cross section varies slowly with velocity for light nuclei, and for heavy nuclei where large variations can occur due to resonance scattering, the moderating effect is rather small. Nonetheless, this assumption may cause incorrect answers in systems with low-lying resonances that can cause a significant amount of up-scatter that would be ignored by this assumption -(e.g. U-238 in commercial light-water reactors). Nevertheless, with this +(e.g. U-238 in commercial light-water reactors). We will revisit this assumption +later in :ref:`energy_dependent_xs_model`. For now, continuing with the assumption, we write :math:`\sigma (v_r) = \sigma_s` which simplifies :eq:`target-pdf-1` to @@ -1232,6 +1237,35 @@ If is not accepted, then we repeat the process and resample a target speed and cosine until a combination is found that satisfies equation :eq:`freegas-accept-2`. +.. _energy_dependent_xs_model: + +Energy-Dependent Cross Section Model +------------------------------------ + +As was noted earlier, assuming that the elastic scattering cross section is +constant in :eq:`reaction-rate` is not strictly correct, especially when +low-lying resonances are present in the cross sections for heavy nuclides. To +correctly account for energy dependence of the scattering cross section entails +performing another rejection step. The most common method is to sample +:math:`\mu` and :math:`v_T` as in the constant cross section approximation and +then perform a rejection on the ratio of the 0 K elastic scattering cross +section at the relative velocity to the maximum 0 K elastic scattering cross +section over the range of velocities considered: + +.. math:: + :label: dbrc + + p_{dbrc} = \frac{\sigma_s(v_r)}{\sigma_{s,max}} + +where it should be noted that the maximum is taken over the range :math:`[v_n - +4/\beta, 4_n + 4\beta]`. This method is known as Doppler broadening rejection +correction (DBRC) and was first introduced by `Becker et al.`_. OpenMC has an +implementation of DBRC as well as an accelerated sampling method that are +described fully in `Walsh et al.`_ + +.. _Becker et al.: http://dx.doi.org/10.1016/j.anucene.2008.12.001 +.. _Walsh et al.: http://dx.doi.org/10.1016/j.anucene.2014.01.017 + .. _sab_tables: ------------ From 7d7f9463b2e5fc67456f61ef174ec643f6b0cebd Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 21 Sep 2015 10:57:19 +0700 Subject: [PATCH 10/10] Fix typo in documentation --- docs/source/methods/physics.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/methods/physics.rst b/docs/source/methods/physics.rst index 7eedc4e6ed..e25057488c 100644 --- a/docs/source/methods/physics.rst +++ b/docs/source/methods/physics.rst @@ -1028,8 +1028,8 @@ Let us call the normalization factor in the denominator of equation :eq:`target-pdf-1` :math:`C`. -Contant Cross Section Model ---------------------------- +Constant Cross Section Model +---------------------------- It is often assumed that :math:`\sigma (v_r)` is constant over the range of relative velocities of interest. This is a good assumption for almost all cases