From 4273b407226ea38e88947c156aad2ed55fd52537 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 12 Oct 2026 18:53:24 +0000 Subject: [PATCH] Add implied a_0 to File 6 two-body Legendre distributions In ENDF-6 File 6, LAW=2 with LANG=0 stores the Legendre coefficients a_1 to a_NL only; a_0 = 1 is implied (ENDF-102, Eq. 6.8), as in File 4. _get_products passed the stored values straight to Legendre, so a_1 was used as a_0 and every order shifted down by one. The File 4 reader already prepends a_0 = 1. For example, Al-27 MT51 at 13.5 MeV in ENDF/B-VIII.0 gave a distribution that integrated to 0.257 and went negative; it now integrates to 1 with mean cosine 0.257. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_017gaBBBNzyxaGJGHpSCJwm8 --- openmc/data/reaction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openmc/data/reaction.py b/openmc/data/reaction.py index 1d350165a95..e1ae7b2bf1e 100644 --- a/openmc/data/reaction.py +++ b/openmc/data/reaction.py @@ -192,7 +192,8 @@ def _get_products(ev, mt): energy[i] = items[1] lang = items[2] if lang == 0: - mu.append(Legendre(values)) + # Coefficients start at l = 1; a_0 = 1 is implied + mu.append(Legendre(np.insert(values, 0, 1.0))) elif lang == 12: mu.append(Tabular(values[::2], values[1::2])) elif lang == 14: