mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Removed material_total_xs subroutine in cross_section module.
This commit is contained in:
parent
680cb0993c
commit
a7fb70d08b
2 changed files with 1 additions and 74 deletions
|
|
@ -1377,74 +1377,4 @@ contains
|
|||
|
||||
end subroutine read_xsdata
|
||||
|
||||
!===============================================================================
|
||||
! MATERIAL_TOTAL_XS calculates the total macroscopic cross section of each
|
||||
! material for use in sampling path lengths
|
||||
!===============================================================================
|
||||
|
||||
subroutine material_total_xs()
|
||||
|
||||
type(Material), pointer :: mat => null()
|
||||
type(Nuclide), pointer :: nuc => null()
|
||||
integer :: i, j, k
|
||||
integer :: index
|
||||
integer :: IE
|
||||
real(8) :: density_i
|
||||
real(8) :: val
|
||||
real(8) :: r
|
||||
real(8) :: E_i
|
||||
real(8) :: E_i1
|
||||
real(8) :: sigma_i
|
||||
real(8) :: sigma_i1
|
||||
character(MAX_LINE_LEN) :: msg
|
||||
|
||||
msg = "Creating material total cross-sections..."
|
||||
call message(msg, 4)
|
||||
|
||||
! loop over all materials
|
||||
do i = 1, n_materials
|
||||
|
||||
! allocate storage for total xs
|
||||
mat => materials(i)
|
||||
allocate(mat%total_xs(n_grid))
|
||||
|
||||
! initialize total cross-section
|
||||
mat % total_xs = ZERO
|
||||
|
||||
! loop over each isotope
|
||||
do j = 1, mat % n_nuclides
|
||||
index = mat % nuclide(j)
|
||||
nuc => nuclides(index)
|
||||
|
||||
! find atom density of isotope
|
||||
density_i = mat % atom_density(j)
|
||||
|
||||
! loop over points in union energy grid
|
||||
do k = 1, n_grid
|
||||
! find nuclide grid index
|
||||
IE = nuc % grid_index(k)
|
||||
|
||||
! get nuclide grid energy and cross-section value
|
||||
E_i = nuc % energy(IE)
|
||||
sigma_i = nuc % total(IE)
|
||||
|
||||
! interpolate as necessary
|
||||
if (E_i < e_grid(k)) then
|
||||
E_i1 = nuc % energy(IE + 1)
|
||||
sigma_i1 = nuc % total(IE + 1)
|
||||
|
||||
r = (e_grid(k) - E_i)/(E_i1 - E_i)
|
||||
val = (ONE - r)*sigma_i + r*sigma_i1
|
||||
else
|
||||
val = sigma_i
|
||||
end if
|
||||
|
||||
! add contribution to total cross-section
|
||||
mat%total_xs(k) = mat%total_xs(k) + density_i * val
|
||||
end do
|
||||
end do
|
||||
end do
|
||||
|
||||
end subroutine material_total_xs
|
||||
|
||||
end module cross_section
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
module initialize
|
||||
|
||||
use constants
|
||||
use cross_section, only: read_xs, read_xsdata, material_total_xs
|
||||
use cross_section, only: read_xs, read_xsdata
|
||||
use datatypes, only: dict_create, dict_add_key, dict_get_key, &
|
||||
dict_has_key, DICT_NULL, dict_keys
|
||||
use datatypes_header, only: ListKeyValueII, DictionaryII
|
||||
|
|
@ -92,9 +92,6 @@ contains
|
|||
call unionized_grid()
|
||||
call original_indices()
|
||||
|
||||
! calculate total material cross-sections for sampling path lenghts
|
||||
call material_total_xs()
|
||||
|
||||
! create source particles
|
||||
call initialize_source()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue