From c16c43d8667efd6b10ea3ff949e4253d624107fe Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Tue, 10 Nov 2015 10:17:14 -0500 Subject: [PATCH] changed C_LIGHT back to m/s and changed velocity units in tally.F90 --- src/constants.F90 | 2 +- src/tally.F90 | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/constants.F90 b/src/constants.F90 index 1ca896c3f9..375c517e76 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -66,7 +66,7 @@ module constants MASS_NEUTRON_MEV = 939.565379_8, & ! mass of a neutron in MeV/c^2 MASS_PROTON = 1.007276466812_8, & ! mass of a proton in amu AMU = 1.660538921e-27_8, & ! 1 amu in kg - C_LIGHT = 2.99792458e10_8, & ! speed of light in cm/s + C_LIGHT = 2.99792458e8_8, & ! speed of light in m/s N_AVOGADRO = 0.602214129_8, & ! Avogadro's number in 10^24/mol K_BOLTZMANN = 8.6173324e-11_8, & ! Boltzmann constant in MeV/K INFINITY = huge(0.0_8), & ! positive infinity diff --git a/src/tally.F90 b/src/tally.F90 index 31bce232a0..a5d7f3f0de 100644 --- a/src/tally.F90 +++ b/src/tally.F90 @@ -148,12 +148,16 @@ contains else score = p % last_wgt end if + + ! Score the flux weighted inverse velocity with velocity in units of + ! cm/s score = score / material_xs % total & - / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT) + / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0) else - ! For inverse velocity, we don't need a cross section - score = flux / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT) + ! For inverse velocity, we don't need a cross section. The velocity is + ! in units of cm/s. + score = flux / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0) end if