Skip to content

A minimal example implementation of an open source method of making DAGMC geometry with Paramak and simulating tritium production with OpenMC

License

Notifications You must be signed in to change notification settings

fusion-energy/inertial_fusion_openmc_dagmc_paramak_example

Repository files navigation

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 📹

Prerequisites

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

First clone the repository

git clone https://github.com/fusion-energy/inertial_fusion_openmc_dagmc_paramak_example
inertial_fusion_openmc_dagmc_paramak_example

Making the DAGMC model

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

CAD geometry image

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

DAGMC model image

Simulating the model in OpenMC

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

Mesh Tally result

About

A minimal example implementation of an open source method of making DAGMC geometry with Paramak and simulating tritium production with OpenMC

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published