Introduction to OpenMC

What you'll learn

First pin cell · 1 / 115 min read
  • See the First pin cell path from install through a runnable PWR pin.
  • Describe what OpenMC is and how a Python API changes the workflow versus a card deck.
  • Find the mirrored example scripts that match the pin and assembly pages.

Your path through this guide

These pages are ordered so you build one PWR pin cell, then open the model out. Path A is the spine — follow prev/next or the sidebar group First pin cell until you hit Example: Pin Cell. Path B starts after that pin.

Early Path A pages reuse the same pin dimensions (fuel radius 0.4096 cm, clad 0.4750 cm, pitch 1.26 cm, 4.5% enriched UO2) so the pieces fit together when you reach the full example.

What OpenMC is

OpenMC is a continuous-energy Monte Carlo neutron (and photon) transport code with a Python API as the primary interface. You build materials, geometry, settings, and tallies as objects, then run the transport engine — rather than writing a card-image deck by hand.

It is open source under the MIT license, developed originally at MIT and maintained by an active community. It is especially strong for reactor physics criticality, depletion, and scripted parameter studies.

Repositories and scripts for these tutorials

Two repositories matter. OpenMC itself — github.com/openmc-dev/openmc — is where you get the openmc package and nuclear-data tooling, with reference docs at docs.openmc.org. Separately, the pin and assembly pages on this site have runnable build_model.py twins mirrored at github.com/caalh/ReactorMC, under openmc-examples/ — copy these instead of retyping the inline code blocks once OpenMC and its cross sections are installed.

Everything else on Path A teaches with inline snippets rather than whole files. Start building at Installation, or jump straight to Example: Pin Cell if you already know the API.

Compared with MCNP and Serpent

FeatureOpenMCMCNPSerpent
LicenseOpen source (MIT)Export-controlledAcademic license
InterfacePython APIText inputText input
AutomationNative PythonExternal scriptsLimited
VisualizationInteractive plotsBasic plots2D plots

For a concept-by-concept syntax map, see the Interactive Rosetta Stone.

Check yourself

  • Name the two tracks in this guide and where the pin-cell payoff sits.
  • Point to where the mirrored build_model.py scripts live.