Hello,
Is there any way to show flux variation with respect to time if depletion data are present (using openmc.deplete module)?
Hi Farshid,
After each transport simulation, the depletion module will write tally data to statepoint files, just like you would obtain from a single transport solution. These are named “openmc_simulation_n.h5”, where is the current time step. You can open each file using the StatePoint class. With one StatePoint instance per file (and each file at a unique point in time) you can view and plot tally data over time manually.
I hope this is helpful,
Andrew
Hi Andrew @andrewjohnson,
I am running into a similar problem. With the latest release 0.13.2, I tested a homogeneous fuel depletion. I did see openmc_simulation_n.h5 files at each step. However, I failed to read them with StatePoint. The error messages are:
reading statepoint file: openmc_simulation_n0.h5
Traceback (most recent call last):
File “/home/puran/openmc_job/run_pindep/…/Read_OpenMC_Tallies.py”, line 20, in
sp = openmc.StatePoint(statepoint, autolink=True)
File “/home/group_share/miniconda3/lib/python3.9/site-packages/openmc/statepoint.py”, line 150, in init
self.link_with_summary(su)
File “/home/group_share/miniconda3/lib/python3.9/site-packages/openmc/statepoint.py”, line 678, in link_with_summary
for tally in self.tallies.values():
File “/home/group_share/miniconda3/lib/python3.9/site-packages/openmc/statepoint.py”, line 372, in tallies
if self.tallies_present and not self._tallies_read:
File “/home/group_share/miniconda3/lib/python3.9/site-packages/openmc/statepoint.py”, line 446, in tallies_present
return self._f.attrs[‘tallies_present’] > 0
File “h5py/_objects.pyx”, line 54, in h5py._objects.with_phil.wrapper
File “h5py/_objects.pyx”, line 55, in h5py._objects.with_phil.wrapper
File “/home/group_share/miniconda3/lib/python3.9/site-packages/h5py/_hl/attrs.py”, line 56, in getitem
attr = h5a.open(self._id, self._e(name))
File “h5py/_objects.pyx”, line 54, in h5py._objects.with_phil.wrapper
File “h5py/_objects.pyx”, line 55, in h5py._objects.with_phil.wrapper
File “h5py/h5a.pyx”, line 80, in h5py.h5a.open
KeyError: “Can’t open attribute (can’t locate attribute: ‘tallies_present’)”
I used HDFView to open openmc_simulation_n0.h5 and found those tallies were there but no tally results were recorded. For your information, I attached the StatePoint files. The file “statepoint.150.h5” was obtained at the last time step and it could be read using openmc.StatePoint(‘statepoint.150.h5’) without a problem.
Thanks,
Puran
openmc_simulation_n0.h5 (39.6 KB)
openmc_simulation_n1.h5 (39.6 KB)
openmc_simulation_n2.h5 (39.6 KB)
openmc_simulation_n3.h5 (39.6 KB)
statepoint.150.h5 (450.5 KB)