From de786d413a83225077c1a8f50a3fb122bbc45416 Mon Sep 17 00:00:00 2001 From: shimwell Date: Fri, 31 Jul 2026 15:41:18 +0200 Subject: [PATCH] Warn when ACE average heating numbers are written as zeros The ESZ block's average heating (KERMA) column is unconditionally filled with zeros, and is not recomputed elsewhere. Codes that read heating from this column therefore get a valid ACE file in which heating is silently zero everywhere. Emit a warning at the point the zeros are written, and record the limitation in the module's existing "Issues" docstring. The numeric content of the generated ACE file is unchanged. Co-authored-by: shimwell Co-authored-by: jon-proximafusion --- brownies/LANL/toACE/gndsToACE.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/brownies/LANL/toACE/gndsToACE.py b/brownies/LANL/toACE/gndsToACE.py index 15932f0f..660bb6b9 100644 --- a/brownies/LANL/toACE/gndsToACE.py +++ b/brownies/LANL/toACE/gndsToACE.py @@ -10,9 +10,12 @@ -) When delayed neutrons are present, their multiplicities are added to prompt, and prompt and total nu_bar are written. However, their decay constants, etc are currently not written. -) Only neutrons distribution data are outputted. + -) The average heating numbers (KERMA) in the ESZ block are not calculated and are written as zeros. There is + currently no equivalent of NJOY's HEATR module in FUDGE. A warning is emitted when the zeros are written. """ import time +import warnings from xData import enums as xDataEnumsModule from xData import axes as axesModule @@ -217,6 +220,7 @@ def toACE(self, styleLabel, cdf_style, fileName, evaluationId, productData, dela else: updateXSSInfo( 'absorption cross section', annotates, XSS, mapCrossSectionToGrid(absorptionXSec) ) updateXSSInfo( 'elastic cross section', annotates, XSS, elasticXSec ) + warnings.warn('Average heating numbers (KERMA) are not calculated and are written to the ESZ block as zeros.') averageHeating = len( energyGrid ) * [ 0. ] updateXSSInfo( 'average heating', annotates, XSS, averageHeating )