Merge pull request #454 from paulromano/output-improvements

More improvements to HDF5 interface and Python API
This commit is contained in:
Will Boyd 2015-09-25 10:10:11 -04:00
commit af6c1412bb
74 changed files with 3507 additions and 3165 deletions

View file

@ -16,5 +16,4 @@ as debugging.
styleguide
workflow
xml-parsing
voxel
docbuild

View file

@ -1,52 +0,0 @@
.. _devguide_voxel:
=====================================
Voxel Plot Binary File Specifications
=====================================
The current revision of the voxel plot binary file is 1.
**integer(4) n_voxels_x**
Number of voxels in the x direction
**integer(4) n_voxels_y**
Number of voxels in the y direction
**integer(4) n_voxels_z**
Number of voxels in the z direction
**real(8) width_voxel_x**
Width of voxels in the x direction
**real(8) width_voxel_y**
Width of voxels in the y direction
**real(8) width_voxel_z**
Width of voxels in the z direction
**real(8) lower_left_x**
Lower left x point of the voxel grid
**real(8) lower_left_y**
Lower left y point of the voxel grid
**real(8) lower_left_z**
Lower left z point of the voxel grid
*do x = 1, n_voxels_x*
*do y = 1, n_voxels_y*
*do z = 1, n_voxels_z*
**integer(4) id**
Cell or material id number at this voxel center. Set to -1 when
cell not_found.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,13 @@
.. _notebook_post_processing:
===============
Post Processing
===============
.. only:: html
.. notebook:: post-processing.ipynb
.. only:: latex
IPython notebooks must be viewed in the online HTML documentation.

View file

