From a0cdfc5c51c1cbd4cc58b0899fde0202c9c131fb Mon Sep 17 00:00:00 2001 From: Adam Nelson Date: Tue, 11 Dec 2012 16:14:35 -0500 Subject: [PATCH] revised kappa-fission to work as a tracklength estimator (analog can still be accessed if the user wishes), and tested it for micros/macros, etc. --- src/ace_header.F90 | 2 ++ src/cross_section.F90 | 25 ++++++++++++++++++++++ src/input_xml.F90 | 3 --- src/tally.F90 | 49 +++++++++++++++++++++++++++++++++++-------- 4 files changed, 67 insertions(+), 12 deletions(-) diff --git a/src/ace_header.F90 b/src/ace_header.F90 index 155d3bd848..f325847307 100644 --- a/src/ace_header.F90 +++ b/src/ace_header.F90 @@ -192,6 +192,7 @@ module ace_header real(8) :: absorption ! microscopic absorption xs real(8) :: fission ! microscopic fission xs real(8) :: nu_fission ! microscopic production xs + real(8) :: k_fission ! microscopic energy-released from fission ! Information for S(a,b) use logical :: use_sab ! in S(a,b) energy range? @@ -212,6 +213,7 @@ module ace_header real(8) :: absorption ! macroscopic absorption xs real(8) :: fission ! macroscopic fission xs real(8) :: nu_fission ! macroscopic production xs + real(8) :: k_fission ! macroscopic energy-released from fission end type MaterialMacroXS end module ace_header diff --git a/src/cross_section.F90 b/src/cross_section.F90 index a0768109cf..e9009b81da 100644 --- a/src/cross_section.F90 +++ b/src/cross_section.F90 @@ -33,6 +33,7 @@ contains material_xs % absorption = ZERO material_xs % fission = ZERO material_xs % nu_fission = ZERO + material_xs % k_fission = ZERO ! Exit subroutine if material is void if (p % material == MATERIAL_VOID) return @@ -89,7 +90,14 @@ contains ! Add contributions to material macroscopic nu-fission cross section material_xs % nu_fission = material_xs % nu_fission + & atom_density * micro_xs(i_nuclide) % nu_fission + + ! Add contributions to material macroscopic energy release from fission + material_xs % k_fission = material_xs % k_fission + & + atom_density * micro_xs(i_nuclide) % k_fission end do + ! renormalize k_fission + !material_xs % k_fission = material_xs % k_fission / & + ! material_xs % fission end subroutine calculate_xs @@ -150,6 +158,7 @@ contains ! Initialize nuclide cross-sections to zero micro_xs(i_nuclide) % fission = ZERO micro_xs(i_nuclide) % nu_fission = ZERO + micro_xs(i_nuclide) % k_fission = ZERO ! Calculate microscopic nuclide total cross section micro_xs(i_nuclide) % total = (ONE - f) * nuc % total(i_grid) & @@ -171,6 +180,22 @@ contains ! Calculate microscopic nuclide nu-fission cross section micro_xs(i_nuclide) % nu_fission = (ONE - f) * nuc % nu_fission( & i_grid) + f * nuc % nu_fission(i_grid+1) + + ! Calculate microscopic nuclide k-fission cross section + ! The ENDF standard (ENDF-102) states that MT 18 stores + ! the fission energy as the Q_value, so this will be obtained from + ! the MT of index_fission(1); the standard is mute on + ! whether or not the other fission channels store their own + ! fission energy output; after inspection of the ACE files, all + ! nuclides observed with multiple fission channels have the same + ! Q-value for all of them; therefore, this code just uses the first + ! fission reaction instead of storing the actual fission type which + ! occured. + micro_xs(i_nuclide) % k_fission = & + nuc % reactions(nuc % index_fission(1)) % Q_value * & + micro_xs(i_nuclide) % fission + + end if ! If there is S(a,b) data for this nuclide, we need to do a few diff --git a/src/input_xml.F90 b/src/input_xml.F90 index e67073508d..170fe56778 100644 --- a/src/input_xml.F90 +++ b/src/input_xml.F90 @@ -1855,9 +1855,6 @@ contains t % score_bins(j) = SCORE_NU_FISSION case ('k-fission') t % score_bins(j) = SCORE_K_FISSION - - ! Set tally estimator to analog - t % estimator = ESTIMATOR_ANALOG case ('chi') t % score_bins(j) = SCORE_CHI diff --git a/src/tally.F90 b/src/tally.F90 index ffafcdbd4b..e3de655dc8 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -323,19 +323,37 @@ contains ! All fission events will contribute, so again we can use ! particle's weight entering the collision as the estimate for ! the fission energy production rate - ! The ENDF standard (ENDF-102) states that MT 18 stores - ! the fission energy as the Q_value, so this will be obtained from - ! the MT of index_fission(1); the standard is mute on - ! whether or not the other fission channels store their own - ! fission energy output; after inspection of the ACE files, all - ! nuclides observed with multiple fission channels have the same - ! Q-value for all of them; therefore, this code just uses the first - ! fission reaction instead of storing the actual fission type which - ! occured. + n = nuclides(p % event_nuclide) % index_fission(1) score = last_wgt * & nuclides(p % event_nuclide) % reactions(n) % Q_value + case (SCORE_CHI) + ! Skip any non-fission events + if (p % event /= EVENT_FISSION) cycle SCORE_LOOP + + if (t % find_filter(FILTER_ENERGYOUT) > 0) then + ! Normally, we only need to make contributions to one scoring + ! bin. However, in the case of fission, since multiple + ! fission neutrons were emitted with different energies, + ! multiple outgoing energy bins may have been scored to. The + ! following logic treats this special case and results to + ! multiple bins + + call score_fission_eout(t, score_index) + cycle SCORE_LOOP + + else + ! If there is no outgoing energy filter, than we only need to + ! score to one bin. For the score to be 'analog', we need to + ! score the number of particles that were banked in the + ! fission bank. Since this was weighted by 1/keff, we + ! multiply by keff to get the proper score. + + score = keff * p % wgt_bank + + end if + case (SCORE_EVENTS) ! Simply count number of scoring events score = ONE @@ -543,6 +561,9 @@ contains case (SCORE_NU_FISSION) score = micro_xs(i_nuclide) % nu_fission * & atom_density * flux + case (SCORE_K_FISSION) + score = micro_xs(i_nuclide) % k_fission * & + atom_density * flux case (SCORE_EVENTS) score = ONE case default @@ -565,6 +586,8 @@ contains score = material_xs % fission * flux case (SCORE_NU_FISSION) score = material_xs % nu_fission * flux + case (SCORE_K_FISSION) + score = material_xs % k_fission * flux case (SCORE_EVENTS) score = ONE case default @@ -660,6 +683,8 @@ contains score = micro_xs(i_nuclide) % fission * atom_density * flux case (SCORE_NU_FISSION) score = micro_xs(i_nuclide) % nu_fission * atom_density * flux + case (SCORE_K_FISSION) + score = micro_xs(i_nuclide) % k_fission * atom_density * flux case (SCORE_EVENTS) score = ONE case default @@ -701,6 +726,8 @@ contains score = material_xs % fission * flux case (SCORE_NU_FISSION) score = material_xs % nu_fission * flux + case (SCORE_K_FISSION) + score = material_xs % k_fission * flux case (SCORE_EVENTS) score = ONE case default @@ -966,6 +993,8 @@ contains case (SCORE_NU_FISSION) score = micro_xs(i_nuclide) % nu_fission * & atom_density * flux + case (SCORE_K_FISSION) + score = micro_xs(i_nuclide) % k_fission * atom_density * flux case (SCORE_EVENTS) score = ONE case default @@ -989,6 +1018,8 @@ contains score = material_xs % fission * flux case (SCORE_NU_FISSION) score = material_xs % nu_fission * flux + case (SCORE_K_FISSION) + score = material_xs % k_fission * flux case (SCORE_EVENTS) score = ONE case default