mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed error in calculation of smooth (n,gamma) cross section for probability tables.
This commit is contained in:
parent
e07414a529
commit
e92e0b30da
2 changed files with 12 additions and 5 deletions
|
|
@ -346,7 +346,8 @@ contains
|
|||
! Multiply by smooth cross-section if needed
|
||||
if (urr % multiply_smooth) then
|
||||
elastic = elastic * micro_xs(index_nuclide) % elastic
|
||||
capture = capture * micro_xs(index_nuclide) % absorption
|
||||
capture = capture * (micro_xs(index_nuclide) % absorption - &
|
||||
micro_xs(index_nuclide) % fission)
|
||||
fission = fission * micro_xs(index_nuclide) % fission
|
||||
end if
|
||||
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ contains
|
|||
rxn => nuc % reactions(1)
|
||||
|
||||
! Perform collision physics for elastic scattering
|
||||
call elastic_scatter(p, nuc, rxn)
|
||||
call elastic_scatter(p, index_nuclide, rxn)
|
||||
|
||||
end if
|
||||
|
||||
|
|
@ -475,10 +475,10 @@ contains
|
|||
! need to be fixed
|
||||
!===============================================================================
|
||||
|
||||
subroutine elastic_scatter(p, nuc, rxn)
|
||||
subroutine elastic_scatter(p, index_nuclide, rxn)
|
||||
|
||||
type(Particle), pointer :: p
|
||||
type(Nuclide), pointer :: nuc
|
||||
integer, intent(in) :: index_nuclide
|
||||
type(Reaction), pointer :: rxn
|
||||
|
||||
real(8) :: awr ! atomic weight ratio of target
|
||||
|
|
@ -491,6 +491,10 @@ contains
|
|||
real(8) :: v ! y-direction
|
||||
real(8) :: w ! z-direction
|
||||
real(8) :: E ! energy
|
||||
type(Nuclide), pointer :: nuc => null()
|
||||
|
||||
! get pointer to nuclide
|
||||
nuc => nuclides(index_nuclide)
|
||||
|
||||
vel = sqrt(p % E)
|
||||
awr = nuc % awr
|
||||
|
|
@ -499,7 +503,9 @@ contains
|
|||
v_n = vel * p % coord0 % uvw
|
||||
|
||||
! Sample velocity of target nucleus
|
||||
call sample_target_velocity(p, nuc, v_t)
|
||||
if (.not. micro_xs(index_nuclide) % use_ptable) then
|
||||
call sample_target_velocity(p, nuc, v_t)
|
||||
end if
|
||||
|
||||
! Velocity of center-of-mass
|
||||
v_cm = (v_n + awr*v_t)/(awr + ONE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue