fusion-energy / neutronics-workshop

A workshop covering a range of fusion relevant analysis and simulations with OpenMC, DAGMC, Paramak and other open source fusion neutronics tools
MIT License
111 stars 50 forks source link

added script for openmc lib example that changes material on a parameter study #262

Closed shimwell closed 6 months ago

shimwell commented 6 months ago

This script performs many simulations to find Tritium Breeding Ratio (TBR) as a function of lithium 6 enrichment while only loading the nuclear data for the nuclides just once.

As the simulation for TBR is quick and the loading of nuclear data is a relatively large part of the process this saves a significant amount of time. Using just the standard openmc python API one would have to load the same nuclear data for each simulation.

openmc.lib provides Python bindings to the C/C++ API so we can have fine grain control of the loading of the data, accessing the tallies and changing materials.