Commit 5fe2fbfa authored by Patrick Shriwise's avatar Patrick Shriwise Committed by GitHub

Merge pull request #1219 from paulromano/neutron-fromhdf5-bugfix

Fix bug in IncidentNeutron.from_hdf5
parents ef228502 b4a6d796
......@@ -139,6 +139,18 @@ Miscellaneous
<https://doi.org/10.1007/s41365-019-0588-0>`_," *Nucl. Sci. Tech.*, **30**: 63
(2019).
- M. Sajjad, Muhammad Rizwan Ali, M. Naveed Ashraf, Rustam Khan, Tasneem Fatima,
"`KANUPP Reactor Core Model and its Validation
<https://doi.org/10.1109/PGSRET.2018.8685948>`_," International Conference on
Power Generation Systems and Renewable Energy Technologies, Islamabad,
Pakistan, Sep. 10-12 (2018).
- Muhammad Waqas Tariq, Muhammad Sohail, and Sikander Majid Mirza, "`Calculation
of Neutronic Parameters using OpenMC for Potential Dispersed Fuels of MNSR
<https://doi.org/10.1109/PGSRET.2018.8685927>`_," International Conference on
Power Generation Systems and Renewable Energy Technologies, Islamabad,
Pakistan, Sep. 10-12 (2018).
- Amanda L. Lund and Paul K. Romano, "`Implementation and Validation of Photon
Transport in OpenMC <https://doi.org/10.2172/1490825>`_", Argonne National
Laboratory, Technical Report ANL/MCS-TM-381 (2018).
......
......@@ -543,20 +543,6 @@ class IncidentNeutron(EqualityMixin):
tgroup = group['total_nu']
rx.derived_products.append(Product.from_hdf5(tgroup))
# Build redundant reactions. Start from the highest MT number because
# high MTs never depend on lower MTs.
for mt_sum in sorted(SUM_RULES, reverse=True):
if mt_sum not in data:
rxs = [data[mt] for mt in SUM_RULES[mt_sum] if mt in data]
if len(rxs) > 0:
data.reactions[mt_sum] = rx = Reaction(mt_sum)
rx.redundant = True
if rx.mt == 18 and 'total_nu' in group:
tgroup = group['total_nu']
rx.derived_products.append(Product.from_hdf5(tgroup))
for T in data.temperatures:
rx.xs[T] = Sum([rx_i.xs[T] for rx_i in rxs])
# Read unresolved resonance probability tables
if 'urr' in group:
urr_group = group['urr']
......
......@@ -356,8 +356,8 @@ void Material::finalize()
void Material::normalize_density()
{
bool percent_in_atom = (atom_density_(0) > 0.0);
bool density_in_atom = (density_ > 0.0);
bool percent_in_atom = (atom_density_(0) >= 0.0);
bool density_in_atom = (density_ >= 0.0);
for (int i = 0; i < nuclide_.size(); ++i) {
// determine atomic weight ratio
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment