mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Increment version of depletion results file, and support reading older version
This commit is contained in:
parent
e682aa88e4
commit
c3d3b5a71f
2 changed files with 12 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
|||
Depletion Results File Format
|
||||
=============================
|
||||
|
||||
The current version of the depletion results file format is 1.0.
|
||||
The current version of the depletion results file format is 1.1.
|
||||
|
||||
**/**
|
||||
|
||||
|
|
@ -14,7 +14,7 @@ The current version of the depletion results file format is 1.0.
|
|||
|
||||
:Datasets: - **eigenvalues** (*double[][][2]*) -- k-eigenvalues at each
|
||||
time/stage. This array has shape (number of timesteps, number of
|
||||
stages, value). The last axis contains the eigenvalue and the
|
||||
stages, value). The last axis contains the eigenvalue and the
|
||||
associated uncertainty
|
||||
- **number** (*double[][][][]*) -- Total number of atoms. This array
|
||||
has shape (number of timesteps, number of stages, number of
|
||||
|
|
@ -25,7 +25,10 @@ The current version of the depletion results file format is 1.0.
|
|||
nuclides, number of reactions).
|
||||
- **time** (*double[][2]*) -- Time in [s] at beginning/end of each
|
||||
step.
|
||||
- **depletion time** (*double[]*) -- Average process time in [s]
|
||||
- **source_rate** (*double[][]*) -- Power in [W] or source rate in
|
||||
[neutrons/sec]. This array has shape (number of timesteps, number
|
||||
of stages).
|
||||
- **depletion time** (*double[]*) -- Average process time in [s]
|
||||
spent depleting a material across all burnable materials and,
|
||||
if applicable, MPI processes.
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import numpy as np
|
|||
from . import comm, MPI
|
||||
from .reaction_rates import ReactionRates
|
||||
|
||||
VERSION_RESULTS = (1, 0)
|
||||
VERSION_RESULTS = (1, 1)
|
||||
|
||||
|
||||
__all__ = ["Results"]
|
||||
|
|
@ -394,7 +394,11 @@ class Results:
|
|||
number_dset = handle["/number"]
|
||||
eigenvalues_dset = handle["/eigenvalues"]
|
||||
time_dset = handle["/time"]
|
||||
source_rate_dset = handle["/source_rate"]
|
||||
if "source_rate" in handle:
|
||||
source_rate_dset = handle["/source_rate"]
|
||||
else:
|
||||
# Older versions used "power" instead of "source_rate"
|
||||
source_rate_dset = handle["/power"]
|
||||
|
||||
results.data = number_dset[step, :, :, :]
|
||||
results.k = eigenvalues_dset[step, :]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue