{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "1df9294b",
   "metadata": {},
   "source": [
    "# MSRE isothermal temperature coefficient\n",
    "\n",
    "In this example we will calculate the isothermal temperature reactivity feedback coefficient of the MSRE. To do that we will parametrize the fuel salt temperature and run 3 different cases (in reality you would want to run many more). We will then fit the data with a linear function and approximate the average coefficient to the slope of the curve. We will verify that the coefficient is negative and is approximately equal to $-10\\sim15 pcm/K$, as reported here:  [ORNL, pag.39](http://moltensalt.org/references/static/downloads/pdf/ORNL-4233.pdf) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "49285ef9",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "rm: cannot remove '*.xml': No such file or directory\n",
      "rm: cannot remove '*.h5': No such file or directory\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "256"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import openmc\n",
    "import numpy as np\n",
    "from math import log10\n",
    "import matplotlib.pyplot as plt\n",
    "import os \n",
    "\n",
    "os.system('rm *.xml *.h5')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6d36f317",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set the same temperature to fuel salt, moderator and inor vessel\n",
    "def build_materials(temp):\n",
    "    # Fuel salt\n",
    "    salt_density = 2.3275 * (1 -1.18e-4 * ((temp*9/5+32) - 1181))\n",
    "    salt = openmc.Material(name=\"salt\", temperature = temp)\n",
    "    salt.add_nuclide('Li6',1.31480070E-05)\n",
    "    salt.add_nuclide('Li7', 0.262960140146177)\n",
    "    salt.add_nuclide('Be9',1.1863E-01)\n",
    "    salt.add_nuclide('Zr90',1.0543E-02)\n",
    "    salt.add_nuclide('Zr91',2.2991E-03)\n",
    "    salt.add_nuclide('Zr92',3.5142E-03)\n",
    "    salt.add_nuclide('Zr94',3.5613E-03)\n",
    "    salt.add_nuclide('Zr96',5.7375E-04)\n",
    "    salt.add_nuclide('Hf174',8.3786E-10)\n",
    "    salt.add_nuclide('Hf176',2.7545E-08)\n",
    "    salt.add_nuclide('Hf177',9.7401E-08)\n",
    "    salt.add_nuclide('Hf178',1.4285E-07)\n",
    "    salt.add_nuclide('Hf179',7.1323E-08)\n",
    "    salt.add_nuclide('Hf180',1.8370E-07)\n",
    "    salt.add_nuclide('U234',1.034276246E-05)\n",
    "    salt.add_nuclide('U235',1.009695816E-03)\n",
    "    salt.add_nuclide('U236',4.227809892E-06)\n",
    "    salt.add_nuclide('U238',2.168267822E-03)\n",
    "    salt.add_nuclide('Fe54',2.8551E-06)\n",
    "    salt.add_nuclide('Fe56',4.4818E-05)\n",
    "    salt.add_nuclide('Fe57',1.0350E-06)\n",
    "    salt.add_nuclide('Fe58',1.3775E-07)\n",
    "    salt.add_nuclide('Cr50',2.1224E-06)\n",
    "    salt.add_nuclide('Cr52',4.0928E-05)\n",
    "    salt.add_nuclide('Cr53',4.6409E-06)\n",
    "    salt.add_nuclide('Cr54',1.1552E-06)\n",
    "    salt.add_nuclide('Ni58',5.8597E-06)\n",
    "    salt.add_nuclide('Ni60',2.2571E-06)\n",
    "    salt.add_nuclide('Ni61',9.8117E-08)\n",
    "    salt.add_nuclide('Ni62',3.1284E-07)\n",
    "    salt.add_nuclide('Ni64',7.9671E-08)\n",
    "    salt.add_nuclide('O16',5.1437E-04)\n",
    "    salt.add_nuclide('O17',1.8927E-07)\n",
    "    salt.add_nuclide('O18',9.6440E-07)\n",
    "    salt.add_nuclide('F19',5.9409E-01)\n",
    "    salt.set_density('g/cm3', salt_density)\n",
    "\n",
    "    #Moderator graphite block\n",
    "    graphite = openmc.Material(name='graphite', temperature = temp)\n",
    "    graphite.set_density('g/cm3',1.86)\n",
    "    graphite.add_nuclide('C12',1)\n",
    "    graphite.add_s_alpha_beta('c_Graphite')\n",
    "\n",
    "    #inor-8\n",
    "    inor = openmc.Material(name='inor-8', temperature = temp)\n",
    "    inor.set_density('g/cm3',8.7745)\n",
    "    inor.add_element('Ni',68.5,'wo')\n",
    "    inor.add_element('Mo',16.5,'wo')\n",
    "    inor.add_element('Cr',7,'wo')\n",
    "    inor.add_element('Fe',5,'wo')\n",
    "    inor.add_element('C',0.06,'wo')\n",
    "    inor.add_element('Al',0.25,'wo')\n",
    "    inor.add_element('Ti',0.25,'wo')\n",
    "    inor.add_element('S',0.02,'wo')\n",
    "    inor.add_element('Mn',1.0,'wo')\n",
    "    inor.add_element('Si',1.0,'wo')\n",
    "    inor.add_element('Cu',0.35,'wo')\n",
    "    inor.add_element('B',0.010,'wo')\n",
    "    inor.add_element('W',0.5,'wo')\n",
    "    inor.add_element('P',0.015,'wo')\n",
    "    inor.add_element('Co',0.2,'wo')\n",
    "\n",
    "    #helium\n",
    "    helium = openmc.Material(name='helium')\n",
    "    helium.add_element('He',1.0)\n",
    "    helium.set_density('g/cm3',1.03*(10**-4))\n",
    "\n",
    "    #Control rods inconel clad\n",
    "    trace = 0.01\n",
    "    inconel = openmc.Material(name='inconel', temperature = 65.6 + 273.15)\n",
    "    inconel.add_element('Ni',78.5,percent_type='wo')\n",
    "    inconel.add_element('Cr',14.0,percent_type='wo')\n",
    "    inconel.add_element('Fe',6.5,percent_type='wo')\n",
    "    inconel.add_element('Mn',0.25,percent_type='wo')\n",
    "    inconel.add_element('Si',0.25,percent_type='wo')\n",
    "    inconel.add_element('Cu',0.2,percent_type='wo')\n",
    "    inconel.add_element('Co',0.2,percent_type='wo')\n",
    "    inconel.add_element('Al',0.2,percent_type='wo')\n",
    "    inconel.add_element('Ti',0.2,percent_type='wo')\n",
    "    inconel.add_element('Ta',0.5,percent_type='wo')\n",
    "    inconel.add_element('W',0.5,percent_type='wo')\n",
    "    inconel.add_element('Zn',0.2,percent_type='wo')\n",
    "    inconel.add_element('Zr',0.1,percent_type='wo')\n",
    "    inconel.add_element('C',trace,percent_type='wo')\n",
    "    inconel.add_element('Mo',trace,percent_type='wo')\n",
    "    inconel.add_element('Ag',trace,percent_type='wo')\n",
    "    inconel.add_element('B',trace,percent_type='wo')\n",
    "    inconel.add_element('Ba',trace,percent_type='wo')\n",
    "    inconel.add_element('Be',trace,percent_type='wo')\n",
    "    inconel.add_element('Ca',trace,percent_type='wo')\n",
    "    inconel.add_element('Cd',trace,percent_type='wo')\n",
    "    inconel.add_element('V',trace,percent_type='wo')\n",
    "    inconel.add_element('Sn',trace,percent_type='wo')\n",
    "    inconel.add_element('Mg',trace,percent_type='wo')\n",
    "    inconel.set_density('g/cm3',8.5)\n",
    "\n",
    "    # SS316 control rod flexible hose\n",
    "    ss316 = openmc.Material(name='ss316', temperature = 65.6 + 273.15)\n",
    "    ss316.add_element('C',0.026,'wo')\n",
    "    ss316.add_element('Si',0.37,'wo')\n",
    "    ss316.add_element('Mn',0.16,'wo')\n",
    "    ss316.add_element('Cr',16.55,'wo')\n",
    "    ss316.add_element('Cu',0.16,'wo')\n",
    "    ss316.add_element('Ni',10,'wo')\n",
    "    ss316.add_element('P',0.029,'wo')\n",
    "    ss316.add_element('S',0.027,'wo')\n",
    "    ss316.add_element('Mo',2.02,'wo')\n",
    "    ss316.add_element('N',0.036,'wo')\n",
    "    ss316.add_element('Fe',70.622,'wo')\n",
    "    ss316.set_density('g/cm3',7.99)\n",
    "\n",
    "    #Control rods bushing posion material\n",
    "    Gd2O3 = openmc.Material()\n",
    "    Gd2O3.add_element('Gd',2)\n",
    "    Gd2O3.add_element('O',3)\n",
    "    Gd2O3.set_density('g/cm3',7.41)\n",
    "    Al2O3 = openmc.Material()\n",
    "    Al2O3.add_element('Al',2)\n",
    "    Al2O3.add_element('O',3)\n",
    "    Al2O3.set_density('g/cm3',3.95)\n",
    "    bush = openmc.Material.mix_materials([Gd2O3,Al2O3],[0.7,0.3],'wo')\n",
    "    bush.name='bush'\n",
    "    bush.temperature = 65.6 +273.15\n",
    "\n",
    "    #Concrete block\n",
    "    concrete = openmc.Material(name='concrete')\n",
    "    concrete.add_element('H',0.005,'wo')\n",
    "    concrete.add_element('O',0.496,'wo')\n",
    "    concrete.add_element('Si',0.314,'wo')\n",
    "    concrete.add_element('Ca',0.083,'wo')\n",
    "    concrete.add_element('Na',0.017,'wo')\n",
    "    concrete.add_element('Mn',0.002,'wo')\n",
    "    concrete.add_element('Al',0.046,'wo')\n",
    "    concrete.add_element('S',0.001,'wo')\n",
    "    concrete.add_element('K',0.019,'wo')\n",
    "    concrete.add_element('Fe',0.012,'wo')\n",
    "    concrete.set_density('g/cm3',2.35)\n",
    "\n",
    "    #Thermal shielding as material mix of water and SS304 50-50 vo\n",
    "    water = openmc.Material()\n",
    "    water.add_element('H',2)\n",
    "    water.add_element('O',1)\n",
    "    water.set_density('g/cm3',0.997)\n",
    "\n",
    "    #stainless steel 304\n",
    "    ss304 =  openmc.Material()\n",
    "    ss304.add_element('C',0.08,'wo')\n",
    "    ss304.add_element('Mn',2,'wo')\n",
    "    ss304.add_element('P',0.045,'wo')\n",
    "    ss304.add_element('S',0.03,'wo')\n",
    "    ss304.add_element('Si',0.75,'wo')\n",
    "    ss304.add_element('Cr',19,'wo')\n",
    "    ss304.add_element('Ni',10,'wo')\n",
    "    ss304.add_element('N',0.1,'wo')\n",
    "    ss304.add_element('Fe',67.995, 'wo')\n",
    "    ss304.set_density('g/cm3',7.93)\n",
    "    shield = openmc.Material.mix_materials([water,ss304],[0.5,0.5],'vo')\n",
    "    shield.temperature = 32.2 + 273.15\n",
    "    shield.name='steelwater'\n",
    "\n",
    "    # \"Careytemp 1600\" by Philip Carey Manufacturing Compamy (Cincinnati) \n",
    "    insulation=openmc.Material(name='insulation')\n",
    "    insulation.add_element('Si',1)\n",
    "    insulation.add_element('O',2)\n",
    "    insulation.set_density('g/cm3',0.16) \n",
    "\n",
    "    # Sand water (not sure about this material)\n",
    "    sandwater=openmc.Material(name='sandwater')\n",
    "    sandwater.add_element('Fe',3)\n",
    "    sandwater.add_element('O',4)\n",
    "    sandwater.set_density('g/cm3',6)\n",
    "\n",
    "    #Vessel anular steel\n",
    "    steel = openmc.Material(name='steel')\n",
    "    steel.add_element('Fe',1)\n",
    "    steel.set_density('g/cm3',7.85)\n",
    "\n",
    "    return openmc.Materials([salt,graphite,inor,helium,inconel,shield,concrete,steel,ss316,sandwater,insulation,bush])\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "5fa45be2",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Import h5m files\n",
    "core_h5m = '../h5m/msre_reactor_1e-2.h5m'\n",
    "cr_h5m = '../h5m/msre_control_rod_1e-2.h5m'\n",
    "\n",
    "# Create DAGMC universes out of h5m files\n",
    "core = openmc.DAGMCUniverse(filename=core_h5m, auto_geom_ids=True, universe_id=1)\n",
    "cr = openmc.DAGMCUniverse(filename=cr_h5m, auto_geom_ids=True, universe_id=2)\n",
    "\n",
    "# Create regions\n",
    "core_region = core.bounding_region()\n",
    "cr1_region = cr.bounding_region(boundary_type='transmission', starting_id=20000)\n",
    "\n",
    "# Extend control rod region, to include upwards translations\n",
    "cr1_region = cr1_region | cr1_region.translate([0,0,150])\n",
    "\n",
    "# Create control rod region 2 and 3 as translated region of control rod 1\n",
    "offset = 10.163255\n",
    "cr2_region = cr1_region.translate([-offset,0,0])\n",
    "cr3_region = cr1_region.translate([-offset,offset,0])\n",
    "\n",
    "# Create openmc Cells \n",
    "core_cell = openmc.Cell(region=~(cr1_region | cr2_region | cr3_region) & core_region , fill=core)\n",
    "cr1_cell = openmc.Cell(name='CR1', region=cr1_region, fill=cr)\n",
    "cr2_cell = openmc.Cell(name='CR2', region=cr2_region, fill=cr)\n",
    "cr3_cell = openmc.Cell(name='CR3', region=cr3_region, fill=cr)\n",
    "    \n",
    "#translate control rods at top position (fully withdrawn)\n",
    "inch_to_cm = 2.54\n",
    "start_pos = 19.2 #inches\n",
    "top_pos = 51 #inches\n",
    "setattr(cr1_cell, 'translation', [0, 0, start_pos + top_pos*inch_to_cm])\n",
    "setattr(cr2_cell, 'translation', [-offset, 0, start_pos + top_pos*2.54])\n",
    "setattr(cr3_cell, 'translation', [-offset, offset, start_pos + top_pos*2.54])\n",
    "\n",
    "# Create openmc Geometry object\n",
    "geometry = openmc.Geometry([core_cell,cr1_cell,cr2_cell,cr3_cell])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7bb7b060",
   "metadata": {},
   "outputs": [],
   "source": [
    "settings = openmc.Settings()\n",
    "settings.temperature = {'method':'interpolation','range':(293.15,923.15)}\n",
    "settings.batches = 50\n",
    "settings.inactive = 20\n",
    "settings.particles = 30000\n",
    "settings.photon_transport = False\n",
    "source_area = openmc.stats.Box([-100., -100., 0.],[ 100.,  100.,  200.],only_fissionable = True)\n",
    "settings.source = openmc.Source(space=source_area)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3b6184d5",
   "metadata": {},
   "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-2022 MIT, UChicago Argonne LLC, and contributors\n",
      "         License | https://docs.openmc.org/en/latest/license.html\n",
      "         Version | 0.13.2\n",
      "        Git SHA1 | 030f73a8690ed19e91806e46c8caf338d252e74a\n",
      "       Date/Time | 2023-01-17 13:43:17\n",
      "   MPI Processes | 1\n",
      "  OpenMP Threads | 56\n",
      "\n",
      " Reading settings XML file...\n",
      " Reading cross sections XML file...\n",
      " Reading materials XML file...\n",
      " Reading geometry XML file...\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_reactor_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_control_rod_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      " Reading Li6 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li6.h5\n",
      " Reading Li7 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li7.h5\n",
      " Reading Be9 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Be9.h5\n",
      " Reading Zr90 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr90.h5\n",
      " Reading Zr91 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr91.h5\n",
      " Reading Zr92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr92.h5\n",
      " Reading Zr94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr94.h5\n",
      " Reading Zr96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr96.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 1200K\n",
      " Reading Hf174 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf174.h5\n",
      " Reading Hf176 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf176.h5\n",
      " Reading Hf177 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf177.h5\n",
      " Reading Hf178 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf178.h5\n",
      " Reading Hf179 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf179.h5\n",
      " Reading Hf180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf180.h5\n",
      " Reading U234 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U234.h5\n",
      " Reading U235 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U235.h5\n",
      " Reading U236 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U236.h5\n",
      " Reading U238 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U238.h5\n",
      " Reading Fe54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe54.h5\n",
      " Reading Fe56 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe56.h5\n",
      " Reading Fe57 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe57.h5\n",
      " Reading Fe58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe58.h5\n",
      " Reading Cr50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr50.h5\n",
      " Reading Cr52 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr52.h5\n",
      " Reading Cr53 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr53.h5\n",
      " Reading Cr54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr54.h5\n",
      " Reading Ni58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni58.h5\n",
      " Reading Ni60 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni60.h5\n",
      " Reading Ni61 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni61.h5\n",
      " Reading Ni62 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni62.h5\n",
      " Reading Ni64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni64.h5\n",
      " Reading O16 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O16.h5\n",
      " Reading O17 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O17.h5\n",
      " Reading O18 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O18.h5\n",
      " Reading F19 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/F19.h5\n",
      " Reading C12 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C12.h5\n",
      " Reading Mo100 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo100.h5\n",
      " Reading Mo92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo92.h5\n",
      " Reading Mo94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo94.h5\n",
      " Reading Mo95 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo95.h5\n",
      " Reading Mo96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo96.h5\n",
      " Reading Mo97 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo97.h5\n",
      " Reading Mo98 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo98.h5\n",
      " Reading C13 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C13.h5\n",
      " Reading Al27 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Al27.h5\n",
      " Reading Ti46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti46.h5\n",
      " Reading Ti47 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti47.h5\n",
      " Reading Ti48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti48.h5\n",
      " Reading Ti49 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti49.h5\n",
      " Reading Ti50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti50.h5\n",
      " Reading S32 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S32.h5\n",
      " Reading S33 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S33.h5\n",
      " Reading S34 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S34.h5\n",
      " Reading S36 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S36.h5\n",
      " Reading Mn55 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mn55.h5\n",
      " Reading Si28 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si28.h5\n",
      " Reading Si29 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si29.h5\n",
      " Reading Si30 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si30.h5\n",
      " Reading Cu63 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu63.h5\n",
      " Reading Cu65 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu65.h5\n",
      " Reading B10 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B10.h5\n",
      " Reading B11 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B11.h5\n",
      " Reading W180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W180.h5\n",
      " Reading W182 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W182.h5\n",
      " Reading W183 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W183.h5\n",
      " Reading W184 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W184.h5\n",
      " Reading W186 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W186.h5\n",
      " Reading P31 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/P31.h5\n",
      " Reading Co59 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co59.h5\n",
      " Reading He3 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He3.h5\n",
      " Reading He4 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He4.h5\n",
      " Reading Ta180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta180.h5\n",
      " Reading Ta181 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta181.h5\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Zn64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn64.h5\n",
      " Reading Zn66 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn66.h5\n",
      " Reading Zn67 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn67.h5\n",
      " Reading Zn68 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn68.h5\n",
      " Reading Zn70 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn70.h5\n",
      " Reading Ag107 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag107.h5\n",
      " Reading Ag109 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag109.h5\n",
      " Reading Ba130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba130.h5\n",
      " Reading Ba132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba132.h5\n",
      " Reading Ba134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba134.h5\n",
      " Reading Ba135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba135.h5\n",
      " Reading Ba136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba136.h5\n",
      " Reading Ba137 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba137.h5\n",
      " Reading Ba138 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba138.h5\n",
      " Reading Ca40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca40.h5\n",
      " Reading Ca42 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca42.h5\n",
      " Reading Ca43 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca43.h5\n",
      " Reading Ca44 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca44.h5\n",
      " Reading Ca46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca46.h5\n",
      " Reading Ca48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca48.h5\n",
      " Reading Cd106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd106.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at\n",
      "          1200K\n",
      " Reading Cd108 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd108.h5\n",
      " Reading Cd110 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd110.h5\n",
      " Reading Cd111 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd111.h5\n",
      " Reading Cd112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd112.h5\n",
      " Reading Cd113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd113.h5\n",
      " Reading Cd114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd114.h5\n",
      " Reading Cd116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd116.h5\n",
      " Reading V50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V50.h5\n",
      " Reading V51 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V51.h5\n",
      " Reading Sn112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn112.h5\n",
      " Reading Sn114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn114.h5\n",
      " Reading Sn115 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn115.h5\n",
      " Reading Sn116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn116.h5\n",
      " Reading Sn117 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn117.h5\n",
      " Reading Sn118 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn118.h5\n",
      " Reading Sn119 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn119.h5\n",
      " Reading Sn120 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn120.h5\n",
      " Reading Sn122 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn122.h5\n",
      " Reading Sn124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn124.h5\n",
      " Reading Mg24 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg24.h5\n",
      " Reading Mg25 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg25.h5\n",
      " Reading Mg26 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg26.h5\n",
      " Reading N14 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N14.h5\n",
      " Reading N15 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N15.h5\n",
      " Reading Gd152 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd152.h5\n",
      " Reading Gd154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd154.h5\n",
      " Reading Gd155 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd155.h5\n",
      " Reading Gd156 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd156.h5\n",
      " Reading Gd157 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd157.h5\n",
      " Reading Gd158 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd158.h5\n",
      " Reading Gd160 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd160.h5\n",
      " Reading H1 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H1.h5\n",
      " Reading H2 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H2.h5\n",
      " Reading Na23 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Na23.h5\n",
      " Reading K39 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K39.h5\n",
      " Reading K40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K40.h5\n",
      " Reading K41 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K41.h5\n",
      " Reading c_Graphite from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/c_Graphite.h5\n",
      " Minimum neutron data temperature: 250 K\n",
      " Maximum neutron data temperature: 1200 K\n",
      " Preparing distributed cell instances...\n",
      " Reading plot XML file...\n",
      " Writing summary.h5 file...\n",
      " Maximum neutron transport energy: 20000000 eV for Li6\n",
      " Initializing source particles...\n",
      "\n",
      " ====================>     K EIGENVALUE SIMULATION     <====================\n",
      "\n",
      "  Bat./Gen.      k            Average k\n",
      "  =========   ========   ====================\n",
      "        1/1    0.59413\n",
      "        2/1    0.87144\n",
      "        3/1    0.95932\n",
      "        4/1    0.98230\n",
      "        5/1    0.98710\n",
      "        6/1    1.00177\n",
      "        7/1    1.00787\n",
      "        8/1    0.99209\n",
      "        9/1    0.99546\n",
      "       10/1    0.98464\n",
      "       11/1    1.01001\n",
      "       12/1    1.01107\n",
      " WARNING: No intersection found with DAGMC cell 48, material 3\n",
      "       13/1    1.00053\n",
      "       14/1    0.99278\n",
      "       15/1    0.99531\n",
      "       16/1    1.00262\n",
      "       17/1    0.98915\n",
      "       18/1    0.99553\n",
      "       19/1    0.98836\n",
      "       20/1    0.99625\n",
      "       21/1    0.99275\n",
      "       22/1    0.99348    0.99312 +/- 0.00037\n",
      "       23/1    0.98095    0.98906 +/- 0.00406\n",
      "       24/1    1.00824    0.99386 +/- 0.00559\n",
      "       25/1    1.00497    0.99608 +/- 0.00487\n",
      "       26/1    0.99537    0.99596 +/- 0.00397\n",
      "       27/1    0.99525    0.99586 +/- 0.00336\n",
      "       28/1    0.99927    0.99629 +/- 0.00294\n",
      "       29/1    0.99275    0.99589 +/- 0.00262\n",
      "       30/1    0.99491    0.99579 +/- 0.00235\n",
      "       31/1    1.00042    0.99622 +/- 0.00217\n",
      "       32/1    0.99247    0.99590 +/- 0.00200\n",
      "       33/1    0.99000    0.99545 +/- 0.00190\n",
      "       34/1    1.00013    0.99578 +/- 0.00179\n",
      "       35/1    1.00463    0.99637 +/- 0.00177\n",
      "       36/1    0.99759    0.99645 +/- 0.00165\n",
      "       37/1    1.00124    0.99673 +/- 0.00158\n",
      "       38/1    1.00066    0.99695 +/- 0.00150\n",
      "       39/1    0.98342    0.99624 +/- 0.00159\n",
      "       40/1    0.98485    0.99567 +/- 0.00161\n",
      "       41/1    1.00215    0.99598 +/- 0.00156\n",
      "       42/1    0.99562    0.99596 +/- 0.00149\n",
      "       43/1    1.00358    0.99629 +/- 0.00146\n",
      "       44/1    0.99845    0.99638 +/- 0.00140\n",
      "       45/1    0.98804    0.99605 +/- 0.00139\n",
      "       46/1    0.99894    0.99616 +/- 0.00134\n",
      "       47/1    0.99234    0.99602 +/- 0.00130\n",
      "       48/1    0.98830    0.99574 +/- 0.00128\n",
      "       49/1    1.00189    0.99595 +/- 0.00125\n",
      "       50/1    0.99920    0.99606 +/- 0.00121\n",
      " Creating state point statepoint.50.h5...\n",
      "\n",
      " =======================>     TIMING STATISTICS     <=======================\n",
      "\n",
      " Total time for initialization     = 1.1035e+02 seconds\n",
      "   Reading cross sections          = 1.5148e+01 seconds\n",
      " Total time in simulation          = 9.9007e+01 seconds\n",
      "   Time in transport only          = 9.8742e+01 seconds\n",
      "   Time in inactive batches        = 3.9581e+01 seconds\n",
      "   Time in active batches          = 5.9426e+01 seconds\n",
      "   Time synchronizing fission bank = 1.3993e-01 seconds\n",
      "     Sampling source sites         = 1.2650e-01 seconds\n",
      "     SEND/RECV source sites        = 1.3055e-02 seconds\n",
      "   Time accumulating tallies       = 2.7440e-05 seconds\n",
      "   Time writing statepoints        = 1.3125e-02 seconds\n",
      " Total time for finalization       = 3.5460e-06 seconds\n",
      " Total time elapsed                = 2.0983e+02 seconds\n",
      " Calculation Rate (inactive)       = 15158.7 particles/second\n",
      " Calculation Rate (active)         = 15144.8 particles/second\n",
      "\n",
      " ============================>     RESULTS     <============================\n",
      "\n",
      " k-effective (Collision)     = 0.99553 +/- 0.00123\n",
      " k-effective (Track-length)  = 0.99606 +/- 0.00121\n",
      " k-effective (Absorption)    = 0.99435 +/- 0.00114\n",
      " Combined k-effective        = 0.99510 +/- 0.00102\n",
      " Leakage Fraction            = 0.00001 +/- 0.00000\n",
      "\n"
     ]
    },
    {
     "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-2022 MIT, UChicago Argonne LLC, and contributors\n",
      "         License | https://docs.openmc.org/en/latest/license.html\n",
      "         Version | 0.13.2\n",
      "        Git SHA1 | 030f73a8690ed19e91806e46c8caf338d252e74a\n",
      "       Date/Time | 2023-01-17 13:46:56\n",
      "   MPI Processes | 1\n",
      "  OpenMP Threads | 56\n",
      "\n",
      " Reading settings XML file...\n",
      " Reading cross sections XML file...\n",
      " Reading materials XML file...\n",
      " Reading geometry XML file...\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_reactor_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_control_rod_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      " Reading Li6 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li6.h5\n",
      " Reading Li7 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li7.h5\n",
      " Reading Be9 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Be9.h5\n",
      " Reading Zr90 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr90.h5\n",
      " Reading Zr91 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr91.h5\n",
      " Reading Zr92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr92.h5\n",
      " Reading Zr94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr94.h5\n",
      " Reading Zr96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr96.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 1200K\n",
      " Reading Hf174 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf174.h5\n",
      " Reading Hf176 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf176.h5\n",
      " Reading Hf177 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf177.h5\n",
      " Reading Hf178 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf178.h5\n",
      " Reading Hf179 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf179.h5\n",
      " Reading Hf180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf180.h5\n",
      " Reading U234 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U234.h5\n",
      " Reading U235 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U235.h5\n",
      " Reading U236 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U236.h5\n",
      " Reading U238 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U238.h5\n",
      " Reading Fe54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe54.h5\n",
      " Reading Fe56 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe56.h5\n",
      " Reading Fe57 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe57.h5\n",
      " Reading Fe58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe58.h5\n",
      " Reading Cr50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr50.h5\n",
      " Reading Cr52 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr52.h5\n",
      " Reading Cr53 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr53.h5\n",
      " Reading Cr54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr54.h5\n",
      " Reading Ni58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni58.h5\n",
      " Reading Ni60 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni60.h5\n",
      " Reading Ni61 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni61.h5\n",
      " Reading Ni62 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni62.h5\n",
      " Reading Ni64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni64.h5\n",
      " Reading O16 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O16.h5\n",
      " Reading O17 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O17.h5\n",
      " Reading O18 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O18.h5\n",
      " Reading F19 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/F19.h5\n",
      " Reading C12 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C12.h5\n",
      " Reading Mo100 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo100.h5\n",
      " Reading Mo92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo92.h5\n",
      " Reading Mo94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo94.h5\n",
      " Reading Mo95 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo95.h5\n",
      " Reading Mo96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo96.h5\n",
      " Reading Mo97 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo97.h5\n",
      " Reading Mo98 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo98.h5\n",
      " Reading C13 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C13.h5\n",
      " Reading Al27 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Al27.h5\n",
      " Reading Ti46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti46.h5\n",
      " Reading Ti47 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti47.h5\n",
      " Reading Ti48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti48.h5\n",
      " Reading Ti49 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti49.h5\n",
      " Reading Ti50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti50.h5\n",
      " Reading S32 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S32.h5\n",
      " Reading S33 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S33.h5\n",
      " Reading S34 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S34.h5\n",
      " Reading S36 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S36.h5\n",
      " Reading Mn55 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mn55.h5\n",
      " Reading Si28 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si28.h5\n",
      " Reading Si29 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si29.h5\n",
      " Reading Si30 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si30.h5\n",
      " Reading Cu63 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu63.h5\n",
      " Reading Cu65 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu65.h5\n",
      " Reading B10 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B10.h5\n",
      " Reading B11 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B11.h5\n",
      " Reading W180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W180.h5\n",
      " Reading W182 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W182.h5\n",
      " Reading W183 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W183.h5\n",
      " Reading W184 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W184.h5\n",
      " Reading W186 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W186.h5\n",
      " Reading P31 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/P31.h5\n",
      " Reading Co59 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co59.h5\n",
      " Reading He3 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He3.h5\n",
      " Reading He4 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He4.h5\n",
      " Reading Ta180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta180.h5\n",
      " Reading Ta181 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta181.h5\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Zn64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn64.h5\n",
      " Reading Zn66 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn66.h5\n",
      " Reading Zn67 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn67.h5\n",
      " Reading Zn68 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn68.h5\n",
      " Reading Zn70 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn70.h5\n",
      " Reading Ag107 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag107.h5\n",
      " Reading Ag109 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag109.h5\n",
      " Reading Ba130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba130.h5\n",
      " Reading Ba132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba132.h5\n",
      " Reading Ba134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba134.h5\n",
      " Reading Ba135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba135.h5\n",
      " Reading Ba136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba136.h5\n",
      " Reading Ba137 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba137.h5\n",
      " Reading Ba138 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba138.h5\n",
      " Reading Ca40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca40.h5\n",
      " Reading Ca42 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca42.h5\n",
      " Reading Ca43 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca43.h5\n",
      " Reading Ca44 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca44.h5\n",
      " Reading Ca46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca46.h5\n",
      " Reading Ca48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca48.h5\n",
      " Reading Cd106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd106.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at\n",
      "          1200K\n",
      " Reading Cd108 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd108.h5\n",
      " Reading Cd110 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd110.h5\n",
      " Reading Cd111 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd111.h5\n",
      " Reading Cd112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd112.h5\n",
      " Reading Cd113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd113.h5\n",
      " Reading Cd114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd114.h5\n",
      " Reading Cd116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd116.h5\n",
      " Reading V50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V50.h5\n",
      " Reading V51 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V51.h5\n",
      " Reading Sn112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn112.h5\n",
      " Reading Sn114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn114.h5\n",
      " Reading Sn115 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn115.h5\n",
      " Reading Sn116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn116.h5\n",
      " Reading Sn117 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn117.h5\n",
      " Reading Sn118 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn118.h5\n",
      " Reading Sn119 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn119.h5\n",
      " Reading Sn120 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn120.h5\n",
      " Reading Sn122 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn122.h5\n",
      " Reading Sn124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn124.h5\n",
      " Reading Mg24 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg24.h5\n",
      " Reading Mg25 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg25.h5\n",
      " Reading Mg26 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg26.h5\n",
      " Reading N14 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N14.h5\n",
      " Reading N15 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N15.h5\n",
      " Reading Gd152 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd152.h5\n",
      " Reading Gd154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd154.h5\n",
      " Reading Gd155 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd155.h5\n",
      " Reading Gd156 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd156.h5\n",
      " Reading Gd157 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd157.h5\n",
      " Reading Gd158 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd158.h5\n",
      " Reading Gd160 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd160.h5\n",
      " Reading H1 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H1.h5\n",
      " Reading H2 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H2.h5\n",
      " Reading Na23 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Na23.h5\n",
      " Reading K39 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K39.h5\n",
      " Reading K40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K40.h5\n",
      " Reading K41 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K41.h5\n",
      " Reading c_Graphite from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/c_Graphite.h5\n",
      " Minimum neutron data temperature: 250 K\n",
      " Maximum neutron data temperature: 1200 K\n",
      " Preparing distributed cell instances...\n",
      " Reading plot XML file...\n",
      " Writing summary.h5 file...\n",
      " Maximum neutron transport energy: 20000000 eV for Li6\n",
      " Initializing source particles...\n",
      "\n",
      " ====================>     K EIGENVALUE SIMULATION     <====================\n",
      "\n",
      "  Bat./Gen.      k            Average k\n",
      "  =========   ========   ====================\n",
      "        1/1    0.59985\n",
      "        2/1    0.86992\n",
      "        3/1    0.93662\n",
      "        4/1    0.97317\n",
      "        5/1    0.98089\n",
      "        6/1    0.99006\n",
      "        7/1    0.97465\n",
      "        8/1    0.98408\n",
      "        9/1    0.97688\n",
      "       10/1    0.98133\n",
      "       11/1    0.99735\n",
      "       12/1    0.97989\n",
      "       13/1    0.98175\n",
      "       14/1    0.99775\n",
      "       15/1    0.99462\n",
      "       16/1    0.98558\n",
      "       17/1    0.98992\n",
      "       18/1    0.97169\n",
      "       19/1    0.98839\n",
      "       20/1    0.97831\n",
      "       21/1    0.99006\n",
      "       22/1    0.99916    0.99461 +/- 0.00455\n",
      "       23/1    0.99631    0.99518 +/- 0.00269\n",
      "       24/1    0.98196    0.99187 +/- 0.00381\n",
      "       25/1    0.99825    0.99315 +/- 0.00322\n",
      "       26/1    0.97554    0.99021 +/- 0.00394\n",
      "       27/1    0.97223    0.98764 +/- 0.00420\n",
      "       28/1    0.97858    0.98651 +/- 0.00381\n",
      "       29/1    0.98642    0.98650 +/- 0.00336\n",
      "       30/1    0.98457    0.98631 +/- 0.00301\n",
      "       31/1    0.97973    0.98571 +/- 0.00279\n",
      "       32/1    0.98574    0.98571 +/- 0.00255\n",
      "       33/1    0.98439    0.98561 +/- 0.00235\n",
      "       34/1    0.98536    0.98559 +/- 0.00217\n",
      "       35/1    0.98966    0.98587 +/- 0.00204\n",
      "       36/1    0.99909    0.98669 +/- 0.00208\n",
      "       37/1    0.99175    0.98699 +/- 0.00198\n",
      "       38/1    0.97021    0.98606 +/- 0.00208\n",
      "       39/1    0.98010    0.98574 +/- 0.00200\n",
      "       40/1    0.99120    0.98602 +/- 0.00191\n",
      "       41/1    0.97703    0.98559 +/- 0.00187\n",
      "       42/1    0.98874    0.98573 +/- 0.00179\n",
      "       43/1    1.00000    0.98635 +/- 0.00182\n",
      "       44/1    0.99398    0.98667 +/- 0.00177\n",
      "       45/1    0.99704    0.98709 +/- 0.00175\n",
      "       46/1    0.99588    0.98742 +/- 0.00171\n",
      "       47/1    0.99577    0.98773 +/- 0.00168\n",
      "       48/1    0.98891    0.98777 +/- 0.00162\n",
      "       49/1    0.99467    0.98801 +/- 0.00158\n",
      "       50/1    0.99553    0.98826 +/- 0.00154\n",
      " Creating state point statepoint.50.h5...\n",
      "\n",
      " =======================>     TIMING STATISTICS     <=======================\n",
      "\n",
      " Total time for initialization     = 1.0659e+02 seconds\n",
      "   Reading cross sections          = 1.5197e+01 seconds\n",
      " Total time in simulation          = 1.0105e+02 seconds\n",
      "   Time in transport only          = 1.0081e+02 seconds\n",
      "   Time in inactive batches        = 3.9431e+01 seconds\n",
      "   Time in active batches          = 6.1616e+01 seconds\n",
      "   Time synchronizing fission bank = 1.2863e-01 seconds\n",
      "     Sampling source sites         = 1.1769e-01 seconds\n",
      "     SEND/RECV source sites        = 1.0570e-02 seconds\n",
      "   Time accumulating tallies       = 2.3695e-05 seconds\n",
      "   Time writing statepoints        = 1.3315e-02 seconds\n",
      " Total time for finalization       = 3.4400e-06 seconds\n",
      " Total time elapsed                = 2.0811e+02 seconds\n",
      " Calculation Rate (inactive)       = 15216.6 particles/second\n",
      " Calculation Rate (active)         = 14606.6 particles/second\n",
      "\n",
      " ============================>     RESULTS     <============================\n",
      "\n",
      " k-effective (Collision)     = 0.98752 +/- 0.00155\n",
      " k-effective (Track-length)  = 0.98826 +/- 0.00154\n",
      " k-effective (Absorption)    = 0.98970 +/- 0.00114\n",
      " Combined k-effective        = 0.98972 +/- 0.00125\n",
      " Leakage Fraction            = 0.00001 +/- 0.00000\n",
      "\n"
     ]
    },
    {
     "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-2022 MIT, UChicago Argonne LLC, and contributors\n",
      "         License | https://docs.openmc.org/en/latest/license.html\n",
      "         Version | 0.13.2\n",
      "        Git SHA1 | 030f73a8690ed19e91806e46c8caf338d252e74a\n",
      "       Date/Time | 2023-01-17 13:50:33\n",
      "   MPI Processes | 1\n",
      "  OpenMP Threads | 56\n",
      "\n",
      " Reading settings XML file...\n",
      " Reading cross sections XML file...\n",
      " Reading materials XML file...\n",
      " Reading geometry XML file...\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_reactor_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      "Using the DOUBLE-DOWN interface to Embree.\n",
      "Loading file h5m/msre_control_rod_1e-2.h5m\n",
      "Initializing the GeomQueryTool...\n",
      "Using faceting tolerance: 0.01\n",
      "Building acceleration data structures...\n",
      "Implicit Complement assumed to be Vacuum\n",
      " Reading Li6 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li6.h5\n",
      " Reading Li7 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Li7.h5\n",
      " Reading Be9 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Be9.h5\n",
      " Reading Zr90 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr90.h5\n",
      " Reading Zr91 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr91.h5\n",
      " Reading Zr92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr92.h5\n",
      " Reading Zr94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr94.h5\n",
      " Reading Zr96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr96.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Zr96 at 1200K\n",
      " Reading Hf174 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf174.h5\n",
      " Reading Hf176 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf176.h5\n",
      " Reading Hf177 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf177.h5\n",
      " Reading Hf178 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf178.h5\n",
      " Reading Hf179 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf179.h5\n",
      " Reading Hf180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf180.h5\n",
      " Reading U234 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U234.h5\n",
      " Reading U235 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U235.h5\n",
      " Reading U236 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U236.h5\n",
      " Reading U238 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U238.h5\n",
      " Reading Fe54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe54.h5\n",
      " Reading Fe56 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe56.h5\n",
      " Reading Fe57 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe57.h5\n",
      " Reading Fe58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe58.h5\n",
      " Reading Cr50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr50.h5\n",
      " Reading Cr52 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr52.h5\n",
      " Reading Cr53 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr53.h5\n",
      " Reading Cr54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr54.h5\n",
      " Reading Ni58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni58.h5\n",
      " Reading Ni60 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni60.h5\n",
      " Reading Ni61 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni61.h5\n",
      " Reading Ni62 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni62.h5\n",
      " Reading Ni64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni64.h5\n",
      " Reading O16 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O16.h5\n",
      " Reading O17 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O17.h5\n",
      " Reading O18 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/O18.h5\n",
      " Reading F19 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/F19.h5\n",
      " Reading C12 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C12.h5\n",
      " Reading Mo100 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo100.h5\n",
      " Reading Mo92 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo92.h5\n",
      " Reading Mo94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo94.h5\n",
      " Reading Mo95 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo95.h5\n",
      " Reading Mo96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo96.h5\n",
      " Reading Mo97 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo97.h5\n",
      " Reading Mo98 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo98.h5\n",
      " Reading C13 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C13.h5\n",
      " Reading Al27 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Al27.h5\n",
      " Reading Ti46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti46.h5\n",
      " Reading Ti47 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti47.h5\n",
      " Reading Ti48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti48.h5\n",
      " Reading Ti49 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti49.h5\n",
      " Reading Ti50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ti50.h5\n",
      " Reading S32 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S32.h5\n",
      " Reading S33 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S33.h5\n",
      " Reading S34 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S34.h5\n",
      " Reading S36 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S36.h5\n",
      " Reading Mn55 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mn55.h5\n",
      " Reading Si28 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si28.h5\n",
      " Reading Si29 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si29.h5\n",
      " Reading Si30 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si30.h5\n",
      " Reading Cu63 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu63.h5\n",
      " Reading Cu65 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu65.h5\n",
      " Reading B10 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B10.h5\n",
      " Reading B11 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/B11.h5\n",
      " Reading W180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W180.h5\n",
      " Reading W182 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W182.h5\n",
      " Reading W183 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W183.h5\n",
      " Reading W184 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W184.h5\n",
      " Reading W186 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W186.h5\n",
      " Reading P31 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/P31.h5\n",
      " Reading Co59 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co59.h5\n",
      " Reading He3 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He3.h5\n",
      " Reading He4 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/He4.h5\n",
      " Reading Ta180 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta180.h5\n",
      " Reading Ta181 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta181.h5\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Zn64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn64.h5\n",
      " Reading Zn66 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn66.h5\n",
      " Reading Zn67 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn67.h5\n",
      " Reading Zn68 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn68.h5\n",
      " Reading Zn70 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn70.h5\n",
      " Reading Ag107 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag107.h5\n",
      " Reading Ag109 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag109.h5\n",
      " Reading Ba130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba130.h5\n",
      " Reading Ba132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba132.h5\n",
      " Reading Ba134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba134.h5\n",
      " Reading Ba135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba135.h5\n",
      " Reading Ba136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba136.h5\n",
      " Reading Ba137 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba137.h5\n",
      " Reading Ba138 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba138.h5\n",
      " Reading Ca40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca40.h5\n",
      " Reading Ca42 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca42.h5\n",
      " Reading Ca43 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca43.h5\n",
      " Reading Ca44 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca44.h5\n",
      " Reading Ca46 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca46.h5\n",
      " Reading Ca48 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca48.h5\n",
      " Reading Cd106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd106.h5\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cd106 at\n",
      "          1200K\n",
      " Reading Cd108 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd108.h5\n",
      " Reading Cd110 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd110.h5\n",
      " Reading Cd111 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd111.h5\n",
      " Reading Cd112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd112.h5\n",
      " Reading Cd113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd113.h5\n",
      " Reading Cd114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd114.h5\n",
      " Reading Cd116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd116.h5\n",
      " Reading V50 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V50.h5\n",
      " Reading V51 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V51.h5\n",
      " Reading Sn112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn112.h5\n",
      " Reading Sn114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn114.h5\n",
      " Reading Sn115 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn115.h5\n",
      " Reading Sn116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn116.h5\n",
      " Reading Sn117 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn117.h5\n",
      " Reading Sn118 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn118.h5\n",
      " Reading Sn119 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn119.h5\n",
      " Reading Sn120 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn120.h5\n",
      " Reading Sn122 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn122.h5\n",
      " Reading Sn124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn124.h5\n",
      " Reading Mg24 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg24.h5\n",
      " Reading Mg25 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg25.h5\n",
      " Reading Mg26 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mg26.h5\n",
      " Reading N14 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N14.h5\n",
      " Reading N15 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/N15.h5\n",
      " Reading Gd152 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd152.h5\n",
      " Reading Gd154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd154.h5\n",
      " Reading Gd155 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd155.h5\n",
      " Reading Gd156 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd156.h5\n",
      " Reading Gd157 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd157.h5\n",
      " Reading Gd158 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd158.h5\n",
      " Reading Gd160 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd160.h5\n",
      " Reading H1 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H1.h5\n",
      " Reading H2 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H2.h5\n",
      " Reading Na23 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Na23.h5\n",
      " Reading K39 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K39.h5\n",
      " Reading K40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K40.h5\n",
      " Reading K41 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/K41.h5\n",
      " Reading c_Graphite from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/c_Graphite.h5\n",
      " Minimum neutron data temperature: 250 K\n",
      " Maximum neutron data temperature: 1200 K\n",
      " Preparing distributed cell instances...\n",
      " Reading plot XML file...\n",
      " Writing summary.h5 file...\n",
      " Maximum neutron transport energy: 20000000 eV for Li6\n",
      " Initializing source particles...\n",
      "\n",
      " ====================>     K EIGENVALUE SIMULATION     <====================\n",
      "\n",
      "  Bat./Gen.      k            Average k\n",
      "  =========   ========   ====================\n",
      "        1/1    0.58567\n",
      "        2/1    0.86522\n",
      "        3/1    0.95393\n",
      "        4/1    0.97631\n",
      "        5/1    0.96262\n",
      "        6/1    0.97669\n",
      "        7/1    0.96797\n",
      "        8/1    0.96948\n",
      "        9/1    0.97837\n",
      "       10/1    0.96869\n",
      "       11/1    0.96878\n",
      "       12/1    0.97342\n",
      "       13/1    0.98926\n",
      "       14/1    0.97921\n",
      "       15/1    0.97947\n",
      "       16/1    0.99110\n",
      "       17/1    0.99039\n",
      "       18/1    0.99421\n",
      "       19/1    0.97364\n",
      "       20/1    0.99937\n",
      "       21/1    0.99256\n",
      "       22/1    0.98223    0.98739 +/- 0.00516\n",
      "       23/1    0.98421    0.98633 +/- 0.00316\n",
      "       24/1    0.99580    0.98870 +/- 0.00326\n",
      "       25/1    0.97299    0.98556 +/- 0.00403\n",
      "       26/1    0.97458    0.98373 +/- 0.00376\n",
      "       27/1    0.97297    0.98219 +/- 0.00353\n",
      "       28/1    0.98161    0.98212 +/- 0.00306\n",
      "       29/1    0.97695    0.98154 +/- 0.00276\n",
      "       30/1    0.97210    0.98060 +/- 0.00264\n",
      "       31/1    0.99224    0.98166 +/- 0.00261\n",
      "       32/1    0.98297    0.98177 +/- 0.00239\n",
      "       33/1    0.97624    0.98134 +/- 0.00224\n",
      "       34/1    0.98156    0.98136 +/- 0.00207\n",
      "       35/1    0.98727    0.98175 +/- 0.00197\n",
      "       36/1    0.98541    0.98198 +/- 0.00186\n",
      "       37/1    0.98024    0.98188 +/- 0.00175\n",
      "       38/1    0.97897    0.98172 +/- 0.00165\n",
      "       39/1    0.98925    0.98211 +/- 0.00161\n",
      "       40/1    0.98232    0.98212 +/- 0.00153\n",
      "       41/1    0.97919    0.98198 +/- 0.00146\n",
      "       42/1    0.99294    0.98248 +/- 0.00148\n",
      "       43/1    0.98525    0.98260 +/- 0.00142\n",
      "       44/1    0.97696    0.98237 +/- 0.00138\n",
      "       45/1    0.99247    0.98277 +/- 0.00138\n",
      "       46/1    0.97144    0.98234 +/- 0.00140\n",
      "       47/1    0.97344    0.98201 +/- 0.00139\n",
      "       48/1    0.99184    0.98236 +/- 0.00138\n",
      "       49/1    0.98350    0.98240 +/- 0.00133\n",
      "       50/1    0.97664    0.98220 +/- 0.00130\n",
      " Creating state point statepoint.50.h5...\n",
      "\n",
      " =======================>     TIMING STATISTICS     <=======================\n",
      "\n",
      " Total time for initialization     = 1.0648e+02 seconds\n",
      "   Reading cross sections          = 1.4451e+01 seconds\n",
      " Total time in simulation          = 1.0340e+02 seconds\n",
      "   Time in transport only          = 1.0315e+02 seconds\n",
      "   Time in inactive batches        = 4.1904e+01 seconds\n",
      "   Time in active batches          = 6.1495e+01 seconds\n",
      "   Time synchronizing fission bank = 1.3368e-01 seconds\n",
      "     Sampling source sites         = 1.2047e-01 seconds\n",
      "     SEND/RECV source sites        = 1.2851e-02 seconds\n",
      "   Time accumulating tallies       = 2.2970e-05 seconds\n",
      "   Time writing statepoints        = 1.2931e-02 seconds\n",
      " Total time for finalization       = 4.8340e-06 seconds\n",
      " Total time elapsed                = 2.1040e+02 seconds\n",
      " Calculation Rate (inactive)       = 14318.3 particles/second\n",
      " Calculation Rate (active)         = 14635.4 particles/second\n",
      "\n",
      " ============================>     RESULTS     <============================\n",
      "\n",
      " k-effective (Collision)     = 0.98212 +/- 0.00133\n",
      " k-effective (Track-length)  = 0.98220 +/- 0.00130\n",
      " k-effective (Absorption)    = 0.98054 +/- 0.00135\n",
      " Combined k-effective        = 0.98143 +/- 0.00120\n",
      " Leakage Fraction            = 0.00001 +/- 0.00000\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Define temperature to simulate in Celsius\n",
    "temperatures = [598.9,648.9,698.9]\n",
    "keff = []\n",
    "\n",
    "for temp in temperatures:\n",
    "    model = openmc.model.Model(geometry, build_materials(temp+273.15), settings)\n",
    "    res = model.run()\n",
    "    with openmc.StatePoint(res) as sp:\n",
    "        keff.append((sp.keff.n, sp.keff.s))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f3b687f4",
   "metadata": {},
   "source": [
    "We will now fit the data with a linear function and approximate the slope of the curve to the average isothermal reactivity coefficient. To do that we will use the `scipy` library functionalities:\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "658554f6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, '$\\\\rho\\\\,\\\\pm\\\\sigma$')"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 45312 characters]\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Calculate \n",
    "import numpy as np\n",
    "from scipy.optimize import curve_fit\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "# Define linear function\n",
    "def func (x,a,b):\n",
    "    return a*x +b\n",
    "\n",
    "x = np.array(temperatures)\n",
    "# Convert keff into reactivity\n",
    "y = np.array([(x[0]-1)/x[0] for x in keff])\n",
    "yerr = np.array([x[1] for x in keff])\n",
    "\n",
    "#Fit parameters of the function to the data\n",
    "popt, pcov = curve_fit(func, x, y)\n",
    "\n",
    "# Calculate average isothermal coefficient in pcm/C \n",
    "alpha_iso = popt[0]*1e5\n",
    "\n",
    "plt.figure()\n",
    "plt.errorbar(x, y, yerr=yerr, label='Simulation data')\n",
    "plt.plot(x, func(x, *popt), '--', label='{:.3f} [pcm/C]'.format(alpha_iso))\n",
    "plt.legend()\n",
    "plt.xlabel('Temperature, C')\n",
    "plt.ylabel(r'$\\rho\\,\\pm\\sigma$')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "da6d7a55",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.10.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
