From 3bd35b850fdccff7346a3780922d4a972ca592ed Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sun, 8 Jul 2012 09:23:26 -0400 Subject: [PATCH] Added log-log interpolation for URR probability tables. --- src/cross_section.F90 | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/cross_section.F90 b/src/cross_section.F90 index 3d1a380e6..ae7e4ce8a 100644 --- a/src/cross_section.F90 +++ b/src/cross_section.F90 @@ -339,8 +339,33 @@ contains capture = (ONE - f) * urr % prob(i_energy, URR_N_GAMMA, i_table) + & f * urr % prob(i_energy + 1, URR_N_GAMMA, i_table) elseif (urr % interp == LOG_LOG) then - message = "Log-log interpolation on probability table not yet supported." - call fatal_error() + ! Get logarithmic interpolation factor + f = log(p % E / urr % energy(i_energy)) / & + log(urr % energy(i_energy + 1) / urr % energy(i_energy)) + + ! Calculate elastic cross section/factor + elastic = ZERO + if (urr % prob(i_energy, URR_ELASTIC, i_table) /= ZERO) then + elastic = exp((ONE - f) * log(urr % prob(i_energy, URR_ELASTIC, & + i_table)) + f * log(urr % prob(i_energy + 1, URR_ELASTIC, & + i_table))) + end if + + ! Calculate fission cross section/factor + fission = ZERO + if (urr % prob(i_energy, URR_FISSION, i_table) /= ZERO) then + fission = exp((ONE - f) * log(urr % prob(i_energy, URR_FISSION, & + i_table)) + f * log(urr % prob(i_energy + 1, URR_FISSION, & + i_table))) + end if + + ! Calculate capture cross section/factor + capture = ZERO + if (urr % prob(i_energy, URR_N_GAMMA, i_table) /= ZERO) then + capture = exp((ONE - f) * log(urr % prob(i_energy, URR_N_GAMMA, & + i_table)) + f * log(urr % prob(i_energy + 1, URR_N_GAMMA, & + i_table))) + end if end if ! Determine treatment of inelastic scattering