@ -358,7 +358,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+SH22vbX8OQKf5Rtv+EgDNJ3X5\n8wZaxWd1+fMGiuFvir8bvjp8J/tGy/6jAmRvhW8fwL3vVT+o3grfPoB7r/IpALI3tz8FoJN84/NV\n873hB8UnM3xzANtf8nb4dwmg3grfFEDJO8JPE0i9Ff4pAYL3pI8mkHor/HMCeO9JH00g9SafEsh7\nT/ppARBvp48UwJnelT5SACd7O31TAlnvKx9SQCd7B58KgPO+8iMFuPWe9E8F8BveWX7bAjzX9y4/\n/Jve+fhsH6Ctv7n8PTzjvY/v9gEOHz58+PBX+6v/f/wPvnd54f3j6venE/yl769Xv7+j3x/o98/V\n32/o9+fl389Xnx+g5x/o+Qt6/oOeP6HnX+j5G3z+h54/ouefV5/foufP6Pk3ev4On/+j9w/o/Qd6\n/4Le/6D3T/D9V67Y/ZsVQBq+s+8f0ftP+P41axXguP9NWgDuu/Cdfv+N3r/D9/9TAID+A7T/Ae2/\ngPs/0P4TtP8F7r9J3AIO9P+g/Udw/9Oygbf7r9D+L7j/DO1/Q/vv4P4/tP8Q7n9E+y/h/k+0/xTu\nf4X7b+H+X7T/+BPuf3aM8OHDhw8fPnz4w/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIw\nMTUtMDgtMDZUMTY6NDM6MTMrMDc6MDBtUQj+AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTA4LTA2\nVDE2OjQzOjEzKzA3OjAwHAywQgAAAABJRU5ErkJggg==\n",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB98JFQMZGiFPL70AAALKSURBVGje7dpLcqQwDAbgHHE2\nYeEj+D4cwQucBUfo+3CEXoSp8OhuhF70T4qpKXmdr21LogK2Pj7A8QmNP+HDhw8fPnz48Kf6VH9G\n+66vy+je8k19jnf8C5dXIPv86ms56lPdjvaYbyodx3ze+XLE76cXFiD4zPji99z0/AJ4n1lfvJ6f\nnl0A6x+578efMSg1wPr172/jPO5yFXM+Ef78gdblM+WPHyguP//t1/g6pA0wfln+ho/fwgYYn19C\n/xwDvwHGc9OvC+hs37DTrwuwfWanXxdQTC9Mvyygs3wjTL8uwPJpn/tNDbSGz7T0SBEWw4vLXzbQ\n6b6RoveIoO6TvPxlA63qs7z8ZQPF9F+SH22vbX8OQKf5Rtv+EgDNJ3X58wZaxWd1+fMGiuFvir8b\nvjp8J/tGy/6jAmRvhW8fwL3vVT+o3grfPoB7r/IpALI3tz8FoJN84/NV873hB8UnM3xzANtf8nb4\ndwmg3grfFEDJO8JPE0i9Ff4pAYL3pI8mkHor/HMCeO9JH00g9SafEsh7T/ppARBvp48UwJnelT5S\nACd7O31TAlnvKx9SQCd7B58KgPO+8iMFuPWe9E8F8BveWX7bAjzX9y4//Jve+fhsH6Ctv7n8PTzj\nvY/v9gEOHz58+PBX+6v/f/wPvnd54f3j6venE/yl769Xv7+j3x/o98/V32/o9+fl389Xnx+g5x/o\n+Qt6/oOeP6HnX+j5G3z+h54/ouefV5/foufP6Pk3ev4On/+j9w/o/Qd6/4Le/6D3T/D9V67Y/ZsV\nQBq+s+8f0ftP+P41axXguP9NWgDuu/Cdfv+N3r/D9/9TAID+A7T/Ae2/gPs/0P4TtP8F7r9J3AIO\n9P+g/Udw/9Oygbf7r9D+L7j/DO1/Q/vv4P4/tP8Q7n9E+y/h/k+0/xTuf4X7b+H+X7T/+BPuf3aM\n8OHDhw8fPnz4w/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTUtMDktMjFUMTA6MDg6\nNTcrMDc6MDALr51VAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE1LTA5LTIxVDEwOjA4OjU3KzA3OjAw\nevIl6QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
@ -569,7 +569,8 @@
" Copyright: 2011-2015 Massachusetts Institute of Technology\n",
" License: http://mit-crpg.github.io/openmc/license.html\n",
" Version: 0.7.0\n",
" Date/Time: 2015-08-15 10:52:49\n",
" Git SHA1: b167d70c877c516deca785801b9fa6f53fb0985b\n",
" Date/Time: 2015-09-21 10:25:26\n",
"\n",
" ===========================================================================\n",
" ========================> INITIALIZATION <=========================\n",
@ -595,26 +596,26 @@
"\n",
" Bat./Gen. k Average k \n",
" ========= ======== ==================== \n",
" 1/1 1.00465 \n",
" 2/1 1.05814 \n",
" 3/1 1.05114 \n",
" 4/1 1.09189 \n",
" 5/1 1.03731 \n",
" 6/1 1.03510 \n",
" 7/1 1.09378 1.06444 +/- 0.02934\n",
" 8/1 1.04522 1.05803 +/- 0.01811\n",
" 9/1 1.06557 1.05992 +/- 0.01294\n",
" 10/1 1.05757 1.05945 +/- 0.01004\n",
" 11/1 1.04858 1.05764 +/- 0.00839\n",
" 12/1 1.01832 1.05202 +/- 0.00905\n",
" 13/1 1.05822 1.05279 +/- 0.00787\n",
" 14/1 1.07684 1.05547 +/- 0.00744\n",
" 15/1 1.00349 1.05027 +/- 0.00844\n",
" 16/1 1.06969 1.05203 +/- 0.00784\n",
" 17/1 1.06377 1.05301 +/- 0.00722\n",
" 18/1 1.02897 1.05116 +/- 0.00690\n",
" 19/1 1.00685 1.04800 +/- 0.00713\n",
" 20/1 1.02644 1.04656 +/- 0.00679\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",
" Creating state point statepoint.20.h5...\n",
"\n",
" ===========================================================================\n",
@ -624,27 +625,27 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 4.4100E-01 seconds\n",
" Reading cross sections = 1.1300E-01 seconds\n",
" Total time in simulation = 1.8418E+01 seconds\n",
" Time in transport only = 1.8403E+01 seconds\n",
" Time in inactive batches = 2.1070E+00 seconds\n",
" Time in active batches = 1.6311E+01 seconds\n",
" Time synchronizing fission bank = 2.0000E-03 seconds\n",
" Sampling source sites = 2.0000E-03 seconds\n",
" Total time for initialization = 9.1800E-01 seconds\n",
" Reading cross sections = 6.5800E-01 seconds\n",
" Total time in simulation = 1.7037E+01 seconds\n",
" Time in transport only = 1.7024E+01 seconds\n",
" Time in inactive batches = 2.8600E+00 seconds\n",
" Time in active batches = 1.4177E+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 = 0.0000E+00 seconds\n",
" Total time for finalization = 1.0000E-03 seconds\n",
" Total time elapsed = 1.8861E+01 seconds\n",
" Calculation Rate (inactive) = 5932.61 neutrons/second\n",
" Calculation Rate (active) = 2299.06 neutrons/second\n",
" Total time elapsed = 1.7971E+01 seconds\n",
" Calculation Rate (inactive) = 4370.63 neutrons/second\n",
" Calculation Rate (active) = 2645.13 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
" k-effective (Collision) = 1.04599 +/- 0.00622\n",
" k-effective (Track-length) = 1.04656 +/- 0.00679\n",
" k-effective (Absorption) = 1.04614 +/- 0.00461\n",
" Combined k-effective = 1.04651 +/- 0.00368\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",
" Leakage Fraction = 0.00000 +/- 0.00000\n",
"\n"
]
@ -692,8 +693,7 @@
"outputs": [],
"source": [
"# Load the statepoint file\n",
"sp = StatePoint('statepoint.20.h5')\n",
"sp.read_results()"
"sp = StatePoint('statepoint.20.h5')"
]
},
{
@ -759,8 +759,8 @@
" <th>0</th>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
" <td>1.042726</td>\n",
" <td>0.008661</td>\n",
" <td>1.046353</td>\n",
" <td>0.00935</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -769,7 +769,7 @@
"text/plain": [
" nuclide score mean std. dev.\n",
"bin \n",
"0 total (nu-fission / absorption) 1.042726 0.008661"
"0 total (nu-fission / absorption) 1.046353 0.00935"
]
},
"execution_count": 26,
@ -827,17 +827,17 @@
" <th>0</th>\n",
" <td>total</td>\n",
" <td>absorption</td>\n",
" <td>0.958874</td>\n",
" <td>0.007146</td>\n",
" <td>0.95873</td>\n",
" <td>0.00774</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" nuclide score mean std. dev.\n",
"bin \n",
"0 total absorption 0.958874 0.007146"
" nuclide score mean std. dev.\n",
"bin \n",
"0 total absorption 0.95873 0.00774"
]
},
"execution_count": 27,
@ -893,17 +893,17 @@
" <th>0</th>\n",
" <td>total</td>\n",
" <td>nu-fission</td>\n",
" <td>1.09186</td>\n",
" <td>0.010424</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",
"bin \n",
"0 total nu-fission 1.09186 0.010424"
" nuclide score mean std. dev.\n",
"bin \n",
"0 total nu-fission 1.091622 0.011163"
]
},
"execution_count": 28,
@ -966,8 +966,8 @@
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>absorption</td>\n",
" <td>0.802921</td>\n",
" <td>0.006109</td>\n",
" <td>0.802012</td>\n",
" <td>0.006609</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -976,7 +976,7 @@
"text/plain": [
" energy [MeV] cell nuclide score mean std. dev.\n",
"bin \n",
"0 0.0e+00 - 6.2e-01 10000 total absorption 0.802921 0.006109"
"0 0.0e+00 - 6.2e-01 10000 total absorption 0.802012 0.006609"
]
},
"execution_count": 29,
@ -1037,8 +1037,8 @@
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
" <td>1.240421</td>\n",
" <td>0.010978</td>\n",
" <td>1.246604</td>\n",
" <td>0.011825</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -1047,11 +1047,11 @@
"text/plain": [
" energy [MeV] cell nuclide score mean \\\n",
"bin \n",
"0 0.0e+00 - 6.2e-01 10000 total (nu-fission / absorption) 1.240421 \n",
"0 0.0e+00 - 6.2e-01 10000 total (nu-fission / absorption) 1.246604 \n",
"\n",
" std. dev. \n",
"bin \n",
"0 0.010978 "
"0 0.011825 "
]
},
"execution_count": 30,
@ -1105,8 +1105,8 @@
" <th>0</th>\n",
" <td>total</td>\n",
" <td>(((absorption * nu-fission) * absorption) * (n...</td>\n",
" <td>1.042726</td>\n",
" <td>0.017538</td>\n",
" <td>1.046353</td>\n",
" <td>0.01894</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -1115,11 +1115,11 @@
"text/plain": [
" nuclide score mean \\\n",
"bin \n",
"0 total (((absorption * nu-fission) * absorption) * (n... 1.042726 \n",
"0 total (((absorption * nu-fission) * absorption) * (n... 1.046353 \n",
"\n",
" std. dev. \n",
"bin \n",
"0 0.017538 "
"0 0.01894 "
]
},
"execution_count": 31,
@ -1197,7 +1197,7 @@
" <td>(U-238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>0.000001</td>\n",
" <td>6.985151e-09</td>\n",
" <td>6.859257e-09</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
@ -1205,8 +1205,8 @@
" <td>0.0e+00 - 6.3e-07</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>0.209988</td>\n",
" <td>2.206753e-03</td>\n",
" <td>0.209986</td>\n",
" <td>1.966887e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
@ -1214,8 +1214,8 @@
" <td>0.0e+00 - 6.3e-07</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>0.355276</td>\n",
" <td>3.741612e-03</td>\n",
" <td>0.355667</td>\n",
" <td>3.717881e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
@ -1224,7 +1224,7 @@
" <td>(U-235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>0.005555</td>\n",
" <td>5.842517e-05</td>\n",
" <td>5.218094e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
@ -1232,8 +1232,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>0.007229</td>\n",
" <td>5.951357e-05</td>\n",
" <td>0.007165</td>\n",
" <td>5.625590e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
@ -1241,8 +1241,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>0.227642</td>\n",
" <td>9.496469e-04</td>\n",
" <td>0.227653</td>\n",
" <td>8.544314e-04</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
@ -1250,8 +1250,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>0.008076</td>\n",
" <td>5.699123e-05</td>\n",
" <td>0.008089</td>\n",
" <td>5.080374e-05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
@ -1259,8 +1259,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>0.003369</td>\n",
" <td>1.369755e-05</td>\n",
" <td>0.003370</td>\n",
" <td>1.361116e-05</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -1270,24 +1270,24 @@
" cell energy [MeV] nuclide score mean \\\n",
"bin \n",
"0 10000 0.0e+00 - 6.3e-07 (U-238 / total) (nu-fission / flux) 0.000001 \n",
"1 10000 0.0e+00 - 6.3e-07 (U-238 / total) (scatter / flux) 0.209988 \n",
"2 10000 0.0e+00 - 6.3e-07 (U-235 / total) (nu-fission / flux) 0.355276 \n",
"1 10000 0.0e+00 - 6.3e-07 (U-238 / total) (scatter / flux) 0.209986 \n",
"2 10000 0.0e+00 - 6.3e-07 (U-235 / total) (nu-fission / flux) 0.355667 \n",
"3 10000 0.0e+00 - 6.3e-07 (U-235 / total) (scatter / flux) 0.005555 \n",
"4 10000 6.3e-07 - 2.0e+01 (U-238 / total) (nu-fission / flux) 0.007229 \n",
"5 10000 6.3e-07 - 2.0e+01 (U-238 / total) (scatter / flux) 0.227642 \n",
"6 10000 6.3e-07 - 2.0e+01 (U-235 / total) (nu-fission / flux) 0.008076 \n",
"7 10000 6.3e-07 - 2.0e+01 (U-235 / total) (scatter / flux) 0.003369 \n",
"4 10000 6.3e-07 - 2.0e+01 (U-238 / total) (nu-fission / flux) 0.007165 \n",
"5 10000 6.3e-07 - 2.0e+01 (U-238 / total) (scatter / flux) 0.227653 \n",
"6 10000 6.3e-07 - 2.0e+01 (U-235 / total) (nu-fission / flux) 0.008089 \n",
"7 10000 6.3e-07 - 2.0e+01 (U-235 / total) (scatter / flux) 0.003370 \n",
"\n",
" std. dev. \n",
"bin \n",
"0 6.985151e-09 \n",
"1 2.206753e-03 \n",
"2 3.741612e-03 \n",
"3 5.842517e-05 \n",
"4 5.951357e-05 \n",
"5 9.496469e-04 \n",
"6 5.699123e-05 \n",
"7 1.369755e-05 "
"0 6.859257e-09 \n",
"1 1.966887e-03 \n",
"2 3.717881e-03 \n",
"3 5.218094e-05 \n",
"4 5.625590e-05 \n",
"5 8.544314e-04 \n",
"6 5.080374e-05 \n",
"7 1.361116e-05 "
]
},
"execution_count": 33,
@ -1318,11 +1318,11 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 6.63809296e-07]\n",
" [ 3.55275544e-01]]\n",
"[[[ 6.64174599e-07]\n",
" [ 3.55666541e-01]]\n",
"\n",
" [[ 7.22895528e-03]\n",
" [ 8.07565148e-03]]]\n"
" [[ 7.16505734e-03]\n",
" [ 8.08949336e-03]]]\n"
]
}
],
@ -1350,9 +1350,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 0.00555505]]\n",
"[[[ 0.00555465]]\n",
"\n",
" [[ 0.0033688 ]]]\n"
" [[ 0.00337011]]]\n"
]
}
],
@ -1374,8 +1374,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"[[[ 0.2276418]\n",
" [ 0.0033688]]]\n"
"[[[ 0.22765348]\n",
" [ 0.00337011]]]\n"
]
}
],
@ -1434,7 +1434,7 @@
" <td>U-238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.000002</td>\n",
" <td>1.211808e-08</td>\n",
" <td>1.284890e-08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
@ -1442,8 +1442,8 @@
" <td>0.0e+00 - 6.3e-07</td>\n",
" <td>U-235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.870360</td>\n",
" <td>6.496431e-03</td>\n",
" <td>0.867982</td>\n",
" <td>7.022256e-03</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
@ -1451,8 +1451,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>U-238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.083226</td>\n",
" <td>6.367951e-04</td>\n",
" <td>0.082801</td>\n",
" <td>6.087096e-04</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
@ -1460,8 +1460,8 @@
" <td>6.3e-07 - 2.0e+01</td>\n",
" <td>U-235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.092974</td>\n",
" <td>5.921990e-04</td>\n",
" <td>0.093484</td>\n",
" <td>5.275039e-04</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -1470,10 +1470,10 @@
"text/plain": [
" cell energy [MeV] nuclide score mean std. dev.\n",
"bin \n",
"0 10000 0.0e+00 - 6.3e-07 U-238 nu-fission 0.000002 1.211808e-08\n",
"1 10000 0.0e+00 - 6.3e-07 U-235 nu-fission 0.870360 6.496431e-03\n",
"2 10000 6.3e-07 - 2.0e+01 U-238 nu-fission 0.083226 6.367951e-04\n",
"3 10000 6.3e-07 - 2.0e+01 U-235 nu-fission 0.092974 5.921990e-04"
"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,
@ -1526,8 +1526,8 @@
" <td>1.0e-08 - 1.1e-07</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>4.638428</td>\n",
" <td>0.034134</td>\n",
" <td>4.620525</td>\n",
" <td>0.038249</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
@ -1535,8 +1535,8 @@
" <td>1.1e-07 - 1.2e-06</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.050818</td>\n",
" <td>0.010745</td>\n",
" <td>2.036841</td>\n",
" <td>0.013203</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
@ -1544,8 +1544,8 @@
" <td>1.2e-06 - 1.3e-05</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.656905</td>\n",
" <td>0.009480</td>\n",
" <td>1.659916</td>\n",
" <td>0.010107</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
@ -1553,8 +1553,8 @@
" <td>1.3e-05 - 1.4e-04</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.870808</td>\n",
" <td>0.011883</td>\n",
" <td>1.861546</td>\n",
" <td>0.013328</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
@ -1562,8 +1562,8 @@
" <td>1.4e-04 - 1.5e-03</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.045621</td>\n",
" <td>0.011414</td>\n",
" <td>2.049664</td>\n",
" <td>0.008215</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
@ -1571,8 +1571,8 @@
" <td>1.5e-03 - 1.6e-02</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.163297</td>\n",
" <td>0.008725</td>\n",
" <td>2.162157</td>\n",
" <td>0.010245</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
@ -1580,8 +1580,8 @@
" <td>1.6e-02 - 1.7e-01</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>2.202045</td>\n",
" <td>0.013500</td>\n",
" <td>2.224496</td>\n",
" <td>0.013796</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
@ -1589,8 +1589,8 @@
" <td>1.7e-01 - 1.9e+00</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>1.996977</td>\n",
" <td>0.010791</td>\n",
" <td>1.997585</td>\n",
" <td>0.009161</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
@ -1598,8 +1598,8 @@
" <td>1.9e+00 - 2.0e+01</td>\n",
" <td>H-1</td>\n",
" <td>scatter</td>\n",
" <td>0.370890</td>\n",
" <td>0.003597</td>\n",
" <td>0.373472</td>\n",
" <td>0.003922</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
@ -1608,15 +1608,15 @@
"text/plain": [
" cell energy [MeV] nuclide score mean std. dev.\n",
"bin \n",
"0 10002 1.0e-08 - 1.1e-07 H-1 scatter 4.638428 0.034134\n",
"1 10002 1.1e-07 - 1.2e-06 H-1 scatter 2.050818 0.010745\n",
"2 10002 1.2e-06 - 1.3e-05 H-1 scatter 1.656905 0.009480\n",
"3 10002 1.3e-05 - 1.4e-04 H-1 scatter 1.870808 0.011883\n",
"4 10002 1.4e-04 - 1.5e-03 H-1 scatter 2.045621 0.011414\n",
"5 10002 1.5e-03 - 1.6e-02 H-1 scatter 2.163297 0.008725\n",
"6 10002 1.6e-02 - 1.7e-01 H-1 scatter 2.202045 0.013500\n",
"7 10002 1.7e-01 - 1.9e+00 H-1 scatter 1.996977 0.010791\n",
"8 10002 1.9e+00 - 2.0e+01 H-1 scatter 0.370890 0.003597"
"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,
@ -1649,7 +1649,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.8"
"version": "2.7.9"
}
},
"nbformat": 4,

View file

@ -62,6 +62,7 @@ on a given module or class.
.. toctree::
:maxdepth: 1
examples/post-processing
examples/pandas-dataframes
examples/tally-arithmetic

View file

@ -79,14 +79,13 @@ Message Description
[VALID] XML file matches RelaxNG.
======================== ===================================
As an example, if OpenMC is installed in the directory
``/opt/openmc/0.6.2`` and the current working directory is where
OpenMC XML input files are located, they can be validated using
the following command:
As an example, if OpenMC is installed in the directory ``/opt/openmc/`` and the
current working directory is where OpenMC XML input files are located, they can
be validated using the following command:
.. code-block:: bash
/opt/openmc/0.6.2/bin/xml_validate
/opt/openmc/bin/openmc-validate-xml
--------------------------------------
Settings Specification -- settings.xml
@ -1427,8 +1426,7 @@ a separate element with the tag name ``<mesh>``. This element has the following
attributes/sub-elements:
:type:
The type of structured mesh. Valid options include "rectangular" and
"hexagonal".
The type of structured mesh. The only valid option is "regular".
:dimension:
The number of mesh cells in each direction.
@ -1530,16 +1528,16 @@ sub-elements:
*Default*: None - Required entry
:type:
Keyword for type of plot to be produced. Currently only "slice" and
"voxel" plots are implemented. The "slice" plot type creates 2D pixel
maps saved in the PPM file format. PPM files can be displayed in most
viewers (e.g. the default Gnome viewer, IrfanView, etc.). The "voxel"
plot type produces a binary datafile containing voxel grid positioning and
the cell or material (specified by the ``color`` tag) at the center of each
voxel. These datafiles can be processed into 3D SILO files using the
``voxel.py`` utility provided with the OpenMC source, and subsequently
viewed with a 3D viewer such as VISIT or Paraview. See the
:ref:`devguide_voxel` for information about the datafile structure.
Keyword for type of plot to be produced. Currently only "slice" and "voxel"
plots are implemented. The "slice" plot type creates 2D pixel maps saved in
the PPM file format. PPM files can be displayed in most viewers (e.g. the
default Gnome viewer, IrfanView, etc.). The "voxel" plot type produces a
binary datafile containing voxel grid positioning and the cell or material
(specified by the ``color`` tag) at the center of each voxel. These
datafiles can be processed into 3D SILO files using the
``openmc-voxel-to-silovtk`` utility provided with the OpenMC source, and
subsequently viewed with a 3D viewer such as VISIT or Paraview. See the
:ref:`usersguide_voxel` for information about the datafile structure.
.. note:: Since the PPM format is saved without any kind of compression,
the resulting file sizes can be quite large. Saving the image in

