mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
handle negative 0K elastic xs values by setting to ZERO
This commit is contained in:
parent
2f1952922d
commit
771670f873
1 changed files with 7 additions and 0 deletions
|
|
@ -398,6 +398,7 @@ contains
|
|||
type(Nuclide), pointer :: nuc
|
||||
|
||||
integer :: NE ! number of energy points for total and elastic cross sections
|
||||
integer :: i ! index in 0K elastic xs array for this nuclide
|
||||
|
||||
! determine number of energy points
|
||||
NE = NXS(3)
|
||||
|
|
@ -419,6 +420,12 @@ contains
|
|||
! Continue reading elastic scattering and heating
|
||||
nuc % elastic_0K = get_real(NE)
|
||||
|
||||
! Negative cross sections result in a CDF that is not monotonically
|
||||
! increasing. Set all negative xs values to ZERO.
|
||||
do i = 1, nuc % n_grid_0K
|
||||
if (nuc % elastic_0K(i) < ZERO) nuc % elastic_0K(i) = ZERO
|
||||
end do
|
||||
|
||||
else ! read in non-0K data
|
||||
nuc % n_grid = NE
|
||||
allocate(nuc % energy(NE))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue