Iterations of volumeCalculation

Hi all,

I don’t understand the meaning of the iteration attribute of openmc.VolumeCalculation.
OpenMC didn’t stop volume calculation until the trigger was triggered, even though the iteration had already exceeded the iteration attribute that I set. Therefore, this attribute doesn’t mean “max iteration”.
Then what does it do?

Hi @kingyue. That attribute actually corresponds to the number of iterations it took to reach a trigger during a volume calculation, so it’s not something you as the user need to set. When a trigger is being used, the samples attribute is the number of samples to use per iteration. If you’re loading a volume calculation result (VolumeCalculation.from_hdf5) that used a trigger, you should see this attribute set. Apologies if the documentation is not clear on that point!

1 Like

Thanks Paul! I was a little confused because there seems no difference between “1000 samples * 10 iterations” and “10000 samples”. So I thought this attribute may have other functions. I think it’s better if user can set max_iteration, just like max_batches, to avoid endless volume calculation when the threshold is too hard to reach.
I’m very happy that the trigger of volume calculation is introduced in 0.12. It helps me write universal scripts in depletion problems, in calculation of pin power density and in normalization of flux tally which needs fissionable mass of the whole model. However, it is not necessary to calculate number of atoms in these cases. It may also be a good idea if user can choose not to calculate number of atoms. Then nuclear data library is not required and volume calculation can be launched whether the material uses continuous-energy data or multiple-group data.

Thanks @kingyue. Those are both good suggestions! I’ll create an issue on our github repo so that we can keep track of this.