mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
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:
parent
fb54b035a7
commit
141959dab4
3 changed files with 5 additions and 4 deletions
|
|
@ -525,7 +525,8 @@ class Operator(TransportOperator):
|
||||||
rates = self.reaction_rates
|
rates = self.reaction_rates
|
||||||
rates[:, :, :] = 0.0
|
rates[:, :, :] = 0.0
|
||||||
|
|
||||||
k_combined = openmc.capi.keff()[0]
|
# Get k and uncertainty
|
||||||
|
k_combined = openmc.capi.keff()
|
||||||
|
|
||||||
# Extract tally bins
|
# Extract tally bins
|
||||||
materials = self.burnable_mats
|
materials = self.burnable_mats
|
||||||
|
|
|
||||||
|
|
@ -237,8 +237,8 @@ class Results(object):
|
||||||
chunks=(1, 1, n_mats, n_nuc_rxn, n_rxn),
|
chunks=(1, 1, n_mats, n_nuc_rxn, n_rxn),
|
||||||
dtype='float64')
|
dtype='float64')
|
||||||
|
|
||||||
handle.create_dataset("eigenvalues", (1, n_stages),
|
handle.create_dataset("eigenvalues", (1, n_stages, 2),
|
||||||
maxshape=(None, n_stages), dtype='float64')
|
maxshape=(None, n_stages, 2), dtype='float64')
|
||||||
|
|
||||||
handle.create_dataset("time", (1, 2), maxshape=(None, 2), dtype='float64')
|
handle.create_dataset("time", (1, 2), maxshape=(None, 2), dtype='float64')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class ResultsList(list):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
time = np.empty_like(self, dtype=float)
|
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
|
# Get time/eigenvalue at each point
|
||||||
for i, result in enumerate(self):
|
for i, result in enumerate(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue