From e92e0b30dacdf982142f9cb5efe9a6974dd879df Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 4 Jan 2012 16:21:26 -0500 Subject: [PATCH] Fixed error in calculation of smooth (n,gamma) cross section for probability tables. --- src/cross_section.F90 | 3 ++- src/physics.F90 | 14 ++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/cross_section.F90 b/src/cross_section.F90 index fbf9485ee4..fbec5221ee 100644 --- a/src/cross_section.F90 +++ b/src/cross_section.F90 @@ -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 diff --git a/src/physics.F90 b/src/physics.F90 index 3404824558..27312d72bb 100644 --- a/src/physics.F90 +++ b/src/physics.F90 @@ -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)