Pre-calculate microscopic nu-fission cross sections.

This commit is contained in:
Paul Romano 2011-12-09 16:13:44 -05:00
parent 02a727748f
commit 70e9ecf68e
4 changed files with 42 additions and 3 deletions

View file

@ -5,6 +5,7 @@ cross_section.o: datatypes_header.o
cross_section.o: endf.o
cross_section.o: error.o
cross_section.o: fileio.o
cross_section.o: fission.o
cross_section.o: global.o
cross_section.o: material_header.o
cross_section.o: output.o

View file

@ -9,6 +9,7 @@ module cross_section
use endf, only: reaction_name
use error, only: fatal_error
use fileio, only: read_line, skip_lines
use fission, only: nu_total
use global
use material_header, only: Material
use output, only: write_message
@ -322,12 +323,20 @@ contains
nuc % kT = kT
nuc % zaid = NXS(2)
! read all blocks
call read_esz(nuc)
call read_nu_data(nuc)
call read_reactions(nuc)
call read_angular_dist(nuc)
call read_energy_dist(nuc)
call read_unr_res(nuc)
! for fissionable nuclides, precalculate microscopic nu-fission cross
! sections so that we don't need to call the nu_total function during
! cross section lookups
if (nuc % fissionable) call generate_nu_fission(nuc)
case (ACE_THERMAL)
sab => sab_tables(index_table)
sab % name = name
@ -366,6 +375,7 @@ contains
allocate(nuc % total(NE))
allocate(nuc % elastic(NE))
allocate(nuc % fission(NE))
allocate(nuc % nu_fission(NE))
allocate(nuc % absorption(NE))
allocate(nuc % heating(NE))
@ -373,6 +383,7 @@ contains
nuc % total = ZERO
nuc % elastic = ZERO
nuc % fission = ZERO
nuc % nu_fission = ZERO
nuc % absorption = ZERO
nuc % heating = ZERO
@ -1106,6 +1117,33 @@ contains
end subroutine read_unr_res
!===============================================================================
! GENERATE_NU_FISSION precalculates the microscopic nu-fission cross section for
! a given nuclide. This is done so that the nu_total function does not need to
! be called during cross section lookups.
!===============================================================================
subroutine generate_nu_fission(nuc)
type(Nuclide), pointer :: nuc
integer :: i ! index on nuclide energy grid
real(8) :: E ! energy
real(8) :: nu ! # of neutrons per fission
do i = 1, nuc % n_grid
! determine energy
E = nuc % energy(i)
! determine total nu at given energy
nu = nu_total(nuc, E)
! determine nu-fission microscopic cross section
nuc % nu_fission(i) = nu * nuc % fission(i)
end do
end subroutine generate_nu_fission
!===============================================================================
! READ_THERMAL_DATA reads elastic and inelastic cross sections and corresponding
! secondary energy/angle distributions derived from experimental S(a,b)

View file

@ -81,6 +81,7 @@ module cross_section_header
real(8), allocatable :: total(:) ! total cross section
real(8), allocatable :: elastic(:) ! elastic scattering
real(8), allocatable :: fission(:) ! fission
real(8), allocatable :: nu_fission(:) ! neutron production
real(8), allocatable :: absorption(:) ! absorption (MT > 100)
real(8), allocatable :: heating(:) ! heating

View file

@ -231,7 +231,6 @@ contains
real(8) :: f_sab ! interp factor on S(a,b) energy grid
real(8) :: inelastic ! S(a,b) inelastic cross section
real(8) :: elastic ! S(a,b) elastic cross section
real(8) :: nu ! total # of neutrons emitted per fission
type(Nuclide), pointer :: nuc => null()
type(SAB_Table), pointer :: sab => null()
@ -274,8 +273,8 @@ contains
(ONE-f) * nuc % fission(IE) + f * nuc % fission(IE+1)
! Calculate microscopic nuclide nu-fission cross section
nu = nu_total(nuc, p % E)
micro_xs(index_nuclide) % nu_fission = nu * micro_xs(index_nuclide) % fission
micro_xs(index_nuclide) % nu_fission = &
(ONE-f) * nuc % nu_fission(IE) + f * nuc % nu_fission(IE+1)
end if
! If there is S(a,b) data for this nuclide, we need to do a few