diff --git a/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb b/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
index 0c0250437..cbd81f154 100644
--- a/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
+++ b/docs/source/pythonapi/examples/multi-group-cross-sections.ipynb
@@ -478,7 +478,7 @@
" License: http://mit-crpg.github.io/openmc/license.html\n",
" Version: 0.7.0\n",
" Git SHA1: 23535afa1c69644bb299bde18a094c3b99d53ae0\n",
- " Date/Time: 2015-10-09 00:44:07\n",
+ " Date/Time: 2015-10-09 16:04:33\n",
" MPI Processes: 1\n",
"\n",
" ===========================================================================\n",
@@ -563,20 +563,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
- " Total time for initialization = 4.1300E-01 seconds\n",
- " Reading cross sections = 1.0500E-01 seconds\n",
- " Total time in simulation = 1.3459E+01 seconds\n",
- " Time in transport only = 1.3445E+01 seconds\n",
- " Time in inactive batches = 2.1740E+00 seconds\n",
- " Time in active batches = 1.1285E+01 seconds\n",
- " Time synchronizing fission bank = 4.0000E-03 seconds\n",
- " Sampling source sites = 3.0000E-03 seconds\n",
+ " Total time for initialization = 4.3000E-01 seconds\n",
+ " Reading cross sections = 9.0000E-02 seconds\n",
+ " Total time in simulation = 1.5218E+01 seconds\n",
+ " Time in transport only = 1.5180E+01 seconds\n",
+ " Time in inactive batches = 1.8800E+00 seconds\n",
+ " Time in active batches = 1.3338E+01 seconds\n",
+ " Time synchronizing fission bank = 2.0000E-03 seconds\n",
+ " Sampling source sites = 1.0000E-03 seconds\n",
" SEND/RECV source sites = 1.0000E-03 seconds\n",
" Time accumulating tallies = 1.0000E-03 seconds\n",
- " Total time for finalization = 2.0000E-03 seconds\n",
- " Total time elapsed = 1.3882E+01 seconds\n",
- " Calculation Rate (inactive) = 11499.5 neutrons/second\n",
- " Calculation Rate (active) = 8861.32 neutrons/second\n",
+ " Total time for finalization = 8.0000E-03 seconds\n",
+ " Total time elapsed = 1.5664E+01 seconds\n",
+ " Calculation Rate (inactive) = 13297.9 neutrons/second\n",
+ " Calculation Rate (active) = 7497.38 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@@ -1026,7 +1026,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.685185\tres = 0.000E+00\n",
"[ NORMAL ] Iteration 1:\tk_eff = 0.785642\tres = 3.148E-01\n",
@@ -1461,7 +1462,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 35,
"metadata": {
"collapsed": false
},
@@ -1501,11 +1502,22 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 36,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "0"
+ ]
+ },
+ "execution_count": 36,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"# Delete old HDF5 files\n",
"!rm *.h5\n",
@@ -1531,7 +1543,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 37,
"metadata": {
"collapsed": false
},
@@ -1552,7 +1564,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 38,
"metadata": {
"collapsed": false
},
@@ -1588,11 +1600,46 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 39,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Multi-Group XS\n",
+ "\tReaction Type =\tnu-fission\n",
+ "\tDomain Type =\tcell\n",
+ "\tDomain ID =\t10000\n",
+ "\tNuclide =\tU-235\n",
+ "\tCross Sections [barns]:\n",
+ " Group 1 [0.821 - 20.0 MeV]:\t3.30e+00 +/- 5.91e-01%\n",
+ " Group 2 [0.00553 - 0.821 MeV]:\t3.97e+00 +/- 4.03e-01%\n",
+ " Group 3 [4e-06 - 0.00553 MeV]:\t5.48e+01 +/- 5.56e-01%\n",
+ " Group 4 [6.25e-07 - 4e-06 MeV]:\t8.84e+01 +/- 8.48e-01%\n",
+ " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t2.89e+02 +/- 1.25e+00%\n",
+ " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t4.49e+02 +/- 1.09e+00%\n",
+ " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t6.87e+02 +/- 7.98e-01%\n",
+ " Group 8 [0.0 - 5.8e-08 MeV]:\t1.44e+03 +/- 5.73e-01%\n",
+ "\n",
+ "\tNuclide =\tU-238\n",
+ "\tCross Sections [barns]:\n",
+ " Group 1 [0.821 - 20.0 MeV]:\t1.06e+00 +/- 6.74e-01%\n",
+ " Group 2 [0.00553 - 0.821 MeV]:\t1.22e-03 +/- 8.28e-01%\n",
+ " Group 3 [4e-06 - 0.00553 MeV]:\t4.75e-04 +/- 7.97e+00%\n",
+ " Group 4 [6.25e-07 - 4e-06 MeV]:\t6.53e-06 +/- 7.56e-01%\n",
+ " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t1.07e-05 +/- 1.22e+00%\n",
+ " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t1.55e-05 +/- 1.09e+00%\n",
+ " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t2.30e-05 +/- 7.97e-01%\n",
+ " Group 8 [0.0 - 5.8e-08 MeV]:\t4.25e-05 +/- 5.72e-01%\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
"source": [
"nufission = xs_library[fuel_cell.id]['nu-fission']\n",
"nufission.print_xs(xs_type='micro', nuclides=['U-235', 'U-238'])"
@@ -1607,11 +1654,34 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 40,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Multi-Group XS\n",
+ "\tReaction Type =\tnu-fission\n",
+ "\tDomain Type =\tcell\n",
+ "\tDomain ID =\t10000\n",
+ "\tCross Sections [cm^-1]:\n",
+ " Group 1 [0.821 - 20.0 MeV]:\t2.52e-02 +/- 6.42e-01%\n",
+ " Group 2 [0.00553 - 0.821 MeV]:\t1.52e-03 +/- 3.96e-01%\n",
+ " Group 3 [4e-06 - 0.00553 MeV]:\t2.06e-02 +/- 5.56e-01%\n",
+ " Group 4 [6.25e-07 - 4e-06 MeV]:\t3.32e-02 +/- 8.48e-01%\n",
+ " Group 5 [2.8e-07 - 6.25e-07 MeV]:\t1.09e-01 +/- 1.25e+00%\n",
+ " Group 6 [1.4e-07 - 2.8e-07 MeV]:\t1.69e-01 +/- 1.09e+00%\n",
+ " Group 7 [5.8e-08 - 1.4e-07 MeV]:\t2.58e-01 +/- 7.98e-01%\n",
+ " Group 8 [0.0 - 5.8e-08 MeV]:\t5.41e-01 +/- 5.73e-01%\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
"source": [
"nufission = xs_library[fuel_cell.id]['nu-fission']\n",
"nufission.print_xs(xs_type='macro', nuclides='sum')"
@@ -1626,11 +1696,141 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 41,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "
\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " cell | \n",
+ " group in | \n",
+ " group out | \n",
+ " nuclide | \n",
+ " mean | \n",
+ " std. dev. | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 126 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " O-16 | \n",
+ " 1.560098 | \n",
+ " 0.017801 | \n",
+ "
\n",
+ " \n",
+ " | 127 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 1 | \n",
+ " H-1 | \n",
+ " 0.234877 | \n",
+ " 0.010096 | \n",
+ "
\n",
+ " \n",
+ " | 124 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 2 | \n",
+ " O-16 | \n",
+ " 0.288236 | \n",
+ " 0.004397 | \n",
+ "
\n",
+ " \n",
+ " | 125 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 2 | \n",
+ " H-1 | \n",
+ " 1.587815 | \n",
+ " 0.007847 | \n",
+ "
\n",
+ " \n",
+ " | 122 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 3 | \n",
+ " O-16 | \n",
+ " 0.000000 | \n",
+ " 0.000000 | \n",
+ "
\n",
+ " \n",
+ " | 123 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 3 | \n",
+ " H-1 | \n",
+ " 0.010122 | \n",
+ " 0.000513 | \n",
+ "
\n",
+ " \n",
+ " | 120 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 4 | \n",
+ " O-16 | \n",
+ " 0.000000 | \n",
+ " 0.000000 | \n",
+ "
\n",
+ " \n",
+ " | 121 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 4 | \n",
+ " H-1 | \n",
+ " 0.000000 | \n",
+ " 0.000000 | \n",
+ "
\n",
+ " \n",
+ " | 118 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 5 | \n",
+ " O-16 | \n",
+ " 0.000000 | \n",
+ " 0.000000 | \n",
+ "
\n",
+ " \n",
+ " | 119 | \n",
+ " 10002 | \n",
+ " 1 | \n",
+ " 5 | \n",
+ " H-1 | \n",
+ " 0.000000 | \n",
+ " 0.000000 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " cell group in group out nuclide mean std. dev.\n",
+ "126 10002 1 1 O-16 1.560098 0.017801\n",
+ "127 10002 1 1 H-1 0.234877 0.010096\n",
+ "124 10002 1 2 O-16 0.288236 0.004397\n",
+ "125 10002 1 2 H-1 1.587815 0.007847\n",
+ "122 10002 1 3 O-16 0.000000 0.000000\n",
+ "123 10002 1 3 H-1 0.010122 0.000513\n",
+ "120 10002 1 4 O-16 0.000000 0.000000\n",
+ "121 10002 1 4 H-1 0.000000 0.000000\n",
+ "118 10002 1 5 O-16 0.000000 0.000000\n",
+ "119 10002 1 5 H-1 0.000000 0.000000"
+ ]
+ },
+ "execution_count": 41,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"nuscatter = xs_library[moderator_cell.id]['nu-scatter']\n",
"df = nuscatter.get_pandas_dataframe(xs_type='micro')\n",
@@ -1646,7 +1846,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 42,
"metadata": {
"collapsed": false
},
@@ -1674,11 +1874,22 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 43,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWYAAADDCAYAAACxgLv/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFxZJREFUeJzt3XmYVNWZx/FvAyIKCijGBRiaxA0VRVTcpROX4BLNzKhR\n46jEOMZldOIel9gkJsRM4q6joxFxJRHRcVc0NGpcEVAEdVzoCAooi7iAcaHmj/cUVV3Ucqrq3KrT\nze/zPPV01/bWuVXvfe+5596qAyIiIiIiIiIiIiIiIiIiIiIiIiIiNfHfwIX1bkQAHWU5JDl7Am/U\nuxEBdJTlaKMV2DvntuOAp4s8ZxvgMeAjYIXHaxwCTAeWuuc8CTSW18xVNAO35dzWAhxfZdykNGLv\n1dSc2/sAXwKzPeMcR/HPZnV3HDAD+ByYB1wH9CzxnMOBZ91zJuW5vzNwCfA+8An2GRaK2Q+4B8vz\nj11bji1nAfJoxHKnU9ZtxxF3HrRgbd425/Z73e17ecZZAXw7XLPK16n0QxKRcpdyfAmMw68IbgqM\nBX6OJfNA4FrgmzJf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E/njWB6o5edwcWklnB2iPldWWqzW3ltYiIiIiIiIiIiIiIiIiIiIiIiIiIiIiIiHRs/w9e\ned7lsJ91IAAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ ""
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
"source": [
"# Create plot of the H-1 scattering matrix\n",
"fig = plt.subplot(121)\n",
@@ -1703,7 +1914,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 44,
"metadata": {
"collapsed": true
},
@@ -1725,22 +1936,133 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 45,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Multi-Group XS\n",
+ "\tReaction Type =\ttransport\n",
+ "\tDomain Type =\tcell\n",
+ "\tDomain ID =\t10000\n",
+ "\tNuclide =\tU-238\n",
+ "\tCross Sections [cm^-1]:\n",
+ " Group 1 [6.25e-07 - 20.0 MeV]:\t2.17e-01 +/- 4.04e-01%\n",
+ " Group 2 [0.0 - 6.25e-07 MeV]:\t2.53e-01 +/- 5.85e-01%\n",
+ "\n",
+ "\tNuclide =\tO-16\n",
+ "\tCross Sections [cm^-1]:\n",
+ " Group 1 [6.25e-07 - 20.0 MeV]:\t1.45e-01 +/- 4.10e-01%\n",
+ " Group 2 [0.0 - 6.25e-07 MeV]:\t1.75e-01 +/- 6.46e-01%\n",
+ "\n",
+ "\tNuclide =\tU-235\n",
+ "\tCross Sections [cm^-1]:\n",
+ " Group 1 [6.25e-07 - 20.0 MeV]:\t7.91e-03 +/- 1.22e+00%\n",
+ " Group 2 [0.0 - 6.25e-07 MeV]:\t1.82e-01 +/- 4.98e-01%\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ }
+ ],
"source": [
"condense_xs.print_xs()"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 46,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "data": {
+ "text/html": [
+ "\n",
+ "
\n",
+ " \n",
+ " \n",
+ " | \n",
+ " cell | \n",
+ " group in | \n",
+ " nuclide | \n",
+ " mean | \n",
+ " std. dev. | \n",
+ "
\n",
+ " \n",
+ " \n",
+ " \n",
+ " | 3 | \n",
+ " 10000 | \n",
+ " 1 | \n",
+ " U-238 | \n",
+ " 9.589323 | \n",
+ " 0.038756 | \n",
+ "
\n",
+ " \n",
+ " | 4 | \n",
+ " 10000 | \n",
+ " 1 | \n",
+ " O-16 | \n",
+ " 3.159101 | \n",
+ " 0.012939 | \n",
+ "
\n",
+ " \n",
+ " | 5 | \n",
+ " 10000 | \n",
+ " 1 | \n",
+ " U-235 | \n",
+ " 21.095256 | \n",
+ " 0.257787 | \n",
+ "
\n",
+ " \n",
+ " | 0 | \n",
+ " 10000 | \n",
+ " 2 | \n",
+ " U-238 | \n",
+ " 11.178844 | \n",
+ " 0.065428 | \n",
+ "
\n",
+ " \n",
+ " | 1 | \n",
+ " 10000 | \n",
+ " 2 | \n",
+ " O-16 | \n",
+ " 3.800027 | \n",
+ " 0.024538 | \n",
+ "
\n",
+ " \n",
+ " | 2 | \n",
+ " 10000 | \n",
+ " 2 | \n",
+ " U-235 | \n",
+ " 485.513530 | \n",
+ " 2.418761 | \n",
+ "
\n",
+ " \n",
+ "
\n",
+ "
"
+ ],
+ "text/plain": [
+ " cell group in nuclide mean std. dev.\n",
+ "3 10000 1 U-238 9.589323 0.038756\n",
+ "4 10000 1 O-16 3.159101 0.012939\n",
+ "5 10000 1 U-235 21.095256 0.257787\n",
+ "0 10000 2 U-238 11.178844 0.065428\n",
+ "1 10000 2 O-16 3.800027 0.024538\n",
+ "2 10000 2 U-235 485.513530 2.418761"
+ ]
+ },
+ "execution_count": 46,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
"source": [
"df = condense_xs.get_pandas_dataframe(xs_type='micro')\n",
"df"
@@ -1762,7 +2084,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 47,
"metadata": {
"collapsed": false
},
@@ -1784,7 +2106,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 48,
"metadata": {
"collapsed": false
},
@@ -1832,7 +2154,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 49,
"metadata": {
"collapsed": false
},
@@ -1860,11 +2182,21 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 50,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "openmc keff = 1.227616\n",
+ "openmoc keff = 1.225325\n",
+ "bias [pcm]: -229.1\n"
+ ]
+ }
+ ],
"source": [
"# Print report of keff and bias with OpenMC\n",
"openmoc_keff = solver.getKeff()\n",
@@ -1885,7 +2217,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 51,
"metadata": {
"collapsed": false
},
@@ -1926,7 +2258,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 52,
"metadata": {
"collapsed": false
},
@@ -1944,11 +2276,21 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 53,
"metadata": {
"collapsed": false
},
- "outputs": [],
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "openmc keff = 1.227616\n",
+ "openmoc keff = 1.227096\n",
+ "bias [pcm]: -52.0\n"
+ ]
+ }
+ ],
"source": [
"# Print report of keff and bias with OpenMC\n",
"openmoc_keff = solver.getKeff()\n",
diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py
index 6f9d40a55..a7276bc9e 100644
--- a/openmc/mgxs/library.py
+++ b/openmc/mgxs/library.py
@@ -12,6 +12,51 @@ if sys.version_info[0] >= 3:
class Library(object):
+ """A multi-group cross section library for some energy group structure.
+
+ This class can be used for both OpenMC input generation and tally data
+ post-processing to compute spatially-homogenized and energy-integrated
+ multi-group cross sections for deterministic neutronics calculations.
+
+ This class helps automate the generation of MGXS objects for some energy
+ group structure and domain type. The Library serves as a collection for
+ MGXS objects with routines to automate the initialization of tallies for
+ input files, the loading of tally data from statepoint files, data storage,
+ energy group condensation and more.
+
+ Parameters
+ ----------
+ openmc_geometry : openmc.Geometry
+ An geometry which has been initialized with a root universe
+ by_nuclide : bool
+ 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'])
+ name : str, optional
+ Name of the multi-group cross section. library Used as a label to
+ identify tallies in OpenMC 'tallies.xml' file.
+
+ Attributes
+ ----------
+ openmc_geometry : openmc.Geometry
+ An geometry which has been initialized with a root universe
+ by_nuclide : bool
+ 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 for spatial homogenization
+ energy_groups : EnergyGroups
+ Energy group structure for energy condensation
+ all_mgxs : dict
+ MGXS objects keyed by domain ID and cross section type
+ statepoint : openmc.StatePoint
+ The statepoint with tally data used to the compute cross sections
+ name : str, optional
+ Name of the multi-group cross section library. Used as a label to
+ identify tallies in OpenMC 'tallies.xml' file.
+
+ """
def __init__(self, openmc_geometry, by_nuclide=False,
mgxs_types=None, name=''):
@@ -23,6 +68,7 @@ class Library(object):
self._domain_type = None
self._energy_groups = None
self._all_mgxs = {}
+ self._statepoint = None
self.name = name
self.openmc_geometry = openmc_geometry
@@ -104,6 +150,10 @@ class Library(object):
def all_mgxs(self):
return self._all_mgxs
+ @property
+ def statepoint(self):
+ return self._statepoint
+
@openmc_geometry.setter
def openmc_geometry(self, openmc_geometry):
cv.check_type('openmc_geometry', openmc_geometry, openmc.Geometry)
@@ -140,7 +190,13 @@ class Library(object):
self._energy_groups = energy_groups
def build_library(self):
- """
+ """Initialize MGXS objects in each domain and for each reaction type
+ in the library.
+
+ This routine will populate the all_mgxs instance attribute dictionary
+ with MGXS subclass objects keyed by each domain ID (e.g., Material IDs)
+ and cross section type (e.g., 'nu-fission', 'total', etc.).
+
"""
# Initialize MGXS for each domain and mgxs type and store in dictionary
@@ -155,13 +211,20 @@ class Library(object):
mgxs.create_tallies()
self.all_mgxs[domain.id][mgxs_type] = mgxs
- def add_to_tallies_file(self, tallies_file):
- """
+ def add_to_tallies_file(self, tallies_file, merge=True):
+ """Add all tallies from all MGXS objects to a tallies file.
NOTE: This assumes that build_library() has been called
- :param tallies_file:
- :return:
+ Parameters
+ ----------
+ tallies_file : openmc.TalliesFile
+ A TalliesFile object to add each MGXS' tallies to generate a
+ "tallies.xml" input file for OpenMC
+ merge : bool
+ Indicate whether tallies should be merged when possible. Defaults
+ to True.
+
"""
cv.check_type('tallies_file', tallies_file, openmc.TalliesFile)
@@ -171,17 +234,39 @@ class Library(object):
for mgxs_type in self.mgxs_types:
mgxs = self.get_mgxs(domain, mgxs_type)
for tally_id, tally in mgxs.tallies.items():
- tallies_file.add_tally(tally, merge=True)
+ tallies_file.add_tally(tally, merge=merge)
def load_from_statepoint(self, statepoint):
- """
+ """Extracts tallies in an OpenMC StatePoint with the data needed to
+ compute multi-group cross sections.
+
+ This method is needed to compute cross section data from tallies
+ in an OpenMC StatePoint object.
+
+ NOTE: The statepoint must first be linked with an OpenMC Summary object.
+
+ Parameters
+ ----------
+ statepoint : openmc.StatePoint
+ An OpenMC StatePoint object with tally data
+
+ Raises
+ ------
+ ValueError
+ When this method is called with a statepoint that has not been
+ linked with a summary object.
- :param statepoint:
- :return:
"""
cv.check_type('statepoint', statepoint, openmc.StatePoint)
+ if not statepoint.with_summary:
+ msg = 'Unable to load data from a statepoint which has not been ' \
+ 'linked with a summary file'
+ raise ValueError(msg)
+
+ self._statepoint = statepoint
+
# Load tallies for each MGXS for each domain and mgxs type
for domain in self.domains:
for mgxs_type in self.mgxs_types:
@@ -190,11 +275,33 @@ class Library(object):
mgxs.compute_xs()
def get_mgxs(self, domain, mgxs_type):
- """
+ """Return the MGXS object for some domain and reaction rate type.
+
+ This routine searches the library for an MGXS object for the spatial
+ domain and reaction rate type requ
+
+ NOTE: This routine must be called after the build_library() routine.
+
+ Parameters
+ ----------
+ domain : Material or Cell or Universe or Integral
+ The material, cell, or universe object of interest (or its ID)
+ mgxs_type : {'total', 'transport', 'absorption', 'capture', 'fission',
+ 'nu-fission', 'scatter', 'nu-scatter', 'scatter matrix',
+ 'nu-scatter matrix', 'chi'}
+ The type of multi-group cross section object to return
+
+ Returns
+ -------
+ openmc.mgxs.MGXS
+ The MGXS object for the requested domain and reaction rate type
+
+ Raises
+ ------
+ ValueError
+ If no MGXS object can be found for the requested domain or
+ multi-group cross section type
- :param domain:
- :param mgxs_type:
- :return:
"""
if self.domain_type == 'material':
@@ -225,15 +332,38 @@ class Library(object):
return self.all_mgxs[domain_id][mgxs_type]
def get_condensed_library(self, coarse_groups):
+ """Construct an energy-condensed version of this library.
+
+ This routine condense each of the multi-group cross sections in the
+ library to a coarse energy group structure. NOTE: This routine must
+ be called after the load_from_statepoint(...) routine loads the tallies
+ from the statepoint into each of the cross sections.
+
+ Parameters
+ ----------
+ coarse_groups : openmc.mgxs.EnergyGroups
+ The coarse energy group structure of interest
+
+ Returns
+ -------
+ Library
+ A new multi-group cross section library condensed to the group
+ structure of interest
+
+ Raises
+ ------
+ ValueError
+ When this method is called before a statepoint has been loaded
+
+ See also
+ --------
+ MGXS.get_condensed_xs(coarse_groups)
+
"""
- :param coarse_groups:
- :return:
- """
-
- if self.energy_groups is None:
+ if self.statepoint is None:
msg = 'Unable to get a condensed coarse group cross section ' \
- 'library since the fine energy groups have not yet been set'
+ 'library since the statepoint has not yet been loaded'
raise ValueError(msg)
cv.check_type('coarse_groups', coarse_groups, openmc.mgxs.EnergyGroups)
@@ -260,26 +390,42 @@ class Library(object):
def build_hdf5_store(self, filename='mgxs', directory='mgxs', xs_type='macro'):
"""Export the multi-group cross section library to an HDF5 binary file.
- This method constructs an HDF5 file which stores the multi-group
- cross section data. The data is stored in a hierarchy of HDF5 groups
- from the domain type, domain id, subdomain id (for distribcell domains),
- nuclides and cross section types. Two datasets for the mean and standard
- deviation are stored for each subdomain entry in the HDF5 file.
+ This method constructs an HDF5 file which stores the library's
+ multi-group cross section data. The data is stored in a hierarchy of
+ HDF5 groups from the domain type, domain id, subdomain id (for
+ distribcell domains), nuclides and cross section types. Two datasets for
+ the mean and standard deviation are stored for each subdomain entry in
+ the HDF5 file.
NOTE: This requires the h5py Python package.
Parameters
----------
filename : str
- Filename for the HDF5 file (default is 'mgxs')
+ Filename for the HDF5 file. Defaults to 'mgxs'.
directory : str
- Directory for the HDF5 file (default is 'mgxs')
+ Directory for the HDF5 file. Defaults to 'mgxs'.
xs_type: {'macro', 'micro'}
- Store the macro or micro cross section in units of cm^-1 or barns
+ Store the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
+
+ Raises
+ ------
+ ValueError
+ When this method is called before a statepoint has been loaded
+
+ See also
+ --------
+ MGXS.build_hdf5_store(filename, directory, xs_type)
"""
- # Load tallies for each MGXS for each domain and mgxs type
+ if self.statepoint is None:
+ msg = 'Unable to get a condensed coarse group cross section ' \
+ 'library since a statepoint has not yet been loaded'
+ raise ValueError(msg)
+
+ # Export MGXS for each domain and mgxs type to an HDF5 file
for domain in self.domains:
for mgxs_type in self.mgxs_types:
mgxs = self.all_mgxs[domain.id][mgxs_type]
diff --git a/openmc/mgxs/mgxs.py b/openmc/mgxs/mgxs.py
index 940586f32..20a9f3d6b 100644
--- a/openmc/mgxs/mgxs.py
+++ b/openmc/mgxs/mgxs.py
@@ -242,10 +242,11 @@ class MGXS(object):
energy_groups : EnergyGroups
The energy group structure for energy condensation
by_nuclide : bool
- If true, computes cross sections for each nuclide in domain
+ If true, computes cross sections for each nuclide in domain.
+ Defaults to False
name : str, optional
Name of the multi-group cross section. Used as a label to identify
- tallies in OpenMC 'tallies.xml' file.
+ tallies in OpenMC 'tallies.xml' file. Defaults to the empty string.
Returns
-------
@@ -351,7 +352,8 @@ class MGXS(object):
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
special string 'all' will return the atom densities for all nuclides
in the spatial domain. The special string 'sum' will return the atom
- density summed across all nuclides in the spatial domain.
+ density summed across all nuclides in the spatial domain. Defaults
+ to 'all'.
Returns
-------
@@ -544,22 +546,24 @@ class MGXS(object):
Parameters
----------
groups : Iterable of Integral or 'all'
- Energy groups of interest
+ Energy groups of interest. Defaults to 'all'.
subdomains : Iterable of Integral or 'all'
- Subdomain IDs of interest
+ Subdomain IDs of interest. Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
- special string 'all' (default) will return the cross sections for
- all nuclides in the spatial domain. The special string 'sum' will
- return the cross section summed over all nuclides.
+ special string 'all' will return the cross sections for all nuclides
+ in the spatial domain. The special string 'sum' will return the
+ cross section summed over all nuclides. Defaults to 'all'.
xs_type: {'macro', 'micro'}
- Return the macro or micro cross section in units of cm^-1 or barns
+ Return the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
order_groups: {'increasing', 'decreasing'}
- Return the cross section indexed according to increasing (default)
- or decreasing energy groups (decreasing or increasing energies)
+ Return the cross section indexed according to increasing or
+ decreasing energy groups (decreasing or increasing energies).
+ Defaults to 'increasing'.
value : str
- A string for the type of value to return - 'mean' (default),
- 'std_dev' or 'rel_err' are accepted
+ A string for the type of value to return - 'mean', 'std_dev' or
+ 'rel_err' are accepted. Defaults to 'mean'.
Returns
-------
@@ -739,7 +743,7 @@ class MGXS(object):
Parameters
----------
subdomains : Iterable of Integral or 'all'
- The subdomain IDs to average across
+ The subdomain IDs to average across. Defaults to 'all'.
Returns
-------
@@ -815,15 +819,17 @@ class MGXS(object):
Parameters
----------
subdomains : Iterable of Integral or 'all'
- The subdomain IDs of the cross sections to include in the report
+ The subdomain IDs of the cross sections to include in the report.
+ Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
The nuclides of the cross-sections to include in the report. This
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
- The special string 'all' (default) will report the cross sections
- for all nuclides in the spatial domain. The special string 'sum'
- will report the cross sections summed over all nuclides.
+ The special string 'all' will report the cross sections for all
+ nuclides in the spatial domain. The special string 'sum' will report
+ the cross sections summed over all nuclides. Defaults to 'all'.
xs_type: {'macro', 'micro'}
- Return the macro or micro cross section in units of cm^-1 or barns
+ Return the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
"""
@@ -912,14 +918,15 @@ class MGXS(object):
Parameters
----------
filename : str
- Filename for the HDF5 file (default is 'mgxs')
+ Filename for the HDF5 file. Defaults to 'mgxs'.
directory : str
- Directory for the HDF5 file (default is 'mgxs')
+ Directory for the HDF5 file. Defaults to 'mgxs'.
xs_type: {'macro', 'micro'}
- Store the macro or micro cross section in units of cm^-1 or barns
+ Store the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
append : boolean
If true, appends to an existing HDF5 file with the same filename
- directory (if one exists)
+ directory (if one exists). Defaults to True.
Raises
------
@@ -1030,15 +1037,16 @@ class MGXS(object):
Parameters
----------
filename : str
- Filename for the exported file (default is 'mgxs')
+ Filename for the exported file. Defaults to 'mgxs'.
directory : str
- Directory for the exported file (default is 'mgxs')
+ Directory for the exported file. Defaults to 'mgxs'.
format : {'csv', 'excel', 'pickle', 'latex'}
- The format for the exported data file
+ The format for the exported data file. Defaults to 'csv'.
groups : Iterable of Integral or 'all'
- Energy groups of interest
+ Energy groups of interest. Defaults to 'all'.
xs_type: {'macro', 'micro'}
- Store the macro or micro cross section in units of cm^-1 or barns
+ Store the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
"""
@@ -1100,15 +1108,17 @@ class MGXS(object):
Parameters
----------
groups : Iterable of Integral or 'all'
- Energy groups of interest
+ Energy groups of interest. Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
The nuclides of the cross-sections to include in the dataframe. This
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
- The special string 'all' (default) will include the cross sections
- for all nuclides in the spatial domain. The special string 'sum'
- will include the cross sections summed over all nuclides.
+ The special string 'all' will include the cross sections for all
+ nuclides in the spatial domain. The special string 'sum' will
+ include the cross sections summed over all nuclides. Defaults
+ to 'all'.
xs_type: {'macro', 'micro'}
- Return macro or micro cross section in units of cm^-1 or barns
+ Return macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
summary : None or Summary
An optional Summary object to be used to construct columns for
distribcell tally filters (default is None). The geometric
@@ -1628,24 +1638,26 @@ class ScatterMatrixXS(MGXS):
Parameters
----------
in_groups : Iterable of Integral or 'all'
- Incoming energy groups of interest
+ Incoming energy groups of interest. Defaults to 'all'.
out_groups : Iterable of Integral or 'all'
- Outgoing energy groups of interest
+ Outgoing energy groups of interest. Defaults to 'all'.
subdomains : Iterable of Integral or 'all'
- Subdomain IDs of interest
+ Subdomain IDs of interest. Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
- special string 'all' (default) will return the cross sections for
- all nuclides in the spatial domain. The special string 'sum' will
- return the cross section summed over all nuclides.
+ special string 'all' will return the cross sections for all nuclides
+ in the spatial domain. The special string 'sum' will return the
+ cross section summed over all nuclides. Defaults to 'all'.
xs_type: {'macro', 'micro'}
- Return the macro or micro cross section in units of cm^-1 or barns
+ Return the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
order_groups: {'increasing', 'decreasing'}
- Return the cross section indexed according to increasing (default)
- or decreasing energy groups (decreasing or increasing energies)
+ Return the cross section indexed according to increasing or
+ decreasing energy groups (decreasing or increasing energies).
+ Defaults to 'increasing'.
value : str
- A string for the type of value to return - 'mean' (default),
- 'std_dev' or 'rel_err' are accepted
+ A string for the type of value to return - 'mean', 'std_dev', or
+ 'rel_err' are accepted. Defaults to the empty string.
Returns
-------
@@ -1756,15 +1768,17 @@ class ScatterMatrixXS(MGXS):
Parameters
----------
subdomains : Iterable of Integral or 'all'
- The subdomain IDs of the cross sections to include in the report
+ The subdomain IDs of the cross sections to include in the report.
+ Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
The nuclides of the cross-sections to include in the report. This
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
- The special string 'all' (default) will report the cross sections
- for all nuclides in the spatial domain. The special string 'sum'
- will report the cross sections summed over all nuclides.
+ The special string 'all' will report the cross sections for all
+ nuclides in the spatial domain. The special string 'sum' will report
+ the cross sections summed over all nuclides. Defaults to 'all'.
xs_type: {'macro', 'micro'}
- Return the macro or micro cross section in units of cm^-1 or barns
+ Return the macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
"""
@@ -1952,23 +1966,24 @@ class Chi(MGXS):
Parameters
----------
groups : Iterable of Integral or 'all'
- Energy groups of interest
+ Energy groups of interest. Defaults to 'all'.
subdomains : Iterable of Integral or 'all'
- Subdomain IDs of interest
+ Subdomain IDs of interest. Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
A list of nuclide name strings (e.g., ['U-235', 'U-238']). The
- special string 'all' (default) will return the cross sections for
- all nuclides in the spatial domain. The special string 'sum' will
- return the cross section summed over all nuclides.
+ special string 'all' will return the cross sections for all nuclides
+ in the spatial domain. The special string 'sum' will return the
+ cross section summed over all nuclides. Defaults to 'all'.
xs_type: {'macro', 'micro'}
This parameter is not relevant for chi but is included here to
mirror the parent MGXS.get_xs(...) class method
order_groups: {'increasing', 'decreasing'}
- Return the cross section indexed according to increasing (default)
- or decreasing energy groups (decreasing or increasing energies)
+ Return the cross section indexed according to increasing or
+ decreasing energy groups (decreasing or increasing energies).
+ Defaults to 'increasing'.
value : str
- A string for the type of value to return - 'mean' (default),
- 'std_dev' or 'rel_err' are accepted
+ A string for the type of value to return - 'mean', 'std_dev', or
+ 'rel_err' are accepted. Defaults to 'mean'.
Returns
-------
@@ -2082,15 +2097,17 @@ class Chi(MGXS):
Parameters
----------
groups : Iterable of Integral or 'all'
- Energy groups of interest
+ Energy groups of interest. Defaults to 'all'.
nuclides : Iterable of str or 'all' or 'sum'
The nuclides of the cross-sections to include in the dataframe. This
may be a list of nuclide name strings (e.g., ['U-235', 'U-238']).
- The special string 'all' (default) will include the cross sections
- for all nuclides in the spatial domain. The special string 'sum'
- will include the cross sections summed over all nuclides.
+ The special string 'all' will include the cross sections for all
+ nuclides in the spatial domain. The special string 'sum' will
+ include the cross sections summed over all nuclides. Defaults to
+ 'all'.
xs_type: {'macro', 'micro'}
- Return macro or micro cross section in units of cm^-1 or barns
+ Return macro or micro cross section in units of cm^-1 or barns.
+ Defaults to 'macro'.
summary : None or Summary
An optional Summary object to be used to construct columns for
distribcell tally filters (default is None). The geometric