{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "197d82b4",
   "metadata": {},
   "source": [
    "# A RBMK geometry \n",
    "This notebook can be used as a template for modeling RBMK reactors.\n",
    "\n",
    "SOURCES\n",
    "\"Fuel Assembly\": https://web.archive.org/web/20090908013425/http:/www.insc.anl.gov:80/rbmk/reactor/assembly.html\n",
    "\"Fuel with burnable absorber for RBMK-1500\", pg250-252: https://www.osti.gov/etdeweb/servlets/purl/20269236\n",
    "\"DESIGN AND FABRICATION OF NUCLEAR FUEL FOR WWER AND RBMK REACTORS\"\n",
    "Slides 8-11: indico.ictp.it/event/a04215/session/26/contribution/16/material/0/1.pdf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "7b28ed9f",
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "from math import pi, sin, cos, sqrt\n",
    "import numpy as np\n",
    "import openmc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "c7518256",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Materials definitions\n",
    "\n",
    "fuel = openmc.Material(name='2.0% Fuel')\n",
    "fuel.add_element('U', 0.995, enrichment=2.0)\n",
    "fuel.add_element('Er', 0.005)\n",
    "fuel.add_nuclide('O16', 2.0)\n",
    "fuel.set_density('g/cm3', 10.400)\n",
    "\n",
    "zircaloy = openmc.Material(name='Zircaloy')\n",
    "zircaloy.add_element('Zr', 0.99)\n",
    "zircaloy.add_element('Nb', 0.01)\n",
    "zircaloy.set_density('g/cm3', 8.59)\n",
    "\n",
    "wall = openmc.Material(name='Carrier Rod Material')\n",
    "wall.add_element('Zr', 0.975)\n",
    "wall.add_element('Nb', 0.025)\n",
    "wall.set_density('g/cm3', 8.59)\n",
    "\n",
    "helium = openmc.Material(name='Helium')\n",
    "helium.add_element('He', 1)\n",
    "helium.set_density('g/cm3', 0.178)\n",
    "\n",
    "# Instantiate a Materials collection and export to xml\n",
    "materials_file = openmc.Materials([fuel, zircaloy, helium, wall])\n",
    "materials_file.export_to_xml()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e08264ac",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Geometry definitions for the fuel rod\n",
    "\n",
    "#Making the boundary planes for the sleeves\n",
    "sleeve_min_z = openmc.ZPlane(z0=-12)\n",
    "sleeve_max_z = openmc.ZPlane(z0=+12)\n",
    "\n",
    "# Create cylinders for the fuel and clad\n",
    "fuel_inner_radius = openmc.ZCylinder(r=0.55)\n",
    "fuel_outer_radius = openmc.ZCylinder(r=0.566)\n",
    "clad_inner_radius = openmc.ZCylinder(r=0.596)\n",
    "clad_outer_radius = openmc.ZCylinder(r=0.68)\n",
    "\n",
    "# Create a universe to encapsulate a fuel rod\n",
    "pin_cell_universe = openmc.Universe(name='2.0% Fuel Pin')\n",
    "\n",
    "# Create fuel cell\n",
    "fuel_cell_top = openmc.Cell(name='2.0% Fuel')\n",
    "fuel_cell_top.fill = fuel\n",
    "fuel_cell_top.region = -fuel_inner_radius & +sleeve_max_z\n",
    "pin_cell_universe.add_cell(fuel_cell_top)\n",
    "\n",
    "# Create void space\n",
    "void_space_top = openmc.Cell(name='empty_space')\n",
    "void_space_top.fill = helium\n",
    "void_space_top.region = +fuel_inner_radius & -clad_inner_radius & +sleeve_max_z\n",
    "pin_cell_universe.add_cell(void_space_top)\n",
    "\n",
    "# Create a clad cell\n",
    "clad_cell_top = openmc.Cell(name='2.0% Clad')\n",
    "clad_cell_top.fill = zircaloy\n",
    "clad_cell_top.region = +clad_inner_radius & -clad_outer_radius & +sleeve_max_z\n",
    "pin_cell_universe.add_cell(clad_cell_top)\n",
    "\n",
    "# Create fuel cell\n",
    "fuel_cell_bot = openmc.Cell(name='2.0% Fuel')\n",
    "fuel_cell_bot.fill = fuel\n",
    "fuel_cell_bot.region = -fuel_inner_radius & -sleeve_min_z\n",
    "pin_cell_universe.add_cell(fuel_cell_bot)\n",
    "\n",
    "# Create void space\n",
    "void_space_bot = openmc.Cell(name='empty_space')\n",
    "void_space_bot.fill = helium\n",
    "void_space_bot.region = +fuel_inner_radius & -clad_inner_radius & -sleeve_min_z\n",
    "pin_cell_universe.add_cell(void_space_bot)\n",
    "\n",
    "# Create a clad cell\n",
    "clad_cell_bot = openmc.Cell(name='2.0% Clad')\n",
    "clad_cell_bot.fill = zircaloy\n",
    "clad_cell_bot.region = +clad_inner_radius & -clad_outer_radius & -sleeve_min_z\n",
    "pin_cell_universe.add_cell(clad_cell_bot)\n",
    "\n",
    "# Create an outside of pin cell\n",
    "moderator = openmc.Cell(name='Moderator')\n",
    "moderator.fill = helium\n",
    "moderator.region = +clad_outer_radius\n",
    "pin_cell_universe.add_cell(moderator)\n",
    "\n",
    "# Create a 'sleeve' cell that slices through the middle of the elongated element\n",
    "sleeve_cell = openmc.Cell(name='Sleeve')\n",
    "sleeve_cell.fill = helium\n",
    "sleeve_cell.region = -clad_outer_radius & +sleeve_min_z & -sleeve_max_z\n",
    "pin_cell_universe.add_cell(sleeve_cell)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "0fa519b0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Geometry definitions for the fuel rod\n",
    "\n",
    "rod_inner_radius = openmc.ZCylinder(r=0.75)\n",
    "rod_outer_radius = openmc.ZCylinder(r=0.7625)\n",
    "\n",
    "rod_cell_universe = openmc.Universe(name='Carrier Rod')\n",
    "\n",
    "inner_rod = openmc.Cell(name='Inner Rod')\n",
    "inner_rod.fill = helium\n",
    "inner_rod.region = -rod_inner_radius\n",
    "rod_cell_universe.add_cell(inner_rod)\n",
    "\n",
    "outer_rod = openmc.Cell(name='Outer Rod')\n",
    "outer_rod.fill = wall\n",
    "outer_rod.region = +rod_inner_radius & -rod_outer_radius\n",
    "rod_cell_universe.add_cell(outer_rod)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "778d598c",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Create a circular Lattice for the bundle\n",
    "\n",
    "element_min_z = openmc.ZPlane(z0=-364, boundary_type='reflective')\n",
    "element_max_z = openmc.ZPlane(z0=+364, boundary_type='reflective')\n",
    "carrier_min_z = openmc.ZPlane(z0=-400, boundary_type='reflective')\n",
    "carrier_max_z = openmc.ZPlane(z0=+600, boundary_type='reflective')\n",
    "\n",
    "circlat = openmc.Universe(name='Circular Lattice')\n",
    "\n",
    "channel = openmc.ZCylinder(r=4.5, boundary_type='reflective')\n",
    "\n",
    "channel_cell = openmc.Cell(name='Channel')\n",
    "channel_cell.fill = helium\n",
    "channel_cell.region = -channel & +rod_outer_radius & +element_min_z & -element_max_z\n",
    "\n",
    "#Calculations before finding pin placement\n",
    "r_channel = 4.0\n",
    "r_element = 0.68\n",
    "r_outer = r_channel-r_element\n",
    "\n",
    "padding = pi*r_outer/6-2*r_element\n",
    "r_inner = r_outer*cos(pi/12)-sqrt((r_element*2+padding)**2-(r_element+padding)**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "0701a951",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Add the fuel pins into the channel\n",
    "\n",
    "num_in_rings = [6, 12]\n",
    "radii = [r_inner, r_outer]\n",
    "angles = [0, pi/12]\n",
    "\n",
    "for index in range(len(num_in_rings)):\n",
    "  elem_num = num_in_rings[index]\n",
    "  ring_radius = radii[index]\n",
    "  theta_0 = angles[index]\n",
    "  theta = 2*pi/elem_num\n",
    "  for element in range(elem_num):\n",
    "    x = ring_radius*cos(element*theta + theta_0)\n",
    "    y = ring_radius*sin(element*theta + theta_0)\n",
    "\n",
    "    pin_boundary = openmc.ZCylinder(x0=x, y0=y, r=r_element)\n",
    "    pin = openmc.Cell(fill=pin_cell_universe, region=-pin_boundary & +element_min_z & -element_max_z)\n",
    "    pin.translation = (x,y,0)\n",
    "    pin.id = (index+1)*100 + element\n",
    "    channel_cell.region &= ~pin.region\n",
    "    circlat.add_cell(pin)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "49f9702b",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Add the 3 Components of the Carrier Rod\n",
    "rod_bound = openmc.ZCylinder(r=0.7625, boundary_type='reflective')\n",
    "rod_channel_min = openmc.ZPlane(z0=-364)\n",
    "rod_channel_max = openmc.ZPlane(z0=+364)\n",
    "\n",
    "rod_above = openmc.Cell(fill=rod_cell_universe, region=-rod_bound & -carrier_max_z & +rod_channel_max)\n",
    "rod_mid = openmc.Cell(fill=rod_cell_universe, region=-rod_outer_radius & +rod_channel_min & -rod_channel_max)\n",
    "rod_below = openmc.Cell(fill=rod_cell_universe, region=-rod_bound & -rod_channel_min & +carrier_min_z)\n",
    "\n",
    "circlat.add_cell(rod_above)\n",
    "circlat.add_cell(rod_mid)\n",
    "circlat.add_cell(rod_below)\n",
    "circlat.add_cell(channel_cell)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "896dbfd3",
   "metadata": {},
   "outputs": [],
   "source": [
    "geometry = openmc.Geometry(circlat)\n",
    "geometry.export_to_xml()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "fd63af64",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7f1da532ea10>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 9136 characters]",
      "text/plain": [
       "<Figure size 258.065x259.74 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "circlat.plot(width=(12, 12), basis='xy')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "5d1ed0ce",
   "metadata": {},
   "outputs": [],
   "source": [
    "# OpenMC simulation parameters\n",
    "\n",
    "batches = 100\n",
    "inactive = 10\n",
    "particles = 5000\n",
    "\n",
    "settings_file = openmc.Settings()\n",
    "settings_file.batches = batches\n",
    "settings_file.inactive = inactive\n",
    "settings_file.particles = particles\n",
    "\n",
    "bounds = [-3, -3, -2.4, 3, 3, 2.4]\n",
    "uniform_dist = openmc.stats.Box(bounds[:3], bounds[3:], only_fissionable=False) #only_fissionable != True due to lots of helium\n",
    "settings_file.source = openmc.IndependentSource(space=uniform_dist)\n",
    "\n",
    "settings_file.export_to_xml()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "3b58cced",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                                %%%%%%%%%%%%%%%\n",
      "                           %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                                    %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                                     %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ##################     %%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ###################     %%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ####################     %%%%%%%%%%%%%%%%%%%%%%\n",
      "                #####################     %%%%%%%%%%%%%%%%%%%%%\n",
      "                ######################     %%%%%%%%%%%%%%%%%%%%\n",
      "                #######################     %%%%%%%%%%%%%%%%%%\n",
      "                 #######################     %%%%%%%%%%%%%%%%%\n",
      "                 ######################     %%%%%%%%%%%%%%%%%\n",
      "                  ####################     %%%%%%%%%%%%%%%%%\n",
      "                    #################     %%%%%%%%%%%%%%%%%\n",
      "                     ###############     %%%%%%%%%%%%%%%%\n",
      "                       ############     %%%%%%%%%%%%%%%\n",
      "                          ########     %%%%%%%%%%%%%%\n",
      "                                      %%%%%%%%%%%\n",
      "\n",
      "                 | The OpenMC Monte Carlo Code\n",
      "       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors\n",
      "         License | https://docs.openmc.org/en/latest/license.html\n",
      "         Version | 0.13.3\n",
      "        Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
      "       Date/Time | 2023-10-31 23:03:43\n",
      "  OpenMP Threads | 4\n",
      "\n",
      " Reading settings XML file...\n",
      " Reading cross sections XML file...\n",
      " Reading materials XML file...\n",
      " Reading geometry XML file...\n",
      " Reading U234 from /opt/xdata/endfb-vii.1-hdf5/neutron/U234.h5\n",
      " Reading U235 from /opt/xdata/endfb-vii.1-hdf5/neutron/U235.h5\n",
      " Reading U238 from /opt/xdata/endfb-vii.1-hdf5/neutron/U238.h5\n",
      " Reading U236 from /opt/xdata/endfb-vii.1-hdf5/neutron/U236.h5\n",
      " Reading Er162 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er162.h5\n",
      " Reading Er164 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er164.h5\n",
      " Reading Er166 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er166.h5\n",
      " Reading Er167 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er167.h5\n",
      " Reading Er168 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er168.h5\n",
      " Reading Er170 from /opt/xdata/endfb-vii.1-hdf5/neutron/Er170.h5\n",
      " Reading O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.h5\n",
      " Reading Zr90 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr90.h5\n",
      " Reading Zr91 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr91.h5\n",
      " Reading Zr92 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr92.h5\n",
      " Reading Zr94 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr94.h5\n",
      " Reading Zr96 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr96.h5\n",
      " Reading Nb93 from /opt/xdata/endfb-vii.1-hdf5/neutron/Nb93.h5\n",
      " Reading He3 from /opt/xdata/endfb-vii.1-hdf5/neutron/He3.h5\n",
      " Reading He4 from /opt/xdata/endfb-vii.1-hdf5/neutron/He4.h5\n",
      " Minimum neutron data temperature: 294 K\n",
      " Maximum neutron data temperature: 294 K\n",
      " Preparing distributed cell instances...\n",
      " Reading plot XML file...\n",
      " Writing summary.h5 file...\n",
      " Maximum neutron transport energy: 20000000 eV for U235\n",
      " Initializing source particles...\n",
      "\n",
      " ====================>     K EIGENVALUE SIMULATION     <====================\n",
      "\n",
      "  Bat./Gen.      k            Average k\n",
      "  =========   ========   ====================\n",
      "        1/1    0.36789\n",
      "        2/1    0.42299\n",
      "        3/1    0.41987\n",
      "        4/1    0.42596\n",
      "        5/1    0.41234\n",
      "        6/1    0.42963\n",
      "        7/1    0.42266\n",
      "        8/1    0.42423\n",
      "        9/1    0.42123\n",
      "       10/1    0.43412\n",
      "       11/1    0.41709\n",
      "       12/1    0.42381    0.42045 +/- 0.00336\n",
      "       13/1    0.42377    0.42156 +/- 0.00223\n",
      "       14/1    0.43119    0.42396 +/- 0.00288\n",
      "       15/1    0.41749    0.42267 +/- 0.00258\n",
      "       16/1    0.42491    0.42304 +/- 0.00214\n",
      "       17/1    0.41893    0.42245 +/- 0.00190\n",
      "       18/1    0.41910    0.42204 +/- 0.00170\n",
      "       19/1    0.42348    0.42220 +/- 0.00151\n",
      "       20/1    0.42303    0.42228 +/- 0.00135\n",
      "       21/1    0.42054    0.42212 +/- 0.00123\n",
      "       22/1    0.42196    0.42211 +/- 0.00112\n",
      "       23/1    0.41419    0.42150 +/- 0.00120\n",
      "       24/1    0.41866    0.42130 +/- 0.00113\n",
      "       25/1    0.41443    0.42084 +/- 0.00115\n",
      "       26/1    0.41911    0.42073 +/- 0.00108\n",
      "       27/1    0.41603    0.42045 +/- 0.00105\n",
      "       28/1    0.42151    0.42051 +/- 0.00099\n",
      "       29/1    0.42466    0.42073 +/- 0.00096\n",
      "       30/1    0.42696    0.42104 +/- 0.00097\n",
      "       31/1    0.42019    0.42100 +/- 0.00092\n",
      "       32/1    0.41925    0.42092 +/- 0.00088\n",
      "       33/1    0.42851    0.42125 +/- 0.00090\n",
      "       34/1    0.41904    0.42116 +/- 0.00087\n",
      "       35/1    0.41336    0.42085 +/- 0.00089\n",
      "       36/1    0.40825    0.42036 +/- 0.00098\n",
      "       37/1    0.42126    0.42040 +/- 0.00095\n",
      "       38/1    0.41770    0.42030 +/- 0.00092\n",
      "       39/1    0.41320    0.42006 +/- 0.00092\n",
      "       40/1    0.42092    0.42008 +/- 0.00089\n",
      "       41/1    0.41800    0.42002 +/- 0.00086\n",
      "       42/1    0.41783    0.41995 +/- 0.00084\n",
      "       43/1    0.41593    0.41983 +/- 0.00082\n",
      "       44/1    0.41648    0.41973 +/- 0.00080\n",
      "       45/1    0.42461    0.41987 +/- 0.00079\n",
      "       46/1    0.42635    0.42005 +/- 0.00079\n",
      "       47/1    0.42601    0.42021 +/- 0.00078\n",
      "       48/1    0.42524    0.42034 +/- 0.00077\n",
      "       49/1    0.42391    0.42043 +/- 0.00076\n",
      "       50/1    0.42644    0.42058 +/- 0.00076\n",
      "       51/1    0.42461    0.42068 +/- 0.00074\n",
      "       52/1    0.41400    0.42052 +/- 0.00074\n",
      "       53/1    0.40554    0.42017 +/- 0.00081\n",
      "       54/1    0.41609    0.42008 +/- 0.00079\n",
      "       55/1    0.41939    0.42007 +/- 0.00077\n",
      "       56/1    0.42482    0.42017 +/- 0.00076\n",
      "       57/1    0.42144    0.42020 +/- 0.00075\n",
      "       58/1    0.42266    0.42025 +/- 0.00073\n",
      "       59/1    0.41754    0.42019 +/- 0.00072\n",
      "       60/1    0.41618    0.42011 +/- 0.00071\n",
      "       61/1    0.40759    0.41987 +/- 0.00074\n",
      "       62/1    0.42328    0.41993 +/- 0.00073\n",
      "       63/1    0.42103    0.41995 +/- 0.00071\n",
      "       64/1    0.42951    0.42013 +/- 0.00072\n",
      "       65/1    0.40918    0.41993 +/- 0.00074\n",
      "       66/1    0.41632    0.41987 +/- 0.00073\n",
      "       67/1    0.40789    0.41966 +/- 0.00074\n",
      "       68/1    0.41921    0.41965 +/- 0.00073\n",
      "       69/1    0.41250    0.41953 +/- 0.00073\n",
      "       70/1    0.41571    0.41946 +/- 0.00072\n",
      "       71/1    0.41786    0.41944 +/- 0.00071\n",
      "       72/1    0.41826    0.41942 +/- 0.00070\n",
      "       73/1    0.41586    0.41936 +/- 0.00069\n",
      "       74/1    0.41208    0.41925 +/- 0.00069\n",
      "       75/1    0.42209    0.41929 +/- 0.00068\n",
      "       76/1    0.41875    0.41928 +/- 0.00067\n",
      "       77/1    0.42818    0.41942 +/- 0.00067\n",
      "       78/1    0.42043    0.41943 +/- 0.00066\n",
      "       79/1    0.42366    0.41949 +/- 0.00065\n",
      "       80/1    0.41737    0.41946 +/- 0.00065\n",
      "       81/1    0.41772    0.41944 +/- 0.00064\n",
      "       82/1    0.42922    0.41957 +/- 0.00064\n",
      "       83/1    0.42357    0.41963 +/- 0.00064\n",
      "       84/1    0.41841    0.41961 +/- 0.00063\n",
      "       85/1    0.42532    0.41969 +/- 0.00062\n",
      "       86/1    0.42394    0.41974 +/- 0.00062\n",
      "       87/1    0.42362    0.41979 +/- 0.00061\n",
      "       88/1    0.42122    0.41981 +/- 0.00060\n",
      "       89/1    0.43252    0.41997 +/- 0.00062\n",
      "       90/1    0.40940    0.41984 +/- 0.00062\n",
      "       91/1    0.41683    0.41980 +/- 0.00062\n",
      "       92/1    0.41949    0.41980 +/- 0.00061\n",
      "       93/1    0.42320    0.41984 +/- 0.00060\n",
      "       94/1    0.42224    0.41987 +/- 0.00060\n",
      "       95/1    0.42299    0.41991 +/- 0.00059\n",
      "       96/1    0.42603    0.41998 +/- 0.00059\n",
      "       97/1    0.42952    0.42009 +/- 0.00059\n",
      "       98/1    0.41837    0.42007 +/- 0.00059\n",
      "       99/1    0.42181    0.42009 +/- 0.00058\n",
      "      100/1    0.41738    0.42006 +/- 0.00057\n",
      " Creating state point statepoint.100.h5...\n",
      "\n",
      " =======================>     TIMING STATISTICS     <=======================\n",
      "\n",
      " Total time for initialization     = 1.7313e+00 seconds\n",
      "   Reading cross sections          = 1.6946e+00 seconds\n",
      " Total time in simulation          = 9.4329e+01 seconds\n",
      "   Time in transport only          = 9.4246e+01 seconds\n",
      "   Time in inactive batches        = 9.7179e+00 seconds\n",
      "   Time in active batches          = 8.4611e+01 seconds\n",
      "   Time synchronizing fission bank = 4.2822e-02 seconds\n",
      "     Sampling source sites         = 3.6681e-02 seconds\n",
      "     SEND/RECV source sites        = 6.0859e-03 seconds\n",
      "   Time accumulating tallies       = 6.5997e-05 seconds\n",
      "   Time writing statepoints        = 3.6930e-03 seconds\n",
      " Total time for finalization       = 7.0400e-07 seconds\n",
      " Total time elapsed                = 9.6071e+01 seconds\n",
      " Calculation Rate (inactive)       = 5145.16 particles/second\n",
      " Calculation Rate (active)         = 5318.44 particles/second\n",
      "\n",
      " ============================>     RESULTS     <============================\n",
      "\n",
      " k-effective (Collision)     = 0.41999 +/- 0.00052\n",
      " k-effective (Track-length)  = 0.42006 +/- 0.00057\n",
      " k-effective (Absorption)    = 0.41889 +/- 0.00135\n",
      " Combined k-effective        = 0.41986 +/- 0.00050\n",
      " Leakage Fraction            = 0.00000 +/- 0.00000\n",
      "\n"
     ]
    }
   ],
   "source": [
    "openmc.run()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "openmc-env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
