diff --git a/src/constants.F90 b/src/constants.F90 index 6734a7bcd7..46ae8e9c1a 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -256,8 +256,7 @@ module constants EVENT_SURFACE = -2, & EVENT_LATTICE = -1, & EVENT_SCATTER = 1, & - EVENT_ABSORB = 2, & - EVENT_FISSION = 3 + EVENT_ABSORB = 2 ! Tally score type integer, parameter :: N_SCORE_TYPES = 14 diff --git a/src/particle_header.F90 b/src/particle_header.F90 index 3f396b15eb..201de518eb 100644 --- a/src/particle_header.F90 +++ b/src/particle_header.F90 @@ -58,7 +58,8 @@ module particle_header real(8) :: absorb_wgt ! weight absorbed for survival biasing ! What event last took place - integer :: event ! scatter, absorption, fission + logical :: fission ! did the particle cause implicit fission + integer :: event ! scatter, absorption integer :: event_nuclide ! index in nuclides array integer :: event_MT ! reaction MT @@ -129,6 +130,7 @@ contains this % n_bank = 0 this % wgt_bank = ZERO this % n_collision = 0 + this % fission = .false. ! Set up base level coordinates allocate(this % coord0) diff --git a/src/physics.F90 b/src/physics.F90 index a8325b2d87..10b136f38e 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -758,6 +758,7 @@ contains ! Bank source neutrons if (nu == 0 .or. n_bank == 3*work) return + p % fission = .true. ! Fission neutrons will be banked do i = int(n_bank,4) + 1, int(min(n_bank + nu, 3*work),4) ! Bank source neutrons by copying particle data fission_bank(i) % xyz = p % coord0 % xyz diff --git a/src/tally.F90 b/src/tally.F90 index 8550473e4a..4c72fb6394 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -258,7 +258,7 @@ contains else ! Skip any non-fission events - if (p % event /= EVENT_FISSION) cycle SCORE_LOOP + if (.not. p % fission) cycle SCORE_LOOP ! All fission events will contribute, so again we can use ! particle's weight entering the collision as the estimate for the @@ -278,7 +278,7 @@ contains else ! Skip any non-fission events - if (p % event /= EVENT_FISSION) cycle SCORE_LOOP + if (.not. p % fission) cycle SCORE_LOOP if (t % find_filter(FILTER_ENERGYOUT) > 0) then ! Normally, we only need to make contributions to one scoring @@ -314,7 +314,7 @@ contains else ! Skip any non-fission events - if (p % event /= EVENT_FISSION) cycle SCORE_LOOP + if (.not. p % fission) cycle SCORE_LOOP ! All fission events will contribute, so again we can use ! particle's weight entering the collision as the estimate for diff --git a/src/tracking.F90 b/src/tracking.F90 index aee90ea52c..e96aa9b647 100644 --- a/src/tracking.F90 +++ b/src/tracking.F90 @@ -150,6 +150,9 @@ contains p % n_bank = 0 p % wgt_bank = ZERO + ! Reset fission logical + p % fission = .false. + ! Save coordinates for tallying purposes p % last_xyz = p % coord0 % xyz diff --git a/tests/test_filter_group_transfer/results_true.dat b/tests/test_filter_group_transfer/results_true.dat index 8aa5d82c25..8888e3d45b 100644 --- a/tests/test_filter_group_transfer/results_true.dat +++ b/tests/test_filter_group_transfer/results_true.dat @@ -11,12 +11,12 @@ tallies: 0.00000000 0.00000000 0.00000000 +0.43432874 +0.04300463 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.68388976 +0.09923378 2.62000000 1.37720000 0.00000000 @@ -27,12 +27,12 @@ tallies: 0.00000000 0.00000000 0.00000000 +0.18873245 +0.00886786 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.37923400 +0.03046656 0.00000000 0.00000000 0.00000000 @@ -43,12 +43,12 @@ tallies: 0.00000000 48.48000000 470.68580000 +0.00946951 +0.00008967 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.02797612 +0.00043327 0.00000000 0.00000000 0.00000000 @@ -59,9 +59,9 @@ tallies: 0.00000000 2.93000000 1.78470000 -0.00000000 -0.00000000 +0.03909366 +0.00076490 6.14000000 7.84340000 -0.00000000 -0.00000000 +0.06790212 +0.00101042 diff --git a/tests/test_score_fission/results_true.dat b/tests/test_score_fission/results_true.dat index 0678696d7f..124622ee8a 100644 --- a/tests/test_score_fission/results_true.dat +++ b/tests/test_score_fission/results_true.dat @@ -10,11 +10,11 @@ tally 1: 1.28044244 0.33521026 tally 2: +0.53000000 +0.05710000 0.00000000 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +1.34000000 +0.37160000 diff --git a/tests/test_statepoint_restart/results_true.dat b/tests/test_statepoint_restart/results_true.dat index aabe34714f..8f336a5616 100644 --- a/tests/test_statepoint_restart/results_true.dat +++ b/tests/test_statepoint_restart/results_true.dat @@ -9,8 +9,8 @@ tally 1: 0.00000016 0.00088505 0.00000040 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -49,8 +49,8 @@ tally 1: 0.00000048 0.00042869 0.00000010 -0.00000000 -0.00000000 +0.00060092 +0.00000036 0.00000000 0.00000000 0.00000000 @@ -89,8 +89,8 @@ tally 1: 0.00000236 0.00113194 0.00000128 -0.00000000 -0.00000000 +0.00090077 +0.00000081 0.00000000 0.00000000 0.00000000 @@ -169,8 +169,8 @@ tally 1: 0.00000612 0.00262564 0.00000412 -0.00000000 -0.00000000 +0.00120163 +0.00000090 0.00000000 0.00000000 0.00000000 @@ -209,8 +209,8 @@ tally 1: 0.00000034 0.00025375 0.00000006 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -249,8 +249,8 @@ tally 1: 0.00000021 0.00021051 0.00000003 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -329,8 +329,8 @@ tally 1: 0.00000000 0.00002929 0.00000028 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -369,8 +369,8 @@ tally 1: 0.00000194 0.00099646 0.00000072 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -409,8 +409,8 @@ tally 1: 0.00000006 -0.00001738 0.00000038 -0.00000000 -0.00000000 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -489,8 +489,8 @@ tally 1: 0.00000001 -0.00042932 0.00000018 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -529,8 +529,8 @@ tally 1: 0.00000060 -0.00133198 0.00000090 -0.00000000 -0.00000000 +0.00120163 +0.00000090 0.00000000 0.00000000 0.00000000 @@ -569,6 +569,8 @@ tally 1: 0.00000021 0.00062908 0.00000040 +0.00270372 +0.00000478 0.00000000 0.00000000 0.00000000 @@ -577,6 +579,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -585,12 +589,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00200000 0.00000400 0.00197139 @@ -609,8 +609,8 @@ tally 1: 0.00000080 0.00000556 0.00000000 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -649,6 +649,8 @@ tally 1: 0.00002469 0.00220743 0.00000251 +0.00300397 +0.00000523 0.00000000 0.00000000 0.00000000 @@ -657,10 +659,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -689,8 +689,8 @@ tally 1: 0.00000857 0.00194421 0.00000444 -0.00000000 -0.00000000 +0.00270352 +0.00000406 0.00000000 0.00000000 0.00000000 @@ -729,8 +729,8 @@ tally 1: 0.00000203 -0.00020439 0.00000028 -0.00000000 -0.00000000 +0.00150189 +0.00000117 0.00000000 0.00000000 0.00000000 @@ -769,8 +769,8 @@ tally 1: 0.00000029 -0.00032018 0.00000067 -0.00000000 -0.00000000 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -809,8 +809,8 @@ tally 1: 0.00002078 0.00252471 0.00000919 -0.00000000 -0.00000000 +0.00240266 +0.00000307 0.00000000 0.00000000 0.00000000 @@ -849,8 +849,8 @@ tally 1: 0.00000671 0.00241262 0.00000345 -0.00000000 -0.00000000 +0.00330383 +0.00000550 0.00000000 0.00000000 0.00000000 @@ -889,8 +889,8 @@ tally 1: 0.00000371 0.00182793 0.00000200 -0.00000000 -0.00000000 +0.00090117 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -929,8 +929,8 @@ tally 1: 0.00000019 0.00104340 0.00000109 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -969,8 +969,8 @@ tally 1: 0.00000148 -0.00065759 0.00000022 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1009,6 +1009,8 @@ tally 1: 0.00000137 0.00131395 0.00000179 +0.00150189 +0.00000117 0.00000000 0.00000000 0.00000000 @@ -1017,10 +1019,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00100000 0.00000100 -0.00002876 @@ -1029,8 +1029,8 @@ tally 1: 0.00000025 0.00004308 0.00000000 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1049,6 +1049,8 @@ tally 1: 0.00000151 0.00066108 0.00000022 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1067,10 +1069,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1089,6 +1089,8 @@ tally 1: 0.00000129 0.00137843 0.00000110 +0.00120143 +0.00000072 0.00000000 0.00000000 0.00000000 @@ -1097,10 +1099,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1129,6 +1129,8 @@ tally 1: 0.00001606 -0.00001897 0.00000064 +0.00330403 +0.00000550 0.00000000 0.00000000 0.00000000 @@ -1137,10 +1139,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1169,8 +1169,8 @@ tally 1: 0.00000236 0.00397934 0.00001021 -0.00000000 -0.00000000 +0.00240286 +0.00000289 0.00000000 0.00000000 0.00000000 @@ -1209,8 +1209,8 @@ tally 1: 0.00000539 0.00355147 0.00000641 -0.00000000 -0.00000000 +0.00060051 +0.00000036 0.00000000 0.00000000 0.00000000 @@ -1249,6 +1249,8 @@ tally 1: 0.00000057 0.00125771 0.00000080 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1257,10 +1259,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1289,6 +1289,8 @@ tally 1: 0.00000026 -0.00005688 0.00000000 +0.00060092 +0.00000036 0.00000000 0.00000000 0.00000000 @@ -1297,10 +1299,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00100000 0.00000100 -0.00089417 @@ -1309,8 +1309,8 @@ tally 1: 0.00000049 -0.00044604 0.00000020 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1329,8 +1329,8 @@ tally 1: 0.00000029 0.00073692 0.00000054 -0.00000000 -0.00000000 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1369,8 +1369,8 @@ tally 1: 0.00000061 0.00064850 0.00000071 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1409,8 +1409,8 @@ tally 1: 0.00000005 0.00118162 0.00000088 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -1449,8 +1449,8 @@ tally 1: 0.00000041 0.00042932 0.00000010 -0.00000000 -0.00000000 +0.00090117 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1489,8 +1489,8 @@ tally 1: 0.00000267 0.00044347 0.00000184 -0.00000000 -0.00000000 +0.00150189 +0.00000117 0.00000000 0.00000000 0.00000000 @@ -1529,8 +1529,8 @@ tally 1: 0.00000891 0.00244759 0.00000364 -0.00000000 -0.00000000 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1569,8 +1569,8 @@ tally 1: 0.00000128 -0.00085684 0.00000432 -0.00000000 -0.00000000 +0.00060051 +0.00000036 0.00000000 0.00000000 0.00000000 @@ -1609,6 +1609,8 @@ tally 1: 0.00000495 0.00232498 0.00000279 +0.00240286 +0.00000289 0.00000000 0.00000000 0.00000000 @@ -1617,10 +1619,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1649,8 +1649,8 @@ tally 1: 0.00000001 0.00071400 0.00000046 -0.00000000 -0.00000000 +0.00150149 +0.00000153 0.00000000 0.00000000 0.00000000 @@ -1689,8 +1689,8 @@ tally 1: 0.00000862 0.00216485 0.00000235 -0.00000000 -0.00000000 +0.00180194 +0.00000180 0.00000000 0.00000000 0.00000000 @@ -1729,8 +1729,8 @@ tally 1: 0.00000152 0.00149726 0.00000117 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -1769,6 +1769,8 @@ tally 1: 0.00004805 0.00613989 0.00002280 +0.00240246 +0.00000361 0.00000000 0.00000000 0.00000000 @@ -1777,10 +1779,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00100000 0.00000100 -0.00024594 @@ -1809,8 +1809,8 @@ tally 1: 0.00000007 0.00024496 0.00000004 -0.00000000 -0.00000000 +0.00090137 +0.00000081 0.00000000 0.00000000 0.00000000 @@ -1849,6 +1849,8 @@ tally 1: 0.00001393 0.00211962 0.00000228 +0.00150189 +0.00000117 0.00000000 0.00000000 0.00000000 @@ -1857,10 +1859,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -1889,6 +1889,8 @@ tally 1: 0.00000536 0.00250521 0.00000348 +0.00090097 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1897,10 +1899,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 -0.00000000 -0.00000000 +0.00090117 +0.00000045 0.00000000 0.00000000 0.00000000 @@ -1969,8 +1969,8 @@ tally 1: 0.00000032 -0.00019934 0.00000003 -0.00000000 -0.00000000 +0.00060071 +0.00000018 0.00000000 0.00000000 0.00000000 @@ -2049,8 +2049,8 @@ tally 1: 0.00000068 0.00066785 0.00000045 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -2089,8 +2089,8 @@ tally 1: 0.00001008 -0.00027178 0.00000005 -0.00000000 -0.00000000 +0.00180255 +0.00000235 0.00000000 0.00000000 0.00000000 @@ -2129,8 +2129,8 @@ tally 1: 0.00000130 0.00121771 0.00000101 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -2169,8 +2169,8 @@ tally 1: 0.00000065 0.00062934 0.00000040 -0.00000000 -0.00000000 +0.00030026 +0.00000009 0.00000000 0.00000000 0.00000000 @@ -2269,8 +2269,8 @@ tally 1: 0.00000000 0.00000000 0.00000000 -0.00000000 -0.00000000 +0.00090137 +0.00000081 0.00300000 0.00000900 0.00217070 @@ -2289,8 +2289,8 @@ tally 1: 0.00000090 0.00044773 0.00000051 -0.00000000 -0.00000000 +0.00030046 +0.00000009 0.00000000 0.00000000 0.00000000