This example simulates a simplified model of an inertial confinement fusion reactor.
- A CAD model is made and automatically converted to a DAGMC geometry that is then used in OpenMC for a neutronics simulation.
- The neutronics simulation obtains the tritium breeding ratio and a 3D map of tritium production.
- The simulation outputs are post processed to display the results and produce a VTK file for visualization.
👉 📹 Link to video tutorial for this repository 📹
This minimal example makes use of Conda to manage and install the packages.
You will need one of these conda distributions to be installed or work within a Docker image
git clone https://github.com/fusion-energy/inertial_fusion_openmc_dagmc_paramak_example
inertial_fusion_openmc_dagmc_paramak_example
Make an environment for the model preparation
conda env create -f environment_cad.yml
conda activate env_cad
Then run the script for making the DAGMC model.
python 1_creation_of_dagmc_geometry.py
Then open the dagmc.html
file in an internet browser to view the CAD created
Optionally you can inspect the DAGMC file at this stage by converting the h5m file to a vtk file and opening this with Paraview
mbconvert dagmc.h5m dagmc.vtk
paraview dagmc.vtk
First make an environment for simulation.
conda env create -f environment_neutronics.yml
conda activate env_neutronics
Then run the simulation which will produce a statepoint.10.h5 file that contains the simulation outputs
python 2_run_openmc_dagmc_simulation.py
Then run the post processing script that should output the Tritium Breeding Ratio to the terminal and make a VTK showing the neutron interactions resulting in tritium production
python 3_extract_results.py
Open up the VTK file with Paraview and slice the data to see the high tritium breeding region
paraview tritium_production_map.vtk