{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Pre-requisites\n", "\n", "This Notebook requires the following to be installed on one's machine:\n", "\n", "* **openmc**\n", "* **beavrs**\n", "\n", "**NOTE**: You can install the `beavrs` Python module by running the following in the terminal:\n", "\n", "```\n", "$ python setup.py install --user\n", "```" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import openmc\n", "import beavrs.builder\n", "from beavrs.constants import Constants\n", "from IPython.display import Image\n", "\n", "c = Constants(150,0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create BEAVRS Model" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Cannot have a negative S position. S set to 0\n", "Cannot have a negative SS position. SS set to 0\n", " RCCA Positions\n", " A: 228 B: 228 C: 228 D: 228\n", " SA: 228 SB: 228 SC: 228 SD: 228 SE: 228\n" ] } ], "source": [ "# Instantiate a BEAVRS object from the mit-crpg/PWR_benchmarks repository\n", "b = beavrs.builder.BEAVRS(0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The BEAVRS model represented by variable `b` encapsulates the fully-detailed 3D BEAVRS core geometry and materials built using the OpenMC Python API." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create \"geometry.xml\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We wish to extract a fuel pin from the BEAVRS `Geometry` object for our simulation." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# User-specified enrichment of 1.6, 2.4 or 3.1 percent\n", "enrichment = 1.6" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Extract fuel pin of interest from BEAVRS model\n", "pin_name = 'Fuel rod active region - {}% enr'.format(enrichment)\n", "pin = b.openmc_geometry.get_universes_by_name(pin_name)[0]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can inspect our chosen fuel pin using OpenMC's built-in string representation for the object:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "Universe\n", "\tID =\t8\n", "\tName =\tFuel rod active region - 1.6% enr\n", "\tGeom =\tCSG\n", "\tCells =\t[52, 53, 54]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pin" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{52: Cell\n", "\tID =\t52\n", "\tName =\tFuel rod active region - 1.6% enr radial 0: Fuel 1.6%\n", "\tFill =\tMaterial 9\n", "\tRegion =\t-35\n", "\tRotation =\tNone\n", "\tTemperature =\tNone\n", "\tTranslation =\tNone\n", "\tVolume =\tNone\n", ", 53: Cell\n", "\tID =\t53\n", "\tName =\tFuel rod active region - 1.6% enr radial 1: Helium\n", "\tFill =\tMaterial 5\n", "\tRegion =\t(35 -36)\n", "\tRotation =\tNone\n", "\tTemperature =\tNone\n", "\tTranslation =\tNone\n", "\tVolume =\tNone\n", ", 54: Cell\n", "\tID =\t54\n", "\tName =\tFuel rod active region - 1.6% enr radial outer: Zircaloy 4\n", "\tFill =\tMaterial 7\n", "\tRegion =\t36\n", "\tRotation =\tNone\n", "\tTemperature =\tNone\n", "\tTranslation =\tNone\n", "\tVolume =\tNone\n", "}\n" ] } ], "source": [ "print(pin.cells)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We need to wrap the fuel region with water to make a complete fuel pin:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "# Create surface as the boundary of clad and cell pitches\n", "fuel_clad_OR = openmc.ZCylinder(name='Fuel clad OR', r=c.cladOR)\n", "pin_sides = openmc.model.RectangularPrism(c.pinPitch, c.pinPitch,\n", " boundary_type='reflective')\n", "# Create a cell filled by the fuel pin\n", "fuel_cell = openmc.Cell(name='Fuel cell',\n", " fill=pin,\n", " region=-fuel_clad_OR\n", " )\n", "water_cell = openmc.Cell(name='Water',\n", " fill=b.mats['Borated Water'],\n", " region=+fuel_clad_OR & -pin_sides\n", " )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Then we construct a sub-geometry encapsulating only this fuel pin. We will do this by first creating a \"root\" universe and add our cells to it:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Create a \"root\" universe with ID=0 and add the \"root\" cell to it\n", "root_univ = openmc.Universe(name='root universe', cells=[fuel_cell, water_cell])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Lastly, the \"root\" universe must be attached to a new OpenMC `Geometry` object representing this new sub-geometry:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Create an OpenMC Geometry around root Universe\n", "sub_geometry = openmc.Geometry(root_univ)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, we are ready to create a \"geometry.xml\" input file for OpenMC! We simply export it to XML as follows:" ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Export the OpenMC Geometry to a \"geometry.xml\" file\n", "sub_geometry.export_to_xml()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create \"materials.xml\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we need to create materials for our geometry. This is very easy to do with the `b.write_openmc_materials()` routine. The one disadvantage of this is that it will write *all* materials for the entire BEAVRS geometry to a \"materials.xml\" file, most of which are not used in our sub-geometry for a single fuel pin. Instead, we can write out only those materials that are in our geometry as follows:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Get a list of all OpenMC Materials\n", "all_materials = sub_geometry.get_all_materials()\n", "\n", "# Create a MaterialsFile object\n", "materials = openmc.Materials(all_materials.values())\n", "\n", "# Export the OpenMC Materials to a \"materials.xml\" file\n", "materials.export_to_xml()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create \"settings.xml\" " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now for the easy part :-) Let's create a \"settings.xml\" file:" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Create a MaterialsFile object\n", "settings = openmc.Settings()\n", "\n", "# Set any settings of interest\n", "settings.batches = 150\n", "settings.inactive = 10\n", "settings.particles = 1000\n", "\n", "# Use a bounding box to define the starting source distribution\n", "lower_left = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_bot]\n", "upper_right = [c.pinPitch/2, c.pinPitch/2, c.fuel_ActiveFuel_top]\n", "settings.source = openmc.source.IndependentSource(space=openmc.stats.Point((0, 0, 0)))\n", "\n", "# Export the settings to a \"settings.xml\" file\n", "settings.export_to_xml()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create \"plots.xml\"" ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Create a single plot using default paramters (basis='xy', origin=(0,0,0))\n", "plot = openmc.Plot(plot_id=1)\n", "plot.width = [c.pinPitch, c.pinPitch]\n", "\n", "# Create a PlotsFile object and add our plot to it\n", "plot_file = openmc.Plots([plot])\n", "\n", "# Export the plots to a \"plots.xml\" file\n", "plot_file.export_to_xml()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "With the \"plots.xml\" file, we can now generate and view the plot. We must first instantiate an `openmc.Executor` object and then ask it to plot the geometry(equivalent to running `openmc -p` from within the terminal)." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Run openmc in plotting mode\n", "openmc.plot_geometry(output=False)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "OpenMC outputs plots in .ppm format, which can be converted into a compressed format like .png with the convert utility. We can view the .png image inline using the `IPython.display.Image` class as follows:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZAAAAGQCAIAAAAP3aGbA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IAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMQQLiCFYQAzBAmIIFhBDsIAYggXEECwghmABMf4fbqL8EoliUssAAAAASUVORK5CYII=", "text/plain": [ "" ] }, "execution_count": 15, "metadata": { "image/png": { "height": 250, "width": 250 } }, "output_type": "execute_result" } ], "source": [ "# Display the plot inline\n", "Image(filename='plot_1.png', width=250, height=250)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Create \"tallies.xml\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Perhaps you'd like a tally in one of the cells. First, we need to extract the cell(s) of interest:" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "all_material_cells = sub_geometry.get_all_material_cells()\n", "\n", "cell_name = 'Fuel rod active region - 1.6% enr radial 0: Fuel 1.6%'\n", "for id, cell in all_material_cells.items():\n", " if cell.name == cell_name:\n", " my_cell = cell" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's tally the fast/thermal scatter and absorption rates for all nuclides in our cell. We create a `Tally` to do so as follows:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "# Instantiate a really cool tally\n", "tally = openmc.Tally(name='a really cool tally')\n", "\n", "# Instantiate a cell filter\n", "cell_filter = openmc.CellFilter(bins=[my_cell.id])\n", "\n", "# Instantiate energy filter\n", "energy_filter = openmc.EnergyFilter([0., 0.625e-6, 20.])\n", "\n", "tally.filters = [cell_filter, energy_filter]\n", "\n", "# Add the scores of interest to the tally\n", "tally.scores = ['scatter', 'absorption']\n", "\n", "# Add all nuclides to the tally for kicks\n", "tally.nuclides = my_cell.fill.get_nuclides()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Next, we simply need to add our `Tally` object(s) to a `TalliesFile` object and export them to a \"tallies.xml\" file:" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Instantiate an empty TalliesFile\n", "tallies_file = openmc.Tallies()\n", "\n", "# Add our tally(ies) to the file\n", "tallies_file.append(tally)\n", "\n", "# Export the tallies to a \"tallies.xml\" file\n", "tallies_file.export_to_xml()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Run OpenMC!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can run OpenMC from within the notebook if we wish. Wow, isn't this so much more powerful than ASCII!" ] }, { "cell_type": "code", "execution_count": 19, "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-2023 MIT, UChicago Argonne LLC, and contributors\n", " License | https://docs.openmc.org/en/latest/license.html\n", " Version | 0.14.0\n", " Git SHA1 | e1a8ee7794b441c992426f17fafe216391cbba83\n", " Date/Time | 2024-02-02 00:48:52\n", " MPI Processes | 2\n", " OpenMP Threads | 2\n", "\n", " Reading settings XML file...\n", " Reading cross sections XML file...\n", " Reading materials XML file...\n", " Reading geometry XML file...\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 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 Cr50 from /opt/xdata/endfb-vii.1-hdf5/neutron/Cr50.h5\n", " Reading Cr52 from /opt/xdata/endfb-vii.1-hdf5/neutron/Cr52.h5\n", " Reading Cr53 from /opt/xdata/endfb-vii.1-hdf5/neutron/Cr53.h5\n", " Reading Cr54 from /opt/xdata/endfb-vii.1-hdf5/neutron/Cr54.h5\n", " Reading Fe54 from /opt/xdata/endfb-vii.1-hdf5/neutron/Fe54.h5\n", " Reading Fe56 from /opt/xdata/endfb-vii.1-hdf5/neutron/Fe56.h5\n", " Reading Fe57 from /opt/xdata/endfb-vii.1-hdf5/neutron/Fe57.h5\n", " Reading Fe58 from /opt/xdata/endfb-vii.1-hdf5/neutron/Fe58.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 Sn112 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn112.h5\n", " Reading Sn114 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn114.h5\n", " Reading Sn115 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn115.h5\n", " Reading Sn116 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn116.h5\n", " Reading Sn117 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn117.h5\n", " Reading Sn118 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn118.h5\n", " Reading Sn119 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn119.h5\n", " Reading Sn120 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn120.h5\n", " Reading Sn122 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn122.h5\n", " Reading Sn124 from /opt/xdata/endfb-vii.1-hdf5/neutron/Sn124.h5\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 B10 from /opt/xdata/endfb-vii.1-hdf5/neutron/B10.h5\n", " Reading B11 from /opt/xdata/endfb-vii.1-hdf5/neutron/B11.h5\n", " Reading H1 from /opt/xdata/endfb-vii.1-hdf5/neutron/H1.h5\n", " Reading H2 from /opt/xdata/endfb-vii.1-hdf5/neutron/H2.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", " Reading tallies XML file...\n", " Preparing distributed cell instances...\n", " Reading plot XML file...\n", " Writing summary.h5 file...\n", " Maximum neutron transport energy: 20000000 eV for He3\n", " Initializing source particles...\n", "\n", " ====================> K EIGENVALUE SIMULATION <====================\n", "\n", " Bat./Gen. k Average k\n", " ========= ======== ====================\n", " 1/1 1.02645\n", " 2/1 0.99765\n", " 3/1 1.01443\n", " 4/1 0.99315\n", " 5/1 1.00349\n", " 6/1 1.04760\n", " 7/1 0.97568\n", " 8/1 1.01985\n", " 9/1 1.02142\n", " 10/1 1.06754\n", " 11/1 1.00976\n", " 12/1 1.01636 1.01306 +/- 0.00330\n", " 13/1 0.99644 1.00752 +/- 0.00586\n", " 14/1 1.06645 1.02225 +/- 0.01530\n", " 15/1 0.96294 1.01039 +/- 0.01677\n", " 16/1 1.01583 1.01130 +/- 0.01372\n", " 17/1 1.00515 1.01042 +/- 0.01163\n", " 18/1 1.00582 1.00984 +/- 0.01009\n", " 19/1 1.04966 1.01427 +/- 0.00994\n", " 20/1 0.99010 1.01185 +/- 0.00921\n", " 21/1 1.02895 1.01341 +/- 0.00848\n", " 22/1 1.03273 1.01502 +/- 0.00790\n", " 23/1 1.00194 1.01401 +/- 0.00734\n", " 24/1 1.05051 1.01662 +/- 0.00728\n", " 25/1 1.06279 1.01970 +/- 0.00744\n", " 26/1 1.03726 1.02079 +/- 0.00705\n", " 27/1 1.02463 1.02102 +/- 0.00662\n", " 28/1 1.03113 1.02158 +/- 0.00627\n", " 29/1 1.03525 1.02230 +/- 0.00597\n", " 30/1 1.00092 1.02123 +/- 0.00577\n", " 31/1 1.06995 1.02355 +/- 0.00596\n", " 32/1 1.02330 1.02354 +/- 0.00568\n", " 33/1 1.05108 1.02474 +/- 0.00556\n", " 34/1 1.03009 1.02496 +/- 0.00533\n", " 35/1 1.02828 1.02509 +/- 0.00511\n", " 36/1 1.07762 1.02711 +/- 0.00531\n", " 37/1 1.01539 1.02668 +/- 0.00513\n", " 38/1 1.03572 1.02700 +/- 0.00495\n", " 39/1 1.01042 1.02643 +/- 0.00481\n", " 40/1 1.03149 1.02660 +/- 0.00465\n", " 41/1 0.99594 1.02561 +/- 0.00461\n", " 42/1 1.04728 1.02629 +/- 0.00451\n", " 43/1 1.05021 1.02701 +/- 0.00443\n", " 44/1 1.13894 1.03030 +/- 0.00541\n", " 45/1 1.02891 1.03026 +/- 0.00526\n", " 46/1 0.95904 1.02829 +/- 0.00548\n", " 47/1 1.02866 1.02830 +/- 0.00533\n", " 48/1 1.01773 1.02802 +/- 0.00519\n", " 49/1 1.00524 1.02743 +/- 0.00509\n", " 50/1 1.06765 1.02844 +/- 0.00507\n", " 51/1 1.02869 1.02845 +/- 0.00494\n", " 52/1 0.98567 1.02743 +/- 0.00493\n", " 53/1 1.04195 1.02777 +/- 0.00482\n", " 54/1 0.98990 1.02690 +/- 0.00479\n", " 55/1 1.05027 1.02742 +/- 0.00471\n", " 56/1 1.01671 1.02719 +/- 0.00461\n", " 57/1 1.01896 1.02702 +/- 0.00452\n", " 58/1 1.02964 1.02707 +/- 0.00442\n", " 59/1 1.06027 1.02775 +/- 0.00438\n", " 60/1 0.94151 1.02602 +/- 0.00463\n", " 61/1 1.04427 1.02638 +/- 0.00455\n", " 62/1 1.00755 1.02602 +/- 0.00448\n", " 63/1 1.03042 1.02610 +/- 0.00439\n", " 64/1 1.06065 1.02674 +/- 0.00436\n", " 65/1 1.09489 1.02798 +/- 0.00445\n", " 66/1 0.94093 1.02643 +/- 0.00464\n", " 67/1 1.02360 1.02638 +/- 0.00456\n", " 68/1 1.05913 1.02694 +/- 0.00452\n", " 69/1 1.03014 1.02700 +/- 0.00444\n", " 70/1 1.06483 1.02763 +/- 0.00441\n", " 71/1 1.06306 1.02821 +/- 0.00438\n", " 72/1 0.95143 1.02697 +/- 0.00448\n", " 73/1 1.02068 1.02687 +/- 0.00441\n", " 74/1 0.99676 1.02640 +/- 0.00436\n", " 75/1 1.05533 1.02684 +/- 0.00432\n", " 76/1 0.97821 1.02611 +/- 0.00432\n", " 77/1 1.10001 1.02721 +/- 0.00439\n", " 78/1 1.01191 1.02698 +/- 0.00433\n", " 79/1 1.07679 1.02771 +/- 0.00433\n", " 80/1 0.99926 1.02730 +/- 0.00429\n", " 81/1 1.01963 1.02719 +/- 0.00423\n", " 82/1 1.03189 1.02726 +/- 0.00417\n", " 83/1 1.04160 1.02745 +/- 0.00412\n", " 84/1 1.00441 1.02714 +/- 0.00407\n", " 85/1 0.97796 1.02649 +/- 0.00407\n", " 86/1 0.97930 1.02587 +/- 0.00407\n", " 87/1 1.01974 1.02579 +/- 0.00401\n", " 88/1 1.07295 1.02639 +/- 0.00401\n", " 89/1 1.04861 1.02667 +/- 0.00397\n", " 90/1 1.03532 1.02678 +/- 0.00392\n", " 91/1 0.97870 1.02619 +/- 0.00391\n", " 92/1 1.00144 1.02588 +/- 0.00388\n", " 93/1 1.03796 1.02603 +/- 0.00383\n", " 94/1 1.00525 1.02578 +/- 0.00380\n", " 95/1 1.04720 1.02603 +/- 0.00376\n", " 96/1 1.02944 1.02607 +/- 0.00372\n", " 97/1 1.07814 1.02667 +/- 0.00372\n", " 98/1 0.98386 1.02619 +/- 0.00371\n", " 99/1 0.99942 1.02589 +/- 0.00368\n", " 100/1 1.06482 1.02632 +/- 0.00367\n", " 101/1 1.05862 1.02667 +/- 0.00364\n", " 102/1 1.02241 1.02663 +/- 0.00360\n", " 103/1 1.03319 1.02670 +/- 0.00356\n", " 104/1 1.06903 1.02715 +/- 0.00356\n", " 105/1 1.05246 1.02741 +/- 0.00353\n", " 106/1 1.00136 1.02714 +/- 0.00350\n", " 107/1 1.05601 1.02744 +/- 0.00348\n", " 108/1 0.96755 1.02683 +/- 0.00350\n", " 109/1 1.06354 1.02720 +/- 0.00348\n", " 110/1 1.06919 1.02762 +/- 0.00347\n", " 111/1 1.04993 1.02784 +/- 0.00344\n", " 112/1 1.08810 1.02843 +/- 0.00346\n", " 113/1 1.05241 1.02866 +/- 0.00343\n", " 114/1 0.97746 1.02817 +/- 0.00344\n", " 115/1 0.98790 1.02779 +/- 0.00343\n", " 116/1 1.08795 1.02836 +/- 0.00344\n", " 117/1 1.02201 1.02830 +/- 0.00341\n", " 118/1 0.97152 1.02777 +/- 0.00342\n", " 119/1 0.98537 1.02738 +/- 0.00341\n", " 120/1 1.03938 1.02749 +/- 0.00338\n", " 121/1 1.02718 1.02749 +/- 0.00335\n", " 122/1 1.03585 1.02756 +/- 0.00332\n", " 123/1 1.02970 1.02758 +/- 0.00329\n", " 124/1 1.05110 1.02779 +/- 0.00327\n", " 125/1 0.96037 1.02720 +/- 0.00329\n", " 126/1 0.97982 1.02679 +/- 0.00329\n", " 127/1 1.06303 1.02710 +/- 0.00327\n", " 128/1 1.06496 1.02742 +/- 0.00326\n", " 129/1 1.07217 1.02780 +/- 0.00326\n", " 130/1 1.06084 1.02808 +/- 0.00324\n", " 131/1 1.03487 1.02813 +/- 0.00321\n", " 132/1 0.97656 1.02771 +/- 0.00322\n", " 133/1 1.00767 1.02755 +/- 0.00319\n", " 134/1 0.98553 1.02721 +/- 0.00319\n", " 135/1 1.00056 1.02699 +/- 0.00317\n", " 136/1 1.04770 1.02716 +/- 0.00315\n", " 137/1 1.00243 1.02696 +/- 0.00313\n", " 138/1 1.04823 1.02713 +/- 0.00311\n", " 139/1 0.96607 1.02666 +/- 0.00312\n", " 140/1 1.05028 1.02684 +/- 0.00310\n", " 141/1 1.02018 1.02679 +/- 0.00308\n", " 142/1 1.05010 1.02696 +/- 0.00306\n", " 143/1 0.94602 1.02635 +/- 0.00310\n", " 144/1 0.99193 1.02610 +/- 0.00308\n", " 145/1 1.08497 1.02653 +/- 0.00309\n", " 146/1 1.08954 1.02700 +/- 0.00310\n", " 147/1 1.01307 1.02690 +/- 0.00308\n", " 148/1 1.05130 1.02707 +/- 0.00307\n", " 149/1 0.96176 1.02660 +/- 0.00308\n", " 150/1 1.06671 1.02689 +/- 0.00307\n", " Creating state point statepoint.150.h5...\n", "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", " Total time for initialization = 2.3583e+00 seconds\n", " Reading cross sections = 2.3309e+00 seconds\n", " Total time in simulation = 1.0739e+01 seconds\n", " Time in transport only = 1.0461e+01 seconds\n", " Time in inactive batches = 6.4227e-01 seconds\n", " Time in active batches = 1.0096e+01 seconds\n", " Time synchronizing fission bank = 2.4140e-01 seconds\n", " Sampling source sites = 6.2924e-03 seconds\n", " SEND/RECV source sites = 1.6094e-03 seconds\n", " Time accumulating tallies = 1.4377e-02 seconds\n", " Time writing statepoints = 9.8511e-03 seconds\n", " Total time for finalization = 1.9690e-04 seconds\n", " Total time elapsed = 1.3108e+01 seconds\n", " Calculation Rate (inactive) = 15569.8 particles/second\n", " Calculation Rate (active) = 13866.5 particles/second\n", "\n", " ============================> RESULTS <============================\n", "\n", " k-effective (Collision) = 1.03023 +/- 0.00292\n", " k-effective (Track-length) = 1.02689 +/- 0.00307\n", " k-effective (Absorption) = 1.03192 +/- 0.00284\n", " Combined k-effective = 1.03033 +/- 0.00237\n", " Leakage Fraction = 0.00000 +/- 0.00000\n", "\n" ] } ], "source": [ "# Run OpenMC with 2 MPI processes\n", "openmc.run(mpi_args=['mpiexec', '-n', '2'], threads=2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analyze Tally Data" ] }, { "cell_type": "code", "execution_count": 20, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Instantiate a StatePoint object\n", "from openmc.statepoint import StatePoint\n", "filename = 'statepoint.{}.h5'.format(settings.batches)\n", "sp = StatePoint(filename)" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{1: Tally\n", " \tID =\t1\n", " \tName =\ta really cool tally\n", " \tFilters =\tCellFilter, EnergyFilter\n", " \tNuclides =\tO16 O17 U234 U235 U238 U236\n", " \tScores =\t['scatter', 'absorption']\n", " \tEstimator =\ttracklength\n", " \tMultiply dens. =\tTrue}" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Inspect the StatePoint's tallies\n", "sp.tallies" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
cellenergy low [eV]energy high [eV]nuclidescoremeanstd. dev.
0520.000000e+006.250000e-07O16scatter0.0000000.000000e+00
1520.000000e+006.250000e-07O16absorption0.0000000.000000e+00
2520.000000e+006.250000e-07O17scatter0.0000000.000000e+00
3520.000000e+006.250000e-07O17absorption0.0000000.000000e+00
4520.000000e+006.250000e-07U234scatter0.0000000.000000e+00
5520.000000e+006.250000e-07U234absorption0.0000000.000000e+00
6520.000000e+006.250000e-07U235scatter0.0000000.000000e+00
7520.000000e+006.250000e-07U235absorption0.0000000.000000e+00
8520.000000e+006.250000e-07U238scatter0.0000000.000000e+00
9520.000000e+006.250000e-07U238absorption0.0000000.000000e+00
10520.000000e+006.250000e-07U236scatter0.0000000.000000e+00
11520.000000e+006.250000e-07U236absorption0.0000000.000000e+00
12526.250000e-072.000000e+01O16scatter0.6725401.885498e-03
13526.250000e-072.000000e+01O16absorption0.0000165.425475e-08
14526.250000e-072.000000e+01O17scatter0.0002476.935285e-07
15526.250000e-072.000000e+01O17absorption0.0000082.583810e-08
16526.250000e-072.000000e+01U234scatter0.0002592.090607e-06
17526.250000e-072.000000e+01U234absorption0.0011291.535991e-05
18526.250000e-072.000000e+01U235scatter0.0195625.609057e-05
19526.250000e-072.000000e+01U235absorption0.4361951.511962e-03
20526.250000e-072.000000e+01U238scatter0.7736172.185517e-03
21526.250000e-072.000000e+01U238absorption0.1647957.169391e-04
22526.250000e-072.000000e+01U236scatter0.0000704.220446e-07
23526.250000e-072.000000e+01U236absorption0.0001664.473711e-06
\n", "
" ], "text/plain": [ " cell energy low [eV] energy high [eV] nuclide score mean \\\n", "0 52 0.00e+00 6.25e-07 O16 scatter 0.00e+00 \n", "1 52 0.00e+00 6.25e-07 O16 absorption 0.00e+00 \n", "2 52 0.00e+00 6.25e-07 O17 scatter 0.00e+00 \n", "3 52 0.00e+00 6.25e-07 O17 absorption 0.00e+00 \n", "4 52 0.00e+00 6.25e-07 U234 scatter 0.00e+00 \n", "5 52 0.00e+00 6.25e-07 U234 absorption 0.00e+00 \n", "6 52 0.00e+00 6.25e-07 U235 scatter 0.00e+00 \n", "7 52 0.00e+00 6.25e-07 U235 absorption 0.00e+00 \n", "8 52 0.00e+00 6.25e-07 U238 scatter 0.00e+00 \n", "9 52 0.00e+00 6.25e-07 U238 absorption 0.00e+00 \n", "10 52 0.00e+00 6.25e-07 U236 scatter 0.00e+00 \n", "11 52 0.00e+00 6.25e-07 U236 absorption 0.00e+00 \n", "12 52 6.25e-07 2.00e+01 O16 scatter 6.73e-01 \n", "13 52 6.25e-07 2.00e+01 O16 absorption 1.58e-05 \n", "14 52 6.25e-07 2.00e+01 O17 scatter 2.47e-04 \n", "15 52 6.25e-07 2.00e+01 O17 absorption 7.50e-06 \n", "16 52 6.25e-07 2.00e+01 U234 scatter 2.59e-04 \n", "17 52 6.25e-07 2.00e+01 U234 absorption 1.13e-03 \n", "18 52 6.25e-07 2.00e+01 U235 scatter 1.96e-02 \n", "19 52 6.25e-07 2.00e+01 U235 absorption 4.36e-01 \n", "20 52 6.25e-07 2.00e+01 U238 scatter 7.74e-01 \n", "21 52 6.25e-07 2.00e+01 U238 absorption 1.65e-01 \n", "22 52 6.25e-07 2.00e+01 U236 scatter 6.99e-05 \n", "23 52 6.25e-07 2.00e+01 U236 absorption 1.66e-04 \n", "\n", " std. dev. \n", "0 0.00e+00 \n", "1 0.00e+00 \n", "2 0.00e+00 \n", "3 0.00e+00 \n", "4 0.00e+00 \n", "5 0.00e+00 \n", "6 0.00e+00 \n", "7 0.00e+00 \n", "8 0.00e+00 \n", "9 0.00e+00 \n", "10 0.00e+00 \n", "11 0.00e+00 \n", "12 1.89e-03 \n", "13 5.43e-08 \n", "14 6.94e-07 \n", "15 2.58e-08 \n", "16 2.09e-06 \n", "17 1.54e-05 \n", "18 5.61e-05 \n", "19 1.51e-03 \n", "20 2.19e-03 \n", "21 7.17e-04 \n", "22 4.22e-07 \n", "23 4.47e-06 " ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Get a Pandas DataFrame of the tally data\n", "tally = sp.get_tally(name='a really cool tally')\n", "tally.get_pandas_dataframe()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And I'll leave it up to you at this point :-)" ] } ], "metadata": { "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.12.1" } }, "nbformat": 4, "nbformat_minor": 1 }