This example simulates a simplified model of an inertial confinement fusion reactor using two different neutronics geometries method.
- A CAD model is made and automatically converted to a DAGMC geometry that is then used in OpenMC for a neutronics simulation.
- A Constructive Solid Geometry (CSG) is made made in OpenMC and used for a neutronics simulation directly.
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/shimwell/neutronics_geomentry_comparision_simulation.git
cd neutronics_geomentry_comparision_simulation
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 scripts/1_create_dagmc_geometry.py
Optionally you can inspect the DAGMC file at this stage by converting the h5m file to a vtk file and opening this with Paraview. There should be several h5m made, this example command converts just one of them. The geometries made for Shift should have graveyards while the openmc one won't.
mbconvert dagmc_10_openmc.h5m dagmc_10_openmc.vtk
paraview dagmc.vtk
First make an environment for simulation.
conda env create -f environment_neutronics.yml
conda activate env_neutronics
Make the DAGMC geometry
python scripts 1_create_dagmc_geometry.py
Then run the DAGMC simulation which will produce a statepoint file that contains the simulation outputs.
python python scripts/2_openmc_simulation_with_dagmc_geometry.py
Then run the CSG simulation which will produce a statepoint file that contains the simulation outputs.
python python scripts scripts/3_openmc_simulation_with_csg_geometry.py