{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "7SVc4tVhUN8l",
    "outputId": "91d742b3-4226-4a1c-e1a6-51bbde0949e3"
   },
   "source": [
    "# A VVER geometry \n",
    "This notebook can be used as a template for modeling VVER reactors."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "id": "BpmPdBBHTz2E"
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import openmc"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "TBEO1_TrW7up",
    "outputId": "f6c529e7-05aa-4e22-de7a-2d2ffc9c9421"
   },
   "outputs": [],
   "source": [
    "# Materials definitions\n",
    "\n",
    "au13=openmc.Material(name='au13')\n",
    "au13.add_element('U', 1.0, enrichment=1.3)\n",
    "au13.add_element('O', 2.0)\n",
    "au13.set_density('g/cc', 10.4)\n",
    "\n",
    "au22=openmc.Material(name='au22')\n",
    "au22.add_element('U', 1.0, enrichment=2.2)\n",
    "au22.add_element('O', 2.0)\n",
    "au22.set_density('g/cc', 10.4)\n",
    "\n",
    "av5=openmc.Material(name='av5')\n",
    "av5.add_element('U', 1.0, enrichment=3.0)\n",
    "av5.add_element('O', 2.0)\n",
    "av5.set_density('g/cc', 10.4)\n",
    "\n",
    "awu=openmc.Material(name='awu')\n",
    "awu.add_element('U', 1.0, enrichment=3.3)\n",
    "awu.add_element('O', 2.0)\n",
    "awu.set_density('g/cc', 10.4)\n",
    "\n",
    "go=openmc.Material(name='go')\n",
    "go.add_element('U', 1.0, enrichment=4.0)\n",
    "go.add_element('O', 2.0)\n",
    "go.set_density('g/cc', 10.4)\n",
    "\n",
    "Gd2O3=openmc.Material(name='Gd2O3')\n",
    "Gd2O3.add_element('Gd', 2.0)\n",
    "Gd2O3.add_element('O', 3.0)\n",
    "Gd2O3.set_density('g/cm3', 7.41)\n",
    "\n",
    "water = openmc.Material(name='water')\n",
    "water.add_nuclide('H1', 2.0)\n",
    "water.add_nuclide('O16', 1.0)\n",
    "water.set_density('g/cm3', 1.0)\n",
    "water.add_s_alpha_beta('c_H_in_H2O')\n",
    "\n",
    "zirconium = openmc.Material(name=\"zirconium\")\n",
    "zirconium.add_element('Zr', 1.0)\n",
    "zirconium.set_density('g/cm3', 6.6)\n",
    "\n",
    "niobium=openmc.Material(name='niobium')\n",
    "niobium.add_element('Nb',1.0)\n",
    "niobium.set_density('g/cm3',8.57)\n",
    "\n",
    "helium=openmc.Material(name='Helium')\n",
    "helium.add_element('He', 1.0)\n",
    "helium.set_density('g/cm3', 0.178e-3)\n",
    "\n",
    "reflector_mat = openmc.Material(name='Reflector')\n",
    "reflector_mat.add_nuclide('Be9', 1.0)\n",
    "reflector_mat.add_nuclide('O16', 1.0)\n",
    "reflector_mat.set_density('g/cm3', 2.9)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "id": "-VU_fMs2W751"
   },
   "outputs": [],
   "source": [
    "# Material mixtures\n",
    "\n",
    "alloy = openmc.Material.mix_materials([niobium, zirconium], [0.01, 0.99], 'wo')\n",
    "fuel_awu = openmc.Material.mix_materials([Gd2O3, awu], [0.05, 0.95], 'wo')\n",
    "fuel_go = openmc.Material.mix_materials([Gd2O3, go], [0.05, 0.95], 'wo')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "id": "116XndltahRq"
   },
   "outputs": [],
   "source": [
    "# Instantiate a Materials collection and export to xml\n",
    "materials_file = openmc.Materials([au13, au22, av5, fuel_awu, fuel_go, water, alloy, helium, reflector_mat])\n",
    "materials_file.export_to_xml()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "htyVmeh8ahca",
    "outputId": "20ecf082-9e37-4dc4-f987-cd42a1948e1c"
   },
   "outputs": [],
   "source": [
    "# Geometry definitions\n",
    "\n",
    "# Boudries and outer universe\n",
    "all_water_out=openmc.Cell(cell_id=200, fill=water)\n",
    "\n",
    "# Top & bottom of the assembly\n",
    "assembly_z0 = openmc.ZPlane(surface_id=300, z0=-75)\n",
    "assembly_z1 = openmc.ZPlane(surface_id=301, z0=75)\n",
    "assembly = openmc.model.hexagonal_prism(edge_length=18, orientation='y')\n",
    "\n",
    "# Top & bottom of the reflector\n",
    "reflector_z0 = openmc.ZPlane(surface_id=303, z0=-95, boundary_type='vacuum')\n",
    "reflector_z1 = openmc.ZPlane(surface_id=304, z0= 95, boundary_type='vacuum')\n",
    "\n",
    "# Reflector hexagon\n",
    "reflector = openmc.model.hexagonal_prism(edge_length=19, orientation='y',\n",
    "    boundary_type='vacuum')\n",
    "\n",
    "assembly_cell = openmc.Cell()\n",
    "reflect_cell = openmc.Cell()\n",
    "top_reflect_cell = openmc.Cell()\n",
    "bot_reflect_cell = openmc.Cell()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "id": "ku5Yp2wzyXTg"
   },
   "outputs": [],
   "source": [
    "assembly_cell.region = assembly & -assembly_z1 & +assembly_z0\n",
    "\n",
    "reflect_cell.region = ~assembly & reflector \\\n",
    "& -assembly_z1 & +assembly_z0\n",
    "\n",
    "top_reflect_cell.region = reflector & +assembly_z1 & -reflector_z1\n",
    "\n",
    "bot_reflect_cell.region = reflector & -assembly_z0 & +reflector_z0\n",
    "\n",
    "reflect_cell.fill = reflector_mat\n",
    "top_reflect_cell.fill = reflector_mat\n",
    "bot_reflect_cell.fill = reflector_mat\n",
    "\n",
    "# Create universes\n",
    "all_water_out_u=openmc.Universe(cells=[all_water_out])\n",
    "u_reflect = openmc.Universe(cells=(reflect_cell,top_reflect_cell,bot_reflect_cell))\n",
    "u_root = openmc.Universe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 286
    },
    "id": "Sl9zZQjpahiO",
    "outputId": "dbbad02d-0f40-4689-fdb7-af90e0b60b53"
   },
   "outputs": [],
   "source": [
    "fuel_or1 = openmc.ZCylinder(surface_id=400, r=0.3765)\n",
    "clad_ir1 = openmc.ZCylinder(surface_id=401, r=0.4)\n",
    "clad_or1 = openmc.ZCylinder(surface_id=402, r=0.465)\n",
    "\n",
    "fuel_region1 = -fuel_or1 & -assembly_z1 & +assembly_z0\n",
    "clad_region1 = +fuel_or1 & -clad_or1 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region1 = +clad_or1 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell1  = openmc.Cell(cell_id=400, fill=water, region=fuel_region1)\n",
    "clad_cell1  = openmc.Cell(cell_id=401, fill=alloy, region=clad_region1)\n",
    "water_cell1 = openmc.Cell(cell_id=402, fill=water, region=moderator_region1)\n",
    "\n",
    "central_tube_u = openmc.Universe(cells=[fuel_cell1, clad_cell1, water_cell1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 286
    },
    "id": "s9WlvAAxahlm",
    "outputId": "172bc8df-6006-44b8-e8e1-41142ef675ea"
   },
   "outputs": [],
   "source": [
    "# Geometry of au13 rod\n",
    "\n",
    "fuel_or2 = openmc.ZCylinder(surface_id=410, r=0.3765)\n",
    "clad_ir2 = openmc.ZCylinder(surface_id=411, r=0.4)\n",
    "clad_or2 = openmc.ZCylinder(surface_id=412, r=0.465)\n",
    "\n",
    "fuel_region2 = -fuel_or2 & -assembly_z1 & +assembly_z0\n",
    "gap_region2  = +fuel_or2 & -clad_ir2 & -assembly_z1 & +assembly_z0\n",
    "clad_region2 = +clad_ir2 & -clad_or2 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region2 = +clad_or2 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell2  = openmc.Cell(cell_id=410, fill=au13,   region=fuel_region2)\n",
    "gap_cell2   = openmc.Cell(cell_id=411, fill=helium, region=gap_region2)\n",
    "clad_cell2  = openmc.Cell(cell_id=412, fill=alloy,  region=clad_region2)\n",
    "water_cell2 = openmc.Cell(cell_id=413, fill=water,  region=moderator_region2)\n",
    "\n",
    "au13_u = openmc.Universe(cells=[fuel_cell2, gap_cell2, clad_cell2, water_cell2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "id": "zVCVJ9IHahot"
   },
   "outputs": [],
   "source": [
    "# Geometry of au22 rod\n",
    "\n",
    "fuel_or3 = openmc.ZCylinder(surface_id=420, r=0.3765)\n",
    "clad_ir3 = openmc.ZCylinder(surface_id=421, r=0.4)\n",
    "clad_or3 = openmc.ZCylinder(surface_id=422, r=0.465)\n",
    "\n",
    "fuel_region3 = -fuel_or3 & -assembly_z1 & +assembly_z0\n",
    "gap_region3  = +fuel_or3 & -clad_ir3 & -assembly_z1 & +assembly_z0\n",
    "clad_region3 = +clad_ir3 & -clad_or3 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region3 = +clad_or3 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell3  = openmc.Cell(cell_id=420, fill=au22,   region=fuel_region3)\n",
    "gap_cell3   = openmc.Cell(cell_id=421, fill=helium, region=gap_region3)\n",
    "clad_cell3  = openmc.Cell(cell_id=422, fill=alloy,  region=clad_region3)\n",
    "water_cell3 = openmc.Cell(cell_id=423, fill=water,  region=moderator_region3)\n",
    "\n",
    "au22_u = openmc.Universe(cells=[fuel_cell3, gap_cell3, clad_cell3, water_cell3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "id": "3MlM4EUuahu9"
   },
   "outputs": [],
   "source": [
    "# Geometry of av5 rod\n",
    "\n",
    "fuel_or4 = openmc.ZCylinder(surface_id=430, r=0.3765)\n",
    "clad_ir4 = openmc.ZCylinder(surface_id=431, r=0.4)\n",
    "clad_or4 = openmc.ZCylinder(surface_id=432, r=0.465)\n",
    "\n",
    "fuel_region4 = -fuel_or4 & -assembly_z1 & +assembly_z0\n",
    "gap_region4  = +fuel_or4 & -clad_ir4 & -assembly_z1 & +assembly_z0\n",
    "clad_region4 = +clad_ir4 & -clad_or4 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region4 = +clad_or4 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell4  = openmc.Cell(cell_id=430, fill=av5,    region=fuel_region4)\n",
    "gap_cell4   = openmc.Cell(cell_id=431, fill=helium, region=gap_region4)\n",
    "clad_cell4  = openmc.Cell(cell_id=432, fill=alloy,  region=clad_region4)\n",
    "water_cell4 = openmc.Cell(cell_id=433, fill=water,  region=moderator_region4)\n",
    "\n",
    "av5_u = openmc.Universe(cells=[fuel_cell4, gap_cell4, clad_cell4, water_cell4])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "id": "Ks9nRXR4ah45"
   },
   "outputs": [],
   "source": [
    "# Geometry of awu rod\n",
    "\n",
    "fuel_or5 = openmc.ZCylinder(surface_id=440, r=0.3765)\n",
    "clad_ir5 = openmc.ZCylinder(surface_id=441, r=0.4)\n",
    "clad_or5 = openmc.ZCylinder(surface_id=442, r=0.465)\n",
    "\n",
    "fuel_region5 = -fuel_or5 & -assembly_z1 & +assembly_z0\n",
    "gap_region5  = +fuel_or5 & -clad_ir5 & -assembly_z1 & +assembly_z0\n",
    "clad_region5 = +clad_ir5 & -clad_or5 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region5 = +clad_or5 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell5  = openmc.Cell(cell_id=440, fill=fuel_awu, region=fuel_region5)\n",
    "gap_cell5   = openmc.Cell(cell_id=441, fill=helium,   region=gap_region5)\n",
    "clad_cell5  = openmc.Cell(cell_id=442, fill=alloy,    region=clad_region5)\n",
    "water_cell5 = openmc.Cell(cell_id=443, fill=water,    region=moderator_region5)\n",
    "\n",
    "awu_u = openmc.Universe(cells=[fuel_cell5, gap_cell5, clad_cell5, water_cell5])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "id": "NV8O7-cZaiuX"
   },
   "outputs": [],
   "source": [
    "# Geometry of go rod\n",
    "\n",
    "fuel_or6 = openmc.ZCylinder(surface_id=450, r=0.3765)\n",
    "clad_ir6 = openmc.ZCylinder(surface_id=451, r=0.4)\n",
    "clad_or6 = openmc.ZCylinder(surface_id=452, r=0.465)\n",
    "\n",
    "fuel_region6 = -fuel_or6 & -assembly_z1 & +assembly_z0\n",
    "gap_region6  = +fuel_or6 & -clad_ir6 & -assembly_z1 & +assembly_z0\n",
    "clad_region6 = +clad_ir6 & -clad_or6 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "moderator_region6 = +clad_or6 & -assembly_z1 & +assembly_z0\n",
    "\n",
    "fuel_cell6  = openmc.Cell(cell_id=450, fill=fuel_go, region=fuel_region6)\n",
    "gap_cell6   = openmc.Cell(cell_id=451, fill=helium,  region=gap_region6)\n",
    "clad_cell6  = openmc.Cell(cell_id=452, fill=alloy,   region=clad_region6)\n",
    "water_cell6 = openmc.Cell(cell_id=453, fill=water,   region=moderator_region6)\n",
    "\n",
    "go_u = openmc.Universe(cells=[fuel_cell6, gap_cell6, clad_cell6, water_cell6])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/"
    },
    "id": "Lnnkq16Oaisk",
    "outputId": "676d78e5-ddf5-4fd9-b6b0-8e432a33a1da"
   },
   "outputs": [],
   "source": [
    "# Creating the hexagonal lattice\n",
    "\n",
    "lat=openmc.HexLattice(name='assembly')\n",
    "lat.center = (0., 0.)\n",
    "lat.pitch = (1.275,)\n",
    "lat.outer=all_water_out_u"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "id": "0wD6nzv-aihX"
   },
   "outputs": [],
   "source": [
    "ring7=[awu_u, awu_u, go_u,awu_u, go_u, awu_u, awu_u]*6\n",
    "ring6= [au22_u, av5_u, au22_u,\n",
    "        av5_u, au22_u, av5_u,\n",
    "        au13_u,av5_u, au22_u,\n",
    "        av5_u,au22_u,av5_u,\n",
    "        au22_u,av5_u,au22_u,\n",
    "        av5_u,au22_u,av5_u,\n",
    "        au22_u,av5_u,au22_u,\n",
    "        av5_u,au22_u,av5_u,\n",
    "        au13_u,av5_u,au22_u,\n",
    "        av5_u,au22_u,av5_u,\n",
    "        au13_u,av5_u,au22_u,\n",
    "        av5_u,au22_u,av5_u]\n",
    "ring5= [au13_u, au13_u, au22_u, au13_u, au13_u]*6\n",
    "ring4=[au22_u, av5_u, au13_u, av5_u]*6\n",
    "ring3=[au13_u, au22_u, au13_u]*6\n",
    "ring2=[au22_u, av5_u]*6\n",
    "ring1=[au13_u]*6\n",
    "ring0=[central_tube_u]\n",
    "lat.universes = [ring7, ring6, ring5, ring4, ring3, ring2, ring1, ring0]\n",
    "lat.orientation='y'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 282
    },
    "id": "3qjNGajDaifZ",
    "outputId": "d5c8cad5-7430-4fb7-8bb1-7930f82841c0"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7fe37faeca50>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 21948 characters]",
      "text/plain": [
       "<Figure size 516.129x519.481 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "assembly_cell.fill = lat\n",
    "\n",
    "u_root.add_cells([assembly_cell, reflect_cell, top_reflect_cell, bot_reflect_cell])\n",
    "geom=openmc.Geometry(u_root)\n",
    "geom.export_to_xml()\n",
    "\n",
    "u_root.plot(origin=(0,0,0),width=(25,25),color_by='material',colors={water:'blue'},pixels=[400,400])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 282
    },
    "id": "j7GDiLQtBY1m",
    "outputId": "0e5753e6-eeda-43d1-c137-12d17b1b8c67"
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7fe37f341050>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 6504 characters]",
      "text/plain": [
       "<Figure size 258.065x259.74 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "u_root.plot(basis='yz',origin=(0,0,0),width=(50,50),color_by='material',colors={water:'blue'},pixels=[200,200])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "id": "EzaW9J5l8vRP"
   },
   "outputs": [],
   "source": [
    "# OpenMC simulation parameters\n",
    "\n",
    "batches = 100\n",
    "inactive = 10\n",
    "particles = 5000\n",
    "\n",
    "settings = openmc.Settings()\n",
    "settings.batches = batches\n",
    "settings.inactive = inactive\n",
    "settings.particles = particles\n",
    "\n",
    "uniform_dist = openmc.stats.Box([-24,-24,-75],[24,24,75],only_fissionable=True)\n",
    "settings.source = openmc.source.IndependentSource(space=uniform_dist)\n",
    "\n",
    "settings.export_to_xml()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "colab": {
     "base_uri": "https://localhost:8080/",
     "height": 1000
    },
    "id": "mzhyBvEOaiR8",
    "outputId": "bb783e58-6ac3-4193-e64a-818bf9c0fa6d",
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                                %%%%%%%%%%%%%%%\n",
      "                           %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                                    %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                                     %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                 ###############      %%%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ##################     %%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ###################     %%%%%%%%%%%%%%%%%%%%%%%\n",
      "                ####################     %%%%%%%%%%%%%%%%%%%%%%\n",
      "                #####################     %%%%%%%%%%%%%%%%%%%%%\n",
      "                ######################     %%%%%%%%%%%%%%%%%%%%\n",
      "                #######################     %%%%%%%%%%%%%%%%%%\n",
      "                 #######################     %%%%%%%%%%%%%%%%%\n",
      "                 ######################     %%%%%%%%%%%%%%%%%\n",
      "                  ####################     %%%%%%%%%%%%%%%%%\n",
      "                    #################     %%%%%%%%%%%%%%%%%\n",
      "                     ###############     %%%%%%%%%%%%%%%%\n",
      "                       ############     %%%%%%%%%%%%%%%\n",
      "                          ########     %%%%%%%%%%%%%%\n",
      "                                      %%%%%%%%%%%\n",
      "\n",
      "                 | The OpenMC Monte Carlo Code\n",
      "       Copyright | 2011-2023 MIT, UChicago Argonne LLC, and contributors\n",
      "         License | https://docs.openmc.org/en/latest/license.html\n",
      "         Version | 0.13.3\n",
      "        Git SHA1 | 50e39a4e20dc9e0f3d7ccf07333f6a5e6c797c8c\n",
      "       Date/Time | 2023-10-26 23:55:50\n",
      "  OpenMP Threads | 8\n",
      "\n",
      " Reading settings XML file...\n",
      " Reading cross sections XML file...\n",
      " Reading materials XML file...\n",
      " Reading geometry XML file...\n",
      " Reading U234 from /opt/xdata/endfb-vii.1-hdf5/neutron/U234.h5\n",
      " Reading U235 from /opt/xdata/endfb-vii.1-hdf5/neutron/U235.h5\n",
      " Reading U238 from /opt/xdata/endfb-vii.1-hdf5/neutron/U238.h5\n",
      " Reading U236 from /opt/xdata/endfb-vii.1-hdf5/neutron/U236.h5\n",
      " Reading O16 from /opt/xdata/endfb-vii.1-hdf5/neutron/O16.h5\n",
      " Reading O17 from /opt/xdata/endfb-vii.1-hdf5/neutron/O17.h5\n",
      " Reading H1 from /opt/xdata/endfb-vii.1-hdf5/neutron/H1.h5\n",
      " Reading He3 from /opt/xdata/endfb-vii.1-hdf5/neutron/He3.h5\n",
      " Reading He4 from /opt/xdata/endfb-vii.1-hdf5/neutron/He4.h5\n",
      " Reading Be9 from /opt/xdata/endfb-vii.1-hdf5/neutron/Be9.h5\n",
      " Reading Nb93 from /opt/xdata/endfb-vii.1-hdf5/neutron/Nb93.h5\n",
      " Reading Zr90 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr90.h5\n",
      " Reading Zr91 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr91.h5\n",
      " Reading Zr92 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr92.h5\n",
      " Reading Zr94 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr94.h5\n",
      " Reading Zr96 from /opt/xdata/endfb-vii.1-hdf5/neutron/Zr96.h5\n",
      " Reading Gd152 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd152.h5\n",
      " Reading Gd154 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd154.h5\n",
      " Reading Gd155 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd155.h5\n",
      " Reading Gd156 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd156.h5\n",
      " Reading Gd157 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd157.h5\n",
      " Reading Gd158 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd158.h5\n",
      " Reading Gd160 from /opt/xdata/endfb-vii.1-hdf5/neutron/Gd160.h5\n",
      " Reading c_H_in_H2O from /opt/xdata/endfb-vii.1-hdf5/neutron/c_H_in_H2O.h5\n",
      " Minimum neutron data temperature: 294 K\n",
      " Maximum neutron data temperature: 294 K\n",
      " Preparing distributed cell instances...\n",
      " Reading plot XML file...\n",
      " Writing summary.h5 file...\n",
      " Maximum neutron transport energy: 20000000 eV for U235\n",
      " Initializing source particles...\n",
      "\n",
      " ====================>     K EIGENVALUE SIMULATION     <====================\n",
      "\n",
      "  Bat./Gen.      k            Average k\n",
      "  =========   ========   ====================\n",
      "        1/1    0.35173\n",
      "        2/1    0.36502\n",
      "        3/1    0.35491\n",
      "        4/1    0.34318\n",
      "        5/1    0.35631\n",
      "        6/1    0.35746\n",
      "        7/1    0.37786\n",
      "        8/1    0.36374\n",
      "        9/1    0.36288\n",
      "       10/1    0.34724\n",
      "       11/1    0.37842\n",
      "       12/1    0.35686    0.36764 +/- 0.01078\n",
      "       13/1    0.36586    0.36705 +/- 0.00625\n",
      "       14/1    0.38163    0.37069 +/- 0.00573\n",
      "       15/1    0.36379    0.36931 +/- 0.00465\n",
      "       16/1    0.34746    0.36567 +/- 0.00526\n",
      "       17/1    0.35918    0.36474 +/- 0.00454\n",
      "       18/1    0.35803    0.36390 +/- 0.00402\n",
      "       19/1    0.36753    0.36431 +/- 0.00357\n",
      "       20/1    0.35781    0.36366 +/- 0.00326\n",
      "       21/1    0.36606    0.36388 +/- 0.00296\n",
      "       22/1    0.36306    0.36381 +/- 0.00270\n",
      "       23/1    0.36629    0.36400 +/- 0.00249\n",
      "       24/1    0.35725    0.36352 +/- 0.00235\n",
      "       25/1    0.37796    0.36448 +/- 0.00239\n",
      "       26/1    0.36084    0.36425 +/- 0.00225\n",
      "       27/1    0.37946    0.36515 +/- 0.00230\n",
      "       28/1    0.34939    0.36427 +/- 0.00234\n",
      "       29/1    0.36121    0.36411 +/- 0.00221\n",
      "       30/1    0.35101    0.36346 +/- 0.00220\n",
      "       31/1    0.37968    0.36423 +/- 0.00223\n",
      "       32/1    0.35858    0.36397 +/- 0.00214\n",
      "       33/1    0.35719    0.36368 +/- 0.00207\n",
      "       34/1    0.34793    0.36302 +/- 0.00209\n",
      "       35/1    0.37562    0.36352 +/- 0.00206\n",
      "       36/1    0.36099    0.36343 +/- 0.00199\n",
      "       37/1    0.36407    0.36345 +/- 0.00191\n",
      "       38/1    0.35250    0.36306 +/- 0.00188\n",
      "       39/1    0.35385    0.36274 +/- 0.00184\n",
      "       40/1    0.35097    0.36235 +/- 0.00182\n",
      "       41/1    0.37230    0.36267 +/- 0.00179\n",
      "       42/1    0.37930    0.36319 +/- 0.00181\n",
      "       43/1    0.37832    0.36365 +/- 0.00182\n",
      "       44/1    0.38054    0.36415 +/- 0.00183\n",
      "       45/1    0.33760    0.36339 +/- 0.00193\n",
      "       46/1    0.37621    0.36374 +/- 0.00191\n",
      "       47/1    0.34406    0.36321 +/- 0.00193\n",
      "       48/1    0.37653    0.36356 +/- 0.00191\n",
      "       49/1    0.36760    0.36366 +/- 0.00187\n",
      "       50/1    0.34601    0.36322 +/- 0.00187\n",
      "       51/1    0.35455    0.36301 +/- 0.00184\n",
      "       52/1    0.36030    0.36295 +/- 0.00180\n",
      "       53/1    0.38191    0.36339 +/- 0.00181\n",
      "       54/1    0.37583    0.36367 +/- 0.00179\n",
      "       55/1    0.36366    0.36367 +/- 0.00175\n",
      "       56/1    0.36773    0.36376 +/- 0.00171\n",
      "       57/1    0.36002    0.36368 +/- 0.00168\n",
      "       58/1    0.36918    0.36379 +/- 0.00165\n",
      "       59/1    0.37454    0.36401 +/- 0.00163\n",
      "       60/1    0.35955    0.36392 +/- 0.00160\n",
      "       61/1    0.36032    0.36385 +/- 0.00157\n",
      "       62/1    0.37326    0.36403 +/- 0.00155\n",
      "       63/1    0.33858    0.36355 +/- 0.00159\n",
      "       64/1    0.36131    0.36351 +/- 0.00156\n",
      "       65/1    0.37634    0.36375 +/- 0.00155\n",
      "       66/1    0.37050    0.36387 +/- 0.00153\n",
      "       67/1    0.37217    0.36401 +/- 0.00151\n",
      "       68/1    0.39157    0.36449 +/- 0.00156\n",
      "       69/1    0.34974    0.36424 +/- 0.00155\n",
      "       70/1    0.35284    0.36405 +/- 0.00154\n",
      "       71/1    0.37423    0.36421 +/- 0.00152\n",
      "       72/1    0.35912    0.36413 +/- 0.00150\n",
      "       73/1    0.35826    0.36404 +/- 0.00148\n",
      "       74/1    0.36163    0.36400 +/- 0.00145\n",
      "       75/1    0.36171    0.36397 +/- 0.00143\n",
      "       76/1    0.37486    0.36413 +/- 0.00142\n",
      "       77/1    0.36262    0.36411 +/- 0.00140\n",
      "       78/1    0.35207    0.36393 +/- 0.00139\n",
      "       79/1    0.36796    0.36399 +/- 0.00137\n",
      "       80/1    0.36640    0.36402 +/- 0.00135\n",
      "       81/1    0.35683    0.36392 +/- 0.00133\n",
      "       82/1    0.38391    0.36420 +/- 0.00135\n",
      "       83/1    0.37263    0.36432 +/- 0.00133\n",
      "       84/1    0.36042    0.36426 +/- 0.00131\n",
      "       85/1    0.36007    0.36421 +/- 0.00130\n",
      "       86/1    0.35953    0.36415 +/- 0.00128\n",
      "       87/1    0.34086    0.36384 +/- 0.00130\n",
      "       88/1    0.35357    0.36371 +/- 0.00129\n",
      "       89/1    0.35365    0.36358 +/- 0.00128\n",
      "       90/1    0.35128    0.36343 +/- 0.00127\n",
      "       91/1    0.36983    0.36351 +/- 0.00126\n",
      "       92/1    0.36536    0.36353 +/- 0.00125\n",
      "       93/1    0.35105    0.36338 +/- 0.00124\n",
      "       94/1    0.35824    0.36332 +/- 0.00123\n",
      "       95/1    0.34845    0.36315 +/- 0.00122\n",
      "       96/1    0.36683    0.36319 +/- 0.00121\n",
      "       97/1    0.38060    0.36339 +/- 0.00121\n",
      "       98/1    0.36506    0.36341 +/- 0.00120\n",
      "       99/1    0.36553    0.36343 +/- 0.00119\n",
      "      100/1    0.36756    0.36348 +/- 0.00117\n",
      " Creating state point statepoint.100.h5...\n",
      "\n",
      " =======================>     TIMING STATISTICS     <=======================\n",
      "\n",
      " Total time for initialization     = 4.5971e+00 seconds\n",
      "   Reading cross sections          = 4.5592e+00 seconds\n",
      " Total time in simulation          = 1.3315e+01 seconds\n",
      "   Time in transport only          = 1.3242e+01 seconds\n",
      "   Time in inactive batches        = 1.2438e+00 seconds\n",
      "   Time in active batches          = 1.2071e+01 seconds\n",
      "   Time synchronizing fission bank = 4.0056e-02 seconds\n",
      "     Sampling source sites         = 3.5185e-02 seconds\n",
      "     SEND/RECV source sites        = 4.6822e-03 seconds\n",
      "   Time accumulating tallies       = 9.8531e-05 seconds\n",
      "   Time writing statepoints        = 4.2827e-03 seconds\n",
      " Total time for finalization       = 1.0640e-06 seconds\n",
      " Total time elapsed                = 1.7949e+01 seconds\n",
      " Calculation Rate (inactive)       = 40200.5 particles/second\n",
      " Calculation Rate (active)         = 37278 particles/second\n",
      "\n",
      " ============================>     RESULTS     <============================\n",
      "\n",
      " k-effective (Collision)     = 0.36292 +/- 0.00119\n",
      " k-effective (Track-length)  = 0.36348 +/- 0.00117\n",
      " k-effective (Absorption)    = 0.36355 +/- 0.00123\n",
      " Combined k-effective        = 0.36348 +/- 0.00105\n",
      " Leakage Fraction            = 0.27374 +/- 0.00060\n",
      "\n"
     ]
    }
   ],
   "source": [
    "openmc.run()"
   ]
  }
 ],
 "metadata": {
  "colab": {
   "name": "VVER.ipynb",
   "provenance": []
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
