Tallies created by internal depletion helpers are marked
as internal using the openmc.lib.Tally.writeable property.
This is done to resolve issue #1327 where statepoint files could
grow to be quite large after tallying reaction rates across many
burnable materials for all nuclides of interest.
A check is added in the depletion regression test to ensure that
no additional tallies are loaded to the StatePoint.
The new class method ResultsList.from_hdf5 should be
used to load in results data, rather than passing
the file name into the __init__ method. __init__
passes directly to list.__init__ now.
The motivation for this is to resolve the depletion
restart with MPI bug #1275. To do this, each Operator
will create it's own ResultsList and distribute reaction
rates and densities according to what materials are burned
on this process. Rather than use a normal list, this Operator
expects the various accessor methods like get_atoms to be
present on self.prev_res
Closes#1283 by writing a statepoint file at the beginning
of every depletion step [BOS] and at the final transport simulation,
[EOL]. These files are named "openmc_simulation_n<N>.h5", where
<N> represents the current depletion step, including restart
steps. The new files are written using the C API.
It is worth noting that OpenMC will still write statepoint files
after each intermediate transport simulation used by various
depletion schemes. This commit makes no effort to move or delete
these files, nor stop their creation. It is not clear how,
using the python nor C API, one can stop OpenMC from
writing a statepoint file.
The source bank is not written to these files as this causes
a segmentation fault.
Comparisons of k_combined pull from all statepoints,
reference depletion_results file, and test depletion_results
file have been added to depletion regression test.
The depletion function openmc.deplete.predictor has been removed
in favor of a class-based approach. The following syntax will
replicate the behavior of the predictor integration scheme:
>>> from openmc.deplete import PredictorIntegrator
>>> predictor = PredictorIntegrator(operator, time, power)
>>> predictor.integrate()`
The expression can be reduced to a single line:
>>> PredictorIntegrator(operator, time, power).integrate()