Hi all,
I am new to OpenMC and started by using the example in Jupyter Notebooks, MGXS Part I: Introduction (I basically copy-pasted the Python commands and added cross section path for NNC).
There are two problems:
First, the 2-groups cross section mean and standard deviation are obviously wrong :
Total cross section
Cell | Group In | Nuclide | Mean | Std. Dev. |
- | - | - | - | - |
1 | 1 | total | 0 | 0 |
1 | 2 | total | 1.9599963723 | 0 |
Absorption cross section
Cell | Group In | Nuclide | Mean | Std. Dev. |
- | - | - | - | - |
1 | 1 | total | 1.79769313486232E+308 | 0 |
1 | 2 | total | 0.0113877115 | 0 |
Secondly, and this is probably directly connected to the first problem, I have got warning from Python for the file tallies.py:
/home/julien/openmc/openmc/tallies.py:359: RuntimeWarning: invalid value encountered in sqrt
self.mean[nonzero]**2)/(n - 1))
/home/julien/openmc/openmc/tallies.py:1529: RuntimeWarning: invalid value encountered in true_divide
self_rel_err = data[‘self’][‘std. dev.’] / data[‘self’][‘mean’]
/home/julien/openmc/openmc/tallies.py:1530: RuntimeWarning: invalid value encountered in true_divide
other_rel_err = data[‘other’][‘std. dev.’] / data[‘other’][‘mean’]
/home/julien/openmc/openmc/tallies.py:1531: RuntimeWarning: invalid value encountered in true_divide
new_tally._mean = data[‘self’][‘mean’] / data[‘other’][‘mean’]
/home/julien/openmc/openmc/tallies.py:1108: RuntimeWarning: invalid value encountered in true_divide
data = self.std_dev[indices] / self.mean[indices]
For the very first warning (tallies.py line 359) I checked a little and it looks like there is a problem with sum_sq in the calculation of the standard deviation. If I check the value of the mean (self.mean) it is 37.18195109. The square of the mean is then 1382.49748701. However, the mean of the square (self.sum_sq[nonzero]/n) is 26.76525086. Obviously, the resulting difference in the root square is negative hence the warning and the NaN value that triggers the other warning.
If I understand correctly, it looks like sum_sq is a value directly extracted by tallies.py from the HDF5 statepoint file. Could it be that tallies.py misread something here?
Your help would be very welcome.
Let me know if you guys need more information from my OpenMC or my results.
Thanks a lot.
Julien