mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Don't throw away precision on K-M slope calculation
This commit is contained in:
parent
af579895dd
commit
e7595c3201
2 changed files with 3 additions and 5 deletions
|
|
@ -299,9 +299,7 @@ def kalbach_slope(energy_projectile, energy_emitted, iza_projectile,
|
|||
r_3 = min(e_a, 41.)
|
||||
x_1 = r_1 * e_b / e_a
|
||||
x_3 = r_3 * e_b / e_a
|
||||
slope = 0.04 * x_1 + 1.8e-6 * x_1**3 + 6.7e-7 * M * m * x_3**4
|
||||
|
||||
return float("%7e" % slope)
|
||||
return 0.04 * x_1 + 1.8e-6 * x_1**3 + 6.7e-7 * M * m * x_3**4
|
||||
|
||||
|
||||
class KalbachMann(AngleEnergy):
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ def test_comparison_slope_hdf5(hdf5_filename, endf_type, endf_filename):
|
|||
np.testing.assert_array_almost_equal(
|
||||
endf_distribution.slope[i].y,
|
||||
hdf5_slope.y,
|
||||
decimal=6
|
||||
decimal=5
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -227,5 +227,5 @@ def test_comparison_slope_njoy(endf_type, endf_filename):
|
|||
np.testing.assert_array_almost_equal(
|
||||
endf_distribution.slope[i].y,
|
||||
njoy_slope.y,
|
||||
decimal=6
|
||||
decimal=5
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue