From 9686543fa0890dd2a923fdc7ffa546afc54e9b6b Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Tue, 5 Jul 2016 18:38:56 -0400 Subject: [PATCH 01/16] implemented mesh domain in mgxs --- .../pythonapi/examples/mgxs-part-i.ipynb | 586 +++++++----------- openmc/__init__.py | 2 +- openmc/mgxs/mgxs.py | 348 +++++++---- openmc/tallies.py | 2 +- 4 files changed, 468 insertions(+), 470 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index ded04e4790..ff242885e6 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -326,7 +326,7 @@ "# OpenMC simulation parameters\n", "batches = 50\n", "inactive = 10\n", - "particles = 2500\n", + "particles = 1000\n", "\n", "# Instantiate a Settings object\n", "settings_file = openmc.Settings()\n", @@ -398,10 +398,17 @@ }, "outputs": [], "source": [ + "# Instantiate a tally Mesh\n", + "mesh = openmc.Mesh(name='mesh')\n", + "mesh.type = 'regular'\n", + "mesh.dimension = [2, 2]\n", + "mesh.lower_left = [-0.63, -0.63]\n", + "mesh.upper_right = [+0.63, +0.63]\n", + "\n", "# Instantiate a few different sections\n", - "total = mgxs.TotalXS(domain=cell, groups=groups)\n", - "absorption = mgxs.AbsorptionXS(domain=cell, groups=groups)\n", - "scattering = mgxs.ScatterXS(domain=cell, groups=groups)" + "total = mgxs.TotalXS(domain=mesh, groups=groups)\n", + "absorption = mgxs.AbsorptionXS(domain=mesh, groups=groups)\n", + "scattering = mgxs.ScatterXS(domain=mesh, groups=groups)" ] }, { @@ -422,24 +429,22 @@ "data": { "text/plain": [ "OrderedDict([('flux', Tally\n", - "\tID =\t10000\n", - "\tName =\t\n", - "\tFilters =\t\n", - " \t\tcell\t[1]\n", - " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", - "\tNuclides =\ttotal \n", - "\tScores =\t['flux']\n", - "\tEstimator =\ttracklength\n", - "), ('absorption', Tally\n", - "\tID =\t10001\n", - "\tName =\t\n", - "\tFilters =\t\n", - " \t\tcell\t[1]\n", - " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", - "\tNuclides =\ttotal \n", - "\tScores =\t['absorption']\n", - "\tEstimator =\ttracklength\n", - ")])" + " \tID =\t10000\n", + " \tName =\t\n", + " \tFilters =\t\n", + " \t\tmesh\t[10000]\n", + " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", + " \tNuclides =\ttotal \n", + " \tScores =\t['flux']\n", + " \tEstimator =\ttracklength), ('absorption', Tally\n", + " \tID =\t10001\n", + " \tName =\t\n", + " \tFilters =\t\n", + " \t\tmesh\t[10000]\n", + " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", + " \tNuclides =\ttotal \n", + " \tScores =\t['absorption']\n", + " \tEstimator =\ttracklength)])" ] }, "execution_count": 13, @@ -516,9 +521,9 @@ " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", " Version: 0.7.1\n", - " Git SHA1: 19feb55e6d5e8350398627f39fb55ee8e2e63011\n", - " Date/Time: 2016-05-13 10:19:16\n", - " MPI Processes: 1\n", + " Git SHA1: 736d7aa5ba3bcd1a8a1614ce4b6769babcb1d8ca\n", + " Date/Time: 2016-07-05 16:23:08\n", + " MPI Processes: 4\n", "\n", " ===========================================================================\n", " ========================> INITIALIZATION <=========================\n", @@ -544,56 +549,56 @@ "\n", " Bat./Gen. k Average k \n", " ========= ======== ==================== \n", - " 1/1 1.11184 \n", - " 2/1 1.15820 \n", - " 3/1 1.18468 \n", - " 4/1 1.17492 \n", - " 5/1 1.19645 \n", - " 6/1 1.18436 \n", - " 7/1 1.14070 \n", - " 8/1 1.15150 \n", - " 9/1 1.19202 \n", - " 10/1 1.17677 \n", - " 11/1 1.20272 \n", - " 12/1 1.21366 1.20819 +/- 0.00547\n", - " 13/1 1.15906 1.19181 +/- 0.01668\n", - " 14/1 1.14687 1.18058 +/- 0.01629\n", - " 15/1 1.14570 1.17360 +/- 0.01442\n", - " 16/1 1.13480 1.16713 +/- 0.01343\n", - " 17/1 1.17680 1.16852 +/- 0.01144\n", - " 18/1 1.16866 1.16853 +/- 0.00990\n", - " 19/1 1.19253 1.17120 +/- 0.00913\n", - " 20/1 1.18124 1.17220 +/- 0.00823\n", - " 21/1 1.19206 1.17401 +/- 0.00766\n", - " 22/1 1.17681 1.17424 +/- 0.00700\n", - " 23/1 1.17634 1.17440 +/- 0.00644\n", - " 24/1 1.13659 1.17170 +/- 0.00654\n", - " 25/1 1.17144 1.17169 +/- 0.00609\n", - " 26/1 1.20649 1.17386 +/- 0.00610\n", - " 27/1 1.11238 1.17024 +/- 0.00678\n", - " 28/1 1.18911 1.17129 +/- 0.00647\n", - " 29/1 1.14681 1.17000 +/- 0.00626\n", - " 30/1 1.12152 1.16758 +/- 0.00641\n", - " 31/1 1.12729 1.16566 +/- 0.00639\n", - " 32/1 1.15399 1.16513 +/- 0.00612\n", - " 33/1 1.13547 1.16384 +/- 0.00599\n", - " 34/1 1.17723 1.16440 +/- 0.00576\n", - " 35/1 1.09296 1.16154 +/- 0.00622\n", - " 36/1 1.19621 1.16287 +/- 0.00612\n", - " 37/1 1.12560 1.16149 +/- 0.00605\n", - " 38/1 1.17872 1.16211 +/- 0.00586\n", - " 39/1 1.17721 1.16263 +/- 0.00568\n", - " 40/1 1.13724 1.16178 +/- 0.00555\n", - " 41/1 1.18526 1.16254 +/- 0.00542\n", - " 42/1 1.13779 1.16177 +/- 0.00531\n", - " 43/1 1.15066 1.16143 +/- 0.00516\n", - " 44/1 1.12174 1.16026 +/- 0.00514\n", - " 45/1 1.17479 1.16068 +/- 0.00501\n", - " 46/1 1.14146 1.16014 +/- 0.00489\n", - " 47/1 1.20464 1.16135 +/- 0.00491\n", - " 48/1 1.15119 1.16108 +/- 0.00479\n", - " 49/1 1.17938 1.16155 +/- 0.00468\n", - " 50/1 1.15798 1.16146 +/- 0.00457\n", + " 1/1 1.07993 \n", + " 2/1 1.23691 \n", + " 3/1 1.17407 \n", + " 4/1 1.08258 \n", + " 5/1 1.21012 \n", + " 6/1 1.23825 \n", + " 7/1 1.18016 \n", + " 8/1 1.20989 \n", + " 9/1 1.15475 \n", + " 10/1 1.13462 \n", + " 11/1 1.12749 \n", + " 12/1 1.09502 1.11125 +/- 0.01623\n", + " 13/1 1.24722 1.15657 +/- 0.04628\n", + " 14/1 1.14700 1.15418 +/- 0.03281\n", + " 15/1 1.13889 1.15112 +/- 0.02560\n", + " 16/1 1.19008 1.15762 +/- 0.02189\n", + " 17/1 1.11320 1.15127 +/- 0.01956\n", + " 18/1 1.12093 1.14748 +/- 0.01736\n", + " 19/1 1.13809 1.14643 +/- 0.01534\n", + " 20/1 1.09886 1.14168 +/- 0.01452\n", + " 21/1 1.15457 1.14285 +/- 0.01319\n", + " 22/1 1.19951 1.14757 +/- 0.01293\n", + " 23/1 1.13296 1.14645 +/- 0.01195\n", + " 24/1 1.15322 1.14693 +/- 0.01107\n", + " 25/1 1.26213 1.15461 +/- 0.01286\n", + " 26/1 1.11758 1.15230 +/- 0.01225\n", + " 27/1 1.19061 1.15455 +/- 0.01172\n", + " 28/1 1.17562 1.15572 +/- 0.01111\n", + " 29/1 1.15989 1.15594 +/- 0.01051\n", + " 30/1 1.19989 1.15814 +/- 0.01021\n", + " 31/1 1.14498 1.15751 +/- 0.00974\n", + " 32/1 1.11494 1.15558 +/- 0.00948\n", + " 33/1 1.13251 1.15457 +/- 0.00912\n", + " 34/1 1.17943 1.15561 +/- 0.00879\n", + " 35/1 1.21182 1.15786 +/- 0.00872\n", + " 36/1 1.16118 1.15798 +/- 0.00838\n", + " 37/1 1.13679 1.15720 +/- 0.00811\n", + " 38/1 1.15684 1.15719 +/- 0.00781\n", + " 39/1 1.12450 1.15606 +/- 0.00762\n", + " 40/1 1.30157 1.16091 +/- 0.00882\n", + " 41/1 1.04558 1.15719 +/- 0.00930\n", + " 42/1 1.16538 1.15745 +/- 0.00901\n", + " 43/1 1.17710 1.15804 +/- 0.00875\n", + " 44/1 1.13273 1.15730 +/- 0.00853\n", + " 45/1 1.19156 1.15828 +/- 0.00834\n", + " 46/1 1.19404 1.15927 +/- 0.00816\n", + " 47/1 1.19058 1.16012 +/- 0.00798\n", + " 48/1 1.12943 1.15931 +/- 0.00781\n", + " 49/1 1.22428 1.16097 +/- 0.00779\n", + " 50/1 1.07496 1.15882 +/- 0.00789\n", " Creating state point statepoint.50.h5...\n", "\n", " ===========================================================================\n", @@ -603,27 +608,27 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 4.2300E-01 seconds\n", - " Reading cross sections = 9.3000E-02 seconds\n", - " Total time in simulation = 1.6549E+01 seconds\n", - " Time in transport only = 1.6535E+01 seconds\n", - " Time in inactive batches = 2.3650E+00 seconds\n", - " Time in active batches = 1.4184E+01 seconds\n", - " Time synchronizing fission bank = 5.0000E-03 seconds\n", - " Sampling source sites = 3.0000E-03 seconds\n", + " Total time for initialization = 8.6600E-01 seconds\n", + " Reading cross sections = 2.2400E-01 seconds\n", + " Total time in simulation = 3.0950E+00 seconds\n", + " Time in transport only = 2.9310E+00 seconds\n", + " Time in inactive batches = 2.8000E-01 seconds\n", + " Time in active batches = 2.8150E+00 seconds\n", + " Time synchronizing fission bank = 1.4200E-01 seconds\n", + " Sampling source sites = 1.0000E-03 seconds\n", " SEND/RECV source sites = 0.0000E+00 seconds\n", - " Time accumulating tallies = 0.0000E+00 seconds\n", - " Total time for finalization = 0.0000E+00 seconds\n", - " Total time elapsed = 1.6981E+01 seconds\n", - " Calculation Rate (inactive) = 10570.8 neutrons/second\n", - " Calculation Rate (active) = 7050.20 neutrons/second\n", + " Time accumulating tallies = 2.0000E-03 seconds\n", + " Total time for finalization = 3.0000E-03 seconds\n", + " Total time elapsed = 3.9660E+00 seconds\n", + " Calculation Rate (inactive) = 35714.3 neutrons/second\n", + " Calculation Rate (active) = 14209.6 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", - " k-effective (Collision) = 1.15984 +/- 0.00411\n", - " k-effective (Track-length) = 1.16146 +/- 0.00457\n", - " k-effective (Absorption) = 1.16177 +/- 0.00380\n", - " Combined k-effective = 1.16105 +/- 0.00364\n", + " k-effective (Collision) = 1.15707 +/- 0.00744\n", + " k-effective (Track-length) = 1.15882 +/- 0.00789\n", + " k-effective (Absorption) = 1.16215 +/- 0.00476\n", + " Combined k-effective = 1.16131 +/- 0.00452\n", " Leakage Fraction = 0.00000 +/- 0.00000\n", "\n" ] @@ -641,7 +646,7 @@ ], "source": [ "# Run OpenMC\n", - "openmc.run()" + "openmc.run(mpi_procs=4)" ] }, { @@ -732,11 +737,26 @@ "text": [ "Multi-Group XS\n", "\tReaction Type =\ttotal\n", - "\tDomain Type =\tcell\n", - "\tDomain ID =\t1\n", + "\tDomain Type =\tmesh\n", + "\tDomain ID =\t10000\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 2.69e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 5.93e-01%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.83e-01 +/- 4.53e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.16e+00%\n", + "\n", + "\n", + "\tCross Sections [cm^-1]:\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.23e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.30e+00%\n", + "\n", + "\n", + "\tCross Sections [cm^-1]:\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.83e-01 +/- 3.88e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 9.89e-01%\n", + "\n", + "\n", + "\tCross Sections [cm^-1]:\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.82e-01 +/- 4.92e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.20e+00%\n", "\n", "\n", "\n" @@ -767,40 +787,121 @@ "
\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", "
cellmesh 10000group innuclidemeanstd. dev.
xyz
11111total0.6677870.0018020.6690160.003015
01112total1.2920130.0076421.2931380.014971
31211total0.6679300.002132
21212total1.2927410.016747
52111total0.6695130.002584
42112total1.2944230.012750
72211total0.6687730.003314
62212total1.2925150.015479
\n", "
" ], "text/plain": [ - " cell group in nuclide mean std. dev.\n", - "1 1 1 total 0.667787 0.001802\n", - "0 1 2 total 1.292013 0.007642" + " mesh 10000 group in nuclide mean std. dev.\n", + " x y z \n", + "1 1 1 1 1 total 0.669016 0.003015\n", + "0 1 1 1 2 total 1.293138 0.014971\n", + "3 1 2 1 1 total 0.667930 0.002132\n", + "2 1 2 1 2 total 1.292741 0.016747\n", + "5 2 1 1 1 total 0.669513 0.002584\n", + "4 2 1 1 2 total 1.294423 0.012750\n", + "7 2 2 1 1 total 0.668773 0.003314\n", + "6 2 2 1 2 total 1.292515 0.015479" ] }, "execution_count": 19, @@ -824,9 +925,23 @@ "cell_type": "code", "execution_count": 20, "metadata": { - "collapsed": true + "collapsed": false }, - "outputs": [], + "outputs": [ + { + "ename": "TypeError", + "evalue": "Setting dtype to anything other than object is not supported", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mabsorption\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexport_xs_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'absorption-xs'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mformat\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'excel'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", + "\u001b[0;32m/Users/sam/.local/lib/python2.7/site-packages/openmc-0.7.1-py2.7.egg/openmc/mgxs/mgxs.pyc\u001b[0m in \u001b[0;36mexport_xs_data\u001b[0;34m(self, filename, directory, format, groups, xs_type)\u001b[0m\n\u001b[1;32m 1430\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1431\u001b[0m \u001b[0;31m# Capitalize column label strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1432\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1433\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1434\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/index.pyc\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype)\u001b[0m\n\u001b[1;32m 5922\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mis_object_dtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5923\u001b[0m raise TypeError('Setting %s dtype to anything other than object '\n\u001b[0;32m-> 5924\u001b[0;31m 'is not supported' % self.__class__)\n\u001b[0m\u001b[1;32m 5925\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_shallow_copy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5926\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mTypeError\u001b[0m: Setting dtype to anything other than object is not supported" + ] + } + ], "source": [ "absorption.export_xs_data(filename='absorption-xs', format='excel')" ] @@ -840,7 +955,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": null, "metadata": { "collapsed": false }, @@ -867,68 +982,11 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": null, "metadata": { "collapsed": false }, - "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", - "
cellenergy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
010.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...-3.774758e-150.011292
116.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...1.443290e-150.002570
\n", - "
" - ], - "text/plain": [ - " cell energy low [MeV] energy high [MeV] nuclide \\\n", - "0 1 0.00e+00 6.25e-07 total \n", - "1 1 6.25e-07 2.00e+01 total \n", - "\n", - " score mean std. dev. \n", - "0 (((total / flux) - (absorption / flux)) - (sca... -3.77e-15 1.13e-02 \n", - "1 (((total / flux) - (absorption / flux)) - (sca... 1.44e-15 2.57e-03 " - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Use tally arithmetic to compute the difference between the total, absorption and scattering\n", "difference = total.xs_tally - absorption.xs_tally - scattering.xs_tally\n", @@ -946,68 +1004,11 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": { "collapsed": false }, - "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", - "
cellenergy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
010.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0761150.000649
116.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0192630.000095
\n", - "
" - ], - "text/plain": [ - " cell energy low [MeV] energy high [MeV] nuclide \\\n", - "0 1 0.00e+00 6.25e-07 total \n", - "1 1 6.25e-07 2.00e+01 total \n", - "\n", - " score mean std. dev. \n", - "0 ((absorption / flux) / (total / flux)) 7.61e-02 6.49e-04 \n", - "1 ((absorption / flux) / (total / flux)) 1.93e-02 9.46e-05 " - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Use tally arithmetic to compute the absorption-to-total MGXS ratio\n", "absorption_to_total = absorption.xs_tally / total.xs_tally\n", @@ -1018,68 +1019,11 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": null, "metadata": { "collapsed": false }, - "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", - "
cellenergy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
010.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9238850.007736
116.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9807370.003737
\n", - "
" - ], - "text/plain": [ - " cell energy low [MeV] energy high [MeV] nuclide \\\n", - "0 1 0.00e+00 6.25e-07 total \n", - "1 1 6.25e-07 2.00e+01 total \n", - "\n", - " score mean std. dev. \n", - "0 ((scatter / flux) / (total / flux)) 9.24e-01 7.74e-03 \n", - "1 ((scatter / flux) / (total / flux)) 9.81e-01 3.74e-03 " - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Use tally arithmetic to compute the scattering-to-total MGXS ratio\n", "scattering_to_total = scattering.xs_tally / total.xs_tally\n", @@ -1097,68 +1041,11 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": null, "metadata": { "collapsed": false }, - "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", - "
cellenergy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
010.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...1.00.007763
116.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...1.00.003739
\n", - "
" - ], - "text/plain": [ - " cell energy low [MeV] energy high [MeV] nuclide \\\n", - "0 1 0.00e+00 6.25e-07 total \n", - "1 1 6.25e-07 2.00e+01 total \n", - "\n", - " score mean std. dev. \n", - "0 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 7.76e-03 \n", - "1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 3.74e-03 " - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "# Use tally arithmetic to ensure that the absorption- and scattering-to-total MGXS ratios sum to unity\n", "sum_ratio = absorption_to_total + scattering_to_total\n", @@ -1166,6 +1053,15 @@ "# The scattering-to-total ratio is a derived tally which can generate Pandas DataFrames for inspection\n", "sum_ratio.get_pandas_dataframe()" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/openmc/__init__.py b/openmc/__init__.py index 0bde0f5843..557e13039f 100644 --- a/openmc/__init__.py +++ b/openmc/__init__.py @@ -9,8 +9,8 @@ from openmc.plots import * from openmc.settings import * from openmc.surface import * from openmc.universe import * -from openmc.mgxs_library import * from openmc.mesh import * +from openmc.mgxs_library import * from openmc.filter import * from openmc.trigger import * from openmc.tallies import * diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 7485236087..cac5957fd6 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -13,7 +13,7 @@ import numpy as np import openmc import openmc.checkvalue as cv from openmc.mgxs import EnergyGroups - +from openmc import Mesh if sys.version_info[0] >= 3: basestring = str @@ -45,13 +45,15 @@ MGXS_TYPES = ['total', DOMAIN_TYPES = ['cell', 'distribcell', 'universe', - 'material'] + 'material', + 'mesh'] # Supported domain classes # TODO: Implement Mesh domains _DOMAINS = (openmc.Cell, openmc.Universe, - openmc.Material) + openmc.Material, + openmc.Mesh) class MGXS(object): @@ -66,9 +68,9 @@ class MGXS(object): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -86,9 +88,9 @@ class MGXS(object): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -115,9 +117,10 @@ class MGXS(object): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading - tally data from a statepoint file). + tally data from a statepoint file) and the number of mesh cells for + 'mesh' domain types. num_nuclides : int The number of nuclides for which the multi-group cross section is being tracked. This is unity if the by_nuclide attribute is False. @@ -263,6 +266,10 @@ class MGXS(object): # Create a domain Filter object domain_filter = openmc.Filter(self.domain_type, self.domain.id) + # If a mesh domain, give the mesh to the domain filter + if self.domain_type == 'mesh': + domain_filter.mesh = self.domain + # Create each Tally needed to compute the multi group cross section tally_metadata = zip(self.scores, self.tally_keys, self.filters) for score, key, filters in tally_metadata: @@ -378,6 +385,8 @@ class MGXS(object): self._domain_type = 'cell' elif isinstance(domain, openmc.Universe): self._domain_type = 'universe' + elif isinstance(domain, openmc.Mesh): + self._domain_type = 'mesh' @domain_type.setter def domain_type(self, domain_type): @@ -432,9 +441,10 @@ class MGXS(object): ---------- mgxs_type : {'total', 'transport', 'nu-transport', 'absorption', 'capture', 'fission', 'nu-fission', 'kappa-fission', 'scatter', 'nu-scatter', 'scatter matrix', 'nu-scatter matrix', 'multiplicity matrix', 'nu-fission matrix', 'chi', 'chi-prompt', 'velocity', 'prompt-nu-fission'} The type of multi-group cross section object to return - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or + openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -675,6 +685,8 @@ class MGXS(object): self.domain = statepoint.summary.get_universe_by_id(self.domain.id) elif self.domain_type == 'material': self.domain = statepoint.summary.get_material_by_id(self.domain.id) + elif self.domain_type == 'mesh': + self.domain = statepoint.meshes[self.domain.id] else: msg = 'Unable to load data from a statepoint for domain type {0} ' \ 'which is not yet supported'.format(self.domain_type) @@ -682,7 +694,23 @@ class MGXS(object): # Use tally "slicing" to ensure that tallies correspond to our domain # NOTE: This is important if tally merging was used - if self.domain_type != 'distribcell': + if self.domain_type == 'mesh': + filters = [self.domain_type] + bins = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + bins.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + bins.append((x, y, 1)) + + filter_bins = [tuple(bins)] + elif self.domain_type != 'distribcell': filters = [self.domain_type] filter_bins = [(self.domain.id,)] # Distribcell filters only accept single cell - neglect it when slicing @@ -761,7 +789,7 @@ class MGXS(object): # Construct a collection of the domain filter bins if not isinstance(subdomains, basestring): - cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=2) + cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=3) for subdomain in subdomains: filters.append(self.domain_type) filter_bins.append((subdomain,)) @@ -981,16 +1009,16 @@ class MGXS(object): cv.check_iterable_type('energy_groups', groups, Integral) # Build lists of filters and filter bins to slice - if len(groups) == 0: - filters = [] - filter_bins = [] - else: - filter_bins = [] + filters = [] + filter_bins = [] + + if len(groups) != 0: + energy_bins = [] for group in groups: group_bounds = self.energy_groups.get_group_bounds(group) - filter_bins.append(group_bounds) - filter_bins = [tuple(filter_bins)] - filters = ['energy'] + energy_bins.append(group_bounds) + filter_bins.append(tuple(energy_bins)) + filters.append('energy') # Clone this MGXS to initialize the sliced version slice_xs = copy.deepcopy(self) @@ -1134,6 +1162,19 @@ class MGXS(object): cv.check_iterable_type('subdomains', subdomains, Integral) elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) + elif self.domain_type == 'mesh': + subdomains = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + subdomains.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + subdomains.append((x, y, 1)) else: subdomains = [self.domain.id] @@ -1270,6 +1311,19 @@ class MGXS(object): elif self.domain_type == 'avg(distribcell)': domain_filter = self.xs_tally.find_filter('avg(distribcell)') subdomains = domain_filter.bins + elif self.domain_type == 'mesh': + subdomains = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + subdomains.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + subdomains.append((x, y, 1)) else: subdomains = [self.domain.id] @@ -1375,8 +1429,8 @@ class MGXS(object): df = self.get_pandas_dataframe(groups=groups, xs_type=xs_type) # Capitalize column label strings - df.columns = df.columns.astype(str) - df.columns = map(str.title, df.columns) + #df.columns = df.columns.astype(str) + #df.columns = map(str.title, df.columns) # Export the data using Pandas IO API if format == 'csv': @@ -1477,7 +1531,10 @@ class MGXS(object): distribcell_paths=distribcell_paths) # Remove the score column since it is homogeneous and redundant - df = df.drop('score', axis=1) + if self.domain_type == 'mesh': + df = df.drop('score', axis=1, level=0) + else: + df = df.drop('score', axis=1) # Override energy groups bounds with indices all_groups = np.arange(self.num_groups, 0, -1, dtype=np.int) @@ -1533,7 +1590,12 @@ class MGXS(object): # Sort the dataframe by domain type id (e.g., distribcell id) and # energy groups such that data is from fast to thermal - df.sort_values(by=[self.domain_type] + columns, inplace=True) + if self.domain_type == 'mesh': + mesh_str = 'mesh {0}'.format(self.domain.id) + df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'), \ + (mesh_str, 'z')] + columns, inplace=True) + else: + df.sort_values(by=[self.domain_type] + columns, inplace=True) return df @@ -1552,9 +1614,9 @@ class MatrixMGXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -1572,9 +1634,9 @@ class MatrixMGXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -1601,9 +1663,10 @@ class MatrixMGXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading - tally data from a statepoint file). + tally data from a statepoint file) and the number of mesh cells for + 'mesh' domain types. num_nuclides : int The number of nuclides for which the multi-group cross section is being tracked. This is unity if the by_nuclide attribute is False. @@ -1700,7 +1763,7 @@ class MatrixMGXS(MGXS): # Construct a collection of the domain filter bins if not isinstance(subdomains, basestring): cv.check_iterable_type('subdomains', subdomains, Integral, - max_depth=2) + max_depth=3) for subdomain in subdomains: filters.append(self.domain_type) filter_bins.append((subdomain,)) @@ -1862,6 +1925,19 @@ class MatrixMGXS(MGXS): cv.check_iterable_type('subdomains', subdomains, Integral) elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) + elif self.domain_type == 'mesh': + subdomains = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + subdomains.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + subdomains.append((x, y, 1)) else: subdomains = [self.domain.id] @@ -1971,9 +2047,9 @@ class TotalXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -1991,9 +2067,9 @@ class TotalXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2022,7 +2098,7 @@ class TotalXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2089,9 +2165,9 @@ class TransportXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2109,9 +2185,9 @@ class TransportXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2140,7 +2216,7 @@ class TransportXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2219,9 +2295,9 @@ class NuTransportXS(TransportXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2239,9 +2315,9 @@ class NuTransportXS(TransportXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2270,7 +2346,7 @@ class NuTransportXS(TransportXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2340,9 +2416,9 @@ class AbsorptionXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2360,9 +2436,9 @@ class AbsorptionXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2391,7 +2467,7 @@ class AbsorptionXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2456,9 +2532,9 @@ class CaptureXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2476,9 +2552,9 @@ class CaptureXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2507,7 +2583,7 @@ class CaptureXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2578,9 +2654,9 @@ class FissionXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2598,9 +2674,9 @@ class FissionXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2629,7 +2705,7 @@ class FissionXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2689,9 +2765,9 @@ class NuFissionXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2709,9 +2785,9 @@ class NuFissionXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2740,7 +2816,7 @@ class NuFissionXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2805,9 +2881,9 @@ class KappaFissionXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2825,9 +2901,9 @@ class KappaFissionXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2856,7 +2932,7 @@ class KappaFissionXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -2918,9 +2994,9 @@ class ScatterXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -2938,9 +3014,9 @@ class ScatterXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -2969,7 +3045,7 @@ class ScatterXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -3033,9 +3109,9 @@ class NuScatterXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -3053,9 +3129,9 @@ class NuScatterXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -3084,7 +3160,7 @@ class NuScatterXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -3163,9 +3239,9 @@ class ScatterMatrixXS(MatrixMGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -3187,9 +3263,9 @@ class ScatterMatrixXS(MatrixMGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -3218,7 +3294,7 @@ class ScatterMatrixXS(MatrixMGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -3515,7 +3591,7 @@ class ScatterMatrixXS(MatrixMGXS): # Construct a collection of the domain filter bins if not isinstance(subdomains, basestring): - cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=2) + cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=3) for subdomain in subdomains: filters.append(self.domain_type) filter_bins.append((subdomain,)) @@ -3702,6 +3778,19 @@ class ScatterMatrixXS(MatrixMGXS): cv.check_iterable_type('subdomains', subdomains, Integral) elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) + elif self.domain_type == 'mesh': + subdomains = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + subdomains.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + subdomains.append((x, y, 1)) else: subdomains = [self.domain.id] @@ -3812,9 +3901,9 @@ class NuScatterMatrixXS(ScatterMatrixXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -3836,9 +3925,9 @@ class NuScatterMatrixXS(ScatterMatrixXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -3867,7 +3956,7 @@ class NuScatterMatrixXS(ScatterMatrixXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -3938,9 +4027,9 @@ class MultiplicityMatrixXS(MatrixMGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -3958,9 +4047,9 @@ class MultiplicityMatrixXS(MatrixMGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -3989,7 +4078,7 @@ class MultiplicityMatrixXS(MatrixMGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -4085,9 +4174,9 @@ class NuFissionMatrixXS(MatrixMGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -4105,9 +4194,9 @@ class NuFissionMatrixXS(MatrixMGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -4136,7 +4225,7 @@ class NuFissionMatrixXS(MatrixMGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -4200,9 +4289,9 @@ class Chi(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -4220,9 +4309,9 @@ class Chi(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -4251,7 +4340,7 @@ class Chi(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -4484,7 +4573,7 @@ class Chi(MGXS): # Construct a collection of the domain filter bins if not isinstance(subdomains, basestring): - cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=2) + cv.check_iterable_type('subdomains', subdomains, Integral, max_depth=3) for subdomain in subdomains: filters.append(self.domain_type) filter_bins.append((subdomain,)) @@ -4659,9 +4748,9 @@ class ChiPrompt(Chi): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -4679,9 +4768,9 @@ class ChiPrompt(Chi): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -4710,7 +4799,7 @@ class ChiPrompt(Chi): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int @@ -4796,9 +4885,9 @@ class Velocity(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -4816,9 +4905,9 @@ class Velocity(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -4921,6 +5010,19 @@ class Velocity(MGXS): cv.check_iterable_type('subdomains', subdomains, Integral) elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) + elif self.domain_type == 'mesh': + subdomains = [] + if (len(self.domain.dimension) == 3): + nx, ny, nz = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + for z in range(1,nz+1): + subdomains.append((x, y, z)) + else: + nx, ny = self.domain.dimension + for x in range(1,nx+1): + for y in range(1,ny+1): + subdomains.append((x, y, 1)) else: subdomains = [self.domain.id] @@ -5011,9 +5113,9 @@ class PromptNuFissionXS(MGXS): Parameters ---------- - domain : openmc.Material or openmc.Cell or openmc.Universe + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization groups : openmc.mgxs.EnergyGroups The energy group structure for energy condensation @@ -5031,9 +5133,9 @@ class PromptNuFissionXS(MGXS): Reaction type (e.g., 'total', 'nu-fission', etc.) by_nuclide : bool If true, computes cross sections for each nuclide in domain - domain : Material or Cell or Universe + domain : Material or Cell or Universe or Mesh Domain for spatial homogenization - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization energy_groups : openmc.mgxs.EnergyGroups Energy group structure for energy condensation @@ -5062,7 +5164,7 @@ class PromptNuFissionXS(MGXS): is None unless the multi-group cross section has been computed. num_subdomains : int The number of subdomains is unity for 'material', 'cell' and 'universe' - domain types. When the This is equal to the number of cell instances + domain types. This is equal to the number of cell instances for 'distribcell' domain types (it is equal to unity prior to loading tally data from a statepoint file). num_nuclides : int diff --git a/openmc/tallies.py b/openmc/tallies.py index af19549a7c..4fc19f1e5d 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -2983,7 +2983,7 @@ class Tally(object): bin_indices.extend([bin_index]) bin_indices.extend([bin_index, bin_index+1]) num_bins += 1 - elif filter_type == 'distribcell': + elif filter_type in ['distribcell', 'mesh']: bin_indices = [0] num_bins = find_filter.num_bins else: From b56c528bdb0ce3efaefe66af4da77cedfef69d8f Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Thu, 7 Jul 2016 16:46:24 -0400 Subject: [PATCH 02/16] used condensed methods to generate mesh domain bins --- .../pythonapi/examples/mgxs-part-i.ipynb | 900 +++++++++++++++--- openmc/mgxs/mgxs.py | 87 +- 2 files changed, 765 insertions(+), 222 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index ff242885e6..7c5838b2d9 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -91,7 +91,7 @@ "\n", "$$\\sigma_{n,x,k,g} = \\frac{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\sigma_{n,x}(\\mathbf{r},E')\\Phi(\\mathbf{r},E')}{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\Phi(\\mathbf{r},E')}$$\n", "\n", - "This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](https://mit-crpg.github.io/openmc/pythonapi/filter.html) on the energy range and spatial zone (material, cell or universe) define the bounds of integration for both numerator and denominator." + "This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](https://mit-crpg.github.io/openmc/pythonapi/filter.html) on the energy range and spatial zone (material, cell, universe, or mesh) define the bounds of integration for both numerator and denominator." ] }, { @@ -326,7 +326,7 @@ "# OpenMC simulation parameters\n", "batches = 50\n", "inactive = 10\n", - "particles = 1000\n", + "particles = 2500\n", "\n", "# Instantiate a Settings object\n", "settings_file = openmc.Settings()\n", @@ -433,7 +433,7 @@ " \tName =\t\n", " \tFilters =\t\n", " \t\tmesh\t[10000]\n", - " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", + " \t\tenergy\t[0.000000E+00 6.250000E-07 2.000000E+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['flux']\n", " \tEstimator =\ttracklength), ('absorption', Tally\n", @@ -441,7 +441,7 @@ " \tName =\t\n", " \tFilters =\t\n", " \t\tmesh\t[10000]\n", - " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", + " \t\tenergy\t[0.000000E+00 6.250000E-07 2.000000E+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['absorption']\n", " \tEstimator =\ttracklength)])" @@ -521,9 +521,9 @@ " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", " Version: 0.7.1\n", - " Git SHA1: 736d7aa5ba3bcd1a8a1614ce4b6769babcb1d8ca\n", - " Date/Time: 2016-07-05 16:23:08\n", - " MPI Processes: 4\n", + " Git SHA1: 6a66fb9af7372435dc7da987c8fc3d6acff6549a\n", + " Date/Time: 2016-07-07 16:43:21\n", + " MPI Processes: 1\n", "\n", " ===========================================================================\n", " ========================> INITIALIZATION <=========================\n", @@ -549,56 +549,56 @@ "\n", " Bat./Gen. k Average k \n", " ========= ======== ==================== \n", - " 1/1 1.07993 \n", - " 2/1 1.23691 \n", - " 3/1 1.17407 \n", - " 4/1 1.08258 \n", - " 5/1 1.21012 \n", - " 6/1 1.23825 \n", - " 7/1 1.18016 \n", - " 8/1 1.20989 \n", - " 9/1 1.15475 \n", - " 10/1 1.13462 \n", - " 11/1 1.12749 \n", - " 12/1 1.09502 1.11125 +/- 0.01623\n", - " 13/1 1.24722 1.15657 +/- 0.04628\n", - " 14/1 1.14700 1.15418 +/- 0.03281\n", - " 15/1 1.13889 1.15112 +/- 0.02560\n", - " 16/1 1.19008 1.15762 +/- 0.02189\n", - " 17/1 1.11320 1.15127 +/- 0.01956\n", - " 18/1 1.12093 1.14748 +/- 0.01736\n", - " 19/1 1.13809 1.14643 +/- 0.01534\n", - " 20/1 1.09886 1.14168 +/- 0.01452\n", - " 21/1 1.15457 1.14285 +/- 0.01319\n", - " 22/1 1.19951 1.14757 +/- 0.01293\n", - " 23/1 1.13296 1.14645 +/- 0.01195\n", - " 24/1 1.15322 1.14693 +/- 0.01107\n", - " 25/1 1.26213 1.15461 +/- 0.01286\n", - " 26/1 1.11758 1.15230 +/- 0.01225\n", - " 27/1 1.19061 1.15455 +/- 0.01172\n", - " 28/1 1.17562 1.15572 +/- 0.01111\n", - " 29/1 1.15989 1.15594 +/- 0.01051\n", - " 30/1 1.19989 1.15814 +/- 0.01021\n", - " 31/1 1.14498 1.15751 +/- 0.00974\n", - " 32/1 1.11494 1.15558 +/- 0.00948\n", - " 33/1 1.13251 1.15457 +/- 0.00912\n", - " 34/1 1.17943 1.15561 +/- 0.00879\n", - " 35/1 1.21182 1.15786 +/- 0.00872\n", - " 36/1 1.16118 1.15798 +/- 0.00838\n", - " 37/1 1.13679 1.15720 +/- 0.00811\n", - " 38/1 1.15684 1.15719 +/- 0.00781\n", - " 39/1 1.12450 1.15606 +/- 0.00762\n", - " 40/1 1.30157 1.16091 +/- 0.00882\n", - " 41/1 1.04558 1.15719 +/- 0.00930\n", - " 42/1 1.16538 1.15745 +/- 0.00901\n", - " 43/1 1.17710 1.15804 +/- 0.00875\n", - " 44/1 1.13273 1.15730 +/- 0.00853\n", - " 45/1 1.19156 1.15828 +/- 0.00834\n", - " 46/1 1.19404 1.15927 +/- 0.00816\n", - " 47/1 1.19058 1.16012 +/- 0.00798\n", - " 48/1 1.12943 1.15931 +/- 0.00781\n", - " 49/1 1.22428 1.16097 +/- 0.00779\n", - " 50/1 1.07496 1.15882 +/- 0.00789\n", + " 1/1 1.11184 \n", + " 2/1 1.15820 \n", + " 3/1 1.18468 \n", + " 4/1 1.17492 \n", + " 5/1 1.19645 \n", + " 6/1 1.18436 \n", + " 7/1 1.14070 \n", + " 8/1 1.15150 \n", + " 9/1 1.19202 \n", + " 10/1 1.17677 \n", + " 11/1 1.20272 \n", + " 12/1 1.21366 1.20819 +/- 0.00547\n", + " 13/1 1.15906 1.19181 +/- 0.01668\n", + " 14/1 1.14687 1.18058 +/- 0.01629\n", + " 15/1 1.14570 1.17360 +/- 0.01442\n", + " 16/1 1.13480 1.16713 +/- 0.01343\n", + " 17/1 1.17680 1.16852 +/- 0.01144\n", + " 18/1 1.16866 1.16853 +/- 0.00990\n", + " 19/1 1.19253 1.17120 +/- 0.00913\n", + " 20/1 1.18124 1.17220 +/- 0.00823\n", + " 21/1 1.19206 1.17401 +/- 0.00766\n", + " 22/1 1.17681 1.17424 +/- 0.00700\n", + " 23/1 1.17634 1.17440 +/- 0.00644\n", + " 24/1 1.13659 1.17170 +/- 0.00654\n", + " 25/1 1.17144 1.17169 +/- 0.00609\n", + " 26/1 1.20649 1.17386 +/- 0.00610\n", + " 27/1 1.11238 1.17024 +/- 0.00678\n", + " 28/1 1.18911 1.17129 +/- 0.00647\n", + " 29/1 1.14681 1.17000 +/- 0.00626\n", + " 30/1 1.12152 1.16758 +/- 0.00641\n", + " 31/1 1.12729 1.16566 +/- 0.00639\n", + " 32/1 1.15399 1.16513 +/- 0.00612\n", + " 33/1 1.13547 1.16384 +/- 0.00599\n", + " 34/1 1.17723 1.16440 +/- 0.00576\n", + " 35/1 1.09296 1.16154 +/- 0.00622\n", + " 36/1 1.19621 1.16287 +/- 0.00612\n", + " 37/1 1.12560 1.16149 +/- 0.00605\n", + " 38/1 1.17872 1.16211 +/- 0.00586\n", + " 39/1 1.17721 1.16263 +/- 0.00568\n", + " 40/1 1.13724 1.16178 +/- 0.00555\n", + " 41/1 1.18526 1.16254 +/- 0.00542\n", + " 42/1 1.13779 1.16177 +/- 0.00531\n", + " 43/1 1.15066 1.16143 +/- 0.00516\n", + " 44/1 1.12174 1.16026 +/- 0.00514\n", + " 45/1 1.17479 1.16068 +/- 0.00501\n", + " 46/1 1.14146 1.16014 +/- 0.00489\n", + " 47/1 1.20464 1.16135 +/- 0.00491\n", + " 48/1 1.15119 1.16108 +/- 0.00479\n", + " 49/1 1.17938 1.16155 +/- 0.00468\n", + " 50/1 1.15798 1.16146 +/- 0.00457\n", " Creating state point statepoint.50.h5...\n", "\n", " ===========================================================================\n", @@ -608,27 +608,27 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 8.6600E-01 seconds\n", - " Reading cross sections = 2.2400E-01 seconds\n", - " Total time in simulation = 3.0950E+00 seconds\n", - " Time in transport only = 2.9310E+00 seconds\n", - " Time in inactive batches = 2.8000E-01 seconds\n", - " Time in active batches = 2.8150E+00 seconds\n", - " Time synchronizing fission bank = 1.4200E-01 seconds\n", - " Sampling source sites = 1.0000E-03 seconds\n", + " Total time for initialization = 7.1900E-01 seconds\n", + " Reading cross sections = 2.0400E-01 seconds\n", + " Total time in simulation = 2.4932E+01 seconds\n", + " Time in transport only = 2.4916E+01 seconds\n", + " Time in inactive batches = 2.1830E+00 seconds\n", + " Time in active batches = 2.2749E+01 seconds\n", + " Time synchronizing fission bank = 4.0000E-03 seconds\n", + " Sampling source sites = 4.0000E-03 seconds\n", " SEND/RECV source sites = 0.0000E+00 seconds\n", - " Time accumulating tallies = 2.0000E-03 seconds\n", - " Total time for finalization = 3.0000E-03 seconds\n", - " Total time elapsed = 3.9660E+00 seconds\n", - " Calculation Rate (inactive) = 35714.3 neutrons/second\n", - " Calculation Rate (active) = 14209.6 neutrons/second\n", + " Time accumulating tallies = 1.0000E-03 seconds\n", + " Total time for finalization = 2.0000E-03 seconds\n", + " Total time elapsed = 2.5667E+01 seconds\n", + " Calculation Rate (inactive) = 11452.1 neutrons/second\n", + " Calculation Rate (active) = 4395.80 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", - " k-effective (Collision) = 1.15707 +/- 0.00744\n", - " k-effective (Track-length) = 1.15882 +/- 0.00789\n", - " k-effective (Absorption) = 1.16215 +/- 0.00476\n", - " Combined k-effective = 1.16131 +/- 0.00452\n", + " k-effective (Collision) = 1.15984 +/- 0.00411\n", + " k-effective (Track-length) = 1.16146 +/- 0.00457\n", + " k-effective (Absorption) = 1.16177 +/- 0.00380\n", + " Combined k-effective = 1.16105 +/- 0.00364\n", " Leakage Fraction = 0.00000 +/- 0.00000\n", "\n" ] @@ -646,7 +646,7 @@ ], "source": [ "# Run OpenMC\n", - "openmc.run(mpi_procs=4)" + "openmc.run()" ] }, { @@ -740,23 +740,23 @@ "\tDomain Type =\tmesh\n", "\tDomain ID =\t10000\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.83e-01 +/- 4.53e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.16e+00%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.06e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 6.94e-01%\n", "\n", "\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.23e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.30e+00%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.19e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 7.34e-01%\n", "\n", "\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.83e-01 +/- 3.88e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 9.89e-01%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.82e-01 +/- 3.01e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 7.23e-01%\n", "\n", "\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.82e-01 +/- 4.92e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 1.20e+00%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.80e-01 +/- 3.34e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 5.92e-01%\n", "\n", "\n", "\n" @@ -814,8 +814,8 @@ " 1\n", " 1\n", " total\n", - " 0.669016\n", - " 0.003015\n", + " 0.667691\n", + " 0.002046\n", " \n", " \n", " 0\n", @@ -824,8 +824,8 @@ " 1\n", " 2\n", " total\n", - " 1.293138\n", - " 0.014971\n", + " 1.291709\n", + " 0.008941\n", " \n", " \n", " 3\n", @@ -834,8 +834,8 @@ " 1\n", " 1\n", " total\n", - " 0.667930\n", - " 0.002132\n", + " 0.667474\n", + " 0.002119\n", " \n", " \n", " 2\n", @@ -844,8 +844,8 @@ " 1\n", " 2\n", " total\n", - " 1.292741\n", - " 0.016747\n", + " 1.292677\n", + " 0.009479\n", " \n", " \n", " 5\n", @@ -854,8 +854,8 @@ " 1\n", " 1\n", " total\n", - " 0.669513\n", - " 0.002584\n", + " 0.668766\n", + " 0.002021\n", " \n", " \n", " 4\n", @@ -864,8 +864,8 @@ " 1\n", " 2\n", " total\n", - " 1.294423\n", - " 0.012750\n", + " 1.292504\n", + " 0.009323\n", " \n", " \n", " 7\n", @@ -874,8 +874,8 @@ " 1\n", " 1\n", " total\n", - " 0.668773\n", - " 0.003314\n", + " 0.667218\n", + " 0.002220\n", " \n", " \n", " 6\n", @@ -884,8 +884,8 @@ " 1\n", " 2\n", " total\n", - " 1.292515\n", - " 0.015479\n", + " 1.291160\n", + " 0.007613\n", " \n", " \n", "\n", @@ -894,14 +894,14 @@ "text/plain": [ " mesh 10000 group in nuclide mean std. dev.\n", " x y z \n", - "1 1 1 1 1 total 0.669016 0.003015\n", - "0 1 1 1 2 total 1.293138 0.014971\n", - "3 1 2 1 1 total 0.667930 0.002132\n", - "2 1 2 1 2 total 1.292741 0.016747\n", - "5 2 1 1 1 total 0.669513 0.002584\n", - "4 2 1 1 2 total 1.294423 0.012750\n", - "7 2 2 1 1 total 0.668773 0.003314\n", - "6 2 2 1 2 total 1.292515 0.015479" + "1 1 1 1 1 total 0.667691 0.002046\n", + "0 1 1 1 2 total 1.291709 0.008941\n", + "3 1 2 1 1 total 0.667474 0.002119\n", + "2 1 2 1 2 total 1.292677 0.009479\n", + "5 2 1 1 1 total 0.668766 0.002021\n", + "4 2 1 1 2 total 1.292504 0.009323\n", + "7 2 2 1 1 total 0.667218 0.002220\n", + "6 2 2 1 2 total 1.291160 0.007613" ] }, "execution_count": 19, @@ -914,38 +914,6 @@ "df.head(10)" ] }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Each multi-group cross section object can be easily exported to a variety of file formats, including CSV, Excel, and LaTeX for storage or data processing." - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": { - "collapsed": false - }, - "outputs": [ - { - "ename": "TypeError", - "evalue": "Setting dtype to anything other than object is not supported", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mTypeError\u001b[0m Traceback (most recent call last)", - "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mabsorption\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexport_xs_data\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfilename\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'absorption-xs'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mformat\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'excel'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m/Users/sam/.local/lib/python2.7/site-packages/openmc-0.7.1-py2.7.egg/openmc/mgxs/mgxs.pyc\u001b[0m in \u001b[0;36mexport_xs_data\u001b[0;34m(self, filename, directory, format, groups, xs_type)\u001b[0m\n\u001b[1;32m 1430\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1431\u001b[0m \u001b[0;31m# Capitalize column label strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1432\u001b[0;31m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mastype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1433\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mmap\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mstr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtitle\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolumns\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1434\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pandas/core/index.pyc\u001b[0m in \u001b[0;36mastype\u001b[0;34m(self, dtype)\u001b[0m\n\u001b[1;32m 5922\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mis_object_dtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdtype\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5923\u001b[0m raise TypeError('Setting %s dtype to anything other than object '\n\u001b[0;32m-> 5924\u001b[0;31m 'is not supported' % self.__class__)\n\u001b[0m\u001b[1;32m 5925\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_shallow_copy\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5926\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;31mTypeError\u001b[0m: Setting dtype to anything other than object is not supported" - ] - } - ], - "source": [ - "absorption.export_xs_data(filename='absorption-xs', format='excel')" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -955,7 +923,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 20, "metadata": { "collapsed": false }, @@ -982,11 +950,170 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": { "collapsed": false }, - "outputs": [], + "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", + "
mesh 10000energy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
xyz
01110.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...-1.332268e-150.013214
11116.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...-2.220446e-160.002922
21210.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...4.440892e-160.014000
31216.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...2.331468e-150.003034
42110.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...-6.661338e-160.013782
52116.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...-9.992007e-160.002880
62210.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...4.440892e-160.011257
72216.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...7.771561e-160.003177
\n", + "
" + ], + "text/plain": [ + " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", + " x y z \n", + "0 1 1 1 0.00e+00 6.25e-07 total \n", + "1 1 1 1 6.25e-07 2.00e+01 total \n", + "2 1 2 1 0.00e+00 6.25e-07 total \n", + "3 1 2 1 6.25e-07 2.00e+01 total \n", + "4 2 1 1 0.00e+00 6.25e-07 total \n", + "5 2 1 1 6.25e-07 2.00e+01 total \n", + "6 2 2 1 0.00e+00 6.25e-07 total \n", + "7 2 2 1 6.25e-07 2.00e+01 total \n", + "\n", + " score mean std. dev. \n", + " \n", + "0 (((total / flux) - (absorption / flux)) - (sca... -1.33e-15 1.32e-02 \n", + "1 (((total / flux) - (absorption / flux)) - (sca... -2.22e-16 2.92e-03 \n", + "2 (((total / flux) - (absorption / flux)) - (sca... 4.44e-16 1.40e-02 \n", + "3 (((total / flux) - (absorption / flux)) - (sca... 2.33e-15 3.03e-03 \n", + "4 (((total / flux) - (absorption / flux)) - (sca... -6.66e-16 1.38e-02 \n", + "5 (((total / flux) - (absorption / flux)) - (sca... -9.99e-16 2.88e-03 \n", + "6 (((total / flux) - (absorption / flux)) - (sca... 4.44e-16 1.13e-02 \n", + "7 (((total / flux) - (absorption / flux)) - (sca... 7.77e-16 3.18e-03 " + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Use tally arithmetic to compute the difference between the total, absorption and scattering\n", "difference = total.xs_tally - absorption.xs_tally - scattering.xs_tally\n", @@ -1004,11 +1131,170 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": { "collapsed": false }, - "outputs": [], + "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", + "
mesh 10000energy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
xyz
01110.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0760770.000762
11116.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0192420.000160
21210.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0761730.000800
31216.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0193720.000136
42110.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0761830.000796
52116.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0193640.000154
62210.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0760270.000654
72216.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0190740.000153
\n", + "
" + ], + "text/plain": [ + " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", + " x y z \n", + "0 1 1 1 0.00e+00 6.25e-07 total \n", + "1 1 1 1 6.25e-07 2.00e+01 total \n", + "2 1 2 1 0.00e+00 6.25e-07 total \n", + "3 1 2 1 6.25e-07 2.00e+01 total \n", + "4 2 1 1 0.00e+00 6.25e-07 total \n", + "5 2 1 1 6.25e-07 2.00e+01 total \n", + "6 2 2 1 0.00e+00 6.25e-07 total \n", + "7 2 2 1 6.25e-07 2.00e+01 total \n", + "\n", + " score mean std. dev. \n", + " \n", + "0 ((absorption / flux) / (total / flux)) 7.61e-02 7.62e-04 \n", + "1 ((absorption / flux) / (total / flux)) 1.92e-02 1.60e-04 \n", + "2 ((absorption / flux) / (total / flux)) 7.62e-02 8.00e-04 \n", + "3 ((absorption / flux) / (total / flux)) 1.94e-02 1.36e-04 \n", + "4 ((absorption / flux) / (total / flux)) 7.62e-02 7.96e-04 \n", + "5 ((absorption / flux) / (total / flux)) 1.94e-02 1.54e-04 \n", + "6 ((absorption / flux) / (total / flux)) 7.60e-02 6.54e-04 \n", + "7 ((absorption / flux) / (total / flux)) 1.91e-02 1.53e-04 " + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Use tally arithmetic to compute the absorption-to-total MGXS ratio\n", "absorption_to_total = absorption.xs_tally / total.xs_tally\n", @@ -1019,11 +1305,170 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": { "collapsed": false }, - "outputs": [], + "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", + "
mesh 10000energy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
xyz
01110.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9239230.009054
11116.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9807580.004247
21210.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9238270.009586
31216.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9806280.004411
42110.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9238170.009436
52116.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9806360.004180
62210.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9239730.007717
72216.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9809260.004623
\n", + "
" + ], + "text/plain": [ + " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", + " x y z \n", + "0 1 1 1 0.00e+00 6.25e-07 total \n", + "1 1 1 1 6.25e-07 2.00e+01 total \n", + "2 1 2 1 0.00e+00 6.25e-07 total \n", + "3 1 2 1 6.25e-07 2.00e+01 total \n", + "4 2 1 1 0.00e+00 6.25e-07 total \n", + "5 2 1 1 6.25e-07 2.00e+01 total \n", + "6 2 2 1 0.00e+00 6.25e-07 total \n", + "7 2 2 1 6.25e-07 2.00e+01 total \n", + "\n", + " score mean std. dev. \n", + " \n", + "0 ((scatter / flux) / (total / flux)) 9.24e-01 9.05e-03 \n", + "1 ((scatter / flux) / (total / flux)) 9.81e-01 4.25e-03 \n", + "2 ((scatter / flux) / (total / flux)) 9.24e-01 9.59e-03 \n", + "3 ((scatter / flux) / (total / flux)) 9.81e-01 4.41e-03 \n", + "4 ((scatter / flux) / (total / flux)) 9.24e-01 9.44e-03 \n", + "5 ((scatter / flux) / (total / flux)) 9.81e-01 4.18e-03 \n", + "6 ((scatter / flux) / (total / flux)) 9.24e-01 7.72e-03 \n", + "7 ((scatter / flux) / (total / flux)) 9.81e-01 4.62e-03 " + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Use tally arithmetic to compute the scattering-to-total MGXS ratio\n", "scattering_to_total = scattering.xs_tally / total.xs_tally\n", @@ -1041,11 +1486,170 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 24, "metadata": { "collapsed": false }, - "outputs": [], + "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", + "
mesh 10000energy low [MeV]energy high [MeV]nuclidescoremeanstd. dev.
xyz
01110.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.009086
11116.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004250
21210.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.009619
31216.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004413
42110.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.009470
52116.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004183
62210.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.007745
72216.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004626
\n", + "
" + ], + "text/plain": [ + " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", + " x y z \n", + "0 1 1 1 0.00e+00 6.25e-07 total \n", + "1 1 1 1 6.25e-07 2.00e+01 total \n", + "2 1 2 1 0.00e+00 6.25e-07 total \n", + "3 1 2 1 6.25e-07 2.00e+01 total \n", + "4 2 1 1 0.00e+00 6.25e-07 total \n", + "5 2 1 1 6.25e-07 2.00e+01 total \n", + "6 2 2 1 0.00e+00 6.25e-07 total \n", + "7 2 2 1 6.25e-07 2.00e+01 total \n", + "\n", + " score mean std. dev. \n", + " \n", + "0 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.09e-03 \n", + "1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.25e-03 \n", + "2 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.62e-03 \n", + "3 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.41e-03 \n", + "4 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.47e-03 \n", + "5 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.18e-03 \n", + "6 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 7.74e-03 \n", + "7 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.63e-03 " + ] + }, + "execution_count": 24, + "metadata": {}, + "output_type": "execute_result" + } + ], "source": [ "# Use tally arithmetic to ensure that the absorption- and scattering-to-total MGXS ratios sum to unity\n", "sum_ratio = absorption_to_total + scattering_to_total\n", diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index ab65f7a5ac..1d2536678c 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -7,6 +7,7 @@ import os import sys import copy import abc +import itertools import numpy as np @@ -701,20 +702,8 @@ class MGXS(object): # NOTE: This is important if tally merging was used if self.domain_type == 'mesh': filters = [self.domain_type] - bins = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - bins.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - bins.append((x, y, 1)) - - filter_bins = [tuple(bins)] + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + filter_bins = [tuple(itertools.product(*xyz))] elif self.domain_type != 'distribcell': filters = [self.domain_type] filter_bins = [(self.domain.id,)] @@ -1169,18 +1158,8 @@ class MGXS(object): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - subdomains = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - subdomains.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - subdomains.append((x, y, 1)) + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1318,18 +1297,8 @@ class MGXS(object): domain_filter = self.xs_tally.find_filter('avg(distribcell)') subdomains = domain_filter.bins elif self.domain_type == 'mesh': - subdomains = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - subdomains.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - subdomains.append((x, y, 1)) + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1934,18 +1903,8 @@ class MatrixMGXS(MGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - subdomains = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - subdomains.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - subdomains.append((x, y, 1)) + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -3787,18 +3746,8 @@ class ScatterMatrixXS(MatrixMGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - subdomains = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - subdomains.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - subdomains.append((x, y, 1)) + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -5020,18 +4969,8 @@ class Velocity(MGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - subdomains = [] - if (len(self.domain.dimension) == 3): - nx, ny, nz = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - for z in range(1,nz+1): - subdomains.append((x, y, z)) - else: - nx, ny = self.domain.dimension - for x in range(1,nx+1): - for y in range(1,ny+1): - subdomains.append((x, y, 1)) + xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] From bce4132bc84b0351c7fe629eb8b51e6dedc6afbb Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Thu, 28 Jul 2016 16:47:19 -0400 Subject: [PATCH 03/16] removed line to capitalize columns when exporting xs data --- openmc/mgxs/mgxs.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 2deeac797e..6c78e200da 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1399,10 +1399,6 @@ class MGXS(object): # Get a Pandas DataFrame for the data df = self.get_pandas_dataframe(groups=groups, xs_type=xs_type) - # Capitalize column label strings - #df.columns = df.columns.astype(str) - #df.columns = map(str.title, df.columns) - # Export the data using Pandas IO API if format == 'csv': df.to_csv(filename + '.csv', index=False) From 6694895769ce32bfa8555da2843ec52a65bec88d Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 29 Jul 2016 13:38:46 -0400 Subject: [PATCH 04/16] added error statement when micro xs is requested for a mesh domain --- .../pythonapi/examples/mgxs-part-i.ipynb | 47 ++++++++++--------- openmc/mgxs/mgxs.py | 7 +++ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index 7b20a97db5..e7b8cc73ad 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -433,7 +433,7 @@ " \tName =\t\n", " \tFilters =\t\n", " \t\tmesh\t[10000]\n", - " \t\tenergy\t[0.000000E+00 6.250000E-07 2.000000E+01]\n", + " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['flux']\n", " \tEstimator =\ttracklength), ('absorption', Tally\n", @@ -441,7 +441,7 @@ " \tName =\t\n", " \tFilters =\t\n", " \t\tmesh\t[10000]\n", - " \t\tenergy\t[0.000000E+00 6.250000E-07 2.000000E+01]\n", + " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['absorption']\n", " \tEstimator =\ttracklength)])" @@ -520,9 +520,10 @@ "\n", " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", - " Version: 0.7.1\n", - " Git SHA1: 3d68c07625e33cd64188df03ee03e9c31b3d4b74\n", - " Date/Time: 2016-07-22 21:03:18\n", + " Version: 0.8.0\n", + " Git SHA1: 16e74656b028875a7ebcb90df07293c5f1cc56a4\n", + " Date/Time: 2016-07-29 13:20:18\n", + " MPI Processes: 1\n", "\n", " ===========================================================================\n", " ========================> INITIALIZATION <=========================\n", @@ -532,11 +533,11 @@ " Reading geometry XML file...\n", " Reading cross sections XML file...\n", " Reading materials XML file...\n", - " Reading H1.71c from /home/romano/openmc/data/nndc_hdf5/H1_71c.h5\n", - " Reading O16.71c from /home/romano/openmc/data/nndc_hdf5/O16_71c.h5\n", - " Reading U235.71c from /home/romano/openmc/data/nndc_hdf5/U235_71c.h5\n", - " Reading U238.71c from /home/romano/openmc/data/nndc_hdf5/U238_71c.h5\n", - " Reading Zr90.71c from /home/romano/openmc/data/nndc_hdf5/Zr90_71c.h5\n", + " Reading H1.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/H1_71c.h5\n", + " Reading O16.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/O16_71c.h5\n", + " Reading U235.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/U235_71c.h5\n", + " Reading U238.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/U238_71c.h5\n", + " Reading Zr90.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/Zr90_71c.h5\n", " Maximum neutron transport energy: 20.0000 MeV for H1.71c\n", " Reading tallies XML file...\n", " Building neighboring cells lists for each surface...\n", @@ -607,20 +608,20 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 3.2300E-01 seconds\n", - " Reading cross sections = 1.6900E-01 seconds\n", - " Total time in simulation = 1.9882E+01 seconds\n", - " Time in transport only = 1.9869E+01 seconds\n", - " Time in inactive batches = 2.6590E+00 seconds\n", - " Time in active batches = 1.7223E+01 seconds\n", - " Time synchronizing fission bank = 4.0000E-03 seconds\n", - " Sampling source sites = 4.0000E-03 seconds\n", - " SEND/RECV source sites = 0.0000E+00 seconds\n", + " Total time for initialization = 3.8300E-01 seconds\n", + " Reading cross sections = 2.0900E-01 seconds\n", + " Total time in simulation = 2.3245E+01 seconds\n", + " Time in transport only = 2.3223E+01 seconds\n", + " Time in inactive batches = 2.0320E+00 seconds\n", + " Time in active batches = 2.1213E+01 seconds\n", + " Time synchronizing fission bank = 1.0000E-02 seconds\n", + " Sampling source sites = 7.0000E-03 seconds\n", + " SEND/RECV source sites = 2.0000E-03 seconds\n", " Time accumulating tallies = 0.0000E+00 seconds\n", - " Total time for finalization = 0.0000E+00 seconds\n", - " Total time elapsed = 2.0217E+01 seconds\n", - " Calculation Rate (inactive) = 9402.03 neutrons/second\n", - " Calculation Rate (active) = 5806.19 neutrons/second\n", + " Total time for finalization = 1.0000E-03 seconds\n", + " Total time elapsed = 2.3642E+01 seconds\n", + " Calculation Rate (inactive) = 12303.1 neutrons/second\n", + " Calculation Rate (active) = 4714.09 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 5399047447..1ef3194be0 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -773,6 +773,13 @@ class MGXS(object): cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) cv.check_value('xs_type', xs_type, ['macro', 'micro']) + # FIXME: Unable to get microscopic xs for mesh domain because the mesh + # cells do not know the nuclide densities in each mesh cell. + if self.domain_type == 'mesh' and xs_type == 'micro': + msg = 'Unable to get micro xs for mesh domain since the mesh ' \ + 'cells do not know the nuclide densities in each mesh cell.' + raise ValueError(msg) + filters = [] filter_bins = [] From c35eac2c0656a902007cc7fd865b7fe13dcd1394 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 29 Jul 2016 13:41:14 -0400 Subject: [PATCH 05/16] changed mgxs-part-i.ipynb mgxs domain back to cell --- .../pythonapi/examples/mgxs-part-i.ipynb | 667 ++---------------- 1 file changed, 78 insertions(+), 589 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index e7b8cc73ad..b4e6d84fef 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -398,17 +398,10 @@ }, "outputs": [], "source": [ - "# Instantiate a tally Mesh\n", - "mesh = openmc.Mesh(name='mesh')\n", - "mesh.type = 'regular'\n", - "mesh.dimension = [2, 2]\n", - "mesh.lower_left = [-0.63, -0.63]\n", - "mesh.upper_right = [+0.63, +0.63]\n", - "\n", "# Instantiate a few different sections\n", - "total = mgxs.TotalXS(domain=mesh, groups=groups)\n", - "absorption = mgxs.AbsorptionXS(domain=mesh, groups=groups)\n", - "scattering = mgxs.ScatterXS(domain=mesh, groups=groups)" + "total = mgxs.TotalXS(domain=cell, groups=groups)\n", + "absorption = mgxs.AbsorptionXS(domain=cell, groups=groups)\n", + "scattering = mgxs.ScatterXS(domain=cell, groups=groups)" ] }, { @@ -432,7 +425,7 @@ " \tID =\t10000\n", " \tName =\t\n", " \tFilters =\t\n", - " \t\tmesh\t[10000]\n", + " \t\tcell\t[1]\n", " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['flux']\n", @@ -440,7 +433,7 @@ " \tID =\t10001\n", " \tName =\t\n", " \tFilters =\t\n", - " \t\tmesh\t[10000]\n", + " \t\tcell\t[1]\n", " \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n", " \tNuclides =\ttotal \n", " \tScores =\t['absorption']\n", @@ -522,7 +515,7 @@ " License: http://openmc.readthedocs.io/en/latest/license.html\n", " Version: 0.8.0\n", " Git SHA1: 16e74656b028875a7ebcb90df07293c5f1cc56a4\n", - " Date/Time: 2016-07-29 13:20:18\n", + " Date/Time: 2016-07-29 13:40:25\n", " MPI Processes: 1\n", "\n", " ===========================================================================\n", @@ -608,20 +601,20 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 3.8300E-01 seconds\n", - " Reading cross sections = 2.0900E-01 seconds\n", - " Total time in simulation = 2.3245E+01 seconds\n", - " Time in transport only = 2.3223E+01 seconds\n", - " Time in inactive batches = 2.0320E+00 seconds\n", - " Time in active batches = 2.1213E+01 seconds\n", - " Time synchronizing fission bank = 1.0000E-02 seconds\n", - " Sampling source sites = 7.0000E-03 seconds\n", - " SEND/RECV source sites = 2.0000E-03 seconds\n", - " Time accumulating tallies = 0.0000E+00 seconds\n", + " Total time for initialization = 3.9900E-01 seconds\n", + " Reading cross sections = 2.1800E-01 seconds\n", + " Total time in simulation = 2.0870E+01 seconds\n", + " Time in transport only = 2.0855E+01 seconds\n", + " Time in inactive batches = 2.3100E+00 seconds\n", + " Time in active batches = 1.8560E+01 seconds\n", + " Time synchronizing fission bank = 4.0000E-03 seconds\n", + " Sampling source sites = 3.0000E-03 seconds\n", + " SEND/RECV source sites = 1.0000E-03 seconds\n", + " Time accumulating tallies = 2.0000E-03 seconds\n", " Total time for finalization = 1.0000E-03 seconds\n", - " Total time elapsed = 2.3642E+01 seconds\n", - " Calculation Rate (inactive) = 12303.1 neutrons/second\n", - " Calculation Rate (active) = 4714.09 neutrons/second\n", + " Total time elapsed = 2.1283E+01 seconds\n", + " Calculation Rate (inactive) = 10822.5 neutrons/second\n", + " Calculation Rate (active) = 5387.93 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -737,26 +730,11 @@ "text": [ "Multi-Group XS\n", "\tReaction Type =\ttotal\n", - "\tDomain Type =\tmesh\n", - "\tDomain ID =\t10000\n", + "\tDomain Type =\tcell\n", + "\tDomain ID =\t1\n", "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.06e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 6.94e-01%\n", - "\n", - "\n", - "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 3.19e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 7.34e-01%\n", - "\n", - "\n", - "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.82e-01 +/- 3.01e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 7.23e-01%\n", - "\n", - "\n", - "\tCross Sections [cm^-1]:\n", - " Group 1 [6.25e-07 - 20.0 MeV]:\t6.80e-01 +/- 3.34e-01%\n", - " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 5.92e-01%\n", + " Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 2.69e-01%\n", + " Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 5.93e-01%\n", "\n", "\n", "\n" @@ -787,121 +765,40 @@ "
\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", "
mesh 10000cellgroup innuclidemeanstd. dev.
xyz
11111total0.6676910.0020460.6677870.001802
01112total1.2917090.008941
31211total0.6674740.002119
21212total1.2926770.009479
52111total0.6687660.002021
42112total1.2925040.009323
72211total0.6672180.002220
62212total1.2911600.0076131.2920130.007642
\n", "
" ], "text/plain": [ - " mesh 10000 group in nuclide mean std. dev.\n", - " x y z \n", - "1 1 1 1 1 total 0.667691 0.002046\n", - "0 1 1 1 2 total 1.291709 0.008941\n", - "3 1 2 1 1 total 0.667474 0.002119\n", - "2 1 2 1 2 total 1.292677 0.009479\n", - "5 2 1 1 1 total 0.668766 0.002021\n", - "4 2 1 1 2 total 1.292504 0.009323\n", - "7 2 2 1 1 total 0.667218 0.002220\n", - "6 2 2 1 2 total 1.291160 0.007613" + " cell group in nuclide mean std. dev.\n", + "1 1 1 total 0.667787 0.001802\n", + "0 1 2 total 1.292013 0.007642" ] }, "execution_count": 19, @@ -961,9 +858,9 @@ "
\n", "\n", " \n", - " \n", + " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -971,142 +868,40 @@ " \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", "
mesh 10000cellenergy low [MeV]energy high [MeV]nuclidemeanstd. dev.
xyz
01110.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...-1.332268e-150.013214-3.996803e-150.011292
11116.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...-2.220446e-160.002922
21210.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...4.440892e-160.014000
31216.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...2.331468e-150.003034
42110.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...-6.661338e-160.013782
52116.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...-9.992007e-160.002880
62210.000000e+006.250000e-07total(((total / flux) - (absorption / flux)) - (sca...4.440892e-160.011257
72216.250000e-072.000000e+01total(((total / flux) - (absorption / flux)) - (sca...7.771561e-160.0031775.551115e-160.002570
\n", "
" ], "text/plain": [ - " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", - " x y z \n", - "0 1 1 1 0.00e+00 6.25e-07 total \n", - "1 1 1 1 6.25e-07 2.00e+01 total \n", - "2 1 2 1 0.00e+00 6.25e-07 total \n", - "3 1 2 1 6.25e-07 2.00e+01 total \n", - "4 2 1 1 0.00e+00 6.25e-07 total \n", - "5 2 1 1 6.25e-07 2.00e+01 total \n", - "6 2 2 1 0.00e+00 6.25e-07 total \n", - "7 2 2 1 6.25e-07 2.00e+01 total \n", + " cell energy low [MeV] energy high [MeV] nuclide \\\n", + "0 1 0.00e+00 6.25e-07 total \n", + "1 1 6.25e-07 2.00e+01 total \n", "\n", - " score mean std. dev. \n", - " \n", - "0 (((total / flux) - (absorption / flux)) - (sca... -1.33e-15 1.32e-02 \n", - "1 (((total / flux) - (absorption / flux)) - (sca... -2.22e-16 2.92e-03 \n", - "2 (((total / flux) - (absorption / flux)) - (sca... 4.44e-16 1.40e-02 \n", - "3 (((total / flux) - (absorption / flux)) - (sca... 2.33e-15 3.03e-03 \n", - "4 (((total / flux) - (absorption / flux)) - (sca... -6.66e-16 1.38e-02 \n", - "5 (((total / flux) - (absorption / flux)) - (sca... -9.99e-16 2.88e-03 \n", - "6 (((total / flux) - (absorption / flux)) - (sca... 4.44e-16 1.13e-02 \n", - "7 (((total / flux) - (absorption / flux)) - (sca... 7.77e-16 3.18e-03 " + " score mean std. dev. \n", + "0 (((total / flux) - (absorption / flux)) - (sca... -4.00e-15 1.13e-02 \n", + "1 (((total / flux) - (absorption / flux)) - (sca... 5.55e-16 2.57e-03 " ] }, "execution_count": 21, @@ -1142,9 +937,9 @@ "
\n", "\n", " \n", - " \n", + " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1152,142 +947,40 @@ " \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", "
mesh 10000cellenergy low [MeV]energy high [MeV]nuclidemeanstd. dev.
xyz
01110.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0760770.0007620.0761150.000649
11116.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0192420.000160
21210.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0761730.000800
31216.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0193720.000136
42110.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0761830.000796
52116.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0193640.000154
62210.000000e+006.250000e-07total((absorption / flux) / (total / flux))0.0760270.000654
72216.250000e-072.000000e+01total((absorption / flux) / (total / flux))0.0190740.0001530.0192630.000095
\n", "
" ], "text/plain": [ - " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", - " x y z \n", - "0 1 1 1 0.00e+00 6.25e-07 total \n", - "1 1 1 1 6.25e-07 2.00e+01 total \n", - "2 1 2 1 0.00e+00 6.25e-07 total \n", - "3 1 2 1 6.25e-07 2.00e+01 total \n", - "4 2 1 1 0.00e+00 6.25e-07 total \n", - "5 2 1 1 6.25e-07 2.00e+01 total \n", - "6 2 2 1 0.00e+00 6.25e-07 total \n", - "7 2 2 1 6.25e-07 2.00e+01 total \n", + " cell energy low [MeV] energy high [MeV] nuclide \\\n", + "0 1 0.00e+00 6.25e-07 total \n", + "1 1 6.25e-07 2.00e+01 total \n", "\n", - " score mean std. dev. \n", - " \n", - "0 ((absorption / flux) / (total / flux)) 7.61e-02 7.62e-04 \n", - "1 ((absorption / flux) / (total / flux)) 1.92e-02 1.60e-04 \n", - "2 ((absorption / flux) / (total / flux)) 7.62e-02 8.00e-04 \n", - "3 ((absorption / flux) / (total / flux)) 1.94e-02 1.36e-04 \n", - "4 ((absorption / flux) / (total / flux)) 7.62e-02 7.96e-04 \n", - "5 ((absorption / flux) / (total / flux)) 1.94e-02 1.54e-04 \n", - "6 ((absorption / flux) / (total / flux)) 7.60e-02 6.54e-04 \n", - "7 ((absorption / flux) / (total / flux)) 1.91e-02 1.53e-04 " + " score mean std. dev. \n", + "0 ((absorption / flux) / (total / flux)) 7.61e-02 6.49e-04 \n", + "1 ((absorption / flux) / (total / flux)) 1.93e-02 9.46e-05 " ] }, "execution_count": 22, @@ -1316,9 +1009,9 @@ "
\n", "\n", " \n", - " \n", + " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1326,142 +1019,40 @@ " \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", "
mesh 10000cellenergy low [MeV]energy high [MeV]nuclidemeanstd. dev.
xyz
01110.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9239230.0090540.9238850.007736
11116.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9807580.004247
21210.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9238270.009586
31216.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9806280.004411
42110.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9238170.009436
52116.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9806360.004180
62210.000000e+006.250000e-07total((scatter / flux) / (total / flux))0.9239730.007717
72216.250000e-072.000000e+01total((scatter / flux) / (total / flux))0.9809260.0046230.9807370.003737
\n", "
" ], "text/plain": [ - " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", - " x y z \n", - "0 1 1 1 0.00e+00 6.25e-07 total \n", - "1 1 1 1 6.25e-07 2.00e+01 total \n", - "2 1 2 1 0.00e+00 6.25e-07 total \n", - "3 1 2 1 6.25e-07 2.00e+01 total \n", - "4 2 1 1 0.00e+00 6.25e-07 total \n", - "5 2 1 1 6.25e-07 2.00e+01 total \n", - "6 2 2 1 0.00e+00 6.25e-07 total \n", - "7 2 2 1 6.25e-07 2.00e+01 total \n", + " cell energy low [MeV] energy high [MeV] nuclide \\\n", + "0 1 0.00e+00 6.25e-07 total \n", + "1 1 6.25e-07 2.00e+01 total \n", "\n", - " score mean std. dev. \n", - " \n", - "0 ((scatter / flux) / (total / flux)) 9.24e-01 9.05e-03 \n", - "1 ((scatter / flux) / (total / flux)) 9.81e-01 4.25e-03 \n", - "2 ((scatter / flux) / (total / flux)) 9.24e-01 9.59e-03 \n", - "3 ((scatter / flux) / (total / flux)) 9.81e-01 4.41e-03 \n", - "4 ((scatter / flux) / (total / flux)) 9.24e-01 9.44e-03 \n", - "5 ((scatter / flux) / (total / flux)) 9.81e-01 4.18e-03 \n", - "6 ((scatter / flux) / (total / flux)) 9.24e-01 7.72e-03 \n", - "7 ((scatter / flux) / (total / flux)) 9.81e-01 4.62e-03 " + " score mean std. dev. \n", + "0 ((scatter / flux) / (total / flux)) 9.24e-01 7.74e-03 \n", + "1 ((scatter / flux) / (total / flux)) 9.81e-01 3.74e-03 " ] }, "execution_count": 23, @@ -1497,9 +1088,9 @@ "
\n", "\n", " \n", - " \n", + " \n", " \n", - " \n", + " \n", " \n", " \n", " \n", @@ -1507,142 +1098,40 @@ " \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", "
mesh 10000cellenergy low [MeV]energy high [MeV]nuclidemeanstd. dev.
xyz
01110.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.0090860.007763
11116.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004250
21210.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.009619
31216.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004413
42110.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.009470
52116.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.004183
62210.000000e+006.250000e-07total(((absorption / flux) / (total / flux)) + ((sc...10.007745
72216.250000e-072.000000e+01total(((absorption / flux) / (total / flux)) + ((sc...10.0046260.003739
\n", "
" ], "text/plain": [ - " mesh 10000 energy low [MeV] energy high [MeV] nuclide \\\n", - " x y z \n", - "0 1 1 1 0.00e+00 6.25e-07 total \n", - "1 1 1 1 6.25e-07 2.00e+01 total \n", - "2 1 2 1 0.00e+00 6.25e-07 total \n", - "3 1 2 1 6.25e-07 2.00e+01 total \n", - "4 2 1 1 0.00e+00 6.25e-07 total \n", - "5 2 1 1 6.25e-07 2.00e+01 total \n", - "6 2 2 1 0.00e+00 6.25e-07 total \n", - "7 2 2 1 6.25e-07 2.00e+01 total \n", + " cell energy low [MeV] energy high [MeV] nuclide \\\n", + "0 1 0.00e+00 6.25e-07 total \n", + "1 1 6.25e-07 2.00e+01 total \n", "\n", - " score mean std. dev. \n", - " \n", - "0 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.09e-03 \n", - "1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.25e-03 \n", - "2 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.62e-03 \n", - "3 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.41e-03 \n", - "4 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 9.47e-03 \n", - "5 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.18e-03 \n", - "6 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 7.74e-03 \n", - "7 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 4.63e-03 " + " score mean std. dev. \n", + "0 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 7.76e-03 \n", + "1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 3.74e-03 " ] }, "execution_count": 24, From a00441ee14bec10badad33f78531e49ae6b050f5 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 29 Jul 2016 13:44:11 -0400 Subject: [PATCH 06/16] removed updates to mgxs notebooks --- .../pythonapi/examples/mgxs-part-i.ipynb | 102 +++++---- .../pythonapi/examples/mgxs-part-iii.ipynb | 212 +++++++++--------- 2 files changed, 161 insertions(+), 153 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-i.ipynb b/docs/source/pythonapi/examples/mgxs-part-i.ipynb index b4e6d84fef..7c5132100e 100644 --- a/docs/source/pythonapi/examples/mgxs-part-i.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-i.ipynb @@ -91,7 +91,7 @@ "\n", "$$\\sigma_{n,x,k,g} = \\frac{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\sigma_{n,x}(\\mathbf{r},E')\\Phi(\\mathbf{r},E')}{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\Phi(\\mathbf{r},E')}$$\n", "\n", - "This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](https://mit-crpg.github.io/openmc/pythonapi/filter.html) on the energy range and spatial zone (material, cell, universe, or mesh) define the bounds of integration for both numerator and denominator." + "This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](https://mit-crpg.github.io/openmc/pythonapi/filter.html) on the energy range and spatial zone (material, cell or universe) define the bounds of integration for both numerator and denominator." ] }, { @@ -513,10 +513,9 @@ "\n", " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", - " Version: 0.8.0\n", - " Git SHA1: 16e74656b028875a7ebcb90df07293c5f1cc56a4\n", - " Date/Time: 2016-07-29 13:40:25\n", - " MPI Processes: 1\n", + " Version: 0.7.1\n", + " Git SHA1: 3d68c07625e33cd64188df03ee03e9c31b3d4b74\n", + " Date/Time: 2016-07-22 21:03:18\n", "\n", " ===========================================================================\n", " ========================> INITIALIZATION <=========================\n", @@ -526,11 +525,11 @@ " Reading geometry XML file...\n", " Reading cross sections XML file...\n", " Reading materials XML file...\n", - " Reading H1.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/H1_71c.h5\n", - " Reading O16.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/O16_71c.h5\n", - " Reading U235.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/U235_71c.h5\n", - " Reading U238.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/U238_71c.h5\n", - " Reading Zr90.71c from /Users/sam/git/openmc-sam/data/nndc_hdf5/Zr90_71c.h5\n", + " Reading H1.71c from /home/romano/openmc/data/nndc_hdf5/H1_71c.h5\n", + " Reading O16.71c from /home/romano/openmc/data/nndc_hdf5/O16_71c.h5\n", + " Reading U235.71c from /home/romano/openmc/data/nndc_hdf5/U235_71c.h5\n", + " Reading U238.71c from /home/romano/openmc/data/nndc_hdf5/U238_71c.h5\n", + " Reading Zr90.71c from /home/romano/openmc/data/nndc_hdf5/Zr90_71c.h5\n", " Maximum neutron transport energy: 20.0000 MeV for H1.71c\n", " Reading tallies XML file...\n", " Building neighboring cells lists for each surface...\n", @@ -601,20 +600,20 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 3.9900E-01 seconds\n", - " Reading cross sections = 2.1800E-01 seconds\n", - " Total time in simulation = 2.0870E+01 seconds\n", - " Time in transport only = 2.0855E+01 seconds\n", - " Time in inactive batches = 2.3100E+00 seconds\n", - " Time in active batches = 1.8560E+01 seconds\n", + " Total time for initialization = 3.2300E-01 seconds\n", + " Reading cross sections = 1.6900E-01 seconds\n", + " Total time in simulation = 1.9882E+01 seconds\n", + " Time in transport only = 1.9869E+01 seconds\n", + " Time in inactive batches = 2.6590E+00 seconds\n", + " Time in active batches = 1.7223E+01 seconds\n", " Time synchronizing fission bank = 4.0000E-03 seconds\n", - " Sampling source sites = 3.0000E-03 seconds\n", - " SEND/RECV source sites = 1.0000E-03 seconds\n", - " Time accumulating tallies = 2.0000E-03 seconds\n", - " Total time for finalization = 1.0000E-03 seconds\n", - " Total time elapsed = 2.1283E+01 seconds\n", - " Calculation Rate (inactive) = 10822.5 neutrons/second\n", - " Calculation Rate (active) = 5387.93 neutrons/second\n", + " Sampling source sites = 4.0000E-03 seconds\n", + " SEND/RECV source sites = 0.0000E+00 seconds\n", + " Time accumulating tallies = 0.0000E+00 seconds\n", + " Total time for finalization = 0.0000E+00 seconds\n", + " Total time elapsed = 2.0217E+01 seconds\n", + " Calculation Rate (inactive) = 9402.03 neutrons/second\n", + " Calculation Rate (active) = 5806.19 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -815,12 +814,30 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The following code snippet shows how to export all three `MGXS` to the same HDF5 binary data store." + "Each multi-group cross section object can be easily exported to a variety of file formats, including CSV, Excel, and LaTeX for storage or data processing." ] }, { "cell_type": "code", "execution_count": 20, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "absorption.export_xs_data(filename='absorption-xs', format='excel')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The following code snippet shows how to export all three `MGXS` to the same HDF5 binary data store." + ] + }, + { + "cell_type": "code", + "execution_count": 21, "metadata": { "collapsed": false }, @@ -847,7 +864,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 22, "metadata": { "collapsed": false }, @@ -877,7 +894,7 @@ " 6.250000e-07\n", " total\n", " (((total / flux) - (absorption / flux)) - (sca...\n", - " -3.996803e-15\n", + " -3.774758e-15\n", " 0.011292\n", " \n", " \n", @@ -887,7 +904,7 @@ " 2.000000e+01\n", " total\n", " (((total / flux) - (absorption / flux)) - (sca...\n", - " 5.551115e-16\n", + " 1.443290e-15\n", " 0.002570\n", " \n", " \n", @@ -900,11 +917,11 @@ "1 1 6.25e-07 2.00e+01 total \n", "\n", " score mean std. dev. \n", - "0 (((total / flux) - (absorption / flux)) - (sca... -4.00e-15 1.13e-02 \n", - "1 (((total / flux) - (absorption / flux)) - (sca... 5.55e-16 2.57e-03 " + "0 (((total / flux) - (absorption / flux)) - (sca... -3.77e-15 1.13e-02 \n", + "1 (((total / flux) - (absorption / flux)) - (sca... 1.44e-15 2.57e-03 " ] }, - "execution_count": 21, + "execution_count": 22, "metadata": {}, "output_type": "execute_result" } @@ -926,7 +943,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 23, "metadata": { "collapsed": false }, @@ -983,7 +1000,7 @@ "1 ((absorption / flux) / (total / flux)) 1.93e-02 9.46e-05 " ] }, - "execution_count": 22, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -998,7 +1015,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 24, "metadata": { "collapsed": false }, @@ -1055,7 +1072,7 @@ "1 ((scatter / flux) / (total / flux)) 9.81e-01 3.74e-03 " ] }, - "execution_count": 23, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1077,7 +1094,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 25, "metadata": { "collapsed": false }, @@ -1107,7 +1124,7 @@ " 6.250000e-07\n", " total\n", " (((absorption / flux) / (total / flux)) + ((sc...\n", - " 1\n", + " 1.0\n", " 0.007763\n", " \n", " \n", @@ -1117,7 +1134,7 @@ " 2.000000e+01\n", " total\n", " (((absorption / flux) / (total / flux)) + ((sc...\n", - " 1\n", + " 1.0\n", " 0.003739\n", " \n", " \n", @@ -1134,7 +1151,7 @@ "1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 3.74e-03 " ] }, - "execution_count": 24, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -1146,15 +1163,6 @@ "# The scattering-to-total ratio is a derived tally which can generate Pandas DataFrames for inspection\n", "sum_ratio.get_pandas_dataframe()" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": true - }, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb index aa243cfc22..39980a8fd7 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb @@ -32,7 +32,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/wboyd/anaconda2/lib/python2.7/site-packages/matplotlib/__init__.py:1350: UserWarning: This call to matplotlib.use() has no effect\n", + "/home/romano/miniconda3/envs/default/lib/python3.5/site-packages/matplotlib/__init__.py:1350: UserWarning: This call to matplotlib.use() has no effect\n", "because the backend has already been chosen;\n", "matplotlib.use() must be called *before* pylab, matplotlib.pyplot,\n", "or matplotlib.backends is imported for the first time.\n", @@ -75,12 +75,12 @@ "outputs": [], "source": [ "# Instantiate some Nuclides\n", - "h1 = openmc.Nuclide('H-1')\n", - "b10 = openmc.Nuclide('B-10')\n", - "o16 = openmc.Nuclide('O-16')\n", - "u235 = openmc.Nuclide('U-235')\n", - "u238 = openmc.Nuclide('U-238')\n", - "zr90 = openmc.Nuclide('Zr-90')" + "h1 = openmc.Nuclide('H1')\n", + "b10 = openmc.Nuclide('B10')\n", + "o16 = openmc.Nuclide('O16')\n", + "u235 = openmc.Nuclide('U235')\n", + "u238 = openmc.Nuclide('U238')\n", + "zr90 = openmc.Nuclide('Zr90')" ] }, { @@ -458,7 +458,7 @@ "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AFDhAdBviGIzgAAAWFSURBVGje7Zs7cttADIZ9CSvX\ncrP0iCxUqbBc8Ag6xR6BhV2EvYvwFD4CCx1ABT1jMdgndpegRQnOrCbjpPlGESISC4A/gd27e8H5\n83CX3b4+iKJrRHkS4vkghMPBonRYWGwtfgD2YN+dRDUOoh6lACw0Noi9w2fESuEoAR/uVuMolX03\n9oXGT7F3eFL2iEfhUX1f4cPdL/ishs+68ai+udE4xPhexbjX2FfjGNoPj/DPNX4Tsd+EODr8FvsV\ndf1Hd9P2VvCi4+s/aXvrf+upAD+1/9GV1mk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H9T/Sv\nVboUmqJJon1/hZq8LnzRDlDrX1u0xRT1+6vEpomMmyYkqi95vIH8yW1PN+122KkLcNLKi/WTF01z\n/cNASrWE/l3ev6T17zX909z9X27/euK/Rf3zWP+Waf9eEv37KkWJ+rfDl6ZglNDa+cEBhwYDvkoN\nP/rX69814NaI3imq0l7OYDy/qSdDGwr7r+Y3VbzoKZr6XX2lfxfOb87qXzr+b1j/Xlp/nP6dn98M\ncdH7cn7zjPObKsYWS3Eb9w8n85smHtqQuPuZ30T2dlIT6F9xFl+n8xslegL9a4c2KRr9W4rp/GYq\numiM9Nec/j2v/yj9u1h//hv9e93vc++f63/u+rPjL3f+5Lbn1j9m/eXWf+7zh/v8+2b9e/Hzn6s/\nuPqHrb8g71n6L3f+5Lbnvn8w33+4718/+5d47//c/gO7/5E7/nPbc/tv3P4fs//I7X9y+6/fqH+v\n6j9z+9/c/ju3/8+eP+TOn9z23PkXc/7Gnf9x5483q38Xzn+582fu/Js9fy8kb/6fO39y23P3n3S8\n/S/c/Tfc/T83uX/pgv1XE/9duP+Lu/+Mvf8td/znti8kb/8ld/9nx9t/Sjw/Ltr/yt1/+337f6/b\nf0zoB3nJ/ucVc/81d/83e/957vzJbc89/8A8f8E9/5HE78XnT/4H/cs5f8Q9/8Q9f8U+/5U7f3Lb\nc88fdrzzjyvm+cuf/Uu887/c88fs88954/8vO4SjPC+2QRIAAAAldEVYdGRhdGU6Y3JlYXRlADIw\nMTYtMDctMjNUMTY6NDI6MzItMDU6MDDOEzLAAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA3LTIz\nVDE2OjQyOjMyLTA1OjAwv06KfAAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] @@ -728,27 +728,26 @@ " Copyright: 2011-2016 Massachusetts Institute of Technology\n", " License: http://openmc.readthedocs.io/en/latest/license.html\n", " Version: 0.7.1\n", - " Git SHA1: 47ef320ad517612376e181ec6a6bc42ca0db98ce\n", - " Date/Time: 2016-05-14 12:29:07\n", - " MPI Processes: 1\n", + " Git SHA1: 3d68c07625e33cd64188df03ee03e9c31b3d4b74\n", + " Date/Time: 2016-07-23 16:42:32\n", "\n", " ===========================================================================\n", " ========================> INITIALIZATION <=========================\n", " ===========================================================================\n", "\n", " Reading settings XML file...\n", - " Reading cross sections XML file...\n", " Reading geometry XML file...\n", + " Reading cross sections XML file...\n", " Reading materials XML file...\n", + " Reading U235.71c from /home/romano/openmc/data/nndc_hdf5/U235_71c.h5\n", + " Reading U238.71c from /home/romano/openmc/data/nndc_hdf5/U238_71c.h5\n", + " Reading O16.71c from /home/romano/openmc/data/nndc_hdf5/O16_71c.h5\n", + " Reading H1.71c from /home/romano/openmc/data/nndc_hdf5/H1_71c.h5\n", + " Reading B10.71c from /home/romano/openmc/data/nndc_hdf5/B10_71c.h5\n", + " Reading Zr90.71c from /home/romano/openmc/data/nndc_hdf5/Zr90_71c.h5\n", + " Maximum neutron transport energy: 20.0000 MeV for U235.71c\n", " Reading tallies XML file...\n", " Building neighboring cells lists for each surface...\n", - " Loading ACE cross section table: 92235.71c\n", - " Loading ACE cross section table: 92238.71c\n", - " Loading ACE cross section table: 8016.71c\n", - " Loading ACE cross section table: 1001.71c\n", - " Loading ACE cross section table: 5010.71c\n", - " Loading ACE cross section table: 40090.71c\n", - " Maximum neutron transport energy: 20.0000 MeV for 92235.71c\n", " Initializing source particles...\n", "\n", " ===========================================================================\n", @@ -816,20 +815,20 @@ "\n", " =======================> TIMING STATISTICS <=======================\n", "\n", - " Total time for initialization = 5.7700E-01 seconds\n", - " Reading cross sections = 1.3400E-01 seconds\n", - " Total time in simulation = 8.0461E+01 seconds\n", - " Time in transport only = 8.0422E+01 seconds\n", - " Time in inactive batches = 6.4060E+00 seconds\n", - " Time in active batches = 7.4055E+01 seconds\n", - " Time synchronizing fission bank = 6.0000E-03 seconds\n", - " Sampling source sites = 2.0000E-03 seconds\n", - " SEND/RECV source sites = 3.0000E-03 seconds\n", + " Total time for initialization = 4.3400E-01 seconds\n", + " Reading cross sections = 2.7900E-01 seconds\n", + " Total time in simulation = 6.1121E+01 seconds\n", + " Time in transport only = 6.1101E+01 seconds\n", + " Time in inactive batches = 5.0660E+00 seconds\n", + " Time in active batches = 5.6055E+01 seconds\n", + " Time synchronizing fission bank = 5.0000E-03 seconds\n", + " Sampling source sites = 3.0000E-03 seconds\n", + " SEND/RECV source sites = 2.0000E-03 seconds\n", " Time accumulating tallies = 0.0000E+00 seconds\n", " Total time for finalization = 0.0000E+00 seconds\n", - " Total time elapsed = 8.1067E+01 seconds\n", - " Calculation Rate (inactive) = 3902.59 neutrons/second\n", - " Calculation Rate (active) = 1350.35 neutrons/second\n", + " Total time elapsed = 6.1576E+01 seconds\n", + " Calculation Rate (inactive) = 4934.86 neutrons/second\n", + " Calculation Rate (active) = 1783.96 neutrons/second\n", "\n", " ============================> RESULTS <============================\n", "\n", @@ -956,7 +955,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/wboyd/Documents/NSE-CRPG-Codes/openmc/openmc/tallies.py:1988: RuntimeWarning: invalid value encountered in true_divide\n", + "/home/romano/openmc/openmc/tallies.py:1941: RuntimeWarning: invalid value encountered in true_divide\n", " self_rel_err = data['self']['std. dev.'] / data['self']['mean']\n" ] }, @@ -980,7 +979,7 @@ " 3\n", " 10000\n", " 1\n", - " U-235\n", + " U235\n", " 8.055246e-03\n", " 2.857567e-05\n", " \n", @@ -988,7 +987,7 @@ " 4\n", " 10000\n", " 1\n", - " U-238\n", + " U238\n", " 7.339215e-03\n", " 4.349466e-05\n", " \n", @@ -996,7 +995,7 @@ " 5\n", " 10000\n", " 1\n", - " O-16\n", + " O16\n", " 0.000000e+00\n", " 0.000000e+00\n", " \n", @@ -1004,7 +1003,7 @@ " 0\n", " 10000\n", " 2\n", - " U-235\n", + " U235\n", " 3.615565e-01\n", " 2.050486e-03\n", " \n", @@ -1012,7 +1011,7 @@ " 1\n", " 10000\n", " 2\n", - " U-238\n", + " U238\n", " 6.742638e-07\n", " 3.795256e-09\n", " \n", @@ -1020,7 +1019,7 @@ " 2\n", " 10000\n", " 2\n", - " O-16\n", + " O16\n", " 0.000000e+00\n", " 0.000000e+00\n", " \n", @@ -1030,12 +1029,12 @@ ], "text/plain": [ " cell group in nuclide mean std. dev.\n", - "3 10000 1 U-235 8.055246e-03 2.857567e-05\n", - "4 10000 1 U-238 7.339215e-03 4.349466e-05\n", - "5 10000 1 O-16 0.000000e+00 0.000000e+00\n", - "0 10000 2 U-235 3.615565e-01 2.050486e-03\n", - "1 10000 2 U-238 6.742638e-07 3.795256e-09\n", - "2 10000 2 O-16 0.000000e+00 0.000000e+00" + "3 10000 1 U235 8.055246e-03 2.857567e-05\n", + "4 10000 1 U238 7.339215e-03 4.349466e-05\n", + "5 10000 1 O16 0.000000e+00 0.000000e+00\n", + "0 10000 2 U235 3.615565e-01 2.050486e-03\n", + "1 10000 2 U238 6.742638e-07 3.795256e-09\n", + "2 10000 2 O16 0.000000e+00 0.000000e+00" ] }, "execution_count": 30, @@ -1070,17 +1069,17 @@ "\tReaction Type =\tnu-fission\n", "\tDomain Type =\tcell\n", "\tDomain ID =\t10000\n", - "\tNuclide =\tU-235\n", + "\tNuclide =\tU235\n", "\tCross Sections [cm^-1]:\n", " Group 1 [6.25e-07 - 20.0 MeV]:\t8.06e-03 +/- 3.55e-01%\n", " Group 2 [0.0 - 6.25e-07 MeV]:\t3.62e-01 +/- 5.67e-01%\n", "\n", - "\tNuclide =\tU-238\n", + "\tNuclide =\tU238\n", "\tCross Sections [cm^-1]:\n", " Group 1 [6.25e-07 - 20.0 MeV]:\t7.34e-03 +/- 5.93e-01%\n", " Group 2 [0.0 - 6.25e-07 MeV]:\t6.74e-07 +/- 5.63e-01%\n", "\n", - "\tNuclide =\tO-16\n", + "\tNuclide =\tO16\n", "\tCross Sections [cm^-1]:\n", " Group 1 [6.25e-07 - 20.0 MeV]:\t0.00e+00 +/- nan%\n", " Group 2 [0.0 - 6.25e-07 MeV]:\t0.00e+00 +/- nan%\n", @@ -1193,7 +1192,7 @@ " 0\n", " 10000\n", " 1\n", - " U-235\n", + " U235\n", " 0.074860\n", " 0.000303\n", " \n", @@ -1201,7 +1200,7 @@ " 1\n", " 10000\n", " 1\n", - " U-238\n", + " U238\n", " 0.005952\n", " 0.000035\n", " \n", @@ -1209,7 +1208,7 @@ " 2\n", " 10000\n", " 1\n", - " O-16\n", + " O16\n", " 0.000000\n", " 0.000000\n", " \n", @@ -1219,9 +1218,9 @@ ], "text/plain": [ " cell group in nuclide mean std. dev.\n", - "0 10000 1 U-235 0.074860 0.000303\n", - "1 10000 1 U-238 0.005952 0.000035\n", - "2 10000 1 O-16 0.000000 0.000000" + "0 10000 1 U235 0.074860 0.000303\n", + "1 10000 1 U238 0.005952 0.000035\n", + "2 10000 1 O16 0.000000 0.000000" ] }, "execution_count": 36, @@ -1301,7 +1300,8 @@ "name": "stdout", "output_type": "stream", "text": [ - "[ NORMAL ] Importing ray tracing data from file...\n", + "[ NORMAL ] Ray tracing for track segmentation...\n", + "[ NORMAL ] Dumping tracks to file...\n", "[ NORMAL ] Computing the eigenvalue...\n", "[ NORMAL ] Iteration 0:\tk_eff = 0.854370\tres = 0.000E+00\n", "[ NORMAL ] Iteration 1:\tk_eff = 0.801922\tres = 1.521E-01\n", @@ -1314,42 +1314,42 @@ "[ NORMAL ] Iteration 8:\tk_eff = 0.683124\tres = 6.142E-03\n", "[ NORMAL ] Iteration 9:\tk_eff = 0.685943\tres = 7.897E-04\n", "[ NORMAL ] Iteration 10:\tk_eff = 0.691322\tres = 4.180E-03\n", - "[ NORMAL ] Iteration 11:\tk_eff = 0.698747\tres = 7.873E-03\n", + "[ NORMAL ] Iteration 11:\tk_eff = 0.698746\tres = 7.873E-03\n", "[ NORMAL ] Iteration 12:\tk_eff = 0.707777\tres = 1.076E-02\n", - "[ NORMAL ] Iteration 13:\tk_eff = 0.718040\tres = 1.295E-02\n", + "[ NORMAL ] Iteration 13:\tk_eff = 0.718039\tres = 1.295E-02\n", "[ NORMAL ] Iteration 14:\tk_eff = 0.729218\tres = 1.452E-02\n", "[ NORMAL ] Iteration 15:\tk_eff = 0.741045\tres = 1.559E-02\n", "[ NORMAL ] Iteration 16:\tk_eff = 0.753296\tres = 1.624E-02\n", - "[ NORMAL ] Iteration 17:\tk_eff = 0.765785\tres = 1.655E-02\n", + "[ NORMAL ] Iteration 17:\tk_eff = 0.765784\tres = 1.655E-02\n", "[ NORMAL ] Iteration 18:\tk_eff = 0.778355\tres = 1.659E-02\n", "[ NORMAL ] Iteration 19:\tk_eff = 0.790879\tres = 1.643E-02\n", - "[ NORMAL ] Iteration 20:\tk_eff = 0.803254\tres = 1.610E-02\n", + "[ NORMAL ] Iteration 20:\tk_eff = 0.803253\tres = 1.610E-02\n", "[ NORMAL ] Iteration 21:\tk_eff = 0.815394\tres = 1.566E-02\n", "[ NORMAL ] Iteration 22:\tk_eff = 0.827235\tres = 1.513E-02\n", "[ NORMAL ] Iteration 23:\tk_eff = 0.838724\tres = 1.453E-02\n", "[ NORMAL ] Iteration 24:\tk_eff = 0.849823\tres = 1.390E-02\n", - "[ NORMAL ] Iteration 25:\tk_eff = 0.860503\tres = 1.324E-02\n", + "[ NORMAL ] Iteration 25:\tk_eff = 0.860502\tres = 1.324E-02\n", "[ NORMAL ] Iteration 26:\tk_eff = 0.870744\tres = 1.258E-02\n", "[ NORMAL ] Iteration 27:\tk_eff = 0.880535\tres = 1.191E-02\n", - "[ NORMAL ] Iteration 28:\tk_eff = 0.889870\tres = 1.125E-02\n", - "[ NORMAL ] Iteration 29:\tk_eff = 0.898748\tres = 1.061E-02\n", + "[ NORMAL ] Iteration 28:\tk_eff = 0.889869\tres = 1.125E-02\n", + "[ NORMAL ] Iteration 29:\tk_eff = 0.898747\tres = 1.061E-02\n", "[ NORMAL ] Iteration 30:\tk_eff = 0.907172\tres = 9.985E-03\n", - "[ NORMAL ] Iteration 31:\tk_eff = 0.915151\tres = 9.382E-03\n", - "[ NORMAL ] Iteration 32:\tk_eff = 0.922693\tres = 8.802E-03\n", - "[ NORMAL ] Iteration 33:\tk_eff = 0.929811\tres = 8.248E-03\n", + "[ NORMAL ] Iteration 31:\tk_eff = 0.915150\tres = 9.382E-03\n", + "[ NORMAL ] Iteration 32:\tk_eff = 0.922692\tres = 8.802E-03\n", + "[ NORMAL ] Iteration 33:\tk_eff = 0.929810\tres = 8.248E-03\n", "[ NORMAL ] Iteration 34:\tk_eff = 0.936517\tres = 7.720E-03\n", "[ NORMAL ] Iteration 35:\tk_eff = 0.942827\tres = 7.219E-03\n", - "[ NORMAL ] Iteration 36:\tk_eff = 0.948757\tres = 6.744E-03\n", - "[ NORMAL ] Iteration 37:\tk_eff = 0.954322\tres = 6.295E-03\n", + "[ NORMAL ] Iteration 36:\tk_eff = 0.948756\tres = 6.744E-03\n", + "[ NORMAL ] Iteration 37:\tk_eff = 0.954321\tres = 6.295E-03\n", "[ NORMAL ] Iteration 38:\tk_eff = 0.959539\tres = 5.871E-03\n", - "[ NORMAL ] Iteration 39:\tk_eff = 0.964425\tres = 5.472E-03\n", - "[ NORMAL ] Iteration 40:\tk_eff = 0.968996\tres = 5.096E-03\n", + "[ NORMAL ] Iteration 39:\tk_eff = 0.964424\tres = 5.472E-03\n", + "[ NORMAL ] Iteration 40:\tk_eff = 0.968995\tres = 5.096E-03\n", "[ NORMAL ] Iteration 41:\tk_eff = 0.973268\tres = 4.744E-03\n", - "[ NORMAL ] Iteration 42:\tk_eff = 0.977259\tres = 4.413E-03\n", - "[ NORMAL ] Iteration 43:\tk_eff = 0.980982\tres = 4.104E-03\n", - "[ NORMAL ] Iteration 44:\tk_eff = 0.984454\tres = 3.814E-03\n", + "[ NORMAL ] Iteration 42:\tk_eff = 0.977258\tres = 4.413E-03\n", + "[ NORMAL ] Iteration 43:\tk_eff = 0.980981\tres = 4.104E-03\n", + "[ NORMAL ] Iteration 44:\tk_eff = 0.984453\tres = 3.814E-03\n", "[ NORMAL ] Iteration 45:\tk_eff = 0.987689\tres = 3.543E-03\n", - "[ NORMAL ] Iteration 46:\tk_eff = 0.990702\tres = 3.289E-03\n", + "[ NORMAL ] Iteration 46:\tk_eff = 0.990701\tres = 3.289E-03\n", "[ NORMAL ] Iteration 47:\tk_eff = 0.993505\tres = 3.053E-03\n", "[ NORMAL ] Iteration 48:\tk_eff = 0.996112\tres = 2.832E-03\n", "[ NORMAL ] Iteration 49:\tk_eff = 0.998536\tres = 2.627E-03\n", @@ -1369,12 +1369,12 @@ "[ NORMAL ] Iteration 63:\tk_eff = 1.018721\tres = 8.864E-04\n", "[ NORMAL ] Iteration 64:\tk_eff = 1.019490\tres = 8.187E-04\n", "[ NORMAL ] Iteration 65:\tk_eff = 1.020201\tres = 7.560E-04\n", - "[ NORMAL ] Iteration 66:\tk_eff = 1.020858\tres = 6.980E-04\n", - "[ NORMAL ] Iteration 67:\tk_eff = 1.021464\tres = 6.444E-04\n", + "[ NORMAL ] Iteration 66:\tk_eff = 1.020857\tres = 6.980E-04\n", + "[ NORMAL ] Iteration 67:\tk_eff = 1.021464\tres = 6.443E-04\n", "[ NORMAL ] Iteration 68:\tk_eff = 1.022024\tres = 5.947E-04\n", - "[ NORMAL ] Iteration 69:\tk_eff = 1.022541\tres = 5.488E-04\n", + "[ NORMAL ] Iteration 69:\tk_eff = 1.022540\tres = 5.488E-04\n", "[ NORMAL ] Iteration 70:\tk_eff = 1.023017\tres = 5.063E-04\n", - "[ NORMAL ] Iteration 71:\tk_eff = 1.023458\tres = 4.670E-04\n", + "[ NORMAL ] Iteration 71:\tk_eff = 1.023457\tres = 4.670E-04\n", "[ NORMAL ] Iteration 72:\tk_eff = 1.023863\tres = 4.308E-04\n", "[ NORMAL ] Iteration 73:\tk_eff = 1.024238\tres = 3.972E-04\n", "[ NORMAL ] Iteration 74:\tk_eff = 1.024583\tres = 3.663E-04\n", @@ -1389,38 +1389,38 @@ "[ NORMAL ] Iteration 83:\tk_eff = 1.026697\tres = 1.753E-04\n", "[ NORMAL ] Iteration 84:\tk_eff = 1.026849\tres = 1.614E-04\n", "[ NORMAL ] Iteration 85:\tk_eff = 1.026989\tres = 1.487E-04\n", - "[ NORMAL ] Iteration 86:\tk_eff = 1.027118\tres = 1.369E-04\n", + "[ NORMAL ] Iteration 86:\tk_eff = 1.027118\tres = 1.368E-04\n", "[ NORMAL ] Iteration 87:\tk_eff = 1.027237\tres = 1.260E-04\n", - "[ NORMAL ] Iteration 88:\tk_eff = 1.027347\tres = 1.160E-04\n", + "[ NORMAL ] Iteration 88:\tk_eff = 1.027346\tres = 1.159E-04\n", "[ NORMAL ] Iteration 89:\tk_eff = 1.027447\tres = 1.067E-04\n", - "[ NORMAL ] Iteration 90:\tk_eff = 1.027540\tres = 9.823E-05\n", - "[ NORMAL ] Iteration 91:\tk_eff = 1.027625\tres = 9.039E-05\n", - "[ NORMAL ] Iteration 92:\tk_eff = 1.027704\tres = 8.317E-05\n", - "[ NORMAL ] Iteration 93:\tk_eff = 1.027776\tres = 7.652E-05\n", - "[ NORMAL ] Iteration 94:\tk_eff = 1.027843\tres = 7.040E-05\n", - "[ NORMAL ] Iteration 95:\tk_eff = 1.027904\tres = 6.476E-05\n", - "[ NORMAL ] Iteration 96:\tk_eff = 1.027960\tres = 5.957E-05\n", - "[ NORMAL ] Iteration 97:\tk_eff = 1.028012\tres = 5.479E-05\n", - "[ NORMAL ] Iteration 98:\tk_eff = 1.028059\tres = 5.039E-05\n", - "[ NORMAL ] Iteration 99:\tk_eff = 1.028103\tres = 4.635E-05\n", - "[ NORMAL ] Iteration 100:\tk_eff = 1.028143\tres = 4.262E-05\n", - "[ NORMAL ] Iteration 101:\tk_eff = 1.028180\tres = 3.919E-05\n", - "[ NORMAL ] Iteration 102:\tk_eff = 1.028214\tres = 3.603E-05\n", - "[ NORMAL ] Iteration 103:\tk_eff = 1.028245\tres = 3.313E-05\n", - "[ NORMAL ] Iteration 104:\tk_eff = 1.028274\tres = 3.046E-05\n", + "[ NORMAL ] Iteration 90:\tk_eff = 1.027540\tres = 9.821E-05\n", + "[ NORMAL ] Iteration 91:\tk_eff = 1.027625\tres = 9.040E-05\n", + "[ NORMAL ] Iteration 92:\tk_eff = 1.027703\tres = 8.316E-05\n", + "[ NORMAL ] Iteration 93:\tk_eff = 1.027775\tres = 7.652E-05\n", + "[ NORMAL ] Iteration 94:\tk_eff = 1.027842\tres = 7.039E-05\n", + "[ NORMAL ] Iteration 95:\tk_eff = 1.027903\tres = 6.480E-05\n", + "[ NORMAL ] Iteration 96:\tk_eff = 1.027959\tres = 5.959E-05\n", + "[ NORMAL ] Iteration 97:\tk_eff = 1.028011\tres = 5.479E-05\n", + "[ NORMAL ] Iteration 98:\tk_eff = 1.028058\tres = 5.043E-05\n", + "[ NORMAL ] Iteration 99:\tk_eff = 1.028102\tres = 4.633E-05\n", + "[ NORMAL ] Iteration 100:\tk_eff = 1.028142\tres = 4.265E-05\n", + "[ NORMAL ] Iteration 101:\tk_eff = 1.028180\tres = 3.921E-05\n", + "[ NORMAL ] Iteration 102:\tk_eff = 1.028214\tres = 3.605E-05\n", + "[ NORMAL ] Iteration 103:\tk_eff = 1.028245\tres = 3.315E-05\n", + "[ NORMAL ] Iteration 104:\tk_eff = 1.028273\tres = 3.047E-05\n", "[ NORMAL ] Iteration 105:\tk_eff = 1.028300\tres = 2.800E-05\n", - "[ NORMAL ] Iteration 106:\tk_eff = 1.028324\tres = 2.574E-05\n", - "[ NORMAL ] Iteration 107:\tk_eff = 1.028347\tres = 2.366E-05\n", - "[ NORMAL ] Iteration 108:\tk_eff = 1.028367\tres = 2.175E-05\n", - "[ NORMAL ] Iteration 109:\tk_eff = 1.028386\tres = 1.999E-05\n", + "[ NORMAL ] Iteration 106:\tk_eff = 1.028324\tres = 2.575E-05\n", + "[ NORMAL ] Iteration 107:\tk_eff = 1.028346\tres = 2.368E-05\n", + "[ NORMAL ] Iteration 108:\tk_eff = 1.028367\tres = 2.176E-05\n", + "[ NORMAL ] Iteration 109:\tk_eff = 1.028386\tres = 2.003E-05\n", "[ NORMAL ] Iteration 110:\tk_eff = 1.028403\tres = 1.837E-05\n", - "[ NORMAL ] Iteration 111:\tk_eff = 1.028419\tres = 1.688E-05\n", - "[ NORMAL ] Iteration 112:\tk_eff = 1.028434\tres = 1.551E-05\n", + "[ NORMAL ] Iteration 111:\tk_eff = 1.028419\tres = 1.690E-05\n", + "[ NORMAL ] Iteration 112:\tk_eff = 1.028434\tres = 1.553E-05\n", "[ NORMAL ] Iteration 113:\tk_eff = 1.028447\tres = 1.426E-05\n", - "[ NORMAL ] Iteration 114:\tk_eff = 1.028460\tres = 1.310E-05\n", - "[ NORMAL ] Iteration 115:\tk_eff = 1.028471\tres = 1.204E-05\n", - "[ NORMAL ] Iteration 116:\tk_eff = 1.028481\tres = 1.106E-05\n", - "[ NORMAL ] Iteration 117:\tk_eff = 1.028491\tres = 1.016E-05\n" + "[ NORMAL ] Iteration 114:\tk_eff = 1.028459\tres = 1.309E-05\n", + "[ NORMAL ] Iteration 115:\tk_eff = 1.028471\tres = 1.202E-05\n", + "[ NORMAL ] Iteration 116:\tk_eff = 1.028481\tres = 1.107E-05\n", + "[ NORMAL ] Iteration 117:\tk_eff = 1.028491\tres = 1.015E-05\n" ] } ], @@ -1562,7 +1562,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 43, @@ -1571,9 +1571,9 @@ }, { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAADDCAYAAABJYEAIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmcFNW1B/DfmRl2ZpAdBoGRVQXZlyjgjHHlqSBuwSWB\nGJen5sU8TRSjzwHME6LGuBtfHgFjUCIqQV8SxY1BFlkFBMEFGEA2QZBF1pk574+qgZ6hu071LN19\n8ff9fPjQ03W67u2q06e7q+vWFVUFERG5IS3ZHSAiovBYtImIHMKiTUTkEBZtIiKHsGgTETmERZuI\nyCEs2kkkIs+JyH2VePy9IvI/VdknouogIgNFZFUlHt9aRPaIiFRlv1yUUkVbREaKyH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fdVfB1IAvqyq/VXVDiPT\nMIRFFb8XwHuq2hvABwDsZf7qjy9MFHTa9WElbnYN1INt1+eT9hAAy1R1japWAhgHYGQ91n+wCPK8\nGylLVPGRAF50t1+Ef83QBuULFgWddn2YiJtdA/Vj2/V50XoA8M6tXufK8h0F8K6IzBCRmxu6MbWg\ni6qWAoCqbgQQJSJpQxPHKOi06/oljnYNHELbzutf2jxhmKoOAPBVALeJiL1qfX6S72M7fwfgOFU9\nHcBGOFHQyeGDdl1/HFLbrk+nXQLgaE/6SFeW16jqBvf/ZgAT4bwOx4FSEekK1ASr3dTA7cmJqm7W\n9KSBPwMICVmSl9Cu65dY2TVw6G27Pp32DADHi8gxItIEwBgAk+qx/lojIi1EpJW73RLABcjf6Ny+\nqOJwzu0N7vb1AN6s7wYZfFGioNOuDy9xs2vgMNt2vaw9AgCqWiUitwOYDOfH4jlVzffluroCmOhO\nV24E4GVVndzAbQqQJar4owDGi8iNANYAuKrhWujnixQFnXZ9+IibXQP1Y9ucxk4IITGCHyIJISRG\n0GkTQkiMoNMmhJAYQadNCCExgk6bEEJiBJ02IYTECDptQgiJEXTahBASI/4/n9C4+LslnowAAAAA\nSUVORK5CYII=\n", "text/plain": [ - "" + "" ] }, "metadata": {}, From fc56da57fd66f1603c819b29004ed0b5e2c5229b Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 29 Jul 2016 13:46:03 -0400 Subject: [PATCH 07/16] removed implement mesh domain todos --- openmc/mgxs/mgxs.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 1ef3194be0..ca5adcceb5 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -42,7 +42,6 @@ MGXS_TYPES = ['total', # Supported domain types -# TODO: Implement Mesh domains DOMAIN_TYPES = ['cell', 'distribcell', 'universe', @@ -50,7 +49,6 @@ DOMAIN_TYPES = ['cell', 'mesh'] # Supported domain classes -# TODO: Implement Mesh domains _DOMAINS = (openmc.Cell, openmc.Universe, openmc.Material, From 90cd17c3ec8c0d324d38bbb35a3ca60504a21676 Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Fri, 29 Jul 2016 20:53:27 +0000 Subject: [PATCH 08/16] updated test results --- openmc/mgxs/mgxs.py | 21 +++++++++++++++++++ .../inputs_true.dat | 2 +- .../inputs_true.dat | 2 +- .../inputs_true.dat | 2 +- .../inputs_true.dat | 2 +- .../results_true.dat | 2 +- tests/test_tallies/inputs_true.dat | 2 +- 7 files changed, 27 insertions(+), 6 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 4f87953f53..e3697010b0 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1749,6 +1749,13 @@ class MatrixMGXS(MGXS): cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) cv.check_value('xs_type', xs_type, ['macro', 'micro']) + # FIXME: Unable to get microscopic xs for mesh domain because the mesh + # cells do not know the nuclide densities in each mesh cell. + if self.domain_type == 'mesh' and xs_type == 'micro': + msg = 'Unable to get micro xs for mesh domain since the mesh ' \ + 'cells do not know the nuclide densities in each mesh cell.' + raise ValueError(msg) + filters = [] filter_bins = [] @@ -3567,6 +3574,13 @@ class ScatterMatrixXS(MatrixMGXS): cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) cv.check_value('xs_type', xs_type, ['macro', 'micro']) + # FIXME: Unable to get microscopic xs for mesh domain because the mesh + # cells do not know the nuclide densities in each mesh cell. + if self.domain_type == 'mesh' and xs_type == 'micro': + msg = 'Unable to get micro xs for mesh domain since the mesh ' \ + 'cells do not know the nuclide densities in each mesh cell.' + raise ValueError(msg) + filters = [] filter_bins = [] @@ -4538,6 +4552,13 @@ class Chi(MGXS): cv.check_value('value', value, ['mean', 'std_dev', 'rel_err']) cv.check_value('xs_type', xs_type, ['macro', 'micro']) + # FIXME: Unable to get microscopic xs for mesh domain because the mesh + # cells do not know the nuclide densities in each mesh cell. + if self.domain_type == 'mesh' and xs_type == 'micro': + msg = 'Unable to get micro xs for mesh domain since the mesh ' \ + 'cells do not know the nuclide densities in each mesh cell.' + raise ValueError(msg) + filters = [] filter_bins = [] diff --git a/tests/test_mgxs_library_condense/inputs_true.dat b/tests/test_mgxs_library_condense/inputs_true.dat index 181c5c59ca..0c648376e8 100644 --- a/tests/test_mgxs_library_condense/inputs_true.dat +++ b/tests/test_mgxs_library_condense/inputs_true.dat @@ -1 +1 @@ -e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e +e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e \ No newline at end of file diff --git a/tests/test_mgxs_library_distribcell/inputs_true.dat b/tests/test_mgxs_library_distribcell/inputs_true.dat index 4ad63a9470..055ce35a57 100644 --- a/tests/test_mgxs_library_distribcell/inputs_true.dat +++ b/tests/test_mgxs_library_distribcell/inputs_true.dat @@ -1 +1 @@ -2d948f3b12293294eaeca231a3df9d51195379e8bb38dd3e68d3bc512a7d08ed52a1109054ca381684ec127268710f6d6e9210ac8154c9b379608e996627624a +2d948f3b12293294eaeca231a3df9d51195379e8bb38dd3e68d3bc512a7d08ed52a1109054ca381684ec127268710f6d6e9210ac8154c9b379608e996627624a \ No newline at end of file diff --git a/tests/test_mgxs_library_no_nuclides/inputs_true.dat b/tests/test_mgxs_library_no_nuclides/inputs_true.dat index 181c5c59ca..0c648376e8 100644 --- a/tests/test_mgxs_library_no_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_no_nuclides/inputs_true.dat @@ -1 +1 @@ -e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e +e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e \ No newline at end of file diff --git a/tests/test_mgxs_library_nuclides/inputs_true.dat b/tests/test_mgxs_library_nuclides/inputs_true.dat index 0bf12fbb2a..a15bbee4c8 100644 --- a/tests/test_mgxs_library_nuclides/inputs_true.dat +++ b/tests/test_mgxs_library_nuclides/inputs_true.dat @@ -1 +1 @@ -e4a5f03ab6167e96462c4ef537533fe33b98d7878ae00824c5619356bda8d548b3c71af01ba8c88d5a9b46dd1471d331e6f678a164af922200f2ee3642be6340 +e4a5f03ab6167e96462c4ef537533fe33b98d7878ae00824c5619356bda8d548b3c71af01ba8c88d5a9b46dd1471d331e6f678a164af922200f2ee3642be6340 \ No newline at end of file diff --git a/tests/test_mgxs_library_nuclides/results_true.dat b/tests/test_mgxs_library_nuclides/results_true.dat index e89776fe88..3da8146042 100644 --- a/tests/test_mgxs_library_nuclides/results_true.dat +++ b/tests/test_mgxs_library_nuclides/results_true.dat @@ -1 +1 @@ -e494320a213b5704a2ac915a2ba504857be91961ceb6735b6ad05d81eb31c44c9584d5bd9d40baececf1dcb5b030e6ecec63cfbd20639baf69bcb596c5c46591 +e494320a213b5704a2ac915a2ba504857be91961ceb6735b6ad05d81eb31c44c9584d5bd9d40baececf1dcb5b030e6ecec63cfbd20639baf69bcb596c5c46591 \ No newline at end of file diff --git a/tests/test_tallies/inputs_true.dat b/tests/test_tallies/inputs_true.dat index f961821aa0..17f04238c2 100644 --- a/tests/test_tallies/inputs_true.dat +++ b/tests/test_tallies/inputs_true.dat @@ -1 +1 @@ -ca47172a42f6c13b244a763c990cbe4811662708ee03307d810a4542ee34bb5db7cc29d66aea313dad95b9f38a4ff7943ded527cfd0c7c8825372fec40cfc0d0 +ca47172a42f6c13b244a763c990cbe4811662708ee03307d810a4542ee34bb5db7cc29d66aea313dad95b9f38a4ff7943ded527cfd0c7c8825372fec40cfc0d0 \ No newline at end of file From 3986a20b131df7570a1bd33639cdcb5aaf02a086 Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Fri, 29 Jul 2016 21:09:57 +0000 Subject: [PATCH 09/16] removed unnecessary code in mgxs.py --- openmc/mgxs/mgxs.py | 12 ------------ tests/test_mgxs_library_hdf5/inputs_true.dat | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index e3697010b0..8d60e521a5 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -14,7 +14,6 @@ import numpy as np import openmc import openmc.checkvalue as cv from openmc.mgxs import EnergyGroups -from openmc import Mesh if sys.version_info[0] >= 3: basestring = str @@ -4977,17 +4976,6 @@ class InverseVelocity(MGXS): """ - # Construct a collection of the subdomains to report - if not isinstance(subdomains, basestring): - cv.check_iterable_type('subdomains', subdomains, Integral) - elif self.domain_type == 'distribcell': - subdomains = np.arange(self.num_subdomains, dtype=np.int) - elif self.domain_type == 'mesh': - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) - subdomains = list(itertools.product(*xyz)) - else: - subdomains = [self.domain.id] - if xs_type == 'macro': return 'second/cm' else: diff --git a/tests/test_mgxs_library_hdf5/inputs_true.dat b/tests/test_mgxs_library_hdf5/inputs_true.dat index 181c5c59ca..0c648376e8 100644 --- a/tests/test_mgxs_library_hdf5/inputs_true.dat +++ b/tests/test_mgxs_library_hdf5/inputs_true.dat @@ -1 +1 @@ -e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e +e2cdca7ea5b3532050af5b12fac26d7ef212d2696bb1b73cdd00929b2243c40d100ad02438c7b090555b49815d0de6c48cf1b4ebf437a48bc80c2d2b4bad292e \ No newline at end of file From 102edb6d65f6b405b156959065ef4193bdf2f98a Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Fri, 29 Jul 2016 21:22:16 +0000 Subject: [PATCH 10/16] replaced mapped lambdas with inline for loops --- openmc/mgxs/mgxs.py | 10 +++++----- openmc/tallies.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 8d60e521a5..ad55f9a241 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -694,7 +694,7 @@ class MGXS(object): # NOTE: This is important if tally merging was used if self.domain_type == 'mesh': filters = [self.domain_type] - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + xyz = [np.arange(1, x+1) for x in self.domain.dimension] filter_bins = [tuple(itertools.product(*xyz))] elif self.domain_type != 'distribcell': filters = [self.domain_type] @@ -1157,7 +1157,7 @@ class MGXS(object): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + xyz = [np.arange(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1295,7 +1295,7 @@ class MGXS(object): domain_filter = self.xs_tally.find_filter('avg(distribcell)') subdomains = domain_filter.bins elif self.domain_type == 'mesh': - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + xyz = [np.arange(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1924,7 +1924,7 @@ class MatrixMGXS(MGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + xyz = [np.arange(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -3773,7 +3773,7 @@ class ScatterMatrixXS(MatrixMGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = map(lambda x: np.arange(1, x+1), self.domain.dimension) + xyz = [np.arange(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] diff --git a/openmc/tallies.py b/openmc/tallies.py index 79e7c56bcb..45bc496388 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -1293,7 +1293,7 @@ class Tally(object): # Create list of 2- or 3-tuples tuples for mesh cell bins if self_filter.type == 'mesh': dimension = self_filter.mesh.dimension - xyz = map(lambda x: np.arange(1, x+1), dimension) + xyz = [np.arange(1, x+1) for x in dimension] bins = list(itertools.product(*xyz)) # Create list of 2-tuples for energy boundary bins From ef0cbebbaac1a1ae1580b1ae449ad6c1e9833765 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Fri, 29 Jul 2016 17:45:35 -0400 Subject: [PATCH 11/16] updated mgxs ipython notebooks noting that the mesh domain type has been added --- docs/source/pythonapi/examples/mgxs-part-iii.ipynb | 2 +- docs/source/pythonapi/examples/mgxs-part-iv.ipynb | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb index 39980a8fd7..a1eaa7ad82 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iii.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iii.ipynb @@ -574,7 +574,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports `\"material,\"` `\"cell,\"` and `\"universe\"` domain types. We will use a `\"cell\"` domain type here to compute cross sections in each of the cells in the fuel assembly geometry.\n", + "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports `\"material\"`, `\"cell\"`, `\"universe\"`, and `\"mesh\"` domain types. We will use a `\"cell\"` domain type here to compute cross sections in each of the cells in the fuel assembly geometry.\n", "\n", "**Note:** By default, the `Library` class will instantiate `MGXS` objects for each and every domain (material, cell or universe) in the geometry of interest. However, one may specify a subset of these domains to the `Library.domains` property. In our case, we wish to compute multi-group cross sections in each and every cell since they will be needed in our downstream OpenMOC calculation on the identical combinatorial geometry mesh." ] diff --git a/docs/source/pythonapi/examples/mgxs-part-iv.ipynb b/docs/source/pythonapi/examples/mgxs-part-iv.ipynb index ae015b0a64..5b3bae4957 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iv.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iv.ipynb @@ -519,9 +519,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports \"material,\" \"cell,\" and \"universe\" domain types. In this simple example, we wish to compute multi-group cross sections only for each material andtherefore will use a \"material\" domain type.\n", + "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports \"material\" \"cell\", \"universe\", and \"mesh\" domain types. In this simple example, we wish to compute multi-group cross sections only for each material andtherefore will use a \"material\" domain type.\n", "\n", - "**Note:** By default, the `Library` class will instantiate `MGXS` objects for each and every domain (material, cell or universe) in the geometry of interest. However, one may specify a subset of these domains to the `Library.domains` property." + "**Note:** By default, the `Library` class will instantiate `MGXS` objects for each and every domain (material, cell, universe, or mesh cell) in the geometry of interest. However, one may specify a subset of these domains to the `Library.domains` property." ] }, { @@ -1437,21 +1437,21 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 2", "language": "python", - "name": "python3" + "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", - "version": 3 + "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.5.2" + "pygments_lexer": "ipython2", + "version": "2.7.11" } }, "nbformat": 4, From 3a6d2b1aeec30334db4d810f3aef17a4b4a8a85e Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Sat, 30 Jul 2016 19:59:07 +0000 Subject: [PATCH 12/16] changed np.arange to range in mgxs.py and added mesh domain to library.py --- openmc/mgxs/library.py | 14 ++++++++++++-- openmc/mgxs/mgxs.py | 10 +++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index bf822017c1..3675571584 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -54,9 +54,10 @@ class Library(object): If true, computes cross sections for each nuclide in each domain mgxs_types : Iterable of str The types of cross sections in the library (e.g., ['total', 'scatter']) - domain_type : {'material', 'cell', 'distribcell', 'universe'} + domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization - domains : Iterable of openmc.Material, openmc.Cell or openmc.Universe + domains : Iterable of openmc.Material, openmc.Cell, openmc.Universe or + openmc.Mesh The spatial domain(s) for which MGXS in the Library are computed correction : {'P0', None} Apply the P0 correction to scattering matrices if set to 'P0' @@ -183,6 +184,8 @@ class Library(object): return self.openmc_geometry.get_all_material_cells() elif self.domain_type == 'universe': return self.openmc_geometry.get_all_universes() + elif self.domain_type == 'mesh': + raise ValueError('Unable to get domains for Mesh domain type') else: raise ValueError('Unable to get domains without a domain type') else: @@ -273,6 +276,11 @@ class Library(object): elif self.domain_type == 'universe': cv.check_iterable_type('domain', domains, openmc.Universe) all_domains = self.openmc_geometry.get_all_universes() + elif self.domain_type == 'mesh': + cv.check_iterable_type('domain', domains, openmc.Mesh) + + # The mesh and geometry are independent, so just return + return else: raise ValueError('Unable to set domains with domain ' 'type "{}"'.format(self.domain_type)) @@ -474,6 +482,8 @@ class Library(object): cv.check_type('domain', domain, (openmc.Cell, Integral)) elif self.domain_type == 'universe': cv.check_type('domain', domain, (openmc.Universe, Integral)) + elif self.domain_type == 'mesh': + cv.check_type('domain', domain, (openmc.Mesh, Integral)) # Check that requested domain is included in library if isinstance(domain, Integral): diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index ad55f9a241..0dadab38ab 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -694,7 +694,7 @@ class MGXS(object): # NOTE: This is important if tally merging was used if self.domain_type == 'mesh': filters = [self.domain_type] - xyz = [np.arange(1, x+1) for x in self.domain.dimension] + xyz = [range(1, x+1) for x in self.domain.dimension] filter_bins = [tuple(itertools.product(*xyz))] elif self.domain_type != 'distribcell': filters = [self.domain_type] @@ -1157,7 +1157,7 @@ class MGXS(object): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = [np.arange(1, x+1) for x in self.domain.dimension] + xyz = [range(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1295,7 +1295,7 @@ class MGXS(object): domain_filter = self.xs_tally.find_filter('avg(distribcell)') subdomains = domain_filter.bins elif self.domain_type == 'mesh': - xyz = [np.arange(1, x+1) for x in self.domain.dimension] + xyz = [range(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -1924,7 +1924,7 @@ class MatrixMGXS(MGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = [np.arange(1, x+1) for x in self.domain.dimension] + xyz = [range(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] @@ -3773,7 +3773,7 @@ class ScatterMatrixXS(MatrixMGXS): elif self.domain_type == 'distribcell': subdomains = np.arange(self.num_subdomains, dtype=np.int) elif self.domain_type == 'mesh': - xyz = [np.arange(1, x+1) for x in self.domain.dimension] + xyz = [range(1, x+1) for x in self.domain.dimension] subdomains = list(itertools.product(*xyz)) else: subdomains = [self.domain.id] From 19b5faa4498504978b829beefdcdcb37f20c5cf2 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Sat, 30 Jul 2016 16:51:21 -0400 Subject: [PATCH 13/16] fixed issue in exporting mgxs to excel --- openmc/mgxs/library.py | 5 +++-- openmc/mgxs/mgxs.py | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 3675571584..50d568a2d2 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -279,8 +279,9 @@ class Library(object): elif self.domain_type == 'mesh': cv.check_iterable_type('domain', domains, openmc.Mesh) - # The mesh and geometry are independent, so just return - return + # The mesh and geometry are independent, so set all_domains + # to the input domains + all_domains = domains else: raise ValueError('Unable to set domains with domain ' 'type "{}"'.format(self.domain_type)) diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 0dadab38ab..271a78246f 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -1192,7 +1192,7 @@ class MGXS(object): # Loop over all subdomains for subdomain in subdomains: - if self.domain_type == 'distribcell': + if self.domain_type == 'distribcell' or self.domain_type == 'mesh': string += '{0: <16}=\t{1}\n'.format('\tSubdomain', subdomain) # Loop over all Nuclides @@ -1407,7 +1407,10 @@ class MGXS(object): if format == 'csv': df.to_csv(filename + '.csv', index=False) elif format == 'excel': - df.to_excel(filename + '.xls', index=False) + if self.domain_type == 'mesh': + df.to_excel(filename + '.xls') + else: + df.to_excel(filename + '.xls', index=False) elif format == 'pickle': df.to_pickle(filename + '.pkl') elif format == 'latex': From 2c2a29143233ed493c0465c2d598e23a5127c794 Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Sat, 30 Jul 2016 21:36:03 +0000 Subject: [PATCH 14/16] added mgxs mesh domain test and fixed issue in getting pandas df mean index for mesh domain --- openmc/mgxs/mgxs.py | 7 +- tests/test_mgxs_library_mesh/inputs_true.dat | 1 + tests/test_mgxs_library_mesh/results_true.dat | 132 ++++++++++++++++++ .../test_mgxs_library_mesh.py | 81 +++++++++++ 4 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 tests/test_mgxs_library_mesh/inputs_true.dat create mode 100644 tests/test_mgxs_library_mesh/results_true.dat create mode 100644 tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index 271a78246f..f19b50e185 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -3733,9 +3733,12 @@ class ScatterMatrixXS(MatrixMGXS): df['moment'] = moments # Place the moment column before the mean column - mean_index = df.columns.get_loc('mean') columns = df.columns.tolist() - df = df[columns[:mean_index] + ['moment'] + columns[mean_index:-1]] + mean_index = [i for i, s in enumerate(columns) if 'mean' in s][0] + if self.domain_type == 'mesh': + df = df[columns[:mean_index] + [('moment', '')] + columns[mean_index:-1]] + else: + df = df[columns[:mean_index] + ['moment'] + columns[mean_index:-1]] # Select rows corresponding to requested scattering moment if moment != 'all': diff --git a/tests/test_mgxs_library_mesh/inputs_true.dat b/tests/test_mgxs_library_mesh/inputs_true.dat new file mode 100644 index 0000000000..e036b49a26 --- /dev/null +++ b/tests/test_mgxs_library_mesh/inputs_true.dat @@ -0,0 +1 @@ +a4cd030bea212e45fdb159e75a7fb3d1947e9bf3d0384ac5d37a72298d67dcfdd1b9eb5c6af8ac6e5983bd5b47de9c17a2ea472b467b7222a4909ee070bf1ca3 \ No newline at end of file diff --git a/tests/test_mgxs_library_mesh/results_true.dat b/tests/test_mgxs_library_mesh/results_true.dat new file mode 100644 index 0000000000..e3d7ca6473 --- /dev/null +++ b/tests/test_mgxs_library_mesh/results_true.dat @@ -0,0 +1,132 @@ + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.640786 0.044177 +1 1 2 1 1 total 0.660597 0.128423 +2 2 1 1 1 total 0.615276 0.104046 +3 2 2 1 1 total 0.646999 0.186709 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.36665 0.048814 +1 1 2 1 1 total 0.40784 0.096486 +2 2 1 1 1 total 0.36356 0.074111 +3 2 2 1 1 total 0.41456 0.160443 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.366650 0.048814 +1 1 2 1 1 total 0.407840 0.096486 +2 2 1 1 1 total 0.363560 0.074111 +3 2 2 1 1 total 0.414593 0.160436 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.025749 0.002863 +1 1 2 1 1 total 0.028400 0.005275 +2 2 1 1 1 total 0.022988 0.004099 +3 2 2 1 1 total 0.027589 0.010350 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.015861 0.002876 +1 1 2 1 1 total 0.017280 0.004371 +2 2 1 1 1 total 0.014403 0.003542 +3 2 2 1 1 total 0.018061 0.010110 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.009888 0.001077 +1 1 2 1 1 total 0.011121 0.002456 +2 2 1 1 1 total 0.008585 0.001552 +3 2 2 1 1 total 0.009527 0.003659 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.026065 0.002907 +1 1 2 1 1 total 0.029084 0.006430 +2 2 1 1 1 total 0.022596 0.004062 +3 2 2 1 1 total 0.025066 0.009687 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 1.938476 0.211550 +1 1 2 1 1 total 2.177360 0.480780 +2 2 1 1 1 total 1.682799 0.303764 +3 2 2 1 1 total 1.864890 0.715661 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.615037 0.041754 +1 1 2 1 1 total 0.632196 0.123878 +2 2 1 1 1 total 0.592288 0.100439 +3 2 2 1 1 total 0.619410 0.177190 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.584014 0.054315 +1 1 2 1 1 total 0.622514 0.111323 +2 2 1 1 1 total 0.587256 0.084833 +3 2 2 1 1 total 0.613792 0.168612 + mesh 1 group in group out nuclide moment mean std. dev. + x y z +0 1 1 1 1 1 total P0 0.584014 0.054315 +1 1 1 1 1 1 total P1 0.243427 0.025488 +2 1 1 1 1 1 total P2 0.089236 0.007357 +3 1 1 1 1 1 total P3 0.008994 0.005768 +4 1 2 1 1 1 total P0 0.622514 0.111323 +5 1 2 1 1 1 total P1 0.239376 0.042594 +6 1 2 1 1 1 total P2 0.088386 0.017200 +7 1 2 1 1 1 total P3 -0.001243 0.005639 +8 2 1 1 1 1 total P0 0.587256 0.084833 +9 2 1 1 1 1 total P1 0.245120 0.041033 +10 2 1 1 1 1 total P2 0.086784 0.016255 +11 2 1 1 1 1 total P3 0.008660 0.004755 +12 2 2 1 1 1 total P0 0.612950 0.167940 +13 2 2 1 1 1 total P1 0.226176 0.061882 +14 2 2 1 1 1 total P2 0.086593 0.026126 +15 2 2 1 1 1 total P3 0.009672 0.011995 + mesh 1 group in group out nuclide moment mean std. dev. + x y z +0 1 1 1 1 1 total P0 0.584014 0.054315 +1 1 1 1 1 1 total P1 0.243427 0.025488 +2 1 1 1 1 1 total P2 0.089236 0.007357 +3 1 1 1 1 1 total P3 0.008994 0.005768 +4 1 2 1 1 1 total P0 0.622514 0.111323 +5 1 2 1 1 1 total P1 0.239376 0.042594 +6 1 2 1 1 1 total P2 0.088386 0.017200 +7 1 2 1 1 1 total P3 -0.001243 0.005639 +8 2 1 1 1 1 total P0 0.587256 0.084833 +9 2 1 1 1 1 total P1 0.245120 0.041033 +10 2 1 1 1 1 total P2 0.086784 0.016255 +11 2 1 1 1 1 total P3 0.008660 0.004755 +12 2 2 1 1 1 total P0 0.613792 0.168612 +13 2 2 1 1 1 total P1 0.226142 0.061856 +14 2 2 1 1 1 total P2 0.086174 0.025979 +15 2 2 1 1 1 total P3 0.009721 0.012027 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 1.000000 0.088094 +1 1 2 1 1 1 total 1.000000 0.160891 +2 2 1 1 1 1 total 1.000000 0.126864 +3 2 2 1 1 1 total 1.001374 0.305883 + mesh 1 group in group out nuclide mean std. dev. + x y z +0 1 1 1 1 1 total 0.027395 0.004680 +1 1 2 1 1 1 total 0.022914 0.006025 +2 2 1 1 1 1 total 0.019384 0.002846 +3 2 2 1 1 1 total 0.029629 0.006292 + mesh 1 group out nuclide mean std. dev. + x y z +0 1 1 1 1 total 1.0 0.220956 +1 1 2 1 1 total 1.0 0.316565 +2 2 1 1 1 total 1.0 0.132140 +3 2 2 1 1 total 1.0 0.181577 + mesh 1 group out nuclide mean std. dev. + x y z +0 1 1 1 1 total 1.0 0.222246 +1 1 2 1 1 total 1.0 0.316565 +2 2 1 1 1 total 1.0 0.132140 +3 2 2 1 1 total 1.0 0.181577 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 3.610522e-07 3.169931e-08 +1 1 2 1 1 total 3.942353e-07 8.459167e-08 +2 2 1 1 1 total 3.097784e-07 5.252025e-08 +3 2 2 1 1 total 3.799163e-07 1.806470e-07 + mesh 1 group in nuclide mean std. dev. + x y z +0 1 1 1 1 total 0.025735 0.002840 +1 1 2 1 1 total 0.028773 0.006349 +2 2 1 1 1 total 0.022306 0.004010 +3 2 2 1 1 total 0.024549 0.009379 diff --git a/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py new file mode 100644 index 0000000000..df7a0a5ae8 --- /dev/null +++ b/tests/test_mgxs_library_mesh/test_mgxs_library_mesh.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python + +import os +import sys +import glob +import hashlib +sys.path.insert(0, os.pardir) +from testing_harness import PyAPITestHarness +import openmc +import openmc.mgxs + + +class MGXSTestHarness(PyAPITestHarness): + def _build_inputs(self): + # Generate inputs using parent class routine + super(MGXSTestHarness, self)._build_inputs() + + # Initialize a one-group structure + energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.]) + + # Initialize MGXS Library for a few cross section types + # for one material-filled cell in the geometry + self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry) + self.mgxs_lib.by_nuclide = False + + # Test all MGXS types + self.mgxs_lib.mgxs_types = openmc.mgxs.MGXS_TYPES + self.mgxs_lib.energy_groups = energy_groups + self.mgxs_lib.legendre_order = 3 + self.mgxs_lib.domain_type = 'mesh' + + # Instantiate a tally mesh + mesh = openmc.Mesh(mesh_id=1) + mesh.type = 'regular' + mesh.dimension = [2, 2] + mesh.lower_left = [-100., -100.] + mesh.width = [100., 100.] + + self.mgxs_lib.domains = [mesh] + self.mgxs_lib.build_library() + + # Initialize a tallies file + self._input_set.tallies = openmc.Tallies() + self.mgxs_lib.add_to_tallies_file(self._input_set.tallies, merge=False) + self._input_set.tallies.export_to_xml() + + def _get_results(self, hash_output=False): + """Digest info in the statepoint and return as a string.""" + + # Read the statepoint file. + statepoint = glob.glob(os.path.join(os.getcwd(), self._sp_name))[0] + sp = openmc.StatePoint(statepoint) + + # Load the MGXS library from the statepoint + self.mgxs_lib.load_from_statepoint(sp) + + # Build a string from Pandas Dataframe for each 1-group MGXS + outstr = '' + for domain in self.mgxs_lib.domains: + for mgxs_type in self.mgxs_lib.mgxs_types: + mgxs = self.mgxs_lib.get_mgxs(domain, mgxs_type) + df = mgxs.get_pandas_dataframe() + outstr += df.to_string() + '\n' + + # Hash the results if necessary + if hash_output: + sha512 = hashlib.sha512() + sha512.update(outstr.encode('utf-8')) + outstr = sha512.hexdigest() + + return outstr + + def _cleanup(self): + super(MGXSTestHarness, self)._cleanup() + f = os.path.join(os.getcwd(), 'tallies.xml') + if os.path.exists(f): os.remove(f) + + +if __name__ == '__main__': + harness = MGXSTestHarness('statepoint.10.*', True) + harness.main() From 10795fd00fde7be071f27bb1bf965b43005f62ce Mon Sep 17 00:00:00 2001 From: samuel shaner Date: Sat, 30 Jul 2016 21:37:59 +0000 Subject: [PATCH 15/16] changed np.arange to range in tallies.py --- openmc/tallies.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/tallies.py b/openmc/tallies.py index 45bc496388..c68b0faacb 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -1293,7 +1293,7 @@ class Tally(object): # Create list of 2- or 3-tuples tuples for mesh cell bins if self_filter.type == 'mesh': dimension = self_filter.mesh.dimension - xyz = [np.arange(1, x+1) for x in dimension] + xyz = [range(1, x+1) for x in dimension] bins = list(itertools.product(*xyz)) # Create list of 2-tuples for energy boundary bins From 355fb6f30d6c0a93d606aa2ad337b31189037709 Mon Sep 17 00:00:00 2001 From: Sam Shaner Date: Sun, 31 Jul 2016 10:20:50 -0400 Subject: [PATCH 16/16] addressed PR comments --- docs/source/pythonapi/examples/mgxs-part-iv.ipynb | 4 ++-- openmc/mgxs/library.py | 3 +-- openmc/mgxs/mgxs.py | 8 +++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/source/pythonapi/examples/mgxs-part-iv.ipynb b/docs/source/pythonapi/examples/mgxs-part-iv.ipynb index 5b3bae4957..eaae92f7c9 100644 --- a/docs/source/pythonapi/examples/mgxs-part-iv.ipynb +++ b/docs/source/pythonapi/examples/mgxs-part-iv.ipynb @@ -519,9 +519,9 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports \"material\" \"cell\", \"universe\", and \"mesh\" domain types. In this simple example, we wish to compute multi-group cross sections only for each material andtherefore will use a \"material\" domain type.\n", + "Now we must specify the type of domain over which we would like the `Library` to compute multi-group cross sections. The domain type corresponds to the type of tally filter to be used in the tallies created to compute multi-group cross sections. At the present time, the `Library` supports \"material\" \"cell\", \"universe\", and \"mesh\" domain types. In this simple example, we wish to compute multi-group cross sections only for each material and therefore will use a \"material\" domain type.\n", "\n", - "**Note:** By default, the `Library` class will instantiate `MGXS` objects for each and every domain (material, cell, universe, or mesh cell) in the geometry of interest. However, one may specify a subset of these domains to the `Library.domains` property." + "**Note:** By default, the `Library` class will instantiate `MGXS` objects for each and every domain (material, cell, universe, or mesh) in the geometry of interest. However, one may specify a subset of these domains to the `Library.domains` property." ] }, { diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 50d568a2d2..84571ce236 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -56,8 +56,7 @@ class Library(object): The types of cross sections in the library (e.g., ['total', 'scatter']) domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} Domain type for spatial homogenization - domains : Iterable of openmc.Material, openmc.Cell, openmc.Universe or - openmc.Mesh + domains : Iterable of openmc.Material, openmc.Cell, openmc.Universe or openmc.Mesh The spatial domain(s) for which MGXS in the Library are computed correction : {'P0', None} Apply the P0 correction to scattering matrices if set to 'P0' diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py index f19b50e185..e1c2e62217 100644 --- a/openmc/mgxs/mgxs.py +++ b/openmc/mgxs/mgxs.py @@ -439,8 +439,7 @@ class MGXS(object): ---------- mgxs_type : {'total', 'transport', 'nu-transport', 'absorption', 'capture', 'fission', 'nu-fission', 'kappa-fission', 'scatter', 'nu-scatter', 'scatter matrix', 'nu-scatter matrix', 'multiplicity matrix', 'nu-fission matrix', 'chi', 'chi-prompt', 'inverse-velocity', 'prompt-nu-fission'} The type of multi-group cross section object to return - domain : openmc.Material or openmc.Cell or openmc.Universe or - openmc.Mesh + domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.Mesh The domain for spatial homogenization domain_type : {'material', 'cell', 'distribcell', 'universe', 'mesh'} The domain type for spatial homogenization @@ -1491,7 +1490,10 @@ class MGXS(object): distribcell_paths=distribcell_paths) # Remove nuclide column since it is homogeneous and redundant - df.drop('nuclide', axis=1, inplace=True) + if self.domain_type == 'mesh': + df.drop('nuclide', axis=1, level=0, inplace=True) + else: + df.drop('nuclide', axis=1, inplace=True) # If the user requested a specific set of nuclides elif self.by_nuclide and nuclides != 'all':