Fixed merge conflicts and a bug in Tally.add_score(...)

This commit is contained in:
Will Boyd 2015-10-08 13:50:48 -04:00
commit 5e732f99a0
383 changed files with 8257 additions and 17506 deletions

File diff suppressed because one or more lines are too long

View file

@ -174,7 +174,18 @@
"metadata": {
"collapsed": false
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n"
]
}
],
"source": [
"# Create a Universe to encapsulate a fuel pin\n",
"pin_cell_universe = openmc.Universe(name='1.6% Fuel Pin')\n",
@ -212,7 +223,20 @@
"metadata": {
"collapsed": false
},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n",
"/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/universe.py:199: DeprecationWarning: Cell.add_surface(...) has been deprecated and may be removed in a future version. The region for a Cell should be defined using the region property directly.\n"
]
}
],
"source": [
"# Create root Cell\n",
"root_cell = openmc.Cell(name='root cell')\n",
@ -369,7 +393,7 @@
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC\nAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAxQTFRF\n////chIS6YCRTb/E6kGE+wAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAALKSURB\nVGje7dpLcqQwDAbgHHE2YeEj+D4cwQucBUfo+3CEXoSp8OhuhF70T4qpKXmdr21LogK2Pj7A8QmN\nP+HDhw8fPnz48Kf6VH9G+66vy+je8k19jnf8C5dXIPv86ms56lPdjvaYbyodx3ze+XLE76cXFiD4\nzPji99z0/AJ4n1lfvJ6fnl0A6x+578efMSg1wPr172/jPO5yFXM+Ef78gdblM+WPHyguP//t1/g6\npA0wfln+ho/fwgYYn19C/xwDvwHGc9OvC+hs37DTrwuwfWanXxdQTC9Mvyygs3wjTL8uwPJpn/tN\nDbSGz7T0SBEWw4vLXzbQ6b6RoveIoO6TvPxlA63qs7z8ZQPF9F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U5ErkJggg==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
@ -563,6 +587,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"rm: cannot remove statepoint.*: No such file or directory\n",
"\n",
" .d88888b. 888b d888 .d8888b.\n",
" d88P\" \"Y88b 8888b d8888 d88P Y88b\n",
@ -579,8 +604,8 @@
" Copyright: 2011-2015 Massachusetts Institute of Technology\n",
" License: http://mit-crpg.github.io/openmc/license.html\n",
" Version: 0.7.0\n",
" Git SHA1: e0c2aace2e73367536fa03e153b67a2d038cd2b3\n",
" Date/Time: 2015-10-03 13:02:02\n",
" Git SHA1: 23535afa1c69644bb299bde18a094c3b99d53ae0\n",
" Date/Time: 2015-10-08 13:42:07\n",
" MPI Processes: 1\n",
"\n",
" ===========================================================================\n",
@ -593,11 +618,11 @@
" Reading materials XML file...\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: 92235.71c\n",
" Loading ACE cross section table: 5010.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",
" Initializing source particles...\n",
"\n",
@ -607,26 +632,26 @@
"\n",
" Bat./Gen. k Average k \n",
" ========= ======== ==================== \n",
" 1/1 1.00279 \n",
" 2/1 1.03320 \n",
" 3/1 1.04467 \n",
" 4/1 1.09693 \n",
" 5/1 1.05008 \n",
" 6/1 1.08426 \n",
" 7/1 1.05363 1.06894 +/- 0.01531\n",
" 8/1 0.97961 1.03917 +/- 0.03106\n",
" 9/1 1.06444 1.04549 +/- 0.02285\n",
" 10/1 1.08345 1.05308 +/- 0.01926\n",
" 11/1 1.06871 1.05568 +/- 0.01594\n",
" 12/1 1.03183 1.05228 +/- 0.01390\n",
" 13/1 1.04486 1.05135 +/- 0.01207\n",
" 14/1 1.06468 1.05283 +/- 0.01075\n",
" 15/1 1.04185 1.05173 +/- 0.00968\n",
" 16/1 1.01268 1.04818 +/- 0.00944\n",
" 17/1 1.04129 1.04761 +/- 0.00864\n",
" 18/1 1.01127 1.04481 +/- 0.00843\n",
" 19/1 1.03738 1.04428 +/- 0.00782\n",
" 20/1 1.04410 1.04427 +/- 0.00728\n",
" 1/1 1.05992 \n",
" 2/1 1.05251 \n",
" 3/1 1.05204 \n",
" 4/1 1.02100 \n",
" 5/1 1.07784 \n",
" 6/1 1.04814 \n",
" 7/1 1.02335 1.03574 +/- 0.01239\n",
" 8/1 1.02415 1.03188 +/- 0.00813\n",
" 9/1 1.10331 1.04974 +/- 0.01876\n",
" 10/1 1.05452 1.05069 +/- 0.01456\n",
" 11/1 1.07867 1.05536 +/- 0.01277\n",
" 12/1 1.04203 1.05345 +/- 0.01096\n",
" 13/1 1.04482 1.05237 +/- 0.00955\n",
" 14/1 1.04117 1.05113 +/- 0.00852\n",
" 15/1 1.07581 1.05360 +/- 0.00801\n",
" 16/1 1.04235 1.05257 +/- 0.00731\n",
" 17/1 1.02710 1.05045 +/- 0.00701\n",
" 18/1 1.01970 1.04809 +/- 0.00687\n",
" 19/1 1.01022 1.04538 +/- 0.00691\n",
" 20/1 1.01449 1.04332 +/- 0.00675\n",
" Creating state point statepoint.20.h5...\n",
"\n",
" ===========================================================================\n",
@ -636,27 +661,27 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 4.1600E-01 seconds\n",
" Reading cross sections = 9.1000E-02 seconds\n",
" Total time in simulation = 1.4793E+01 seconds\n",
" Time in transport only = 1.4785E+01 seconds\n",
" Time in inactive batches = 2.1450E+00 seconds\n",
" Time in active batches = 1.2648E+01 seconds\n",
" Total time for initialization = 4.6000E-01 seconds\n",
" Reading cross sections = 1.3900E-01 seconds\n",
" Total time in simulation = 1.6630E+01 seconds\n",
" Time in transport only = 1.6613E+01 seconds\n",
" Time in inactive batches = 2.1710E+00 seconds\n",
" Time in active batches = 1.4459E+01 seconds\n",
" Time synchronizing fission bank = 2.0000E-03 seconds\n",
" Sampling source sites = 2.0000E-03 seconds\n",
" SEND/RECV source sites = 0.0000E+00 seconds\n",
" Sampling source sites = 0.0000E+00 seconds\n",
" SEND/RECV source sites = 1.0000E-03 seconds\n",
" Time accumulating tallies = 0.0000E+00 seconds\n",
" Total time for finalization = 1.0000E-03 seconds\n",
" Total time elapsed = 1.5219E+01 seconds\n",
" Calculation Rate (inactive) = 5827.51 neutrons/second\n",
" Calculation Rate (active) = 2964.90 neutrons/second\n",
" Total time elapsed = 1.7100E+01 seconds\n",
" Calculation Rate (inactive) = 5757.72 neutrons/second\n",
" Calculation Rate (active) = 2593.54 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
" k-effective (Collision) = 1.04044 +/- 0.00527\n",
" k-effective (Track-length) = 1.04427 +/- 0.00728\n",
" k-effective (Absorption) = 1.04794 +/- 0.00535\n",
" Combined k-effective = 1.04628 +/- 0.00467\n",
" k-effective (Collision) = 1.03935 +/- 0.00682\n",
" k-effective (Track-length) = 1.04332 +/- 0.00675\n",
" k-effective (Absorption) = 1.03845 +/- 0.00598\n",
" Combined k-effective = 1.04024 +/- 0.00523\n",
" Leakage Fraction = 0.00000 +/- 0.00000\n",
"\n"
]
@ -696,7 +721,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 27,
"metadata": {
"collapsed": false,
"scrolled": true
@ -716,7 +741,7 @@
},
{
"cell_type": "code",
"execution_count": 25,
"execution_count": 28,
"metadata": {
"collapsed": false,
"scrolled": true
@ -739,45 +764,24 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": 29,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
" <td>1.046353</td>\n",
" <td>0.00935</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" nuclide score mean std. dev.\n",
"0 total (nu-fission / absorption) 1.046353 0.00935"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
"ename": "AttributeError",
"evalue": "'CrossScore' object has no attribute 'strip'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m<ipython-input-29-176e9015006a>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m()\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0mfiss_rate\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_tally\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'fiss. rate'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mabs_rate\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0msp\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_tally\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'abs. rate'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 4\u001b[1;33m \u001b[0mkeff\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mfiss_rate\u001b[0m \u001b[1;33m/\u001b[0m \u001b[0mabs_rate\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 5\u001b[0m \u001b[0mkeff\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_pandas_dataframe\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.pyc\u001b[0m in \u001b[0;36m__div__\u001b[1;34m(self, other)\u001b[0m\n\u001b[0;32m 2051\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2052\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mother\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mTally\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 2053\u001b[1;33m \u001b[0mnew_tally\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_outer_product\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mother\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mbinary_op\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'/'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 2054\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2055\u001b[0m \u001b[1;32melif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mother\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mReal\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.pyc\u001b[0m in \u001b[0;36m_outer_product\u001b[1;34m(self, other, binary_op)\u001b[0m\n\u001b[0;32m 1548\u001b[0m \u001b[1;32mfor\u001b[0m \u001b[0mself_score\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mother_score\u001b[0m \u001b[1;32min\u001b[0m \u001b[0mitertools\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mproduct\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m*\u001b[0m\u001b[0mall_scores\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1549\u001b[0m \u001b[0mnew_score\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mCrossScore\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself_score\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mother_score\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mbinary_op\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m-> 1550\u001b[1;33m \u001b[0mnew_tally\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd_score\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mnew_score\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 1551\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 1552\u001b[0m \u001b[1;31m# Generate nuclide \"outer products\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32m/usr/local/lib/python2.7/dist-packages/openmc-0.7.0-py2.7.egg/openmc/tallies.pyc\u001b[0m in \u001b[0;36madd_score\u001b[1;34m(self, score)\u001b[0m\n\u001b[0;32m 434\u001b[0m \u001b[1;32mreturn\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 435\u001b[0m \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 436\u001b[1;33m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_scores\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mscore\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mstrip\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 437\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 438\u001b[0m \u001b[1;33m@\u001b[0m\u001b[0mnum_score_bins\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msetter\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mAttributeError\u001b[0m: 'CrossScore' object has no attribute 'strip'"
]
}
],
"source": [
@ -799,49 +803,11 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>(0.0e+00 - 6.2e-01)</td>\n",
" <td>total</td>\n",
" <td>absorption</td>\n",
" <td>0.95873</td>\n",
" <td>0.00774</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" energy [MeV] nuclide score mean std. dev.\n",
"0 (0.0e+00 - 6.2e-01) total absorption 0.95873 0.00774"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Compute resonance escape probability using tally arithmetic\n",
"therm_abs_rate = sp.get_tally(name='therm. abs. rate')\n",
@ -859,47 +825,11 @@
},
{
"cell_type": "code",
"execution_count": 28,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>total</td>\n",
" <td>nu-fission</td>\n",
" <td>1.091622</td>\n",
" <td>0.011163</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" nuclide score mean std. dev.\n",
"0 total nu-fission 1.091622 0.011163"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Compute fast fission factor factor using tally arithmetic\n",
"therm_fiss_rate = sp.get_tally(name='therm. fiss. rate')\n",
@ -918,51 +848,11 @@
},
{
"cell_type": "code",
"execution_count": 29,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy [MeV]</th>\n",
" <th>cell</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>(0.0e+00 - 6.2e-01)</td>\n",
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>absorption</td>\n",
" <td>0.802012</td>\n",
" <td>0.006609</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" energy [MeV] cell nuclide score mean std. dev.\n",
"0 (0.0e+00 - 6.2e-01) 10000 total absorption 0.802012 0.006609"
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Compute thermal flux utilization factor using tally arithmetic\n",
"fuel_therm_abs_rate = sp.get_tally(name='fuel therm. abs. rate')\n",
@ -979,49 +869,11 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>(0.0e+00 - 6.2e-01)</td>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
" <td>1.246604</td>\n",
" <td>0.011825</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" energy [MeV] nuclide score mean std. dev.\n",
"0 (0.0e+00 - 6.2e-01) total (nu-fission / absorption) 1.246604 0.011825"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# Compute neutrons produced per absorption (eta) using tally arithmetic\n",
"eta = therm_fiss_rate / fuel_therm_abs_rate\n",
@ -1037,52 +889,11 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>(0.0e+00 - 6.2e-01)</td>\n",
" <td>total</td>\n",
" <td>(((absorption * nu-fission) * absorption) * (n...</td>\n",
" <td>1.046353</td>\n",
" <td>0.01894</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" energy [MeV] nuclide \\\n",
"0 (0.0e+00 - 6.2e-01) total \n",
"\n",
" score mean std. dev. \n",
"0 (((absorption * nu-fission) * absorption) * (n... 1.046353 0.01894 "
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"keff = res_esc * fast_fiss * therm_util * eta\n",
"keff.get_pandas_dataframe()"
@ -1099,7 +910,7 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": null,
"metadata": {
"collapsed": false,
"scrolled": true
@ -1115,131 +926,11 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>6.641746e-07</td>\n",
" <td>6.859257e-09</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.099861e-01</td>\n",
" <td>1.966887e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>3.556665e-01</td>\n",
" <td>3.717881e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>5.554650e-03</td>\n",
" <td>5.218094e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>7.165057e-03</td>\n",
" <td>5.625590e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.276535e-01</td>\n",
" <td>8.544314e-04</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>8.089493e-03</td>\n",
" <td>5.080374e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>3.370111e-03</td>\n",
" <td>1.361116e-05</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" cell energy [MeV] nuclide score \\\n",
"0 10000 (0.0e+00 - 6.3e-07) (U-238 / total) (nu-fission / flux) \n",
"1 10000 (0.0e+00 - 6.3e-07) (U-238 / total) (scatter / flux) \n",
"2 10000 (0.0e+00 - 6.3e-07) (U-235 / total) (nu-fission / flux) \n",
"3 10000 (0.0e+00 - 6.3e-07) (U-235 / total) (scatter / flux) \n",
"4 10000 (6.3e-07 - 2.0e+01) (U-238 / total) (nu-fission / flux) \n",
"5 10000 (6.3e-07 - 2.0e+01) (U-238 / total) (scatter / flux) \n",
"6 10000 (6.3e-07 - 2.0e+01) (U-235 / total) (nu-fission / flux) \n",
"7 10000 (6.3e-07 - 2.0e+01) (U-235 / total) (scatter / flux) \n",
"\n",
" mean std. dev. \n",
"0 6.641746e-07 6.859257e-09 \n",
"1 2.099861e-01 1.966887e-03 \n",
"2 3.556665e-01 3.717881e-03 \n",
"3 5.554650e-03 5.218094e-05 \n",
"4 7.165057e-03 5.625590e-05 \n",
"5 2.276535e-01 8.544314e-04 \n",
"6 8.089493e-03 5.080374e-05 \n",
"7 3.370111e-03 1.361116e-05 "
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"fuel_xs = fuel_rxn_rates / flux\n",
"fuel_xs.get_pandas_dataframe()"
@ -1254,23 +945,11 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 6.64174599e-07]\n",
" [ 3.55666541e-01]]\n",
"\n",
" [[ 7.16505734e-03]\n",
" [ 8.08949336e-03]]]\n"
]
}
],
"outputs": [],
"source": [
"# Show how to use Tally.get_values(...) with a CrossScore\n",
"nu_fiss_xs = fuel_xs.get_values(scores=['(nu-fission / flux)'])\n",
@ -1286,21 +965,11 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 0.00555465]]\n",
"\n",
" [[ 0.00337011]]]\n"
]
}
],
"outputs": [],
"source": [
"# Show how to use Tally.get_values(...) with a CrossScore and CrossNuclide\n",
"u235_scatter_xs = fuel_xs.get_values(nuclides=['(U-235 / total)'], \n",
@ -1310,20 +979,11 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 0.22765348]\n",
" [ 0.00337011]]]\n"
]
}
],
"outputs": [],
"source": [
"# Show how to use Tally.get_values(...) with a CrossFilter and CrossScore\n",
"fast_scatter_xs = fuel_xs.get_values(filters=['energy'], \n",
@ -1341,81 +1001,11 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>U-238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.000002</td>\n",
" <td>1.284890e-08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>10000</td>\n",
" <td>(0.0e+00 - 6.3e-07)</td>\n",
" <td>U-235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.867982</td>\n",
" <td>7.022256e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>U-238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.082801</td>\n",
" <td>6.087096e-04</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>10000</td>\n",
" <td>(6.3e-07 - 2.0e+01)</td>\n",
" <td>U-235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.093484</td>\n",
" <td>5.275039e-04</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" cell energy [MeV] nuclide score mean std. dev.\n",
"0 10000 (0.0e+00 - 6.3e-07) U-238 nu-fission 0.000002 1.284890e-08\n",
"1 10000 (0.0e+00 - 6.3e-07) U-235 nu-fission 0.867982 7.022256e-03\n",
"2 10000 (6.3e-07 - 2.0e+01) U-238 nu-fission 0.082801 6.087096e-04\n",
"3 10000 (6.3e-07 - 2.0e+01) U-235 nu-fission 0.093484 5.275039e-04"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# \"Slice\" the nu-fission data into a new derived Tally\n",
"nu_fission_rates = fuel_rxn_rates.get_slice(scores=['nu-fission'])\n",
@ -1424,131 +1014,11 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy [MeV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
" <th>std. dev.</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>10002</td>\n",
" <td>(1.0e-08 - 1.1e-07)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>4.620525</td>\n",
" <td>0.038249</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>10002</td>\n",
" <td>(1.1e-07 - 1.2e-06)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.036841</td>\n",
" <td>0.013203</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>10002</td>\n",
" <td>(1.2e-06 - 1.3e-05)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.659916</td>\n",
" <td>0.010107</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>10002</td>\n",
" <td>(1.3e-05 - 1.4e-04)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.861546</td>\n",
" <td>0.013328</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>10002</td>\n",
" <td>(1.4e-04 - 1.5e-03)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.049664</td>\n",
" <td>0.008215</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>10002</td>\n",
" <td>(1.5e-03 - 1.6e-02)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.162157</td>\n",
" <td>0.010245</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>10002</td>\n",
" <td>(1.6e-02 - 1.7e-01)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.224496</td>\n",
" <td>0.013796</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>10002</td>\n",
" <td>(1.7e-01 - 1.9e+00)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.997585</td>\n",
" <td>0.009161</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>10002</td>\n",
" <td>(1.9e+00 - 2.0e+01)</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>0.373472</td>\n",
" <td>0.003922</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" cell energy [MeV] nuclide score mean std. dev.\n",
"0 10002 (1.0e-08 - 1.1e-07) H-1 scatter 4.620525 0.038249\n",
"1 10002 (1.1e-07 - 1.2e-06) H-1 scatter 2.036841 0.013203\n",
"2 10002 (1.2e-06 - 1.3e-05) H-1 scatter 1.659916 0.010107\n",
"3 10002 (1.3e-05 - 1.4e-04) H-1 scatter 1.861546 0.013328\n",
"4 10002 (1.4e-04 - 1.5e-03) H-1 scatter 2.049664 0.008215\n",
"5 10002 (1.5e-03 - 1.6e-02) H-1 scatter 2.162157 0.010245\n",
"6 10002 (1.6e-02 - 1.7e-01) H-1 scatter 2.224496 0.013796\n",
"7 10002 (1.7e-01 - 1.9e+00) H-1 scatter 1.997585 0.009161\n",
"8 10002 (1.9e+00 - 2.0e+01) H-1 scatter 0.373472 0.003922"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"# \"Slice\" the H-1 scatter data in the moderator Cell into a new derived Tally\n",
"need_to_slice = sp.get_tally(name='need-to-slice')\n",