{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fafca9f7",
   "metadata": {},
   "source": [
    "# MSRE depletion with fission products removal rates\n",
    "We will run a depletion simuation of the MSRE, introducing continuous removal rates to model fission products removal. \n",
    "\n",
    "**Note:** to run the following script this [branch](https://github.com/openmsr/openmc/tree/msr_13.2_cont) of OpenMC is needed."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "079fc782",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import openmc\n",
    "import openmc.deplete\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": "markdown",
   "id": "bfca4d07",
   "metadata": {},
   "source": [
    "Let's start by defining materials and geometry in the same fashion of the other notebooks:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4bc6b094",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Define materials \n",
    "hot_temp = 638.3 + 273.15 # in K\n",
    "salt_density = 2.3275 # g/cm3\n",
    "# Fuel salt \n",
    "salt = openmc.Material(name=\"salt\", temperature = hot_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 = hot_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 = hot_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",
    "mats = openmc.Materials([salt,graphite,inor,helium,inconel,shield,concrete,steel,ss316,sandwater,insulation,bush])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "edfa5bd1",
   "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": "ba99fb4b",
   "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": "markdown",
   "id": "c16520ed",
   "metadata": {},
   "source": [
    "First of all, we will set up and run a standard depletion analysis that will be used as the reference to compare with the next case.\n",
    "\n",
    "Let's define some general settings (timestep, power, depletable volume, integration scheme) and run the analysis:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b9f8eada",
   "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-20 11:06:11\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 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 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 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 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 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",
      " Reading Hf174 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf174.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 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"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " 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 C12 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/C12.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 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 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 P31 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/P31.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 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 Mn55 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mn55.h5\n",
      " Reading Co59 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co59.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 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 Mo100 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo100.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 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 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 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 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 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 Cd106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd106.h5\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"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 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"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " 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 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 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 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",
      " 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",
      "[openmc.deplete] t=0.0 s, dt=432000 s, source=8000000.0\n",
      " Reading H3 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/H3.h5\n",
      " Reading Be7 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Be7.h5\n",
      " Reading Ne20 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ne20.h5\n",
      " Reading Ne21 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ne21.h5\n",
      " Reading Ne22 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ne22.h5\n",
      " Reading Na22 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Na22.h5\n",
      " Reading Al26_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Al26_m1.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Na22 at 2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Si31 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si31.h5\n",
      " Reading Si32 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Si32.h5\n",
      " Reading S35 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/S35.h5\n",
      " Reading Cl35 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cl35.h5\n",
      " Reading Cl36 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cl36.h5\n",
      " Reading Cl37 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cl37.h5\n",
      " Reading Ar36 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar36.h5\n",
      " Reading Ar37 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar37.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ar36 at 2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Ar38 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar38.h5\n",
      " Reading Ar39 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar39.h5\n",
      " Reading Ar40 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar40.h5\n",
      " Reading Ar41 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ar41.h5\n",
      " Reading Ca41 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca41.h5\n",
      " Reading Ca45 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca45.h5\n",
      " Reading Ca47 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ca47.h5\n",
      " Reading Sc45 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sc45.h5\n",
      " Reading V49 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/V49.h5\n",
      " Reading Cr51 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cr51.h5\n",
      " Reading Mn54 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mn54.h5\n",
      " Reading Fe55 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fe55.h5\n",
      " Reading Co58 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co58.h5\n",
      " Reading Co58_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Co58_m1.h5\n",
      " Reading Ni59 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni59.h5\n",
      " Reading Ni63 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ni63.h5\n",
      " Reading Cu64 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cu64.h5\n",
      " Reading Zn65 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn65.h5\n",
      " Reading Zn69 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zn69.h5\n",
      " Reading Ga69 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ga69.h5\n",
      " Reading Ga70 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ga70.h5\n",
      " Reading Ga71 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ga71.h5\n",
      " Reading Ge70 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge70.h5\n",
      " Reading Ge71 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge71.h5\n",
      " Reading Ge72 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge72.h5\n",
      " Reading Ge73 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge73.h5\n",
      " Reading Ge74 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge74.h5\n",
      " Reading Ge75 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge75.h5\n",
      " Reading Ge76 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ge76.h5\n",
      " Reading As73 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/As73.h5\n",
      " Reading As74 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/As74.h5\n",
      " Reading As75 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/As75.h5\n",
      " Reading Se74 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se74.h5\n",
      " Reading Se75 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se75.h5\n",
      " Reading Se76 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se76.h5\n",
      " Reading Se77 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se77.h5\n",
      " Reading Se78 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se78.h5\n",
      " Reading Se79 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se79.h5\n",
      " Reading Se80 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se80.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Se79 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Se79 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Se79 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Se79 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Se79 at 1200K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Se81 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se81.h5\n",
      " Reading Se82 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Se82.h5\n",
      " Reading Br79 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Br79.h5\n",
      " Reading Br80 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Br80.h5\n",
      " Reading Br81 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Br81.h5\n",
      " Reading Kr78 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr78.h5\n",
      " Reading Kr79 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr79.h5\n",
      " Reading Kr80 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr80.h5\n",
      " Reading Kr81 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr81.h5\n",
      " Reading Kr82 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr82.h5\n",
      " Reading Kr83 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr83.h5\n",
      " Reading Kr84 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr84.h5\n",
      " Reading Kr85 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr85.h5\n",
      " Reading Kr86 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Kr86.h5\n",
      " Reading Rb85 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rb85.h5\n",
      " Reading Rb86 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rb86.h5\n",
      " Reading Rb87 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rb87.h5\n",
      " Reading Sr84 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr84.h5\n",
      " Reading Sr85 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr85.h5\n",
      " Reading Sr86 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr86.h5\n",
      " Reading Sr87 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr87.h5\n",
      " Reading Sr88 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr88.h5\n",
      " Reading Sr89 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr89.h5\n",
      " Reading Sr90 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sr90.h5\n",
      " Reading Y89 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Y89.h5\n",
      " Reading Y90 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Y90.h5\n",
      " Reading Y91 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Y91.h5\n",
      " Reading Zr93 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr93.h5\n",
      " Reading Zr95 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Zr95.h5\n",
      " Reading Nb93 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nb93.h5\n",
      " Reading Nb94 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nb94.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb94 at 2500K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb95 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb95 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb95 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb95 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Nb95 at 1200K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Nb95 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nb95.h5\n",
      " Reading Mo93 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo93.h5\n",
      " Reading Mo99 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Mo99.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Mo99 at 2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Tc98 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tc98.h5\n",
      " Reading Tc99 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tc99.h5\n",
      " Reading Ru96 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru96.h5\n",
      " Reading Ru97 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru97.h5\n",
      " Reading Ru98 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru98.h5\n",
      " Reading Ru99 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru99.h5\n",
      " Reading Ru100 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru100.h5\n",
      " Reading Ru101 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru101.h5\n",
      " Reading Ru102 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru102.h5\n",
      " Reading Ru103 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru103.h5\n",
      " Reading Ru104 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru104.h5\n",
      " Reading Ru105 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru105.h5\n",
      " Reading Ru106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ru106.h5\n",
      " Reading Rh103 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rh103.h5\n",
      " Reading Rh104 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rh104.h5\n",
      " Reading Rh105 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Rh105.h5\n",
      " Reading Pd102 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd102.h5\n",
      " Reading Pd103 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd103.h5\n",
      " Reading Pd104 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd104.h5\n",
      " Reading Pd105 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd105.h5\n",
      " Reading Pd106 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd106.h5\n",
      " Reading Pd107 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd107.h5\n",
      " Reading Pd108 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd108.h5\n",
      " Reading Pd109 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd109.h5\n",
      " Reading Pd110 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pd110.h5\n",
      " Reading Ag108 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag108.h5\n",
      " Reading Ag110_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag110_m1.h5\n",
      " Reading Ag111 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag111.h5\n",
      " Reading Ag112 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag112.h5\n",
      " Reading Ag113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag113.h5\n",
      " Reading Ag114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag114.h5\n",
      " Reading Ag115 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag115.h5\n",
      " Reading Ag116 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag116.h5\n",
      " Reading Ag117 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag117.h5\n",
      " Reading Ag118_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ag118_m1.h5\n",
      " Reading Cd107 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd107.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Ag118_m1 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Cd109 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd109.h5\n",
      " Reading Cd115_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cd115_m1.h5\n",
      " Reading In113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/In113.h5\n",
      " Reading In114 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/In114.h5\n",
      " Reading In115 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/In115.h5\n",
      " Reading Sn113 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn113.h5\n",
      " Reading Sn121_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn121_m1.h5\n",
      " Reading Sn123 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn123.h5\n",
      " Reading Sn125 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn125.h5\n",
      " Reading Sn126 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sn126.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Sn123 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Sb121 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb121.h5\n",
      " Reading Sb122 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb122.h5\n",
      " Reading Sb123 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb123.h5\n",
      " Reading Sb124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb124.h5\n",
      " Reading Sb125 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb125.h5\n",
      " Reading Sb126 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sb126.h5\n",
      " Reading Te120 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te120.h5\n",
      " Reading Te121 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te121.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Te120 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Te120 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Te120 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Te120 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Te121_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te121_m1.h5\n",
      " Reading Te122 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te122.h5\n",
      " Reading Te123 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te123.h5\n",
      " Reading Te124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te124.h5\n",
      " Reading Te125 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te125.h5\n",
      " Reading Te126 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te126.h5\n",
      " Reading Te127_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te127_m1.h5\n",
      " Reading Te128 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te128.h5\n",
      " Reading Te129_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te129_m1.h5\n",
      " Reading Te130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te130.h5\n",
      " Reading Te131 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te131.h5\n",
      " Reading Te131_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te131_m1.h5\n",
      " Reading Te132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Te132.h5\n",
      " Reading I127 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I127.h5\n",
      " Reading I128 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I128.h5\n",
      " Reading I129 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I129.h5\n",
      " Reading I130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I130.h5\n",
      " Reading I131 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I131.h5\n",
      " Reading I132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I132.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide I131 at 2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading I132_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I132_m1.h5\n",
      " Reading I133 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I133.h5\n",
      " Reading I134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I134.h5\n",
      " Reading I135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/I135.h5\n",
      " Reading Xe123 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe123.h5\n",
      " Reading Xe124 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe124.h5\n",
      " Reading Xe125 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe125.h5\n",
      " Reading Xe126 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe126.h5\n",
      " Reading Xe127 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe127.h5\n",
      " Reading Xe128 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe128.h5\n",
      " Reading Xe129 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe129.h5\n",
      " Reading Xe130 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe130.h5\n",
      " Reading Xe131 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe131.h5\n",
      " Reading Xe132 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe132.h5\n",
      " Reading Xe133 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe133.h5\n",
      " Reading Xe134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe134.h5\n",
      " Reading Xe135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe135.h5\n",
      " Reading Xe136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Xe136.h5\n",
      " Reading Cs133 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cs133.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Xe133 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Cs134 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cs134.h5\n",
      " Reading Cs135 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cs135.h5\n",
      " Reading Cs136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cs136.h5\n",
      " Reading Cs137 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cs137.h5\n",
      " Reading Ba131 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba131.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cs136 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Ba133 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba133.h5\n",
      " Reading Ba139 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba139.h5\n",
      " Reading Ba140 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ba140.h5\n",
      " Reading La138 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/La138.h5\n",
      " Reading La139 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/La139.h5\n",
      " Reading La140 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/La140.h5\n",
      " Reading Ce136 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce136.h5\n",
      " Reading Ce137 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce137.h5\n",
      " Reading Ce137_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce137_m1.h5\n",
      " Reading Ce138 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce138.h5\n",
      " Reading Ce139 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce139.h5\n",
      " Reading Ce140 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce140.h5\n",
      " Reading Ce141 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce141.h5\n",
      " Reading Ce142 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce142.h5\n",
      " Reading Ce143 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce143.h5\n",
      " Reading Ce144 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ce144.h5\n",
      " Reading Pr141 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pr141.h5\n",
      " Reading Pr142 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pr142.h5\n",
      " Reading Pr143 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pr143.h5\n",
      " Reading Nd142 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd142.h5\n",
      " Reading Nd143 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd143.h5\n",
      " Reading Nd144 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd144.h5\n",
      " Reading Nd145 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd145.h5\n",
      " Reading Nd146 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd146.h5\n",
      " Reading Nd147 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd147.h5\n",
      " Reading Nd148 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd148.h5\n",
      " Reading Nd149 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd149.h5\n",
      " Reading Nd150 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Nd150.h5\n",
      " Reading Pm143 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm143.h5\n",
      " Reading Pm144 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm144.h5\n",
      " Reading Pm145 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm145.h5\n",
      " Reading Pm146 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm146.h5\n",
      " Reading Pm147 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm147.h5\n",
      " Reading Pm148 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm148.h5\n",
      " Reading Pm148_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm148_m1.h5\n",
      " Reading Pm149 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm149.h5\n",
      " Reading Pm150 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm150.h5\n",
      " Reading Pm151 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pm151.h5\n",
      " Reading Sm144 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm144.h5\n",
      " Reading Sm145 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm145.h5\n",
      " Reading Sm146 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm146.h5\n",
      " Reading Sm147 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm147.h5\n",
      " Reading Sm148 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm148.h5\n",
      " Reading Sm149 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm149.h5\n",
      " Reading Sm150 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm150.h5\n",
      " Reading Sm151 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm151.h5\n",
      " Reading Sm152 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm152.h5\n",
      " Reading Sm153 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm153.h5\n",
      " Reading Sm154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Sm154.h5\n",
      " Reading Eu151 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu151.h5\n",
      " Reading Eu152 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu152.h5\n",
      " Reading Eu153 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu153.h5\n",
      " Reading Eu154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu154.h5\n",
      " Reading Eu155 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu155.h5\n",
      " Reading Eu156 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu156.h5\n",
      " Reading Eu157 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Eu157.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Eu156 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Gd153 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd153.h5\n",
      " Reading Gd159 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Gd159.h5\n",
      " Reading Tb158 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tb158.h5\n",
      " Reading Tb159 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tb159.h5\n",
      " Reading Tb160 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tb160.h5\n",
      " Reading Tb161 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tb161.h5\n",
      " Reading Dy154 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy154.h5\n",
      " Reading Dy155 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy155.h5\n",
      " Reading Dy156 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy156.h5\n",
      " Reading Dy157 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy157.h5\n",
      " Reading Dy158 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy158.h5\n",
      " Reading Dy159 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy159.h5\n",
      " Reading Dy160 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy160.h5\n",
      " Reading Dy161 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy161.h5\n",
      " Reading Dy162 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy162.h5\n",
      " Reading Dy163 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy163.h5\n",
      " Reading Dy164 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Dy164.h5\n",
      " Reading Ho165 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ho165.h5\n",
      " Reading Ho166_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ho166_m1.h5\n",
      " Reading Er162 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er162.h5\n",
      " Reading Er163 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er163.h5\n",
      " Reading Er164 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er164.h5\n",
      " Reading Er165 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er165.h5\n",
      " Reading Er166 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er166.h5\n",
      " Reading Er167 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er167.h5\n",
      " Reading Er168 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er168.h5\n",
      " Reading Er169 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er169.h5\n",
      " Reading Er170 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Er170.h5\n",
      " Reading Tm168 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tm168.h5\n",
      " Reading Tm169 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tm169.h5\n",
      " Reading Tm170 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tm170.h5\n",
      " Reading Tm171 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tm171.h5\n",
      " Reading Yb168 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb168.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb168 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Yb169 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb169.h5\n",
      " Reading Yb170 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb170.h5\n",
      " Reading Yb171 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb171.h5\n",
      " Reading Yb172 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb172.h5\n",
      " Reading Yb173 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb173.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb170 at\n",
      "          2500K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb171 at\n",
      "          2500K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb172 at\n",
      "          2500K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb173 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Yb174 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb174.h5\n",
      " Reading Yb175 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb175.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb174 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Yb176 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Yb176.h5\n",
      " Reading Lu175 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Lu175.h5\n",
      " Reading Lu176 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Lu176.h5\n",
      " Reading Hf175 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf175.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Yb176 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Hf181 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf181.h5\n",
      " Reading Hf182 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hf182.h5\n",
      " Reading Ta182 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ta182.h5\n",
      " Reading W181 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W181.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf181 at\n",
      "          2500K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at 600K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at\n",
      "          1200K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Hf182 at\n",
      "          2500K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading W185 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/W185.h5\n",
      " Reading Re185 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Re185.h5\n",
      " Reading Re186_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Re186_m1.h5\n",
      " Reading Re187 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Re187.h5\n",
      " Reading Os184 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os184.h5\n",
      " Reading Os185 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os185.h5\n",
      " Reading Os186 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os186.h5\n",
      " Reading Os187 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os187.h5\n",
      " Reading Os188 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os188.h5\n",
      " Reading Os189 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os189.h5\n",
      " Reading Os190 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os190.h5\n",
      " Reading Os191 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os191.h5\n",
      " Reading Os192 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Os192.h5\n",
      " Reading Ir191 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ir191.h5\n",
      " Reading Ir192 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ir192.h5\n",
      " Reading Ir193 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ir193.h5\n",
      " Reading Ir194_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ir194_m1.h5\n",
      " Reading Pt190 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt190.h5\n",
      " Reading Pt191 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt191.h5\n",
      " Reading Pt192 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt192.h5\n",
      " Reading Pt193 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt193.h5\n",
      " Reading Pt194 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt194.h5\n",
      " Reading Pt195 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt195.h5\n",
      " Reading Pt196 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt196.h5\n",
      " Reading Pt197 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt197.h5\n",
      " Reading Pt198 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pt198.h5\n",
      " Reading Au197 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Au197.h5\n",
      " Reading Hg196 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg196.h5\n",
      " Reading Hg197 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg197.h5\n",
      " Reading Hg197_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg197_m1.h5\n",
      " Reading Hg198 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg198.h5\n",
      " Reading Hg199 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg199.h5\n",
      " Reading Hg200 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg200.h5\n",
      " Reading Hg201 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg201.h5\n",
      " Reading Hg202 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg202.h5\n",
      " Reading Hg203 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg203.h5\n",
      " Reading Hg204 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Hg204.h5\n",
      " Reading Tl203 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tl203.h5\n",
      " Reading Tl204 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tl204.h5\n",
      " Reading Tl205 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Tl205.h5\n",
      " Reading Pb204 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pb204.h5\n",
      " Reading Pb205 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pb205.h5\n",
      " Reading Pb206 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pb206.h5\n",
      " Reading Pb207 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pb207.h5\n",
      " Reading Pb208 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pb208.h5\n",
      " Reading Bi209 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bi209.h5\n",
      " Reading Bi210_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bi210_m1.h5\n",
      " Reading Po208 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Po208.h5\n",
      " Reading Po209 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Po209.h5\n",
      " Reading Po210 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Po210.h5\n",
      " Reading Ra223 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ra223.h5\n",
      " Reading Ra224 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ra224.h5\n",
      " Reading Ra225 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ra225.h5\n",
      " Reading Ra226 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ra226.h5\n",
      " Reading Ac225 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ac225.h5\n",
      " Reading Ac226 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ac226.h5\n",
      " Reading Ac227 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Ac227.h5\n",
      " Reading Th227 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th227.h5\n",
      " Reading Th228 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th228.h5\n",
      " Reading Th229 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th229.h5\n",
      " Reading Th230 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th230.h5\n",
      " Reading Th231 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th231.h5\n",
      " Reading Th232 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th232.h5\n",
      " Reading Th233 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th233.h5\n",
      " Reading Th234 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Th234.h5\n",
      " Reading Pa229 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pa229.h5\n",
      " Reading Pa230 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pa230.h5\n",
      " Reading Pa231 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pa231.h5\n",
      " Reading Pa232 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pa232.h5\n",
      " Reading Pa233 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pa233.h5\n",
      " Reading U230 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U230.h5\n",
      " Reading U231 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U231.h5\n",
      " Reading U232 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U232.h5\n",
      " Reading U233 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U233.h5\n",
      " Reading U237 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U237.h5\n",
      " Reading U239 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U239.h5\n",
      " Reading U240 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U240.h5\n",
      " Reading U241 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/U241.h5\n",
      " Reading Np234 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np234.h5\n",
      " Reading Np235 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np235.h5\n",
      " Reading Np236 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np236.h5\n",
      " Reading Np236_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np236_m1.h5\n",
      " Reading Np237 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np237.h5\n",
      " Reading Np238 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np238.h5\n",
      " Reading Np239 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Np239.h5\n",
      " Reading Pu236 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu236.h5\n",
      " Reading Pu237 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu237.h5\n",
      " Reading Pu238 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu238.h5\n",
      " Reading Pu239 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu239.h5\n",
      " Reading Pu240 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu240.h5\n",
      " Reading Pu241 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu241.h5\n",
      " Reading Pu242 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu242.h5\n",
      " Reading Pu243 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu243.h5\n",
      " Reading Pu244 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu244.h5\n",
      " Reading Pu245 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu245.h5\n",
      " Reading Pu246 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Pu246.h5\n",
      " Reading Am240 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am240.h5\n",
      " Reading Am241 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am241.h5\n",
      " Reading Am242 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am242.h5\n",
      " Reading Am242_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am242_m1.h5\n",
      " Reading Am243 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am243.h5\n",
      " Reading Am244 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am244.h5\n",
      " Reading Am244_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Am244_m1.h5\n",
      " Reading Cm240 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm240.h5\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Cm241 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm241.h5\n",
      " Reading Cm242 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm242.h5\n",
      " Reading Cm243 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm243.h5\n",
      " Reading Cm244 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm244.h5\n",
      " Reading Cm245 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm245.h5\n",
      " Reading Cm246 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm246.h5\n",
      " Reading Cm247 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm247.h5\n",
      " Reading Cm248 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm248.h5\n",
      " Reading Cm249 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm249.h5\n",
      " Reading Cm250 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cm250.h5\n",
      " Reading Bk245 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk245.h5\n",
      " Reading Bk246 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk246.h5\n",
      " Reading Bk247 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk247.h5\n",
      " Reading Bk248 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk248.h5\n",
      " Reading Bk249 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk249.h5\n",
      " Reading Bk250 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Bk250.h5\n",
      " Reading Cf246 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf246.h5\n",
      " Reading Cf247 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf247.h5\n",
      " Reading Cf248 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf248.h5\n",
      " Reading Cf249 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf249.h5\n",
      " Reading Cf250 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf250.h5\n",
      " Reading Cf251 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf251.h5\n",
      " Reading Cf252 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf252.h5\n",
      " Reading Cf253 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf253.h5\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: Negative value(s) found on probability table for nuclide Cf250 at 250K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cf250 at 294K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cf250 at 900K\n",
      " WARNING: Negative value(s) found on probability table for nuclide Cf250 at\n",
      "          1200K\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Reading Cf254 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Cf254.h5\n",
      " Reading Es251 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es251.h5\n",
      " Reading Es252 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es252.h5\n",
      " Reading Es253 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es253.h5\n",
      " Reading Es254 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es254.h5\n",
      " Reading Es254_m1 from\n",
      " /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es254_m1.h5\n",
      " Reading Es255 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Es255.h5\n",
      " Reading Fm255 from /home/lorenzo/Documents/cross_sections/endfb80_hdf5/Fm255.h5\n",
      "Timestep: 0 --> keff: 1.00505\n",
      "[openmc.deplete] t=432000.0 s, dt=432000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.15837032197505e-16 atom/b-cm)\n",
      "Timestep: 1 --> keff: 0.99648\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158335355509685e-16 atom/b-cm)\n",
      "[openmc.deplete] t=864000.0 s, dt=2592000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158332857910594e-16 atom/b-cm)\n",
      "Timestep: 2 --> keff: 0.99569\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158297094883484e-16 atom/b-cm)\n",
      "[openmc.deplete] t=3456000.0 s, dt=2592000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158233980121496e-16 atom/b-cm)\n",
      "Timestep: 3 --> keff: 0.99108\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158125377264131e-16 atom/b-cm)\n",
      "[openmc.deplete] t=6048000.0 s, dt=2592000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.158023599019991e-16 atom/b-cm)\n",
      "Timestep: 4 --> keff: 0.98848\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.15791131104636e-16 atom/b-cm)\n",
      "[openmc.deplete] t=8640000.0 s, dt=15552000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.15776668121522e-16 atom/b-cm)\n",
      "Timestep: 5 --> keff: 0.98764\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.155893001929469e-16 atom/b-cm)\n",
      "[openmc.deplete] t=24192000.0 s, dt=8208000 s, source=8000000.0\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.151049790950367e-16 atom/b-cm)\n",
      "Timestep: 6 --> keff: 0.97911\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.149211007095395e-16 atom/b-cm)\n",
      "[openmc.deplete] t=32400000.0 (final operator evaluation)\n",
      "WARNING: nuclide B11 in material1 is negative (density = -8.145479262213239e-16 atom/b-cm)\n"
     ]
    }
   ],
   "source": [
    "model = openmc.model.Model(geometry,mats,settings)\n",
    "\n",
    "#Depletion general settings\n",
    "depletion_days = [5,5,30,30,30,180,95]\n",
    "power = 8e6 #total thermal power [W]\n",
    "salt_mass = 4590 * 10**3 #grams\n",
    "salt_volume =salt_mass/salt_density #cm3\n",
    "salt.volume = salt_volume\n",
    "\n",
    "# Initialize depletion operator\n",
    "op = openmc.deplete.CoupledOperator(model, normalization_mode = \"energy-deposition\", chain_file='ENDF-B-VIII.0_chain_msr.xml')\n",
    "\n",
    "# Initialize integrator object and start depletion calculation \n",
    "integrator = openmc.deplete.CECMIntegrator(op, depletion_days, timestep_units='d', power=power)\n",
    "integrator.integrate()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "41d076d2",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Let's store some results that will be used later for comparison\n",
    "results = openmc.deplete.Results('depletion_results.h5')\n",
    "t, k_ref = results.get_keff()\n",
    "n_xe_ref = 0\n",
    "n_kr_ref = 0\n",
    "for nuc,_ in openmc.data.isotopes('Xe'):\n",
    "    n_xe_ref += results.get_atoms(str(salt.id), nuc)[1]\n",
    "for nuc,_ in openmc.data.isotopes('Kr'):\n",
    "    n_kr_ref += results.get_atoms(str(salt.id), nuc)[1]"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dd3cd25c",
   "metadata": {},
   "source": [
    "# Removal rates theory\n",
    "The possibility to remove fission products from the fuel salt is one of the key characteristics of the MSRE and msr reactor in general. \n",
    "\n",
    "Mathematically nuclides removal can be thought as an additional term to the Bateman equation:\n",
    "\n",
    "$\\frac{dn_i(t)}{dt} = \\underbrace{\\sum_j \\gamma_{j\\rightarrow i} n_j\\overline{\\sigma_j\\phi} - n_i \\overline{\\sigma_i \\phi}}_\\textbf{R}  + \\underbrace{\\sum_j \\gamma_{j\\rightarrow i} n_j\\lambda_{i\\rightarrow j} + \\lambda_{j\\rightarrow i}n_i}_\\textbf{D} - \\underbrace{\\epsilon_i \\lambda_i n_i}_\\textbf{T}$,\n",
    "\n",
    "Where $ \\epsilon_i \\lambda_i n_i $ is the removal term, $\\epsilon_i$ is the removal efficiency and\n",
    "$\\lambda_i$ is the removal rate coefficient for the continuous removal of the nuclide $i$, expressed in ($s^{-1}$) units.\n",
    "\n",
    "Another way to characterize $\\lambda_i$ is through the concept of cycle time: $T_{cyc,i} = \\frac{1}{\\lambda_i}$, as the time needed to process the removal elements at a specific volumetric rate.\n",
    "\n",
    "For simplicity, we can combine $\\epsilon_i$ and $\\lambda_i$ in one single parameter, that we can call again $\\lambda_i$. Thus, setting a removal rate coefficient of, for example, $1\\ (s^{-1})$ at $100\\ \\%$ efficiency is the same as setting $10\\ (s^{-1})$ at $10\\ \\%$.\n",
    "\n",
    "The capability to model removal rates has been deployed under a different [branch](https://github.com/openmsr/openmc/tree/msr_13.2_cont) of OpenMC.\n",
    "\n",
    "In this example we will set removal rates to gasseous fission products, Xe and Kr, and noble metals fission products. The values and their explanation can be found [here](https://info.ornl.gov/sites/publications/Files/Pub173113.pdf)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "250cacc3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[openmc.deplete] t=0.0 s, dt=432000 s, source=8000000.0\n",
      "Timestep: 0 --> keff: 1.00478\n",
      "WARNING: nuclide B11 in material1 is negative (density = -7.810566471511284e-16 atom/b-cm)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: No intersection found with DAGMC cell 22, material 1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[openmc.deplete] t=432000.0 s, dt=432000 s, source=8000000.0\n",
      "Timestep: 1 --> keff: 1.00248\n",
      "WARNING: nuclide B11 in material1 is negative (density = -5.467815330683659e-16 atom/b-cm)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: No intersection found with DAGMC cell 22, material 1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[openmc.deplete] t=864000.0 s, dt=2592000 s, source=8000000.0\n",
      "Timestep: 2 --> keff: 1.00147\n",
      "[openmc.deplete] t=3456000.0 s, dt=2592000 s, source=8000000.0\n",
      "Timestep: 3 --> keff: 0.99758\n",
      "[openmc.deplete] t=6048000.0 s, dt=2592000 s, source=8000000.0\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: No intersection found with DAGMC cell 22, material 1\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Timestep: 4 --> keff: 0.99451\n",
      "WARNING: nuclide B11 in material1 is negative (density = -1.0411576378416223e-16 atom/b-cm)\n",
      "[openmc.deplete] t=8640000.0 s, dt=15552000 s, source=8000000.0\n",
      "Timestep: 5 --> keff: 0.99462\n",
      "[openmc.deplete] t=24192000.0 s, dt=8208000 s, source=8000000.0\n",
      "Timestep: 6 --> keff: 0.98593\n",
      "[openmc.deplete] t=32400000.0 (final operator evaluation)\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " WARNING: No intersection found with DAGMC cell 22, material 1\n"
     ]
    }
   ],
   "source": [
    "# Re-initialize depletion operator\n",
    "op = openmc.deplete.CoupledOperator(model, normalization_mode = \"energy-deposition\", chain_file='ENDF-B-VIII.0_chain_msr.xml')\n",
    "\n",
    "# Initialize msr continuous object\n",
    "msr = openmc.deplete.msr.MsrContinuous(op, model)\n",
    "\n",
    "# Set removal rates constants in 1/s\n",
    "msr.set_removal_rate('salt', ['Xe','Kr'], 4.067e-5)\n",
    "msr.set_removal_rate('salt', ['Se','Nb','Mo','Tc','Ru','Rh','Pd','Ag','Sb','Te'], 8.777e-3)\n",
    "\n",
    "# Initialize integrator object and start depletion calculation \n",
    "integrator = openmc.deplete.CECMIntegrator(op, depletion_days, msr_continuous=msr, timestep_units='d', power=power)\n",
    "integrator.integrate()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "415f0334",
   "metadata": {},
   "source": [
    "# Critical Factor\n",
    "As we've set removal rates to fission products, we except keff to drop less rapidly than in the first case, let's verify that: "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "9877db52",
   "metadata": {},
   "outputs": [],
   "source": [
    "results = openmc.deplete.Results('depletion_results.h5')\n",
    "t, k = results.get_keff()\n",
    "n_xe = 0\n",
    "n_kr = 0\n",
    "for nuc,_ in openmc.data.isotopes('Xe'):\n",
    "    n_xe += results.get_atoms(str(salt.id), nuc)[1]\n",
    "for nuc,_ in openmc.data.isotopes('Kr'):\n",
    "    n_kr += results.get_atoms(str(salt.id), nuc)[1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "826c26f9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 71864 characters]\n",
      "text/plain": [
       "<Figure size 640x480 with 2 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Let's convert time from sec to days \n",
    "t /= (3600 * 24)\n",
    "\n",
    "plt.figure()\n",
    "ax = plt.subplot()\n",
    "k1, = ax.plot(t, [k[0] for k in k_ref], '--', c='red', label='keff wo removal rates')\n",
    "k2, = ax.plot(t, [k[0] for k in k], c='red', label='keff w removal rates')\n",
    "ax1 = ax.twinx()\n",
    "n1, = ax1.plot(t, n_xe_ref, '--', c='green', label='Xe wo removal rates')\n",
    "n2, = ax1.plot(t, n_xe, c='green', label='Xe w removal rates')\n",
    "n3, = ax1.plot(t, n_kr_ref, '--', c='blue', label='Kr wo removal rates')\n",
    "n4, = ax1.plot(t, n_kr, c='blue', label='Kr w removal rates')\n",
    "ax.set_xlabel('Time[d]')\n",
    "ax.set_ylabel(r'$k_{eff}$', color='r')\n",
    "ax.tick_params(axis='y', colors='red')\n",
    "ax1.set_yscale('log')\n",
    "ax1.set_ylabel('Nuclides [atoms]')\n",
    "ax1.legend(handles=[k1, k2, n1, n2, n3, n4])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cc827041",
   "metadata": {},
   "source": [
    "# Fission products\n",
    "The removal rate for gaseous fission products has been tuned (see [here](https://info.ornl.gov/sites/publications/Files/Pub173113.pdf)) to obtain a Xenon poison fractions matching the measurements reported during the MSRE U235 operation, of 0.3%-0.4%. \n",
    "\n",
    "The Xenon poison fraction is defined as:\n",
    "$FP = \\frac{\\Sigma_a^{135}Xe}{\\Sigma_a^{235}U}$\n",
    "\n",
    "Let's plot the same quantity and see if we obtain values that matches the reference :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "dc07279e",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 21096 characters]\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Microscopic absorption cross section at 0.0253 eV\n",
    "xs_xe135 = 2664214.0\n",
    "xs_u235 = 686.006994850397\n",
    "_, n_xe135 = results.get_atoms(str(salt.id), 'Xe135')\n",
    "_, n_u235 = results.get_atoms(str(salt.id), 'U235')\n",
    "# Poison fraction\n",
    "pf = (xs_xe135*n_xe135)/(xs_u235*n_u235)*100\n",
    "plt.figure()\n",
    "plt.plot(t, pf)\n",
    "plt.xlabel('Time [d]')\n",
    "plt.ylabel('Xe posion fraction [%]')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9d28beee",
   "metadata": {},
   "source": [
    "# Inventory \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "aa32c623",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 42228 characters]\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "inventory = dict()\n",
    "for nuc,_ in openmc.data.isotopes('U'):\n",
    "    inventory[nuc] = results.get_atoms(str(salt.id), nuc)[1] / openmc.data.AVOGADRO * openmc.data.atomic_mass(nuc) / 1000\n",
    "\n",
    "for nuc in ['Pu238','Pu239','Pu240','Pu241','Pu242']:\n",
    "    inventory[nuc] = results.get_atoms(str(salt.id), nuc)[1] / openmc.data.AVOGADRO * openmc.data.atomic_mass(nuc) / 1000\n",
    "\n",
    "plt.figure()\n",
    "for nuc, mass in inventory.items():\n",
    "    plt.plot(t, mass, label=nuc)\n",
    "plt.xlabel('Time [y]')\n",
    "plt.ylabel('Mass [g]')\n",
    "plt.yscale('log')\n",
    "plt.ylim(1e-5)\n",
    "plt.legend()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7434b75d",
   "metadata": {},
   "source": [
    "# Neutron absorption in the fuel"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "0c5bd844",
   "metadata": {},
   "outputs": [],
   "source": [
    "import re\n",
    "import seaborn as sns\n",
    "regex = re.compile(r'(\\d+|\\s+)')\n",
    "\n",
    "# All nuclides present in the fuel at last time-step\n",
    "nucs = results.export_to_materials(-1)[0].get_nuclides()\n",
    "\n",
    "# Let's begin by making some useful groupings\n",
    "gaseos = ['H', 'He', 'Ne', 'Ar', 'Kr', 'Xe', 'Rn'] #gaseous fission products\n",
    "noble_metals = ['Se','Nb','Mo','Tc','Ru','Rh','Pd','Ag','Sb','Te'] # noble metals fission products\n",
    "metals = ['Cr','Mn','Fe','Co','Ni','Cu','Zn','Hf','Zr','W',]\n",
    "halogens = ['F','Cl','Br','I','At']\n",
    "alkali_metals = ['Li','Na','K','Rb','Cs']\n",
    "alkali_earths= ['Be','Mg','Ca','Sr','Ba','Ra']\n",
    "lanthanides  = ['Y','La','Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb','Lu']\n",
    "m_a = ['Ac','Th','Pa','Np','Am','Cm','Bk','Cf','Es','Fm','Md','No','Lr']\n",
    "# Get fissile nuclides in the fuel, based on Ronen's rule for determining fissile isotopes\n",
    "fissile = []\n",
    "\n",
    "for nuc in nucs:\n",
    "    elm = regex.split(nuc)[0]\n",
    "    a = round(openmc.data.atomic_mass(nuc))\n",
    "    z = openmc.data.ATOMIC_NUMBER[elm]\n",
    "    if 90 <= z <= 100:\n",
    "        ronen = 2*z -(a-z)\n",
    "        if ronen in [41,43,45]:\n",
    "            fissile.append(nuc) \n",
    "\n",
    "# Calculate totat absorption rate of fissile nuclides\n",
    "tot_abs_rate = 0\n",
    "for nuc in fissile:\n",
    "    tot_abs_rate += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "    tot_abs_rate += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "\n",
    "nuclides_stack = dict()\n",
    "groups_stack = {'Gaseos':0, 'Noble metals':0, 'Metals':0, 'Halogens':0 , 'Alkali metals':0, 'Alkali earths':0, 'Lanthanides':0, 'MA':0, 'Others':0}\n",
    "for nuc in nucs:\n",
    "    \n",
    "    if regex.split(nuc)[0] in ['U','Pu']:\n",
    "        nuclides_stack[nuc] = results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        nuclides_stack[nuc] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "        nuclides_stack[nuc] /= tot_abs_rate\n",
    "        \n",
    "        \n",
    "    elif regex.split(nuc)[0] in gaseos:\n",
    "        groups_stack['Gaseos'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Gaseos'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in noble_metals:\n",
    "        groups_stack['Noble metals'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Noble metals'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in metals:\n",
    "        groups_stack['Metals'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Metals'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in halogens:\n",
    "        groups_stack['Halogens'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Halogens'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in alkali_metals:\n",
    "        groups_stack['Alkali metals'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Alkali metals'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in alkali_earths:\n",
    "        groups_stack['Alkali earths'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Alkali earths'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in lanthanides:\n",
    "        groups_stack['Lanthanides'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Lanthanides'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    elif regex.split(nuc)[0] in m_a:\n",
    "        groups_stack['MA'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['MA'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "    else:\n",
    "        groups_stack['Others'] += results.get_reaction_rate(str(salt.id), nuc, 'fission')[1]\n",
    "        groups_stack['Others'] += results.get_reaction_rate(str(salt.id), nuc, '(n,gamma)')[1]\n",
    "\n",
    "# Divide each array by the total absorption reaction rate of fissile nuclides\n",
    "for g in groups_stack.keys():\n",
    "    groups_stack[g] /= tot_abs_rate\n",
    "\n",
    "# Sort dictionary groups\n",
    "groups_stack=dict(reversed(sorted(groups_stack.items(), key=lambda item: item[1][len(item)])))\n",
    "\n",
    "# Create red color palette for groups_stack\n",
    "colors = list(reversed(sns.color_palette(\"Reds\", len(groups_stack))))\n",
    "\n",
    "# Order uranium series\n",
    "u_series = {key:value for key,value in nuclides_stack.items() if key.startswith('U')}\n",
    "u_series = dict(reversed(sorted(u_series.items(), key=lambda item: item[1][len(item)])))\n",
    "# Create green color palette for Uranium isotopes\n",
    "colors += list(reversed(sns.color_palette(\"Greens\", len(u_series))))\n",
    "\n",
    "# Order plutionium series\n",
    "pu_series = {key:value for key,value in nuclides_stack.items() if key.startswith('Pu')}\n",
    "pu_series = dict(reversed(sorted(pu_series.items(), key=lambda item: item[1][len(item)])))\n",
    "# Create blue color palette for plutonium isotopes\n",
    "colors += list(reversed(sns.color_palette(\"Blues\", len(pu_series))))\n",
    "# Add uramium and plutonium series to the stack\n",
    "groups_stack.update(u_series)\n",
    "groups_stack.update(pu_series)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "cc4b980e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 132780 characters]\n",
      "text/plain": [
       "<Figure size 1500x1000 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(15,10))\n",
    "plt.stackplot(t, groups_stack.values(), labels=groups_stack.keys(), \n",
    "              edgecolor=\"black\", linewidth=0.5,colors=colors, alpha=0.8)\n",
    "handles, labels = plt.gca().get_legend_handles_labels()\n",
    "legend = plt.legend([handles[idx] for idx in list(reversed(np.arange(0,len(handles),1)))],\n",
    "                            [labels[idx] for idx in list(reversed(np.arange(0,len(handles),1)))],\n",
    "                            bbox_to_anchor=(1.05,1), loc='upper left',\n",
    "                            borderaxespad=0, ncol=2,\n",
    "                            fontsize=15)\n",
    "plt.xlabel('Time [d]',weight='bold',fontsize=17)\n",
    "plt.title('Neutrons absorption distribution per neutron absorbed in fissile isotopes',\n",
    "                   weight='bold', fontsize=17)\n",
    "plt.xticks(fontsize=13)\n",
    "plt.yticks(fontsize=13)\n",
    "plt.tight_layout()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c0c7c200",
   "metadata": {},
   "source": [
    "Here we can visualize the neutrons absorption for each nuclide present in the fuel per neutrons absorption by fissile isotopes. In other words we can see, out of the total neutrons generated, where and how many we end up losing.\n",
    "\n",
    "It is useful to group together those isotopes with similar characteristics that individually wouldn't represent a big contribution to capture.\n",
    "\n",
    "Due to the low burnup and relatively short simulation time, we are far from equilibrium. However, we can notice the quick increase of absorption in the Pu isotopes, created from neutron capture of U238, and in particular of Pu239, due to its higher absorption cross section than U235.\n",
    "\n",
    "**Note**: Neutrons lost to leakage out of the core and capture in other isotopes other than fuel are not represented. Thus, approximately 1 neutron is missing from the counting (we know that a fission event releases approximately 2.3 neutrons). This is simply due to the fact that we have defined the fuel salt as our only depletable material."
   ]
  }
 ],
 "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
}
