mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Fixed bug with analog fission tallies when using UFS.
This commit is contained in:
parent
d6475d568f
commit
37e3e6e9b5
4 changed files with 14 additions and 11 deletions
|
|
@ -57,6 +57,7 @@ module particle_header
|
|||
|
||||
! Post-collision physical data
|
||||
integer :: n_bank ! number of fission sites banked
|
||||
real(8) :: wgt_bank ! weight of fission sites banked
|
||||
|
||||
! Energy grid data
|
||||
integer :: IE ! index on energy grid
|
||||
|
|
|
|||
|
|
@ -213,8 +213,9 @@ contains
|
|||
if (tallies_on .and. n_analog_tallies > 0) &
|
||||
call score_analog_tally()
|
||||
|
||||
! Reset number of particles banked during collision
|
||||
p % n_bank = 0
|
||||
! Reset banked weight during collision
|
||||
p % n_bank = 0
|
||||
p % wgt_bank = ZERO
|
||||
|
||||
end subroutine collision
|
||||
|
||||
|
|
@ -934,11 +935,7 @@ contains
|
|||
fission_bank(i) % xyz = p % coord0 % xyz
|
||||
|
||||
! Set weight of fission bank site
|
||||
if (ufs) then
|
||||
fission_bank(i) % wgt = ONE/weight
|
||||
else
|
||||
fission_bank(i) % wgt = ONE
|
||||
end if
|
||||
fission_bank(i) % wgt = ONE/weight
|
||||
|
||||
! sample cosine of angle
|
||||
mu = sample_angle(rxn, E)
|
||||
|
|
@ -1039,7 +1036,10 @@ contains
|
|||
|
||||
! increment number of bank sites
|
||||
n_bank = min(n_bank + nu, 3*work)
|
||||
p % n_bank = nu
|
||||
|
||||
! Store total weight banked for analog fission tallies
|
||||
p % n_bank = nu
|
||||
p % wgt_bank = nu/weight
|
||||
|
||||
end subroutine create_fission_sites
|
||||
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ contains
|
|||
p % wgt = ONE
|
||||
p % last_wgt = ONE
|
||||
p % n_bank = 0
|
||||
p % wgt_bank = ZERO
|
||||
p % n_collision = 0
|
||||
|
||||
! remove any original coordinates
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ contains
|
|||
! bank. Since this was weighted by 1/keff, we multiply by keff
|
||||
! to get the proper score.
|
||||
|
||||
score = keff * p % n_bank
|
||||
score = keff * p % wgt_bank
|
||||
|
||||
end if
|
||||
|
||||
|
|
@ -495,10 +495,11 @@ contains
|
|||
! score by keff to get the true nu-fission rate. Otherwise, the sum
|
||||
! of all nu-fission rates would be ~1.0.
|
||||
|
||||
score = keff
|
||||
|
||||
! loop over number of particles banked
|
||||
do k = 1, p % n_bank
|
||||
! determine score based on bank site weight and keff
|
||||
score = keff * fission_bank(n_bank - p % n_bank + k) % wgt
|
||||
|
||||
! determine outgoing energy from fission bank
|
||||
E_out = fission_bank(n_bank - p % n_bank + k) % E
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue