mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Make sample_fission aware of multipole
This commit is contained in:
parent
4e940ecc6e
commit
26478293cb
1 changed files with 14 additions and 4 deletions
|
|
@ -97,10 +97,10 @@ contains
|
|||
|
||||
if (nuc % fissionable) then
|
||||
if (run_mode == MODE_EIGENVALUE) then
|
||||
call sample_fission(i_nuclide, i_reaction)
|
||||
call sample_fission(i_nuclide, p % E, i_reaction)
|
||||
call create_fission_sites(p, i_nuclide, i_reaction, fission_bank, n_bank)
|
||||
elseif (run_mode == MODE_FIXEDSOURCE .and. create_fission_neutrons) then
|
||||
call sample_fission(i_nuclide, i_reaction)
|
||||
call sample_fission(i_nuclide, p % E, i_reaction)
|
||||
call create_fission_sites(p, i_nuclide, i_reaction, &
|
||||
p % secondary_bank, p % n_secondary)
|
||||
end if
|
||||
|
|
@ -202,8 +202,9 @@ contains
|
|||
! SAMPLE_FISSION
|
||||
!===============================================================================
|
||||
|
||||
subroutine sample_fission(i_nuclide, i_reaction)
|
||||
subroutine sample_fission(i_nuclide, E, i_reaction)
|
||||
integer, intent(in) :: i_nuclide ! index in nuclides array
|
||||
real(8), intent(in) :: E ! incident neutron energy
|
||||
integer, intent(out) :: i_reaction ! index in nuc % reactions array
|
||||
|
||||
integer :: i
|
||||
|
|
@ -220,13 +221,22 @@ contains
|
|||
! If we're in the URR, by default use the first fission reaction. We also
|
||||
! default to the first reaction if we know that there are no partial fission
|
||||
! reactions
|
||||
|
||||
if (micro_xs(i_nuclide) % use_ptable .or. &
|
||||
.not. nuc % has_partial_fission) then
|
||||
i_reaction = nuc % index_fission(1)
|
||||
return
|
||||
end if
|
||||
|
||||
! Check to see if we are in a windowed multipole range. WMP only supports
|
||||
! the first fission reaction.
|
||||
if (nuc % mp_present) then
|
||||
if (E >= nuc % multipole % start_E/1.0e6_8 .and. &
|
||||
E <= nuc % multipole % end_E/1.0e6_8) then
|
||||
i_reaction = nuc % index_fission(1)
|
||||
return
|
||||
end if
|
||||
end if
|
||||
|
||||
! Get grid index and interpolatoin factor and sample fission cdf
|
||||
i_temp = micro_xs(i_nuclide) % index_temp
|
||||
i_grid = micro_xs(i_nuclide) % index_grid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue