Respond to @smharper comments on #684

This commit is contained in:
Paul Romano 2016-07-25 06:33:37 -05:00
parent 8952865c09
commit e2112b86ae
16 changed files with 1183 additions and 1185 deletions

View file

@ -18,6 +18,20 @@ try:
except ImportError:
from urllib2 import urlopen
if sys.version_info[0] < 3:
askuser = raw_input
else:
askuser = input
download_warning = """
WARNING: This script will download approximately 9 GB of data. Extracting and
processing the data may require as much as 30 GB of additional free disk
space. Note that if you don't need all 11 temperatures, you can modify the
'files' list in the script to download only the data you want.
Are you sure you want to continue? ([y]/n)
"""
thermal_suffix = {20: '01t', 100: '02t', 293: '03t', 296: '03t', 323: '04t',
350: '05t', 373: '06t', 400: '07t', 423: '08t', 473: '09t',
@ -26,13 +40,15 @@ thermal_suffix = {20: '01t', 100: '02t', 293: '03t', 296: '03t', 323: '04t',
1000: '19t', 1200: '20t', 1600: '21t', 2000: '22t',
3000: '23t'}
parser = argparse.ArgumentParser()
parser.add_argument('-b', '--batch', action='store_true',
help='supresses standard in')
args = parser.parse_args()
response = askuser(download_warning) if not args.batch else 'y'
if response.lower().startswith('n'):
sys.exit()
base_url = 'https://www.oecd-nea.org/dbforms/data/eva/evatapes/jeff_32/Processed/'
files = ['JEFF32-ACE-293K.tar.gz',
'JEFF32-ACE-400K.tar.gz',
@ -72,10 +88,7 @@ for f in files:
files_complete.append(f)
continue
else:
if sys.version_info[0] < 3:
overwrite = raw_input('Overwrite {}? ([y]/n) '.format(f))
else:
overwrite = input('Overwrite {}? ([y]/n) '.format(f))
overwrite = askuser('Overwrite {}? ([y]/n) '.format(f))
if overwrite.lower().startswith('n'):
continue
@ -165,10 +178,7 @@ ace_files = (glob.glob(os.path.join('jeff-3.2', '**', '*.ACE')) +
# Ask user to convert
if not args.batch:
if sys.version_info[0] < 3:
response = raw_input('Convert ACE files to binary? ([y]/n) ')
else:
response = input('Convert ACE files to binary? ([y]/n) ')
response = askuser('Convert ACE files to binary? ([y]/n) ')
else:
response = 'y'
@ -183,10 +193,7 @@ if not response or response.lower().startswith('y'):
# Ask user to convert
if not args.batch:
if sys.version_info[0] < 3:
response = raw_input('Generate HDF5 library? ([y]/n) ')
else:
response = input('Generate HDF5 library? ([y]/n) ')
response = askuser('Generate HDF5 library? ([y]/n) ')
else:
response = 'y'

View file

@ -165,11 +165,11 @@
"outputs": [],
"source": [
"# Instantiate some Nuclides\n",
"h1 = openmc.Nuclide('H-1')\n",
"o16 = openmc.Nuclide('O-16')\n",
"u235 = openmc.Nuclide('U-235')\n",
"u238 = openmc.Nuclide('U-238')\n",
"zr90 = openmc.Nuclide('Zr-90')"
"h1 = openmc.Nuclide('H1')\n",
"o16 = openmc.Nuclide('O16')\n",
"u235 = openmc.Nuclide('U235')\n",
"u238 = openmc.Nuclide('U238')\n",
"zr90 = openmc.Nuclide('Zr90')"
]
},
{
@ -419,24 +419,22 @@
"data": {
"text/plain": [
"OrderedDict([('flux', Tally\n",
"\tID =\t10000\n",
"\tName =\t\n",
"\tFilters =\t\n",
" \t\tcell\t[1]\n",
" \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n",
"\tNuclides =\ttotal \n",
"\tScores =\t['flux']\n",
"\tEstimator =\ttracklength\n",
"), ('absorption', Tally\n",
"\tID =\t10001\n",
"\tName =\t\n",
"\tFilters =\t\n",
" \t\tcell\t[1]\n",
" \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n",
"\tNuclides =\ttotal \n",
"\tScores =\t['absorption']\n",
"\tEstimator =\ttracklength\n",
")])"
" \tID =\t10000\n",
" \tName =\t\n",
" \tFilters =\t\n",
" \t\tcell\t[1]\n",
" \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n",
" \tNuclides =\ttotal \n",
" \tScores =\t['flux']\n",
" \tEstimator =\ttracklength), ('absorption', Tally\n",
" \tID =\t10001\n",
" \tName =\t\n",
" \tFilters =\t\n",
" \t\tcell\t[1]\n",
" \t\tenergy\t[ 0.00000000e+00 6.25000000e-07 2.00000000e+01]\n",
" \tNuclides =\ttotal \n",
" \tScores =\t['absorption']\n",
" \tEstimator =\ttracklength)])"
]
},
"execution_count": 13,
@ -513,26 +511,25 @@
" Copyright: 2011-2016 Massachusetts Institute of Technology\n",
" License: http://openmc.readthedocs.io/en/latest/license.html\n",
" Version: 0.7.1\n",
" Git SHA1: 19feb55e6d5e8350398627f39fb55ee8e2e63011\n",
" Date/Time: 2016-05-13 10:19:16\n",
" MPI Processes: 1\n",
" Git SHA1: 3d68c07625e33cd64188df03ee03e9c31b3d4b74\n",
" Date/Time: 2016-07-22 21:03:18\n",
"\n",
" ===========================================================================\n",
" ========================> INITIALIZATION <=========================\n",
" ===========================================================================\n",
"\n",
" Reading settings XML file...\n",
" Reading cross sections XML file...\n",
" Reading geometry XML file...\n",
" Reading cross sections XML file...\n",
" Reading materials XML file...\n",
" Reading H1.71c from /home/romano/openmc/data/nndc_hdf5/H1_71c.h5\n",
" Reading O16.71c from /home/romano/openmc/data/nndc_hdf5/O16_71c.h5\n",
" Reading U235.71c from /home/romano/openmc/data/nndc_hdf5/U235_71c.h5\n",
" Reading U238.71c from /home/romano/openmc/data/nndc_hdf5/U238_71c.h5\n",
" Reading Zr90.71c from /home/romano/openmc/data/nndc_hdf5/Zr90_71c.h5\n",
" Maximum neutron transport energy: 20.0000 MeV for H1.71c\n",
" Reading tallies XML file...\n",
" Building neighboring cells lists for each surface...\n",
" Loading ACE cross section table: 1001.71c\n",
" Loading ACE cross section table: 8016.71c\n",
" Loading ACE cross section table: 92235.71c\n",
" Loading ACE cross section table: 92238.71c\n",
" Loading ACE cross section table: 40090.71c\n",
" Maximum neutron transport energy: 20.0000 MeV for 1001.71c\n",
" Initializing source particles...\n",
"\n",
" ===========================================================================\n",
@ -600,20 +597,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 4.2300E-01 seconds\n",
" Reading cross sections = 9.3000E-02 seconds\n",
" Total time in simulation = 1.6549E+01 seconds\n",
" Time in transport only = 1.6535E+01 seconds\n",
" Time in inactive batches = 2.3650E+00 seconds\n",
" Time in active batches = 1.4184E+01 seconds\n",
" Time synchronizing fission bank = 5.0000E-03 seconds\n",
" Sampling source sites = 3.0000E-03 seconds\n",
" Total time for initialization = 3.2300E-01 seconds\n",
" Reading cross sections = 1.6900E-01 seconds\n",
" Total time in simulation = 1.9882E+01 seconds\n",
" Time in transport only = 1.9869E+01 seconds\n",
" Time in inactive batches = 2.6590E+00 seconds\n",
" Time in active batches = 1.7223E+01 seconds\n",
" Time synchronizing fission bank = 4.0000E-03 seconds\n",
" Sampling source sites = 4.0000E-03 seconds\n",
" SEND/RECV source sites = 0.0000E+00 seconds\n",
" Time accumulating tallies = 0.0000E+00 seconds\n",
" Total time for finalization = 0.0000E+00 seconds\n",
" Total time elapsed = 1.6981E+01 seconds\n",
" Calculation Rate (inactive) = 10570.8 neutrons/second\n",
" Calculation Rate (active) = 7050.20 neutrons/second\n",
" Total time elapsed = 2.0217E+01 seconds\n",
" Calculation Rate (inactive) = 9402.03 neutrons/second\n",
" Calculation Rate (active) = 5806.19 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@ -1167,21 +1164,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -45,12 +45,12 @@
"outputs": [],
"source": [
"# Instantiate some Nuclides\n",
"h1 = openmc.Nuclide('H-1')\n",
"b10 = openmc.Nuclide('B-10')\n",
"o16 = openmc.Nuclide('O-16')\n",
"u235 = openmc.Nuclide('U-235')\n",
"u238 = openmc.Nuclide('U-238')\n",
"zr90 = openmc.Nuclide('Zr-90')"
"h1 = openmc.Nuclide('H1')\n",
"b10 = openmc.Nuclide('B10')\n",
"o16 = openmc.Nuclide('O16')\n",
"u235 = openmc.Nuclide('U235')\n",
"u238 = openmc.Nuclide('U238')\n",
"zr90 = openmc.Nuclide('Zr90')"
]
},
{
@ -339,7 +339,7 @@
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AFBRQzLY81/IkAAALKSURBVGje7dpLcqQwDAbgHHE2\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/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMDUtMDVUMTQ6NTE6\nNDUtMDY6MDCqOITjAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA1LTA1VDE0OjUxOjQ1LTA2OjAw\n22U8XwAAAABJRU5ErkJggg==\n",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AHFwInLqDpadAAAALKSURBVGje7dpLcqQwDAbgHHE2\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/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMDctMjJUMjE6Mzk6\nNDYtMDU6MDBOOEOsAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA3LTIyVDIxOjM5OjQ2LTA1OjAw\nP2X7EAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
@ -540,28 +540,28 @@
" 888\n",
"\n",
" Copyright: 2011-2016 Massachusetts Institute of Technology\n",
" License: http://openmc.readthedocs.org/en/latest/license.html\n",
" License: http://openmc.readthedocs.io/en/latest/license.html\n",
" Version: 0.7.1\n",
" Git SHA1: df280b60eb1c6d7b7f842e05ede734a4883a0fc8\n",
" Date/Time: 2016-05-05 14:51:45\n",
" Git SHA1: 3d68c07625e33cd64188df03ee03e9c31b3d4b74\n",
" Date/Time: 2016-07-22 21:39:46\n",
"\n",
" ===========================================================================\n",
" ========================> INITIALIZATION <=========================\n",
" ===========================================================================\n",
"\n",
" Reading settings XML file...\n",
" Reading cross sections XML file...\n",
" Reading geometry XML file...\n",
" Reading cross sections XML file...\n",
" Reading materials XML file...\n",
" Reading U235.71c from /home/romano/openmc/data/nndc_hdf5/U235_71c.h5\n",
" Reading U238.71c from /home/romano/openmc/data/nndc_hdf5/U238_71c.h5\n",
" Reading O16.71c from /home/romano/openmc/data/nndc_hdf5/O16_71c.h5\n",
" Reading H1.71c from /home/romano/openmc/data/nndc_hdf5/H1_71c.h5\n",
" Reading B10.71c from /home/romano/openmc/data/nndc_hdf5/B10_71c.h5\n",
" Reading Zr90.71c from /home/romano/openmc/data/nndc_hdf5/Zr90_71c.h5\n",
" Maximum neutron transport energy: 20.0000 MeV for U235.71c\n",
" Reading tallies XML file...\n",
" Building neighboring cells lists for each surface...\n",
" Loading ACE cross section table: 92235.71c\n",
" Loading ACE cross section table: 92238.71c\n",
" Loading ACE cross section table: 8016.71c\n",
" Loading ACE cross section table: 1001.71c\n",
" Loading ACE cross section table: 5010.71c\n",
" Loading ACE cross section table: 40090.71c\n",
" Maximum neutron transport energy: 20.0000 MeV for 92235.71c\n",
" Initializing source particles...\n",
"\n",
" ===========================================================================\n",
@ -599,20 +599,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 7.2500E-01 seconds\n",
" Reading cross sections = 4.4400E-01 seconds\n",
" Total time in simulation = 1.5547E+01 seconds\n",
" Time in transport only = 1.5527E+01 seconds\n",
" Time in inactive batches = 2.2880E+00 seconds\n",
" Time in active batches = 1.3259E+01 seconds\n",
" Total time for initialization = 3.5600E-01 seconds\n",
" Reading cross sections = 2.3400E-01 seconds\n",
" Total time in simulation = 1.8333E+01 seconds\n",
" Time in transport only = 1.8325E+01 seconds\n",
" Time in inactive batches = 2.6950E+00 seconds\n",
" Time in active batches = 1.5638E+01 seconds\n",
" Time synchronizing fission bank = 1.0000E-03 seconds\n",
" Sampling source sites = 0.0000E+00 seconds\n",
" SEND/RECV source sites = 0.0000E+00 seconds\n",
" Time accumulating tallies = 1.0000E-03 seconds\n",
" Total time for finalization = 2.0000E-03 seconds\n",
" Total time elapsed = 1.6291E+01 seconds\n",
" Calculation Rate (inactive) = 5463.29 neutrons/second\n",
" Calculation Rate (active) = 2828.27 neutrons/second\n",
" SEND/RECV source sites = 1.0000E-03 seconds\n",
" Time accumulating tallies = 0.0000E+00 seconds\n",
" Total time for finalization = 1.0000E-03 seconds\n",
" Total time elapsed = 1.8711E+01 seconds\n",
" Calculation Rate (inactive) = 4638.22 neutrons/second\n",
" Calculation Rate (active) = 2398.00 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@ -1107,7 +1107,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>6.636968e-07</td>\n",
" <td>4.132875e-09</td>\n",
@ -1117,7 +1117,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.099856e-01</td>\n",
" <td>1.232455e-03</td>\n",
@ -1127,7 +1127,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>3.552458e-01</td>\n",
" <td>2.252681e-03</td>\n",
@ -1137,7 +1137,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>5.554345e-03</td>\n",
" <td>3.265385e-05</td>\n",
@ -1147,7 +1147,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>7.126668e-03</td>\n",
" <td>5.296883e-05</td>\n",
@ -1157,7 +1157,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>(U-238 / total)</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.277460e-01</td>\n",
" <td>1.003558e-03</td>\n",
@ -1167,7 +1167,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>8.010911e-03</td>\n",
" <td>6.802256e-05</td>\n",
@ -1177,7 +1177,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>(U-235 / total)</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>3.367794e-03</td>\n",
" <td>1.443644e-05</td>\n",
@ -1187,15 +1187,15 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 10000 0.00e+00 6.25e-07 (U-238 / total) \n",
"1 10000 0.00e+00 6.25e-07 (U-238 / total) \n",
"2 10000 0.00e+00 6.25e-07 (U-235 / total) \n",
"3 10000 0.00e+00 6.25e-07 (U-235 / total) \n",
"4 10000 6.25e-07 2.00e+01 (U-238 / total) \n",
"5 10000 6.25e-07 2.00e+01 (U-238 / total) \n",
"6 10000 6.25e-07 2.00e+01 (U-235 / total) \n",
"7 10000 6.25e-07 2.00e+01 (U-235 / total) \n",
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 10000 0.00e+00 6.25e-07 (U238 / total) \n",
"1 10000 0.00e+00 6.25e-07 (U238 / total) \n",
"2 10000 0.00e+00 6.25e-07 (U235 / total) \n",
"3 10000 0.00e+00 6.25e-07 (U235 / total) \n",
"4 10000 6.25e-07 2.00e+01 (U238 / total) \n",
"5 10000 6.25e-07 2.00e+01 (U238 / total) \n",
"6 10000 6.25e-07 2.00e+01 (U235 / total) \n",
"7 10000 6.25e-07 2.00e+01 (U235 / total) \n",
"\n",
" score mean std. dev. \n",
"0 (nu-fission / flux) 6.64e-07 4.13e-09 \n",
@ -1276,7 +1276,7 @@
],
"source": [
"# Show how to use Tally.get_values(...) with a CrossScore and CrossNuclide\n",
"u235_scatter_xs = fuel_xs.get_values(nuclides=['(U-235 / total)'], \n",
"u235_scatter_xs = fuel_xs.get_values(nuclides=['(U235 / total)'], \n",
" scores=['(scatter / flux)'])\n",
"print(u235_scatter_xs)"
]
@ -1342,7 +1342,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>U-238</td>\n",
" <td>U238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.000002</td>\n",
" <td>7.473789e-09</td>\n",
@ -1352,7 +1352,7 @@
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>U-235</td>\n",
" <td>U235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.861547</td>\n",
" <td>4.131310e-03</td>\n",
@ -1362,7 +1362,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>U-238</td>\n",
" <td>U238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.082356</td>\n",
" <td>5.560461e-04</td>\n",
@ -1372,7 +1372,7 @@
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>U-235</td>\n",
" <td>U235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.092574</td>\n",
" <td>7.315442e-04</td>\n",
@ -1383,10 +1383,10 @@
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide score mean \\\n",
"0 10000 0.00e+00 6.25e-07 U-238 nu-fission 1.61e-06 \n",
"1 10000 0.00e+00 6.25e-07 U-235 nu-fission 8.62e-01 \n",
"2 10000 6.25e-07 2.00e+01 U-238 nu-fission 8.24e-02 \n",
"3 10000 6.25e-07 2.00e+01 U-235 nu-fission 9.26e-02 \n",
"0 10000 0.00e+00 6.25e-07 U238 nu-fission 1.61e-06 \n",
"1 10000 0.00e+00 6.25e-07 U235 nu-fission 8.62e-01 \n",
"2 10000 6.25e-07 2.00e+01 U238 nu-fission 8.24e-02 \n",
"3 10000 6.25e-07 2.00e+01 U235 nu-fission 9.26e-02 \n",
"\n",
" std. dev. \n",
"0 7.47e-09 \n",
@ -1436,7 +1436,7 @@
" <td>10002</td>\n",
" <td>1.000000e-08</td>\n",
" <td>1.080060e-07</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>4.599225</td>\n",
" <td>0.015973</td>\n",
@ -1446,7 +1446,7 @@
" <td>10002</td>\n",
" <td>1.080060e-07</td>\n",
" <td>1.166529e-06</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.037260</td>\n",
" <td>0.011236</td>\n",
@ -1456,7 +1456,7 @@
" <td>10002</td>\n",
" <td>1.166529e-06</td>\n",
" <td>1.259921e-05</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>1.662552</td>\n",
" <td>0.010280</td>\n",
@ -1466,7 +1466,7 @@
" <td>10002</td>\n",
" <td>1.259921e-05</td>\n",
" <td>1.360790e-04</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>1.872201</td>\n",
" <td>0.012136</td>\n",
@ -1476,7 +1476,7 @@
" <td>10002</td>\n",
" <td>1.360790e-04</td>\n",
" <td>1.469734e-03</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.080459</td>\n",
" <td>0.013155</td>\n",
@ -1486,7 +1486,7 @@
" <td>10002</td>\n",
" <td>1.469734e-03</td>\n",
" <td>1.587401e-02</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.154996</td>\n",
" <td>0.011975</td>\n",
@ -1496,7 +1496,7 @@
" <td>10002</td>\n",
" <td>1.587401e-02</td>\n",
" <td>1.714488e-01</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.218740</td>\n",
" <td>0.008528</td>\n",
@ -1506,7 +1506,7 @@
" <td>10002</td>\n",
" <td>1.714488e-01</td>\n",
" <td>1.851749e+00</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.010517</td>\n",
" <td>0.009187</td>\n",
@ -1516,7 +1516,7 @@
" <td>10002</td>\n",
" <td>1.851749e+00</td>\n",
" <td>2.000000e+01</td>\n",
" <td>H-1</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>0.372022</td>\n",
" <td>0.003196</td>\n",
@ -1527,15 +1527,15 @@
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide score mean \\\n",
"0 10002 1.00e-08 1.08e-07 H-1 scatter 4.60e+00 \n",
"1 10002 1.08e-07 1.17e-06 H-1 scatter 2.04e+00 \n",
"2 10002 1.17e-06 1.26e-05 H-1 scatter 1.66e+00 \n",
"3 10002 1.26e-05 1.36e-04 H-1 scatter 1.87e+00 \n",
"4 10002 1.36e-04 1.47e-03 H-1 scatter 2.08e+00 \n",
"5 10002 1.47e-03 1.59e-02 H-1 scatter 2.15e+00 \n",
"6 10002 1.59e-02 1.71e-01 H-1 scatter 2.22e+00 \n",
"7 10002 1.71e-01 1.85e+00 H-1 scatter 2.01e+00 \n",
"8 10002 1.85e+00 2.00e+01 H-1 scatter 3.72e-01 \n",
"0 10002 1.00e-08 1.08e-07 H1 scatter 4.60e+00 \n",
"1 10002 1.08e-07 1.17e-06 H1 scatter 2.04e+00 \n",
"2 10002 1.17e-06 1.26e-05 H1 scatter 1.66e+00 \n",
"3 10002 1.26e-05 1.36e-04 H1 scatter 1.87e+00 \n",
"4 10002 1.36e-04 1.47e-03 H1 scatter 2.08e+00 \n",
"5 10002 1.47e-03 1.59e-02 H1 scatter 2.15e+00 \n",
"6 10002 1.59e-02 1.71e-01 H1 scatter 2.22e+00 \n",
"7 10002 1.71e-01 1.85e+00 H1 scatter 2.01e+00 \n",
"8 10002 1.85e+00 2.00e+01 H1 scatter 3.72e-01 \n",
"\n",
" std. dev. \n",
"0 1.60e-02 \n",
@ -1557,7 +1557,7 @@
"source": [
"# \"Slice\" the H-1 scatter data in the moderator Cell into a new derived Tally\n",
"need_to_slice = sp.get_tally(name='need-to-slice')\n",
"slice_test = need_to_slice.get_slice(scores=['scatter'], nuclides=['H-1'],\n",
"slice_test = need_to_slice.get_slice(scores=['scatter'], nuclides=['H1'],\n",
" filters=['cell'], filter_bins=[(moderator_cell.id,)])\n",
"slice_test.get_pandas_dataframe()"
]
@ -1579,7 +1579,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
"version": "3.5.2"
}
},
"nbformat": 4,

View file

@ -102,7 +102,7 @@ class AngleEnergy(object):
distribution = openmc.data.NBodyPhaseSpace.from_ace(
ace, idx, rx.q_value)
else:
raise IOError("Unsupported ACE secondary energy "
"distribution law {0}".format(law))
raise ValueError("Unsupported ACE secondary energy "
"distribution law {}".format(law))
return distribution

View file

@ -2,102 +2,102 @@
# of the elements 2009 (IUPAC Technical Report)", Pure. Appl. Chem. 83 (2),
# pp. 397--410 (2011).
NATURAL_ABUNDANCE = {
'H-1': 0.999885, 'H-2': 0.000115, 'He-3': 1.34e-06,
'He-4': 0.99999866, 'Li-6': 0.0759, 'Li-7': 0.9241,
'Be-9': 1.0, 'B-10': 0.199, 'B-11': 0.801,
'C-12': 0.9893, 'C-13': 0.0107, 'N-14': 0.99636,
'N-15': 0.00364, 'O-16': 0.99757, 'O-17': 0.00038,
'O-18': 0.00205, 'F-19': 1.0, 'Ne-20': 0.9048,
'Ne-21': 0.0027, 'Ne-22': 0.0925, 'Na-23': 1.0,
'Mg-24': 0.7899, 'Mg-25': 0.1, 'Mg-26': 0.1101,
'Al-27': 1.0, 'Si-28': 0.92223, 'Si-29': 0.04685,
'Si-30': 0.03092, 'P-31': 1.0, 'S-32': 0.9499,
'S-33': 0.0075, 'S-34': 0.0425, 'S-36': 0.0001,
'Cl-35': 0.7576, 'Cl-37': 0.2424, 'Ar-36': 0.003336,
'Ar-38': 0.000629, 'Ar-40': 0.996035, 'K-39': 0.932581,
'K-40': 0.000117, 'K-41': 0.067302, 'Ca-40': 0.96941,
'Ca-42': 0.00647, 'Ca-43': 0.00135, 'Ca-44': 0.02086,
'Ca-46': 4e-05, 'Ca-48': 0.00187, 'Sc-45': 1.0,
'Ti-46': 0.0825, 'Ti-47': 0.0744, 'Ti-48': 0.7372,
'Ti-49': 0.0541, 'Ti-50': 0.0518, 'V-50': 0.0025,
'V-51': 0.9975, 'Cr-50': 0.04345, 'Cr-52': 0.83789,
'Cr-53': 0.09501, 'Cr-54': 0.02365, 'Mn-55': 1.0,
'Fe-54': 0.05845, 'Fe-56': 0.91754, 'Fe-57': 0.02119,
'Fe-58': 0.00282, 'Co-59': 1.0, 'Ni-58': 0.68077,
'Ni-60': 0.26223, 'Ni-61': 0.011399, 'Ni-62': 0.036346,
'Ni-64': 0.009255, 'Cu-63': 0.6915, 'Cu-65': 0.3085,
'Zn-64': 0.4917, 'Zn-66': 0.2773, 'Zn-67': 0.0404,
'Zn-68': 0.1845, 'Zn-70': 0.0061, 'Ga-69': 0.60108,
'Ga-71': 0.39892, 'Ge-70': 0.2057, 'Ge-72': 0.2745,
'Ge-73': 0.0775, 'Ge-74': 0.365, 'Ge-76': 0.0773,
'As-75': 1.0, 'Se-74': 0.0089, 'Se-76': 0.0937,
'Se-77': 0.0763, 'Se-78': 0.2377, 'Se-80': 0.4961,
'Se-82': 0.0873, 'Br-79': 0.5069, 'Br-81': 0.4931,
'Kr-78': 0.00355, 'Kr-80': 0.02286, 'Kr-82': 0.11593,
'Kr-83': 0.115, 'Kr-84': 0.56987, 'Kr-86': 0.17279,
'Rb-85': 0.7217, 'Rb-87': 0.2783, 'Sr-84': 0.0056,
'Sr-86': 0.0986, 'Sr-87': 0.07, 'Sr-88': 0.8258,
'Y-89': 1.0, 'Zr-90': 0.5145, 'Zr-91': 0.1122,
'Zr-92': 0.1715, 'Zr-94': 0.1738, 'Zr-96': 0.028,
'Nb-93': 1.0, 'Mo-92': 0.1453, 'Mo-94': 0.0915,
'Mo-95': 0.1584, 'Mo-96': 0.1667, 'Mo-97': 0.096,
'Mo-98': 0.2439, 'Mo-100': 0.0982, 'Ru-96': 0.0554,
'Ru-98': 0.0187, 'Ru-99': 0.1276, 'Ru-100': 0.126,
'Ru-101': 0.1706, 'Ru-102': 0.3155, 'Ru-104': 0.1862,
'Rh-103': 1.0, 'Pd-102': 0.0102, 'Pd-104': 0.1114,
'Pd-105': 0.2233, 'Pd-106': 0.2733, 'Pd-108': 0.2646,
'Pd-110': 0.1172, 'Ag-107': 0.51839, 'Ag-109': 0.48161,
'Cd-106': 0.0125, 'Cd-108': 0.0089, 'Cd-110': 0.1249,
'Cd-111': 0.128, 'Cd-112': 0.2413, 'Cd-113': 0.1222,
'Cd-114': 0.2873, 'Cd-116': 0.0749, 'In-113': 0.0429,
'In-115': 0.9571, 'Sn-112': 0.0097, 'Sn-114': 0.0066,
'Sn-115': 0.0034, 'Sn-116': 0.1454, 'Sn-117': 0.0768,
'Sn-118': 0.2422, 'Sn-119': 0.0859, 'Sn-120': 0.3258,
'Sn-122': 0.0463, 'Sn-124': 0.0579, 'Sb-121': 0.5721,
'Sb-123': 0.4279, 'Te-120': 0.0009, 'Te-122': 0.0255,
'Te-123': 0.0089, 'Te-124': 0.0474, 'Te-125': 0.0707,
'Te-126': 0.1884, 'Te-128': 0.3174, 'Te-130': 0.3408,
'I-127': 1.0, 'Xe-124': 0.000952, 'Xe-126': 0.00089,
'Xe-128': 0.019102, 'Xe-129': 0.264006, 'Xe-130': 0.04071,
'Xe-131': 0.212324, 'Xe-132': 0.269086, 'Xe-134': 0.104357,
'Xe-136': 0.088573, 'Cs-133': 1.0, 'Ba-130': 0.00106,
'Ba-132': 0.00101, 'Ba-134': 0.02417, 'Ba-135': 0.06592,
'Ba-136': 0.07854, 'Ba-137': 0.11232, 'Ba-138': 0.71698,
'La-138': 0.0008881, 'La-139': 0.9991119, 'Ce-136': 0.00185,
'Ce-138': 0.00251, 'Ce-140': 0.8845, 'Ce-142': 0.11114,
'Pr-141': 1.0, 'Nd-142': 0.27152, 'Nd-143': 0.12174,
'Nd-144': 0.23798, 'Nd-145': 0.08293, 'Nd-146': 0.17189,
'Nd-148': 0.05756, 'Nd-150': 0.05638, 'Sm-144': 0.0307,
'Sm-147': 0.1499, 'Sm-148': 0.1124, 'Sm-149': 0.1382,
'Sm-150': 0.0738, 'Sm-152': 0.2675, 'Sm-154': 0.2275,
'Eu-151': 0.4781, 'Eu-153': 0.5219, 'Gd-152': 0.002,
'Gd-154': 0.0218, 'Gd-155': 0.148, 'Gd-156': 0.2047,
'Gd-157': 0.1565, 'Gd-158': 0.2484, 'Gd-160': 0.2186,
'Tb-159': 1.0, 'Dy-156': 0.00056, 'Dy-158': 0.00095,
'Dy-160': 0.02329, 'Dy-161': 0.18889, 'Dy-162': 0.25475,
'Dy-163': 0.24896, 'Dy-164': 0.2826, 'Ho-165': 1.0,
'Er-162': 0.00139, 'Er-164': 0.01601, 'Er-166': 0.33503,
'Er-167': 0.22869, 'Er-168': 0.26978, 'Er-170': 0.1491,
'Tm-169': 1.0, 'Yb-168': 0.00123, 'Yb-170': 0.02982,
'Yb-171': 0.1409, 'Yb-172': 0.2168, 'Yb-173': 0.16103,
'Yb-174': 0.32026, 'Yb-176': 0.12996, 'Lu-175': 0.97401,
'Lu-176': 0.02599, 'Hf-174': 0.0016, 'Hf-176': 0.0526,
'Hf-177': 0.186, 'Hf-178': 0.2728, 'Hf-179': 0.1362,
'Hf-180': 0.3508, 'Ta-180': 0.0001201, 'Ta-181': 0.9998799,
'W-180': 0.0012, 'W-182': 0.265, 'W-183': 0.1431,
'W-184': 0.3064, 'W-186': 0.2843, 'Re-185': 0.374,
'Re-187': 0.626, 'Os-184': 0.0002, 'Os-186': 0.0159,
'Os-187': 0.0196, 'Os-188': 0.1324, 'Os-189': 0.1615,
'Os-190': 0.2626, 'Os-192': 0.4078, 'Ir-191': 0.373,
'Ir-193': 0.627, 'Pt-190': 0.00012, 'Pt-192': 0.00782,
'Pt-194': 0.3286, 'Pt-195': 0.3378, 'Pt-196': 0.2521,
'Pt-198': 0.07356, 'Au-197': 1.0, 'Hg-196': 0.0015,
'Hg-198': 0.0997, 'Hg-199': 0.1687, 'Hg-200': 0.231,
'Hg-201': 0.1318, 'Hg-202': 0.2986, 'Hg-204': 0.0687,
'Tl-203': 0.2952, 'Tl-205': 0.7048, 'Pb-204': 0.014,
'Pb-206': 0.241, 'Pb-207': 0.221, 'Pb-208': 0.524,
'Bi-209': 1.0, 'Th-232': 1.0, 'Pa-231': 1.0,
'U-234': 5.4e-05, 'U-235': 0.007204, 'U-238': 0.992742
'H1': 0.999885, 'H2': 0.000115, 'He3': 1.34e-06,
'He4': 0.99999866, 'Li6': 0.0759, 'Li7': 0.9241,
'Be9': 1.0, 'B10': 0.199, 'B11': 0.801,
'C12': 0.9893, 'C13': 0.0107, 'N14': 0.99636,
'N15': 0.00364, 'O16': 0.99757, 'O17': 0.00038,
'O18': 0.00205, 'F19': 1.0, 'Ne20': 0.9048,
'Ne21': 0.0027, 'Ne22': 0.0925, 'Na23': 1.0,
'Mg24': 0.7899, 'Mg25': 0.1, 'Mg26': 0.1101,
'Al27': 1.0, 'Si28': 0.92223, 'Si29': 0.04685,
'Si30': 0.03092, 'P31': 1.0, 'S32': 0.9499,
'S33': 0.0075, 'S34': 0.0425, 'S36': 0.0001,
'Cl35': 0.7576, 'Cl37': 0.2424, 'Ar36': 0.003336,
'Ar38': 0.000629, 'Ar40': 0.996035, 'K39': 0.932581,
'K40': 0.000117, 'K41': 0.067302, 'Ca40': 0.96941,
'Ca42': 0.00647, 'Ca43': 0.00135, 'Ca44': 0.02086,
'Ca46': 4e-05, 'Ca48': 0.00187, 'Sc45': 1.0,
'Ti46': 0.0825, 'Ti47': 0.0744, 'Ti48': 0.7372,
'Ti49': 0.0541, 'Ti50': 0.0518, 'V50': 0.0025,
'V51': 0.9975, 'Cr50': 0.04345, 'Cr52': 0.83789,
'Cr53': 0.09501, 'Cr54': 0.02365, 'Mn55': 1.0,
'Fe54': 0.05845, 'Fe56': 0.91754, 'Fe57': 0.02119,
'Fe58': 0.00282, 'Co59': 1.0, 'Ni58': 0.68077,
'Ni60': 0.26223, 'Ni61': 0.011399, 'Ni62': 0.036346,
'Ni64': 0.009255, 'Cu63': 0.6915, 'Cu65': 0.3085,
'Zn64': 0.4917, 'Zn66': 0.2773, 'Zn67': 0.0404,
'Zn68': 0.1845, 'Zn70': 0.0061, 'Ga69': 0.60108,
'Ga71': 0.39892, 'Ge70': 0.2057, 'Ge72': 0.2745,
'Ge73': 0.0775, 'Ge74': 0.365, 'Ge76': 0.0773,
'As75': 1.0, 'Se74': 0.0089, 'Se76': 0.0937,
'Se77': 0.0763, 'Se78': 0.2377, 'Se80': 0.4961,
'Se82': 0.0873, 'Br79': 0.5069, 'Br81': 0.4931,
'Kr78': 0.00355, 'Kr80': 0.02286, 'Kr82': 0.11593,
'Kr83': 0.115, 'Kr84': 0.56987, 'Kr86': 0.17279,
'Rb85': 0.7217, 'Rb87': 0.2783, 'Sr84': 0.0056,
'Sr86': 0.0986, 'Sr87': 0.07, 'Sr88': 0.8258,
'Y89': 1.0, 'Zr90': 0.5145, 'Zr91': 0.1122,
'Zr92': 0.1715, 'Zr94': 0.1738, 'Zr96': 0.028,
'Nb93': 1.0, 'Mo92': 0.1453, 'Mo94': 0.0915,
'Mo95': 0.1584, 'Mo96': 0.1667, 'Mo97': 0.096,
'Mo98': 0.2439, 'Mo100': 0.0982, 'Ru96': 0.0554,
'Ru98': 0.0187, 'Ru99': 0.1276, 'Ru100': 0.126,
'Ru101': 0.1706, 'Ru102': 0.3155, 'Ru104': 0.1862,
'Rh103': 1.0, 'Pd102': 0.0102, 'Pd104': 0.1114,
'Pd105': 0.2233, 'Pd106': 0.2733, 'Pd108': 0.2646,
'Pd110': 0.1172, 'Ag107': 0.51839, 'Ag109': 0.48161,
'Cd106': 0.0125, 'Cd108': 0.0089, 'Cd110': 0.1249,
'Cd111': 0.128, 'Cd112': 0.2413, 'Cd113': 0.1222,
'Cd114': 0.2873, 'Cd116': 0.0749, 'In113': 0.0429,
'In115': 0.9571, 'Sn112': 0.0097, 'Sn114': 0.0066,
'Sn115': 0.0034, 'Sn116': 0.1454, 'Sn117': 0.0768,
'Sn118': 0.2422, 'Sn119': 0.0859, 'Sn120': 0.3258,
'Sn122': 0.0463, 'Sn124': 0.0579, 'Sb121': 0.5721,
'Sb123': 0.4279, 'Te120': 0.0009, 'Te122': 0.0255,
'Te123': 0.0089, 'Te124': 0.0474, 'Te125': 0.0707,
'Te126': 0.1884, 'Te128': 0.3174, 'Te130': 0.3408,
'I127': 1.0, 'Xe124': 0.000952, 'Xe126': 0.00089,
'Xe128': 0.019102, 'Xe129': 0.264006, 'Xe130': 0.04071,
'Xe131': 0.212324, 'Xe132': 0.269086, 'Xe134': 0.104357,
'Xe136': 0.088573, 'Cs133': 1.0, 'Ba130': 0.00106,
'Ba132': 0.00101, 'Ba134': 0.02417, 'Ba135': 0.06592,
'Ba136': 0.07854, 'Ba137': 0.11232, 'Ba138': 0.71698,
'La138': 0.0008881, 'La139': 0.9991119, 'Ce136': 0.00185,
'Ce138': 0.00251, 'Ce140': 0.8845, 'Ce142': 0.11114,
'Pr141': 1.0, 'Nd142': 0.27152, 'Nd143': 0.12174,
'Nd144': 0.23798, 'Nd145': 0.08293, 'Nd146': 0.17189,
'Nd148': 0.05756, 'Nd150': 0.05638, 'Sm144': 0.0307,
'Sm147': 0.1499, 'Sm148': 0.1124, 'Sm149': 0.1382,
'Sm150': 0.0738, 'Sm152': 0.2675, 'Sm154': 0.2275,
'Eu151': 0.4781, 'Eu153': 0.5219, 'Gd152': 0.002,
'Gd154': 0.0218, 'Gd155': 0.148, 'Gd156': 0.2047,
'Gd157': 0.1565, 'Gd158': 0.2484, 'Gd160': 0.2186,
'Tb159': 1.0, 'Dy156': 0.00056, 'Dy158': 0.00095,
'Dy160': 0.02329, 'Dy161': 0.18889, 'Dy162': 0.25475,
'Dy163': 0.24896, 'Dy164': 0.2826, 'Ho165': 1.0,
'Er162': 0.00139, 'Er164': 0.01601, 'Er166': 0.33503,
'Er167': 0.22869, 'Er168': 0.26978, 'Er170': 0.1491,
'Tm169': 1.0, 'Yb168': 0.00123, 'Yb170': 0.02982,
'Yb171': 0.1409, 'Yb172': 0.2168, 'Yb173': 0.16103,
'Yb174': 0.32026, 'Yb176': 0.12996, 'Lu175': 0.97401,
'Lu176': 0.02599, 'Hf174': 0.0016, 'Hf176': 0.0526,
'Hf177': 0.186, 'Hf178': 0.2728, 'Hf179': 0.1362,
'Hf180': 0.3508, 'Ta180': 0.0001201, 'Ta181': 0.9998799,
'W180': 0.0012, 'W182': 0.265, 'W183': 0.1431,
'W184': 0.3064, 'W186': 0.2843, 'Re185': 0.374,
'Re187': 0.626, 'Os184': 0.0002, 'Os186': 0.0159,
'Os187': 0.0196, 'Os188': 0.1324, 'Os189': 0.1615,
'Os190': 0.2626, 'Os192': 0.4078, 'Ir191': 0.373,
'Ir193': 0.627, 'Pt190': 0.00012, 'Pt192': 0.00782,
'Pt194': 0.3286, 'Pt195': 0.3378, 'Pt196': 0.2521,
'Pt198': 0.07356, 'Au197': 1.0, 'Hg196': 0.0015,
'Hg198': 0.0997, 'Hg199': 0.1687, 'Hg200': 0.231,
'Hg201': 0.1318, 'Hg202': 0.2986, 'Hg204': 0.0687,
'Tl203': 0.2952, 'Tl205': 0.7048, 'Pb204': 0.014,
'Pb206': 0.241, 'Pb207': 0.221, 'Pb208': 0.524,
'Bi209': 1.0, 'Th232': 1.0, 'Pa231': 1.0,
'U234': 5.4e-05, 'U235': 0.007204, 'U238': 0.992742
}
ATOMIC_SYMBOL = {1: 'H', 2: 'He', 3: 'Li', 4: 'Be', 5: 'B', 6: 'C', 7: 'N',

View file

@ -52,6 +52,9 @@ class EnergyDistribution(object):
return LevelInelastic.from_hdf5(group)
elif energy_type == 'continuous':
return ContinuousTabular.from_hdf5(group)
else:
raise ValueError("Unknown energy distribution type: {}"
.format(energy_type))
class ArbitraryTabulated(EnergyDistribution):

View file

@ -39,7 +39,7 @@ class IncidentNeutron(object):
atomic_weight_ratio : float
Atomic mass ratio of the target nuclide.
temperature : float
Temperature of the target nuclide in eV.
Temperature of the target nuclide in MeV.
Attributes
----------

View file

@ -303,9 +303,9 @@ class Reaction(object):
def __repr__(self):
if self.mt in REACTION_NAME:
return "<ACE Reaction: MT={} {}>".format(self.mt, REACTION_NAME[self.mt])
return "<Reaction: MT={} {}>".format(self.mt, REACTION_NAME[self.mt])
else:
return "<ACE Reaction: MT={}>".format(self.mt)
return "<Reaction: MT={}>".format(self.mt)
@property
def center_of_mass(self):

View file

@ -1,3 +1,4 @@
import re
import sys
import openmc
@ -8,6 +9,7 @@ if sys.version_info[0] >= 3:
basestring = str
class Element(object):
"""A natural element used in a material via <element>. Internally, OpenMC will
expand the natural element into isotopes based on the known natural
@ -124,7 +126,7 @@ class Element(object):
isotopes = []
for isotope, abundance in sorted(NATURAL_ABUNDANCE.items()):
if isotope.startswith(self.name + '-'):
if re.match(r'{}\d+'.format(self.name), isotope):
nuc = openmc.Nuclide(isotope, self.xs)
isotopes.append((nuc, abundance))
return isotopes

View file

@ -820,7 +820,7 @@ def get_opencg_lattice(openmc_lattice):
# Create an OpenCG Lattice to represent this OpenMC Lattice
name = openmc_lattice.name
dimension = openmc_lattice.dimension
dimension = openmc_lattice.shape
pitch = openmc_lattice.pitch
lower_left = openmc_lattice.lower_left
universes = openmc_lattice.universes