View file

@ -10,5 +10,7 @@ Output File Formats
statepoint
source
summary
particle_restart
track
voxel

View file

@ -6,11 +6,9 @@ Particle Restart File Format
The current revision of the particle restart file format is 1.
**/filetype** (*int*)
**/filetype** (*char[]*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
String indicating the type of file.
**/revision** (*int*)

View file

@ -8,11 +8,9 @@ Normally, source data is stored in a state point file. However, it is possible
to request that the source be written separately, in which case the format used
is that documented here.
**/filetype** (*int*)
**/filetype** (*char[]*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
String indicating the type of file.
**/source_bank** (Compound type)

View file

@ -6,11 +6,9 @@ State Point File Format
The current revision of the statepoint file format is 13.
**/filetype** (*int*)
**/filetype** (*char[]*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
String indicating the type of file.
**/revision** (*int*)
@ -29,11 +27,11 @@ The current revision of the statepoint file format is 13.
Release version number for OpenMC
**/time_stamp** (*char[19]*)
**/date_and_time** (*char[]*)
Date and time the state point was written.
**/path** (*char[255]*)
**/path** (*char[]*)
Absolute path to directory containing input files.
@ -41,7 +39,7 @@ The current revision of the statepoint file format is 13.
Pseudo-random number generator seed.
**/run_mode** (*int*)
**/run_mode** (*char[]*)
Run mode used. A value of 1 indicates a fixed-source run and a value of 2
indicates an eigenvalue run.
@ -58,7 +56,7 @@ The current revision of the statepoint file format is 13.
The number of batches already simulated.
if (run_mode == MODE_EIGENVALUE)
if run_mode == 'k-eigenvalue':
**/n_inactive** (*int*)
@ -136,37 +134,27 @@ if (run_mode == MODE_EIGENVALUE)
**/tally/meshes/keys** (*int[]*)
User-identified unique ID of each mesh
User-identified unique ID of each mesh.
*do i = 1, n_meshes*
**/tallies/meshes/mesh <uid>/type** (*char[]*)
**/tallies/meshes/mesh i/id** (*int*)
Type of mesh.
Unique identifier of the mesh.
**/tallies/meshes/mesh <uid>/dimension** (*int*)
**/tallies/meshes/mesh i/type** (*int*)
Number of mesh cells in each dimension.
Type of mesh.
**/tallies/meshes/mesh <uid>/lower_left** (*double[]*)
**/tallies/meshes/mesh i/n_dimension** (*int*)
Coordinates of lower-left corner of mesh.
Number of dimensions for mesh (2 or 3).
**/tallies/meshes/mesh <uid>/upper_right** (*double[]*)
**/tallies/meshes/mesh i/dimension** (*int*)
Coordinates of upper-right corner of mesh.
Number of mesh cells in each dimension.
**/tallies/meshes/mesh <uid>/width** (*double[]*)
**/tallies/meshes/mesh i/lower_left** (*double[]*)
Coordinates of lower-left corner of mesh.
**/tallies/meshes/mesh i/upper_right** (*double[]*)
Coordinates of upper-right corner of mesh.
**/tallies/meshes/mesh i/width** (*double[]*)
Width of each mesh cell in each dimension.
Width of each mesh cell in each dimension.
**/tallies/n_tallies** (*int*)
@ -180,65 +168,66 @@ if (run_mode == MODE_EIGENVALUE)
User-identified unique ID of each tally.
*do i = 1, n_tallies*
**/tallies/tally <uid>/estimator** (*char[]*)
**/tallies/tally i/estimator** (*int*)
Type of tally estimator, either 'analog', 'tracklength', or 'collision'.
Type of tally estimator: analog (1) or tracklength (2).
**/tallies/tally <uid>/n_realizations** (*int*)
**/tallies/tally i/n_realizations** (*int*)
Number of realizations.
Number of realizations.
**/tallies/tally <uid>/n_filters** (*int*)
**/tallies/tally i/n_filters** (*int*)
Number of filters used.
Number of filters used.
**/tallies/tally <uid>/filter <j>/type** (*char[]*)
*do j = 1, tallies(i) % n_filters*
Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn',
'surface', 'mesh', 'energy', 'energyout', or 'distribcell'.
**/tallies/tally i/filter j/type** (*int*)
**/tallies/tally <uid>/filter <j>/offset** (*int*)
Type of tally filter.
Filter offset (used for distribcell filter).
**/tallies/tally i/filter j/offset** (*int*)
**/tallies/tally <uid>/filter <j>/n_bins** (*int*)
Filter offset (used for distribcell).
Number of bins for the j-th filter.
**/tallies/tally i/filter j/n_bins** (*int*)
**/tallies/tally <uid>/filter <j>/bins** (*int[]* or *double[]*)
Number of bins for filter.
Value for each filter bin of this type.
**/tallies/tally i/filter j/bins** (*int[]* or *double[]*)
**/tallies/tally <uid>/nuclides** (*char[][]*)
Value for each filter bin of this type.
Array of nuclides to tally. Note that if no nuclide is specified in the user
input, a single 'total' nuclide appears here.
**/tallies/tally i/n_nuclides** (*int*)
**/tallies/tally <uid>/n_score_bins** (*int*)
Number of nuclide bins. If none are specified, this is just one.
Number of scoring bins for a single nuclide. In general, this can be greater
than the number of user-specified scores since each score might have
multiple scoring bins, e.g., scatter-PN.
**/tallies/tally i/nuclides** (*int[]*)
**/tallies/tally <uid>/score_bins** (*char[][]*)
Values of specified nuclide bins (ZAID identifiers)
Values of specified scores.
**/tallies/tally i/n_score_bins** (*int*)
**/tallies/tally <uid>/n_user_scores** (*int*)
Number of scoring bins.
Number of scores without accounting for those added by expansions,
e.g. scatter-PN.
**/tallies/tally i/score_bins** (*int*)
**/tallies/tally <uid>/moment_orders** (*char[][]*)
Values of specified scoring bins (e.g. SCORE_FLUX).
Tallying moment orders for Legendre and spherical harmonic tally expansions
(*e.g.*, 'P2', 'Y1,2', etc.).
**/tallies/tally i/n_user_score_bins**
**/tallies/tally <uid>/results** (Compound type)
Number of scoring bins without accounting for those added by
expansions, e.g. scatter-PN.
*do J = 1, total number of moments*
**/tallies/tally i/moments/orderJ** (*char[8]*)
Tallying moment order for Legendre and spherical
harmonic tally expansions (*e.g.*, 'P2', 'Y1,2', etc.).
Accumulated sum and sum-of-squares for each bin of the i-th tally. This is a
two-dimensional array, the first dimension of which represents combinations
of filter bins and the second dimensions of which represents scoring
bins. Each element of the array has fields 'sum' and 'sum_sq'.
**/source_present** (*int*)
@ -261,13 +250,7 @@ if (run_mode == MODE_EIGENVALUE)
Flag indicated if tallies are present in the file.
*do i = 1, n_tallies*
**/tallies/tally i/results** (Compound type)
Accumulated sum and sum-of-squares for each bin of the tally i-th tally
if (run_mode == MODE_EIGENVALUE and source_present)
if (run_mode == 'k-eigenvalue' and source_present > 0)
**/source_bank** (Compound type)

View file

@ -0,0 +1,310 @@
.. _usersguide_summary:
===================
Summary File Format
===================
The current revision of the summary file format is 1.
**/filetype** (*char[]*)
String indicating the type of file.
**/revision** (*int*)
Revision of the summary file format. Any time a change is made in the
format, this integer is incremented.
**/version_major** (*int*)
Major version number for OpenMC
**/version_minor** (*int*)
Minor version number for OpenMC
**/version_release** (*int*)
Release version number for OpenMC
**/date_and_time** (*char[]*)
Date and time the summary was written.
**/n_procs** (*int*)
Number of MPI processes used.
**/n_particles** (*int8_t*)
Number of particles used per generation.
**/n_batches** (*int*)
Number of batches to simulate.
**/n_inactive** (*int*)
Number of inactive batches. Only present if /run_mode is set to
'k-eigenvalue'.
**/n_active** (*int*)
Number of active batches. Only present if /run_mode is set to
'k-eigenvalue'.
**/gen_per_batch** (*int*)
Number of generations per batch. Only present if /run_mode is set to
'k-eigenvalue'.
**/geometry/n_cells** (*int*)
Number of cells in the problem.
**/geometry/n_surfaces** (*int*)
Number of surfaces in the problem.
**/geometry/n_universes** (*int*)
Number of unique universes in the problem.
**/geometry/n_lattices** (*int*)
Number of lattices in the problem.
**/geometry/cells/cell <uid>/index** (*int*)
Index in cells array used internally in OpenMC.
**/geometry/cells/cell <uid>/name** (*char[]*)
Name of the cell.
**/geometry/cells/cell <uid>/universe** (*int*)
Universe assigned to the cell. If none is specified, the default
universe (0) is assigned.
**/geometry/cells/cell <uid>/fill_type** (*char[]*)
Type of fill for the cell. Can be 'normal', 'universe', or 'lattice'.
**/geometry/cells/cell <uid>/material** (*int*)
Unique ID of the material assigned to the cell. This dataset is present only
if fill_type is set to 'normal'.
**/geometry/cells/cell <uid>/offset** (*int[]*)
Offsets used for distribcell tally filter. This dataset is present only if
fill_type is set to 'universe'.
**/geometry/cells/cell <uid>/translation** (*double[3]*)
Translation applied to the fill universe. This dataset is present only if
fill_type is set to 'universe'.
**/geometry/cells/cell <uid>/rotation** (*double[3]*)
Angles in degrees about the x-, y-, and z-axes for which the fill universe
should be rotated. This dataset is present only if fill_type is set to
'universe'.
**/geometry/cells/cell <uid>/lattice** (*int*)
Unique ID of the lattice which fills the cell. Only present if fill_type is
set to 'lattice'.
**/geometry/cells/cell <uid>/surfaces** (*int[]*)
Surface specification for the cell.
**/geometry/surfaces/surface <uid>/index** (*int*)
Index in surfaces array used internally in OpenMC.
**/geometry/surfaces/surface <uid>/name** (*char[]*)
Name of the surface.
**/geometry/surfaces/surface <uid>/type** (*char[]*)
Type of the surface. Can be 'x-plane', 'y-plane', 'z-plane', 'plane',
'x-cylinder', 'y-cylinder', 'sphere', 'x-cone', 'y-cone', or 'z-cone'.
**/geometry/surfaces/surface <uid>/coefficients** (*double[]*)
Array of coefficients that define the surface. See :ref:`surface_element`
for what coefficients are defined for each surface type.
**/geometry/surfaces/surface <uid>/boundary_condition** (*char[]*)
Boundary condition applied to the surface. Can be 'transmission', 'vacuum',
'reflective', or 'periodic'.
**/geometry/universes/universe <uid>/index** (*int*)
Index in the universes array used internally in OpenMC.
**/geometry/universes/universe <uid>/cells** (*int[]*)
Array of unique IDs of cells that appear in the universe.
**/geometry/lattices/lattice <uid>/index** (*int*)
Index in the lattices array used internally in OpenMC.
**/geometry/lattices/lattice <uid>/name** (*char[]*)
Name of the lattice.
**/geometry/lattices/lattice <uid>/type** (*char[]*)
Type of the lattice, either 'rectangular' or 'hexagonal'.
**/geometry/lattices/lattice <uid>/pitch** (*double[]*)
Pitch of the lattice.
**/geometry/lattices/lattice <uid>/outer** (*int*)
Outer universe assigned to lattice cells outside the defined range.
**/geometry/lattices/lattice <uid>/offsets** (*int[]*)
Offsets used for distribcell tally filter.
**/geometry/lattices/lattice <uid>/universes** (*int[]*)
Three-dimensional array of universes assigned to each cell of the lattice.
**/geometry/lattices/lattice <uid>/dimension** (*int[]*)
The number of lattice cells in each direction. This dataset is present only
when the 'type' dataset is set to 'rectangular'.
**/geometry/lattices/lattice <uid>/lower_left** (*double[]*)
The coordinates of the lower-left corner of the lattice. This dataset is
present only when the 'type' dataset is set to 'rectangular'.
**/geometry/lattices/lattice <uid>/n_rings** (*int*)
Number of radial ring positions in the xy-plane. This dataset is present
only when the 'type' dataset is set to 'hexagonal'.
**/geometry/lattices/lattice <uid>/n_axial** (*int*)
Number of lattice positions along the z-axis. This dataset is present only
when the 'type' dataset is set to 'hexagonal'.
**/geometry/lattices/lattice <uid>/center** (*double[]*)
Coordinates of the center of the lattice. This dataset is present only when
the 'type' dataset is set to 'hexagonal'.
**/n_materials** (*int*)
Number of materials in the problem.
**/materials/material <uid>/index** (*int*)
Index in materials array used internally in OpenMC.
**/materials/material <uid>/name** (*char[]*)
Name of the material.
**/materials/material <uid>/atom_density** (*double[]*)
Total atom density of the material in atom/b-cm.
**/materials/material <uid>/nuclides** (*char[][]*)
Array of nuclides present in the material, e.g., 'U-235.71c'.
**/materials/material <uid>/nuclide_densities** (*double[]*)
Atom density of each nuclide.
**/materials/material <uid>/sab_names** (*char[][]*)
Names of S(:math:`\alpha`,:math:`\beta`) tables assigned to the material.
**/tallies/n_tallies** (*int*)
Number of tallies in the problem.
**/tallies/n_meshes** (*int*)
Number of meshes in the problem.
**/tallies/mesh <uid>/index** (*int*)
Index in the meshes array used internally in OpenMC.
**/tallies/mesh <uid>/type** (*char[]*)
Type of the mesh. The only valid option is currently 'regular'.
**/tallies/mesh <uid>/dimension** (*int[]*)
Number of mesh cells in each direction.
**/tallies/mesh <uid>/lower_left** (*double[]*)
Coordinates of the lower-left corner of the mesh.
**/tallies/mesh <uid>/upper_right** (*double[]*)
Coordinates of the upper-right corner of the mesh.
**/tallies/mesh <uid>/width** (*double[]*)
Width of a single mesh cell in each direction.
**/tallies/tally <uid>/index** (*int*)
Index in tallies array used internally in OpenMC.
**/tallies/tally <uid>/name** (*char[]*)
Name of the tally.
**/tallies/tally <uid>/n_filters** (*int*)
Number of filters applied to the tally.
**/tallies/tally <uid>/filter <j>/type** (*char[]*)
Type of the j-th filter. Can be 'universe', 'material', 'cell', 'cellborn',
'surface', 'mesh', 'energy', 'energyout', or 'distribcell'.
**/tallies/tally <uid>/filter <j>/offset** (*int*)
Filter offset (used for distribcell filter).
**/tallies/tally <uid>/filter <j>/n_bins** (*int*)
Number of bins for the j-th filter.
**/tallies/tally <uid>/filter <j>/bins** (*int[]* or *double[]*)
Value for each filter bin of this type.
**/tallies/tally <uid>/nuclides** (*char[][]*)
Array of nuclides to tally. Note that if no nuclide is specified in the user
input, a single 'total' nuclide appears here.
**/tallies/tally <uid>/n_score_bins** (*int*)
Number of scoring bins for a single nuclide. In general, this can be greater
than the number of user-specified scores since each score might have
multiple scoring bins, e.g., scatter-PN.
**/tallies/tally <uid>/score_bins** (*char[][]*)
Scoring bins for the tally.

View file

@ -6,11 +6,9 @@ Track File Format
The current revision of the particle track file format is 1.
**/filetype** (*int*)
**/filetype** (*char[]*)
Flags what type of file this is. A value of -1 indicates a statepoint file,
a value of -2 indicates a particle restart file, a value of -3 indicates a
source file, and a value of -4 indicates a track file.
String indicating the type of file.
**/revision** (*int*)

View file

@ -0,0 +1,25 @@
.. _usersguide_voxel:
======================
Voxel Plot File Format
======================
**/filetype** (*char[]*)
String indicating the type of file.
**/num_voxels** (*int[3]*)
Number of voxels in the x-, y-, and z- directions.
**/voxel_width** (*double[3]*)
Width of a voxel in centimeters.
**/lower_left** (*double[3]*)
Cartesian coordinates of the lower-left corner of the plot.
**/data** (*int[][][]*)
Data for each voxel that represents a material or cell ID.

View file

@ -6,31 +6,34 @@ Data Processing and Visualization
This section is intended to explain in detail the recommended procedures for
carrying out common post-processing tasks with OpenMC. While several utilities
of varying complexity are provided to help automate the process, in many cases
it will be extremely beneficial to do some coding in Python to quickly obtain
results. In these cases, and for many of the provided utilities, it is necessary
for your Python installation to contain:
of varying complexity are provided to help automate the process, the most
powerful capabilities for post-processing derive from use of the :ref:`Python
API <pythonapi>`. Both the provided scripts and the Python API rely on a number
third-party Python packages, including:
* [1]_ `Numpy <http://www.numpy.org/>`_
* [1]_ `Scipy <http://www.scipy.org/>`_
* [2]_ `h5py <http://code.google.com/p/h5py/>`_
* [3]_ `Matplotlib <http://matplotlib.org/>`_
* [3]_ `Silomesh <https://github.com/nhorelik/silomesh>`_
* [3]_ `VTK <http://www.vtk.org/>`_
* [1]_ `NumPy <http://www.numpy.org/>`_
* [2]_ `h5py <http://www.h5py.org>`_
* [3]_ `pandas <http://pandas.pydata.org>`_
* [4]_ `matplotlib <http://matplotlib.org/>`_
* [4]_ `Silomesh <https://github.com/nhorelik/silomesh>`_
* [4]_ `VTK <http://www.vtk.org/>`_
* [4]_ `lxml <http://lxml.de>`_
Most of these are easily obtainable in Ubuntu through the package manager, or
are easily installed with distutils.
Most of these are can easily be installed with `pip <https://pip.pypa.io>`_
or alternatively obtaining through a package manager.
.. [1] Required for tally data extraction from statepoints with statepoint.py
.. [2] Required only if reading HDF5 statepoint files.
.. [3] Optional for plotting utilities
.. [1] Required for most post-processing tasks
.. [2] Required for reading HDF5 output files
.. [3] Optional dependency for advanced features in Python API
.. [4] Not used directly by the Python API, but are optional dependencies for a
number of scripts.
----------------------
Geometry Visualization
----------------------
Geometry plotting is carried out by creating a plots.xml, specifying plots, and
running OpenMC with the -plot or -p command-line option (See
running OpenMC with the --plot or -p command-line option (See
:ref:`usersguide_plotting`).
Plotting in 2D
@ -128,27 +131,26 @@ capabilities of 3D voxel plots.
Voxel plots are built the same way 2D slice plots are, by determining the cell
or material id of a particle at the center of each voxel. In this example, the
space covered is the cube between the points (-5,-5,-5) and (5,5,5), with voxel
centers 10/500 = 0.02 cm apart. The binary VOXEL files that are produced do not
centers 10/500 = 0.02 cm apart. The HDF5 voxel files that are produced do not
specify any color - instead containing only material or cell ids (material id
in this example) - and thus the ``background``, ``col_spec``, and ``mask``
elements are not used. If no cell is found at a voxel center, an id of -1 is
stored.
The binary VOXEL files output by OpenMC can not be viewed directly by any
existing viewers. In order to view them, they must be converted into a standard
mesh format that can be viewed in ParaView, Visit, etc. This typically will
compress the size of the file significantly. The provided utility voxel.py
accomplishes this for SILO:
The voxel plot data is written to an HDF5 file. The voxel file can subsequently
be converted into a standard mesh format that can be viewed in ParaView, Visit,
etc. This typically will compress the size of the file significantly. The
provided utility openmc-voxel-to-silovtk accomplishes this for SILO:
.. code-block:: sh
<openmc_root>/src/utils/voxel.py myplot.voxel -o output.silo
openmc-voxel-to-silovtk myplot.voxel -o output.silo
and VTK file formats:
.. code-block:: sh
<openmc_root>/src/utils/voxel.py myplot.voxel --vtk -o output.vti
openmc-voxel-to-silovtk myplot.voxel --vtk -o output.vti
To use this utility you need either
@ -156,11 +158,10 @@ To use this utility you need either
or
* `VTK <http://www.vtk.org/>`_ with python bindings - On Ubuntu, these are
easily obtained with ``sudo apt-get install python-vtk``
* `VTK <http://www.vtk.org/>`_ with python bindings. On debian derivatives,
these are easily obtained with ``sudo apt-get install python-vtk``
Users can process the binary into any other format if desired by following the
example of voxel.py. For the binary file structure, see :ref:`devguide_voxel`.
For the HDF5 file structure, see :ref:`usersguide_voxel`.
Once processed into a standard 3D file format, colors and masks can be defined
using the stored id numbers to better explore the geometry. The process for
@ -183,150 +184,38 @@ doing this will depend on the 3D viewer, but should be straightforward.
Tally Visualization
-------------------
Tally results are saved in both a text file (tallies.out) as well as a binary
Tally results are saved in both a text file (tallies.out) as well as an HDF5
statepoint file. While the tallies.out file may be fine for simple tallies, in
many cases the user requires more information about the tally or the run, or
has to deal with a large number of result values (e.g. for mesh tallies). In
these cases, extracting data from the statepoint file via Python scripting is
the preferred method of data analysis and visualization.
many cases the user requires more information about the tally or the run, or has
to deal with a large number of result values (e.g. for mesh tallies). In these
cases, extracting data from the statepoint file via the :ref:`pythonapi` is the
preferred method of data analysis and visualization.
Data Extraction
---------------
A great deal of information is available in statepoint files (See
:ref:`usersguide_statepoint`), most of which is easily extracted by the provided
utility statepoint.py. This utility provides a Python class to load statepoints
and extract data - it is used in many of the provided plotting utilities, and
can be used in user-created scripts to carry out manipulations of the data. To
read tallies using this utility, make sure statepoint.py is in your PYTHONPATH,
and then import the class, instantiate it, and call read_results:
:ref:`usersguide_statepoint`), all of which is accessible through the Python
API. The ``openmc.statepoint`` module (see :ref:`pythonapi_statepoint`) provides
a class to load statepoints and access data as requested; it is used in many of
the provided plotting utilities, OpenMC's regression test suite, and can be used
in user-created scripts to carry out manipulations of the data.
.. code-block:: python
from statepoint import StatePoint
sp = StatePoint('statepoint.100.binary')
sp.read_results()
At this point the user can extract entire scores from tallies into a data
dictionary containing numpy arrays:
.. code-block:: python
tallyid = 1
score = 'flux'
data = sp.extract_results(tallyid, score)
means = data['means']
print data.keys()
The results from this function contain all filter bins (all mesh points, all
energy groups, etc.), which can be reshaped with the bin ordering also contained
in the output dictionary. This is the best choice of output for easily
integrating ranges of data.
Alternatively the user can extract specific values for a single score/filter
combination:
.. code-block:: python
tallyid = 1
score = 'flux'
filters = [('mesh', (1, 1, 5)), ('energyin', 0)]
value, error = sp.get_value(tallyid, filters, score)
In the future more documentation may become available here for statepoint.py and
the data extraction functions of StatePoint objects. However, for now it is up
to the user to explore the classes in statepoint.py to discover what data is
available in StatePoint objects (we highly recommend interactively exploring
with `IPython <http://ipython.org/>`_). Many examples can be found by looking
through the other utilities that use statepoint.py, and a few common
visualization tasks will be described here in the following sections.
An :ref:`example IPython notebook <notebook_post_processing>` demonstrates how
to extract data from a statepoint using the Python API.
Plotting in 2D
--------------
The :ref:`IPython notebook example <notebook_post_processing>` also demonstrates
how to plot a mesh tally in two dimensions using the Python API. Note, however,
that there is also a script distributed with OpenMC, ``openmc-plot-mesh-tally``,
that provides an interactive GUI to explore and plot mesh tallies for any scores
and filter bins.
.. image:: ../_images/plotmeshtally.png
:height: 200px
For simple viewing of 2D slices of a mesh plot, the utility plot_mesh_tally.py
is provided. This utility provides an interactive GUI to explore and plot
mesh tallies for any scores and filter bins. It requires statepoint.py.
.. image:: ../_images/fluxplot.png
:height: 200px
Alternatively, the user can write their own Python script to manipulate the data
appropriately. Consider a run where the first tally contains a 105x105x20 mesh
over a small core, with a flux score and two energyin filter bins. To explicitly
extract the data and create a plot with gnuplot, the following script can be
used. The script operates in several steps for clarity, and is not necessarily
the most efficient way to extract data from large mesh tallies. This creates the
two heatmaps in the previous figure.
.. code-block:: python
#!/usr/bin/env python
import os
import statepoint
# load and parse the statepoint file
sp = statepoint.StatePoint('statepoint.300.binary')
sp.read_results()
tallyid = 0 # This is tally 1
score = 0 # This corresponds to flux (see tally.scores)
# get mesh dimensions
meshid = sp.tallies[tallyid].filters['mesh'].bins[0]
for i,m in enumerate(sp.meshes):
if m.id == meshid:
mesh = m
break
nx,ny,nz = mesh.dimension
# loop through mesh and extract values to python dictionaries
thermal = {}
fast = {}
for x in range(1,nx+1):
for y in range(1,ny+1):
for z in range(1,nz+1):
val,err = sp.get_value(tallyid,
[('mesh',(x,y,z)),('energyin',0)],
score)
thermal[(x,y,z)] = val
val,err = sp.get_value(tallyid,
[('mesh',(x,y,z)),('energyin',1)],
score)
fast[(x,y,z)] = val
# sum up the axial values and write datafile for gnuplot
with open('meshdata.dat','w') as fh:
for x in range(1,nx+1):
for y in range(1,ny+1):
thermalval = 0.
fastval = 0.
for z in range(1,nz+1):
thermalval += thermal[(x,y,z)]
fastval += fast[(x,y,z)]
fh.write("{} {} {} {}\n".format(x,y,thermalval,fastval))
# write gnuplot file
with open('tmp.gnuplot','w') as fh:
fh.write(r"""set terminal png size 1000 400
set output 'fluxplot.png'
set nokey
set autoscale fix
set multiplot layout 1,2 title "Pin Mesh Flux Tally"
set title "Thermal"
plot 'meshdata.dat' using 1:2:3 with image
set title "Fast"
plot 'meshdata.dat' using 1:2:4 with image
""")
# make plot
os.system("gnuplot < tmp.gnuplot")
Plotting in 3D
--------------
@ -334,22 +223,23 @@ Plotting in 3D
:height: 200px
As with 3D plots of the geometry, meshtally data needs to be put into a standard
format for viewing. The utility statepoint_3d.py is provided to accomplish this
for both VTK and SILO. By default statepoint_3d.py processes a statepoint into a
3D file with all mesh tallies and filter/score combinations,
format for viewing. The utility ``openmc-statepoint-3d`` is provided to
accomplish this for both VTK and SILO. By default ``openmc-statepoint-3d``
processes a statepoint into a 3D file with all mesh tallies and filter/score
combinations,
.. code-block:: sh
<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> -o output.silo
<openmc_root>/src/utils/statepoint_3d.py <statepoint_file> --vtk -o output.vtm
openmc-statepoint-3d <statepoint_file> -o output.silo
openmc-statepoint-3d <statepoint_file> --vtk -o output.vtm
but it also provides several command-line options to selectively process only
certain data arrays in order to keep file sizes down.
.. code-block:: sh
statepoint_3d.py <statepoint_file> --tallies 2,4 --scores 4.1,4.3 -o output.silo
statepoint_3d.py <statepoint_file> --filters 2.energyin.1 --vtk -o output.vtm
openmc-statepoint-3d <statepoint_file> --tallies 2,4 --scores 4.1,4.3 -o output.silo
openmc-statepoint-3d <statepoint_file> --filters 2.energyin.1 --vtk -o output.vtm
All available options for specifying a subset of tallies, scores, and filters
can be listed with the ``--list`` or ``-l`` command line options.
@ -426,13 +316,11 @@ Getting Data into MATLAB
------------------------
There is currently no front-end utility to dump tally data to MATLAB files, but
the process is straightforward. First extract the data using a custom Python
script with statepoint.py, put the data into appropriately-shaped numpy arrays,
and then use the `Scipy MATLAB IO routines
the process is straightforward. First extract the data using the Python API via
``openmc.statepoint`` and then use the `Scipy MATLAB IO routines
<http://docs.scipy.org/doc/scipy/reference/tutorial/io.html>`_ to save to a MAT
file. Note that the data contained in the output from
``StatePoint.extract_result`` is already in a Numpy array that can be reshaped
and dumped to MATLAB in one step.
file. Note that all arrays that are accessible in a statepoint are already in
NumPy arrays that can be reshaped and dumped to MATLAB in one step.
----------------------------
Particle Track Visualization
@ -463,15 +351,15 @@ particle numbers, respectively. For example, to output the tracks for particles
</track>
After running OpenMC, the directory should contain a file of the form
"track_(batch #)_(generation #)_(particle #).(binary or h5)" for each particle
tracked. These track files can be converted into VTK poly data files with the
"track.py" utility. The usage of track.py is of the form "track.py [-o OUT] IN"
where OUT is the optional output filename and IN is one or more filenames
describing track files. The default output name is "track.pvtp". A common
usage of track.py is "track.py track*.binary" which will use the data from all
binary track files in the directory to write a "track.pvtp" VTK output file.
The .pvtp file can then be read and plotted by 3d visualization programs such as
ParaView.
"track_(batch #)_(generation #)_(particle #).h5" for each particle tracked.
These track files can be converted into VTK poly data files with the
``openmc-track-to-vtk`` utility. The usage of ``openmc-track-to-vtk`` is of the
form "openmc-track-to-vtk [-o OUT] IN" where OUT is the optional output filename
and IN is one or more filenames describing track files. The default output name
is "track.pvtp". A common usage of track.py is "openmc-track-to-vtk track*.h5"
which will use the data from all binary track files in the directory to write a
"track.pvtp" VTK output file. The .pvtp file can then be read and plotted by 3d
visualization programs such as ParaView.
----------------------
Source Site Processing
@ -480,43 +368,6 @@ Source Site Processing
For eigenvalue problems, OpenMC will store information on the fission source
sites in the statepoint file by default. For each source site, the weight,
position, sampled direction, and sampled energy are stored. To extract this data
from a statepoint file, the statepoint.py Python module can be used. Below is an
example of an interactive ipython session using the statepoint.py Python module:
.. code-block:: python
In [1]: import statepoint
In [2]: sp = statepoint.StatePoint('statepoint.100.h5')
In [3]: sp.read_source()
In [4]: len(sp.source)
Out[4]: 1000
In [5]: sp.source[0:10]
Out[5]:
[<SourceSite: xyz=[ 2.21980946 -8.92686048 87.93720485] at E=0.932923263566>,
<SourceSite: xyz=[ 2.21980946 -8.92686048 87.93720485] at E=0.349240220512>,
<SourceSite: xyz=[-31.21542213 -30.26762771 72.10845757] at E=3.75843584486>,
<SourceSite: xyz=[-31.21542213 -30.26762771 72.10845757] at E=0.80550137267>,
<SourceSite: xyz=[ 0.18805099 -69.13376508 103.67726838] at E=1.67922461097>,
<SourceSite: xyz=[ 0.18805099 -69.13376508 103.67726838] at E=1.16304110199>,
<SourceSite: xyz=[ -50.42189115 -9.96571672 123.34077905] at E=0.710937974074>,
<SourceSite: xyz=[ -32.80427668 -15.49316628 125.26301151] at E=1.61907104162>,
<SourceSite: xyz=[ 53.20376026 -15.38643708 120.58071044] at E=3.33962024907>,
<SourceSite: xyz=[ 53.20376026 -15.38643708 120.58071044] at E=1.90185680329>]
In [6]: site = sp.source[0]
In [7]: site.weight
Out[7]: 1.0
In [8]: site.xyz
Out[8]: array([ 2.21980946, -8.92686048, 87.93720485])
In [9]: site.uvw
Out[9]: array([ 0.06740523, 0.50612814, 0.85982024])
In [10]: site.E
Out[10]: 0.93292326356564159
from a statepoint file, the ``openmc.statepoint`` module can be used. An
:ref:`example IPython notebook <notebook_post_processing>` demontrates how to
analyze and plot source information.

View file

@ -31,21 +31,6 @@ f951: error: unrecognized command line option "-fbacktrace"
You are probably using a version of the gfortran compiler that is too
old. Download and install the latest version of gfortran_.
make[1]: ifort: Command not found
*********************************
You tried compiling with the Intel Fortran compiler and it was not found on your
:envvar:`PATH`. If you have the Intel compiler installed, make sure the shell
can locate it (this can be tested with :program:`which ifort`).
make[1]: pgf90: Command not found
*********************************
You tried compiling with the PGI Fortran compiler and it was not found on your
:envvar:`PATH`. If you have the PGI compiler installed, make sure the shell can
locate it (this can be tested with :program:`which pgf90`).
-------------------------
Problems with Simulations
-------------------------
@ -56,13 +41,13 @@ Segmentation Fault
A segmentation fault occurs when the program tries to access a variable in
memory that was outside the memory allocated for the program. The best way to
debug a segmentation fault is to re-compile OpenMC with debug options turned
on. First go to your ``openmc/src`` directory where OpenMC was compiled and type
the following commands:
on. Create a new build directory and type the following commands:
.. code-block:: sh
make distclean
make DEBUG=yes
mkdir build-debug && cd build-debug
cmake -Ddebug=on /path/to/openmc
make
Now when you re-run your problem, it should report exactly where the program
failed. If after reading the debug output, you are still unsure why the program