Store k and uncertainty through depletion

Useful for benchmarking and other code to code comparisons.
The data is pulled right from the C api but now the uncertainties
are preserved and written to the depletion results file
This commit is contained in:
Andrew Johnson 2019-07-02 14:33:46 -05:00
parent fb54b035a7
commit 141959dab4
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB
3 changed files with 5 additions and 4 deletions

View file

@ -525,7 +525,8 @@ class Operator(TransportOperator):
rates = self.reaction_rates
rates[:, :, :] = 0.0
k_combined = openmc.capi.keff()[0]
# Get k and uncertainty
k_combined = openmc.capi.keff()
# Extract tally bins
materials = self.burnable_mats

View file

@ -237,8 +237,8 @@ class Results(object):
chunks=(1, 1, n_mats, n_nuc_rxn, n_rxn),
dtype='float64')
handle.create_dataset("eigenvalues", (1, n_stages),
maxshape=(None, n_stages), dtype='float64')
handle.create_dataset("eigenvalues", (1, n_stages, 2),
maxshape=(None, n_stages, 2), dtype='float64')
handle.create_dataset("time", (1, 2), maxshape=(None, 2), dtype='float64')

View file

@ -95,7 +95,7 @@ class ResultsList(list):
"""
time = np.empty_like(self, dtype=float)
eigenvalue = np.empty_like(self, dtype=float)
eigenvalue = np.empty((len(self), 2), dtype=float)
# Get time/eigenvalue at each point
for i, result in enumerate(self):