mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
add energy_cutoff
Kill particles under certain energy
This commit is contained in:
parent
2aec3363f0
commit
477da9b47d
3 changed files with 17 additions and 2 deletions
|
|
@ -304,6 +304,7 @@ module global
|
|||
|
||||
logical :: survival_biasing = .false.
|
||||
real(8) :: weight_cutoff = 0.25_8
|
||||
real(8) :: energy_cutoff = ZERO
|
||||
real(8) :: weight_survive = ONE
|
||||
|
||||
! ============================================================================
|
||||
|
|
|
|||
|
|
@ -659,8 +659,15 @@ contains
|
|||
! Cutoffs
|
||||
if (check_for_node(doc, "cutoff")) then
|
||||
call get_node_ptr(doc, "cutoff", node_cutoff)
|
||||
call get_node_value(node_cutoff, "weight", weight_cutoff)
|
||||
call get_node_value(node_cutoff, "weight_avg", weight_survive)
|
||||
if (check_for_node(node_cutoff, "weight")) then
|
||||
call get_node_value(node_cutoff, "weight", weight_cutoff)
|
||||
end if
|
||||
if (check_for_node(node_cutoff, "weight_avg")) then
|
||||
call get_node_value(node_cutoff, "weight_avg", weight_survive)
|
||||
end if
|
||||
if (check_for_node(node_cutoff, "energy")) then
|
||||
call get_node_value(node_cutoff, "energy", energy_cutoff)
|
||||
end if
|
||||
end if
|
||||
|
||||
! Particle trace
|
||||
|
|
|
|||
|
|
@ -127,6 +127,13 @@ contains
|
|||
if (.not. p % alive) return
|
||||
end if
|
||||
|
||||
! Kill neutron under certain energy
|
||||
if (p % E < energy_cutoff) then
|
||||
p % alive = .false.
|
||||
p % wgt = ZERO
|
||||
p % last_wgt = ZERO
|
||||
end if
|
||||
|
||||
end subroutine sample_reaction
|
||||
|
||||
!===============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue