Hello users and OpenMC devs!
I’ve made heavy use of the Python API for OpenMC 0.13.3 for running parametric simulations. They involved materials and geometry sweeps. A function built the model which was exported to an XML and then run. I found that the constant loading and unloading of XS was bottlenecking my sweep. 4 seconds for XS IO for 1.5 seconds of actual simulation. The situation was similar on an HPC cluster. I noticed that the search_for_keff feature also does this. Given that users running parametric sweeps wouldn’t expect very high fidelity and thus, the number of particles run would be low, it seems that the XS IO bottleneck would be common for parametric simulations.
I believe that OpenMC is uniquely suited to parametric runs and I’m interested in writing a dedicated parametric modelling module for it. For now, I’m still planning it but I’ve got this:
- Use openmc.lib in a dedicated parametric sweep function to only load XS as required like the depletion module
- Minimise IO for parametric sweeps, store StatePoint data in memory until the end of the sweep
- Refactor the search_for_keff to use the parametric module
- Include a class to handle the results of parametric sweeps using StatePoint and Numpy arrays
- Parametric depletion??
- Parallel model runs??
I’d love for this topic to be thoroughly discussed here and users and devs provide suggestions and inputs. Examples include the method of implementation (Sweep should take in an array OpenMC models vs Sweep should accept an array of parameters for a callable function builder) and functionality to include or exclude from the module.