mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
Added (n,xn) macro tallies.
This commit is contained in:
parent
1e03af0ad1
commit
2c6ae083c5
3 changed files with 48 additions and 15 deletions
|
|
@ -152,7 +152,7 @@ module constants
|
|||
N_DA = 117
|
||||
|
||||
! Tally macro reactions
|
||||
integer, parameter :: N_MACRO_TYPES = 10
|
||||
integer, parameter :: N_MACRO_TYPES = 14
|
||||
integer, parameter :: &
|
||||
MACRO_FLUX = -1, & ! flux
|
||||
MACRO_TOTAL = -2, & ! total reaction rate
|
||||
|
|
@ -161,9 +161,13 @@ module constants
|
|||
MACRO_SCATTER_1 = -5, & ! first scattering moment
|
||||
MACRO_SCATTER_2 = -6, & ! second scattering moment
|
||||
MACRO_SCATTER_3 = -7, & ! third scattering moment
|
||||
MACRO_ABSORPTION = -8, & ! absorption rate
|
||||
MACRO_FISSION = -9, & ! fission rate
|
||||
MACRO_NU_FISSION = -10 ! neutron production rate
|
||||
MACRO_N_1N = -8, & ! (n,1n) rate
|
||||
MACRO_N_2N = -9, & ! (n,2n) rate
|
||||
MACRO_N_3N = -10, & ! (n,3n) rate
|
||||
MACRO_N_4N = -11, & ! (n,4n) rate
|
||||
MACRO_ABSORPTION = -12, & ! absorption rate
|
||||
MACRO_FISSION = -13, & ! fission rate
|
||||
MACRO_NU_FISSION = -14 ! neutron production rate
|
||||
|
||||
! Tally map bin finding
|
||||
integer, parameter :: NO_BIN_FOUND = -1
|
||||
|
|
|
|||
|
|
@ -756,6 +756,14 @@ contains
|
|||
t % macro_bins(j) % scalar = MACRO_SCATTER_2
|
||||
case ('scatter-3')
|
||||
t % macro_bins(j) % scalar = MACRO_SCATTER_3
|
||||
case ('n1n')
|
||||
t % macro_bins(j) % scalar = MACRO_N_1N
|
||||
case ('n2n')
|
||||
t % macro_bins(j) % scalar = MACRO_N_2N
|
||||
case ('n3n')
|
||||
t % macro_bins(j) % scalar = MACRO_N_3N
|
||||
case ('n4n')
|
||||
t % macro_bins(j) % scalar = MACRO_N_4N
|
||||
case ('absorption')
|
||||
t % macro_bins(j) % scalar = MACRO_ABSORPTION
|
||||
case ('fission')
|
||||
|
|
|
|||
|
|
@ -217,14 +217,6 @@ contains
|
|||
|
||||
end do
|
||||
|
||||
do i = 1, n_cells
|
||||
do j = 1, size(tally_maps(T_CELL) % items(i) % elements)
|
||||
print *, cells(i) % uid, &
|
||||
tally_maps(T_CELL) % items(i) % elements(j) % index_tally, &
|
||||
tally_maps(T_CELL) % items(i) % elements(j) % index_bin
|
||||
end do
|
||||
end do
|
||||
|
||||
end subroutine create_tally_map
|
||||
|
||||
!===============================================================================
|
||||
|
|
@ -395,9 +387,10 @@ contains
|
|||
|
||||
! determine if we need outgoing angle
|
||||
has_outgoing_angle = (macro_bin == MACRO_NU_SCATTER .or. &
|
||||
macro_bin == MACRO_SCATTER_1 .or. &
|
||||
macro_bin == MACRO_SCATTER_2 .or. &
|
||||
macro_bin == MACRO_SCATTER_3)
|
||||
macro_bin == MACRO_SCATTER_1 .or. macro_bin == MACRO_SCATTER_2 .or. &
|
||||
macro_bin == MACRO_SCATTER_3 .or. macro_bin == MACRO_N_1N .or. &
|
||||
macro_bin == MACRO_N_2N .or. macro_bin == MACRO_N_3N .or. &
|
||||
macro_bin == MACRO_N_4N)
|
||||
|
||||
if (has_outgoing_energy .or. has_outgoing_angle) then
|
||||
! If this tally has an outgoing energy filter, the only supported
|
||||
|
|
@ -420,6 +413,30 @@ contains
|
|||
score = last_wgt * 0.5*(3.0*mu*mu - ONE)
|
||||
case (MACRO_SCATTER_3)
|
||||
score = last_wgt * 0.5*(5.0*mu*mu*mu - 3.0*mu)
|
||||
case (MACRO_N_1N)
|
||||
if (wgt == last_wgt) then
|
||||
score = last_wgt
|
||||
else
|
||||
cycle
|
||||
end if
|
||||
case (MACRO_N_2N)
|
||||
if (int(wgt/last_wgt) == 2) then
|
||||
score = last_wgt
|
||||
else
|
||||
cycle
|
||||
end if
|
||||
case (MACRO_N_3N)
|
||||
if (int(wgt/last_wgt) == 3) then
|
||||
score = last_wgt
|
||||
else
|
||||
cycle
|
||||
end if
|
||||
case (MACRO_N_4N)
|
||||
if (int(wgt/last_wgt) == 4) then
|
||||
score = last_wgt
|
||||
else
|
||||
cycle
|
||||
end if
|
||||
case default
|
||||
! call fatal_error
|
||||
end select
|
||||
|
|
@ -615,6 +632,10 @@ contains
|
|||
macro_name(abs(MACRO_SCATTER_1)) = "First Scattering Moment"
|
||||
macro_name(abs(MACRO_SCATTER_2)) = "Second Scattering Moment"
|
||||
macro_name(abs(MACRO_SCATTER_3)) = "Third Scattering Moment"
|
||||
macro_name(abs(MACRO_N_1N)) = "(n,1n) Rate"
|
||||
macro_name(abs(MACRO_N_2N)) = "(n,2n) Rate"
|
||||
macro_name(abs(MACRO_N_3N)) = "(n,3n) Rate"
|
||||
macro_name(abs(MACRO_N_4N)) = "(n,4n) Rate"
|
||||
macro_name(abs(MACRO_ABSORPTION)) = "Absorption Rate"
|
||||
macro_name(abs(MACRO_FISSION)) = "Fission Rate"
|
||||
macro_name(abs(MACRO_NU_FISSION)) = "Nu-Fission Rate"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue