How to run OpenMC

Hi,
I followed the instructions from OpenMC website and installed Docker on Windows 11. From there what are the steps to run an OpenMC file?

I am confused with using Jyputer Notebook and understand how Jyputer and Docker works together.

  1. How do I create an input file like the one with MCNP?
  2. Where do I create an input file (on my desktop or Jyputer website)? Or do I install Jyputer on my desktop?
  3. How do I use Jyputer and Docker? Or are these two different methods to run OpenMC?
  4. How do I run OpenMC?

Thank you

Birsen

Hi Birsen, welcome to the community.
I am not a docker user, but I am using openmc from WSL Windows and compiling it from the source. I think there are some tutorials on YouTube, one from Copenhagen Atomics that give a glimpse into how to use Docker on WSL and do neutronic calculations from it.

If you have successfully set the openmc environment, you can check your openmc version by using this command from the Linux terminal.

openmc --version

Next, you need to check the nuclear data library has been set on your system, try

echo $OPENMC_CROSS_SECTIONS

It will show you the default path for openmc nuclear data library that exists on your system, similar to the path for your xsdir file.
If you have none of it, you might want to check whether the docker you use already has a nuclear data library or not. This is the official nuclear data library for openmc
https://openmc.org/official-data-libraries/

you can also add the nuclear data path to your .profile file from your $HOME if needed

export OPENMC_CROSS_SECTIONS=/path to your nuclear data/cross_sections.xml

Also, if you check the source code of openmc from git

you can see that there is an examples folder with various examples. If you check those Python scripts, try the jezebel, I think you will understand the workflow. You can run this script with
python3 filename.py
it will generate the material.xml, geometry.xml, settings.xml, and other xml files that are needed by openmc to run. You can start openmc by typing
openmc (enter),
it will read the xml files, or if the python script has the openmc.run() line input, it will automatically run openmc after the xml file generated.

If you want a more interactive workflow, you can use the jupyter notebook to check each part of the input Python script. This git repo has many useful example notebooks for you to try. I think it will be easier for you to understand because you have a background in MCNP.

Regarding how you use jupyter notebook from Docker in WSL, I think you can search it on the net. Or maybe other docker users in our forum will catch you later.

Hi Wahid,

Thank you for the response.