Merge remote-tracking branch 'upstream/develop' into angles

This commit is contained in:
Adam Nelson 2016-11-05 08:45:47 -04:00
commit ace555b488
127 changed files with 2474 additions and 3364 deletions

View file

@ -43,7 +43,7 @@ install: true
before_script:
- if [[ ! -e $HOME/nndc_hdf5/cross_sections.xml ]]; then
wget https://anl.box.com/shared/static/fouwc8lh9he2wc97kzq65u4rp8zt9sgq.xz -O - | tar -C $HOME -xvJ;
wget https://anl.box.com/shared/static/1ow880up90hgwynvh91twwfteameuwre.xz -O - | tar -C $HOME -xvJ;
fi
- export OPENMC_CROSS_SECTIONS=$HOME/nndc_hdf5/cross_sections.xml

View file

@ -30,7 +30,7 @@ MGXS Library Specification
:Attributes: - **groups** (*int*) -- Number of energy groups
- **group structure** (*double[]*) -- Monotonically increasing
list of group boundaries, in units of MeV. The length of this
list of group boundaries, in units of eV. The length of this
array should be the number of groups plus 1.
**/<library name>/**
@ -77,8 +77,8 @@ data for the nuclide or material that it represents.
**/<library name>/kTs/**
:Datasets:
- **<TTT>K** (*double*) -- kT values (in MeV) for each Temperature
:Datasets:
- **<TTT>K** (*double*) -- kT values (in eV) for each temperature
TTT (in Kelvin), rounded to the nearest integer
**/<library name>/<TTT>K/**
@ -161,4 +161,4 @@ Data specific to neutron scattering for the temperature <TTT>K
1.0) will be assumed.
The pre-flattened array is shapes consistent with `scatter_matrix`
except the "[Order]" dimension in `scatter_shape` is ignored since
this data is assumed isotropic.
this data is assumed isotropic.

View file

@ -8,6 +8,10 @@ Nuclear Data File Format
Incident Neutron Data
---------------------
**/**
:Attributes:
- **version** (*int[2]*) -- Major and minor version of the data
**/<nuclide name>/**
@ -27,14 +31,14 @@ temperature-dependent data set. For example, the data set corresponding to
300 Kelvin would be located at `300K`.
:Datasets:
- **<TTT>K** (*double*) -- kT values (in MeV) for each Temperature
- **<TTT>K** (*double*) -- kT values (in eV) for each temperature
TTT (in Kelvin)
**/<nuclide name>/reactions/reaction_<mt>/**
:Attributes: - **mt** (*int*) -- ENDF MT reaction number
- **label** (*char[]*) -- Name of the reaction
- **Q_value** (*double*) -- Q value in MeV
- **Q_value** (*double*) -- Q value in eV
- **center_of_mass** (*int*) -- Whether the reference frame for
scattering is center-of-mass (1) or laboratory (0)
- **n_product** (*int*) -- Number of reaction products
@ -113,6 +117,11 @@ temperature-dependent data set. For example, the data set corresponding to
Thermal Neutron Scattering Data
-------------------------------
**/**
:Attributes:
- **version** (*int[2]*) -- Major and minor version of the data
**/<thermal name>/**
:Attributes: - **atomic_weight_ratio** (*double*) -- Mass in units of neutron masses
@ -129,7 +138,7 @@ temperature-dependent data set. For example, the data set corresponding to
300 Kelvin would be located at `300K`.
:Datasets:
- **<TTT>K** (*double*) -- kT values (in MeV) for each Temperature
- **<TTT>K** (*double*) -- kT values (in eV) for each temperature
TTT (in Kelvin)
**/<thermal name>/elastic/<TTT>K/**
@ -333,7 +342,7 @@ N-Body Phase Space
- **n_particles** (*int*) -- Number of product particles
- **atomic_weight_ratio** (*double*) -- Atomic weight ratio of the
target nuclide in neutron masses
- **q_value** (*double*) -- Q value for the reaction in MeV
- **q_value** (*double*) -- Q value for the reaction in eV
.. _energy_distribution:
@ -346,7 +355,7 @@ Maxwell
:Object type: Group
:Attributes: - **type** (*char[]*) -- 'maxwell'
- **u** (*double*) -- Restriction energy in MeV
- **u** (*double*) -- Restriction energy in eV
:Datasets:
- **theta** (:ref:`tabulated <1d_tabulated>`) -- Maxwellian
temperature as a function of energy
@ -356,7 +365,7 @@ Evaporation
:Object type: Group
:Attributes: - **type** (*char[]*) -- 'evaporation'
- **u** (*double*) -- Restriction energy in MeV
- **u** (*double*) -- Restriction energy in eV
:Datasets:
- **theta** (:ref:`tabulated <1d_tabulated>`) -- Evaporation
temperature as a function of energy
@ -366,7 +375,7 @@ Watt Fission Spectrum
:Object type: Group
:Attributes: - **type** (*char[]*) -- 'watt'
- **u** (*double*) -- Restriction energy in MeV
- **u** (*double*) -- Restriction energy in eV
:Datasets: - **a** (:ref:`tabulated <1d_tabulated>`) -- Watt parameter :math:`a`
as a function of incident energy
- **b** (:ref:`tabulated <1d_tabulated>`) -- Watt parameter :math:`b`
@ -386,7 +395,7 @@ Discrete Photon
:Object type: Group
:Attributes: - **type** (*char[]*) -- 'discrete_photon'
- **primary_flag** (*int*) -- Whether photon is a primary
- **energy** (*double*) -- Photon energy in MeV
- **energy** (*double*) -- Photon energy in eV
- **atomic_weight_ratio** (*double*) -- Atomic weight ratio of
target nuclide in neutron masses
@ -396,7 +405,7 @@ Level Inelastic
:Object type: Group
:Attributes: - **type** (*char[]*) -- 'level'
- **threshold** (*double*) -- Energy threshold in the laboratory
system in MeV
system in eV
- **mass_ratio** (*double*) -- :math:`(A/(A + 1))^2`
Continuous Tabular

View file

@ -46,7 +46,7 @@ The current revision of the particle restart file format is 1.
**/energy** (*double*)
Energy of the particle in MeV for continuous-energy mode, or the energy
Energy of the particle in eV for continuous-energy mode, or the energy
group of the particle for multi-group mode.
**/xyz** (*double[3]*)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -8,9 +8,7 @@
"\n",
"* **General equations** for scalar-flux averaged multi-group cross sections\n",
"* Creation of multi-group cross sections for an **infinite homogeneous medium**\n",
"* Use of **tally arithmetic** to manipulate multi-group cross sections\n",
"\n",
"**Note:** This Notebook illustrates the use of [Pandas](http://pandas.pydata.org/) `DataFrames` to containerize multi-group cross section data. We recommend using [Pandas](http://pandas.pydata.org/) >v0.15.0 or later since OpenMC's Python API leverages the multi-indexing feature included in the most recent releases of [Pandas](http://pandas.pydata.org/)."
"* Use of **tally arithmetic** to manipulate multi-group cross sections"
]
},
{
@ -360,7 +358,7 @@
"source": [
"# Instantiate a 2-group EnergyGroups object\n",
"groups = mgxs.EnergyGroups()\n",
"groups.group_edges = np.array([0., 0.625e-6, 20.])"
"groups.group_edges = np.array([0., 0.625, 20.0e6])"
]
},
{
@ -424,16 +422,16 @@
" \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",
" \t\tCellFilter\t[1]\n",
" \t\tEnergyFilter\t[ 0.00000000e+00 6.25000000e-01 2.00000000e+07]\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",
" \t\tCellFilter\t[1]\n",
" \t\tEnergyFilter\t[ 0.00000000e+00 6.25000000e-01 2.00000000e+07]\n",
" \tNuclides =\ttotal \n",
" \tScores =\t['absorption']\n",
" \tEstimator =\ttracklength)])"
@ -526,8 +524,8 @@
" Copyright | 2011-2016 Massachusetts Institute of Technology\n",
" License | http://openmc.readthedocs.io/en/latest/license.html\n",
" Version | 0.8.0\n",
" Git SHA1 | fbebf7bf709fe2fe1813af95bff9b29c0d59312c\n",
" Date/Time | 2016-08-31 10:40:13\n",
" Git SHA1 | da5563eddb5f2c2d6b2c9839d518de40962b78f2\n",
" Date/Time | 2016-10-31 12:23:45\n",
" OpenMP Threads | 4\n",
"\n",
" ===========================================================================\n",
@ -536,14 +534,14 @@
"\n",
" Reading settings XML file...\n",
" Reading geometry XML file...\n",
" Reading cross sections XML file...\n",
" Reading materials XML file...\n",
" Reading H1 from /home/romano/openmc/data/nndc_hdf5/H1.h5\n",
" Reading O16 from /home/romano/openmc/data/nndc_hdf5/O16.h5\n",
" Reading U235 from /home/romano/openmc/data/nndc_hdf5/U235.h5\n",
" Reading U238 from /home/romano/openmc/data/nndc_hdf5/U238.h5\n",
" Reading Zr90 from /home/romano/openmc/data/nndc_hdf5/Zr90.h5\n",
" Maximum neutron transport energy: 20.0000 MeV for H1\n",
" Reading cross sections XML file...\n",
" Reading H1 from /home/romano/openmc/scripts/nndc_hdf5/H1.h5\n",
" Reading O16 from /home/romano/openmc/scripts/nndc_hdf5/O16.h5\n",
" Reading U235 from /home/romano/openmc/scripts/nndc_hdf5/U235.h5\n",
" Reading U238 from /home/romano/openmc/scripts/nndc_hdf5/U238.h5\n",
" Reading Zr90 from /home/romano/openmc/scripts/nndc_hdf5/Zr90.h5\n",
" Maximum neutron transport energy: 2.00000E+07 eV for H1\n",
" Reading tallies XML file...\n",
" Building neighboring cells lists for each surface...\n",
" Initializing source particles...\n",
@ -613,20 +611,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 3.9900E-01 seconds\n",
" Reading cross sections = 2.6500E-01 seconds\n",
" Total time in simulation = 1.1488E+01 seconds\n",
" Time in transport only = 1.1152E+01 seconds\n",
" Time in inactive batches = 1.2180E+00 seconds\n",
" Time in active batches = 1.0270E+01 seconds\n",
" Time synchronizing fission bank = 4.0000E-03 seconds\n",
" Sampling source sites = 3.0000E-03 seconds\n",
" SEND/RECV source sites = 1.0000E-03 seconds\n",
" Time accumulating tallies = 0.0000E+00 seconds\n",
" Total time for finalization = 1.0000E-03 seconds\n",
" Total time elapsed = 1.1901E+01 seconds\n",
" Calculation Rate (inactive) = 20525.5 neutrons/second\n",
" Calculation Rate (active) = 9737.10 neutrons/second\n",
" Total time for initialization = 7.3858E-01 seconds\n",
" Reading cross sections = 5.3599E-01 seconds\n",
" Total time in simulation = 2.1031E+01 seconds\n",
" Time in transport only = 1.9960E+01 seconds\n",
" Time in inactive batches = 2.6543E+00 seconds\n",
" Time in active batches = 1.8376E+01 seconds\n",
" Time synchronizing fission bank = 5.8389E-03 seconds\n",
" Sampling source sites = 4.2676E-03 seconds\n",
" SEND/RECV source sites = 1.4523E-03 seconds\n",
" Time accumulating tallies = 1.5633E-04 seconds\n",
" Total time for finalization = 7.9179E-04 seconds\n",
" Total time elapsed = 2.1784E+01 seconds\n",
" Calculation Rate (inactive) = 9418.63 neutrons/second\n",
" Calculation Rate (active) = 5441.81 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@ -745,8 +743,8 @@
"\tDomain Type =\tcell\n",
"\tDomain ID =\t1\n",
"\tCross Sections [cm^-1]:\n",
" Group 1 [6.25e-07 - 20.0 MeV]:\t6.81e-01 +/- 2.69e-01%\n",
" Group 2 [0.0 - 6.25e-07 MeV]:\t1.40e+00 +/- 5.93e-01%\n",
" Group 1 [0.625 - 20000000.0eV]:\t6.81e-01 +/- 2.69e-01%\n",
" Group 2 [0.0 - 0.625 eV]:\t1.40e+00 +/- 5.93e-01%\n",
"\n",
"\n",
"\n"
@ -891,8 +889,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -903,21 +901,21 @@
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>total</td>\n",
" <td>(((total / flux) - (absorption / flux)) - (sca...</td>\n",
" <td>-2.886580e-15</td>\n",
" <td>-2.664535e-15</td>\n",
" <td>0.011292</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>total</td>\n",
" <td>(((total / flux) - (absorption / flux)) - (sca...</td>\n",
" <td>-5.551115e-16</td>\n",
" <td>-7.771561e-16</td>\n",
" <td>0.002570</td>\n",
" </tr>\n",
" </tbody>\n",
@ -925,13 +923,13 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 1 0.00e+00 6.25e-07 total \n",
"1 1 6.25e-07 2.00e+01 total \n",
" cell energy low [eV] energy high [eV] nuclide \\\n",
"0 1 0.00e+00 6.25e-01 total \n",
"1 1 6.25e-01 2.00e+07 total \n",
"\n",
" score mean std. dev. \n",
"0 (((total / flux) - (absorption / flux)) - (sca... -2.89e-15 1.13e-02 \n",
"1 (((total / flux) - (absorption / flux)) - (sca... -5.55e-16 2.57e-03 "
"0 (((total / flux) - (absorption / flux)) - (sca... -2.66e-15 1.13e-02 \n",
"1 (((total / flux) - (absorption / flux)) - (sca... -7.77e-16 2.57e-03 "
]
},
"execution_count": 22,
@ -970,8 +968,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -982,8 +980,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>total</td>\n",
" <td>((absorption / flux) / (total / flux))</td>\n",
" <td>0.076115</td>\n",
@ -992,8 +990,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>total</td>\n",
" <td>((absorption / flux) / (total / flux))</td>\n",
" <td>0.019263</td>\n",
@ -1004,9 +1002,9 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 1 0.00e+00 6.25e-07 total \n",
"1 1 6.25e-07 2.00e+01 total \n",
" cell energy low [eV] energy high [eV] nuclide \\\n",
"0 1 0.00e+00 6.25e-01 total \n",
"1 1 6.25e-01 2.00e+07 total \n",
"\n",
" score mean std. dev. \n",
"0 ((absorption / flux) / (total / flux)) 7.61e-02 6.49e-04 \n",
@ -1042,8 +1040,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1054,8 +1052,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>total</td>\n",
" <td>((scatter / flux) / (total / flux))</td>\n",
" <td>0.923885</td>\n",
@ -1064,8 +1062,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>total</td>\n",
" <td>((scatter / flux) / (total / flux))</td>\n",
" <td>0.980737</td>\n",
@ -1076,9 +1074,9 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 1 0.00e+00 6.25e-07 total \n",
"1 1 6.25e-07 2.00e+01 total \n",
" cell energy low [eV] energy high [eV] nuclide \\\n",
"0 1 0.00e+00 6.25e-01 total \n",
"1 1 6.25e-01 2.00e+07 total \n",
"\n",
" score mean std. dev. \n",
"0 ((scatter / flux) / (total / flux)) 9.24e-01 7.74e-03 \n",
@ -1121,8 +1119,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1133,8 +1131,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>total</td>\n",
" <td>(((absorption / flux) / (total / flux)) + ((sc...</td>\n",
" <td>1.0</td>\n",
@ -1143,8 +1141,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>1</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>total</td>\n",
" <td>(((absorption / flux) / (total / flux)) + ((sc...</td>\n",
" <td>1.0</td>\n",
@ -1155,9 +1153,9 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide \\\n",
"0 1 0.00e+00 6.25e-07 total \n",
"1 1 6.25e-07 2.00e+01 total \n",
" cell energy low [eV] energy high [eV] nuclide \\\n",
"0 1 0.00e+00 6.25e-01 total \n",
"1 1 6.25e-01 2.00e+07 total \n",
"\n",
" score mean std. dev. \n",
"0 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 7.76e-03 \n",

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

@ -16,6 +16,7 @@
"outputs": [],
"source": [
"import glob\n",
"\n",
"from IPython.display import Image\n",
"import numpy as np\n",
"\n",
@ -338,7 +339,7 @@
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AJHgM6No8TBkYAAALKSURBVGje7dpLcqQwDAbgHHE2\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/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMDktMjlUMjM6NTg6\nNTItMDQ6MDBn7ClZAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA5LTI5VDIzOjU4OjUyLTA0OjAw\nFrGR5QAAAABJRU5ErkJggg==\n",
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AKHxE2I67FxwoAAALKSURBVGje7dpLcqQwDAbgHHE2\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/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMTAtMzFUMTI6NTQ6\nMzUtMDU6MDAowpdyAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTEwLTMxVDEyOjU0OjM1LTA1OjAw\nWZ8vzgAAAABJRU5ErkJggg==\n",
"text/plain": [
"<IPython.core.display.Image object>"
]
@ -386,7 +387,7 @@
"# Create Tallies to compute microscopic multi-group cross-sections\n",
"\n",
"# Instantiate energy filter for multi-group cross-section Tallies\n",
"energy_filter = openmc.EnergyFilter([0., 0.625e-6, 20.])\n",
"energy_filter = openmc.EnergyFilter([0., 0.625, 20.0e6])\n",
"\n",
"# Instantiate flux Tally in moderator and fuel\n",
"tally = openmc.Tally(name='flux')\n",
@ -426,12 +427,12 @@
"tallies_file.append(leak)\n",
"\n",
"thermal_leak = openmc.Tally(name='thermal leakage')\n",
"thermal_leak.filters = [mesh_filter, openmc.EnergyFilter([0., 0.625e-6])]\n",
"thermal_leak.filters = [mesh_filter, openmc.EnergyFilter([0., 0.625])]\n",
"thermal_leak.scores = ['current']\n",
"tallies_file.append(thermal_leak)\n",
"\n",
"fast_leak = openmc.Tally(name='fast leakage')\n",
"fast_leak.filters = [mesh_filter, openmc.EnergyFilter([0.625e-6, 20.])]\n",
"fast_leak.filters = [mesh_filter, openmc.EnergyFilter([0.625, 20.0e6])]\n",
"fast_leak.scores = ['current']\n",
"tallies_file.append(fast_leak)"
]
@ -463,7 +464,7 @@
"# Resonance Escape Probability tallies\n",
"therm_abs_rate = openmc.Tally(name='therm. abs. rate')\n",
"therm_abs_rate.scores = ['absorption']\n",
"therm_abs_rate.filters = [openmc.EnergyFilter([0., 0.625e-6])]\n",
"therm_abs_rate.filters = [openmc.EnergyFilter([0., 0.625])]\n",
"tallies_file.append(therm_abs_rate)"
]
},
@ -478,7 +479,7 @@
"# Thermal Flux Utilization tallies\n",
"fuel_therm_abs_rate = openmc.Tally(name='fuel therm. abs. rate')\n",
"fuel_therm_abs_rate.scores = ['absorption']\n",
"fuel_therm_abs_rate.filters = [openmc.EnergyFilter([0., 0.625e-6]),\n",
"fuel_therm_abs_rate.filters = [openmc.EnergyFilter([0., 0.625]),\n",
" openmc.CellFilter([fuel_cell.id])]\n",
"tallies_file.append(fuel_therm_abs_rate)"
]
@ -494,7 +495,7 @@
"# Fast Fission Factor tallies\n",
"therm_fiss_rate = openmc.Tally(name='therm. fiss. rate')\n",
"therm_fiss_rate.scores = ['nu-fission']\n",
"therm_fiss_rate.filters = [openmc.EnergyFilter([0., 0.625e-6])]\n",
"therm_fiss_rate.filters = [openmc.EnergyFilter([0., 0.625])]\n",
"tallies_file.append(therm_fiss_rate)"
]
},
@ -507,7 +508,7 @@
"outputs": [],
"source": [
"# Instantiate energy filter to illustrate Tally slicing\n",
"fine_energy_filter = openmc.EnergyFilter(np.logspace(np.log10(1e-8), np.log10(20), 10))\n",
"fine_energy_filter = openmc.EnergyFilter(np.logspace(np.log10(1e-2), np.log10(20.0e6), 10))\n",
"\n",
"# Instantiate flux Tally in moderator and fuel\n",
"tally = openmc.Tally(name='need-to-slice')\n",
@ -578,9 +579,9 @@
" Copyright | 2011-2016 Massachusetts Institute of Technology\n",
" License | http://openmc.readthedocs.io/en/latest/license.html\n",
" Version | 0.8.0\n",
" Git SHA1 | b02fa21928a37a2254bec13c9802ff8173b6aefd\n",
" Date/Time | 2016-09-29 23:59:21\n",
" MPI Processes | 1\n",
" Git SHA1 | da5563eddb5f2c2d6b2c9839d518de40962b78f2\n",
" Date/Time | 2016-10-31 12:54:36\n",
" OpenMP Threads | 4\n",
"\n",
" ===========================================================================\n",
" ========================> INITIALIZATION <=========================\n",
@ -588,15 +589,15 @@
"\n",
" Reading settings XML file...\n",
" Reading geometry XML file...\n",
" Reading cross sections XML file...\n",
" Reading materials XML file...\n",
" Reading U235 from /home/smharper/openmc/data/nndc_hdf5/U235.h5\n",
" Reading U238 from /home/smharper/openmc/data/nndc_hdf5/U238.h5\n",
" Reading O16 from /home/smharper/openmc/data/nndc_hdf5/O16.h5\n",
" Reading H1 from /home/smharper/openmc/data/nndc_hdf5/H1.h5\n",
" Reading B10 from /home/smharper/openmc/data/nndc_hdf5/B10.h5\n",
" Reading Zr90 from /home/smharper/openmc/data/nndc_hdf5/Zr90.h5\n",
" Maximum neutron transport energy: 20.0000 MeV for U235\n",
" Reading cross sections XML file...\n",
" Reading U235 from /home/romano/openmc/scripts/nndc_hdf5/U235.h5\n",
" Reading U238 from /home/romano/openmc/scripts/nndc_hdf5/U238.h5\n",
" Reading O16 from /home/romano/openmc/scripts/nndc_hdf5/O16.h5\n",
" Reading H1 from /home/romano/openmc/scripts/nndc_hdf5/H1.h5\n",
" Reading B10 from /home/romano/openmc/scripts/nndc_hdf5/B10.h5\n",
" Reading Zr90 from /home/romano/openmc/scripts/nndc_hdf5/Zr90.h5\n",
" Maximum neutron transport energy: 2.00000E+07 eV for U235\n",
" Reading tallies XML file...\n",
" Building neighboring cells lists for each surface...\n",
" Initializing source particles...\n",
@ -636,20 +637,20 @@
"\n",
" =======================> TIMING STATISTICS <=======================\n",
"\n",
" Total time for initialization = 2.9900E-01 seconds\n",
" Reading cross sections = 1.8000E-01 seconds\n",
" Total time in simulation = 1.6156E+01 seconds\n",
" Time in transport only = 1.6145E+01 seconds\n",
" Time in inactive batches = 2.3940E+00 seconds\n",
" Time in active batches = 1.3762E+01 seconds\n",
" Time synchronizing fission bank = 1.0000E-03 seconds\n",
" Sampling source sites = 1.0000E-03 seconds\n",
" SEND/RECV source sites = 0.0000E+00 seconds\n",
" Time accumulating tallies = 0.0000E+00 seconds\n",
" Total time for finalization = 1.0000E-03 seconds\n",
" Total time elapsed = 1.6476E+01 seconds\n",
" Calculation Rate (inactive) = 5221.39 neutrons/second\n",
" Calculation Rate (active) = 2724.89 neutrons/second\n",
" Total time for initialization = 5.0418E-01 seconds\n",
" Reading cross sections = 3.6765E-01 seconds\n",
" Total time in simulation = 8.8388E+00 seconds\n",
" Time in transport only = 8.7431E+00 seconds\n",
" Time in inactive batches = 1.4676E+00 seconds\n",
" Time in active batches = 7.3713E+00 seconds\n",
" Time synchronizing fission bank = 2.2671E-03 seconds\n",
" Sampling source sites = 1.6677E-03 seconds\n",
" SEND/RECV source sites = 5.5964E-04 seconds\n",
" Time accumulating tallies = 9.0487E-05 seconds\n",
" Total time for finalization = 2.7160E-03 seconds\n",
" Total time elapsed = 9.3633E+00 seconds\n",
" Calculation Rate (inactive) = 8517.40 neutrons/second\n",
" Calculation Rate (active) = 5087.33 neutrons/second\n",
"\n",
" ============================> RESULTS <============================\n",
"\n",
@ -798,8 +799,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -810,7 +811,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>total</td>\n",
" <td>(absorption + current)</td>\n",
" <td>0.695303</td>\n",
@ -821,11 +822,11 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] nuclide score \\\n",
"0 0.00e+00 6.25e-07 total (absorption + current) \n",
" energy low [eV] energy high [eV] nuclide score mean \\\n",
"0 0.00e+00 6.25e-01 total (absorption + current) 6.95e-01 \n",
"\n",
" mean std. dev. \n",
"0 6.95e-01 5.09e-03 "
" std. dev. \n",
"0 5.09e-03 "
]
},
"execution_count": 25,
@ -866,8 +867,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -878,7 +879,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>total</td>\n",
" <td>nu-fission</td>\n",
" <td>1.202639</td>\n",
@ -889,8 +890,8 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] nuclide score mean std. dev.\n",
"0 0.00e+00 6.25e-07 total nu-fission 1.20e+00 1.03e-02"
" energy low [eV] energy high [eV] nuclide score mean std. dev.\n",
"0 0.00e+00 6.25e-01 total nu-fission 1.20e+00 1.03e-02"
]
},
"execution_count": 26,
@ -929,8 +930,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>cell</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
@ -942,7 +943,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>absorption</td>\n",
@ -954,8 +955,8 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] cell nuclide score mean \\\n",
"0 0.00e+00 6.25e-07 10000 total absorption 7.49e-01 \n",
" energy low [eV] energy high [eV] cell nuclide score mean \\\n",
"0 0.00e+00 6.25e-01 10000 total absorption 7.49e-01 \n",
"\n",
" std. dev. \n",
"0 6.73e-03 "
@ -995,8 +996,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>cell</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
@ -1008,7 +1009,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>(nu-fission / absorption)</td>\n",
@ -1020,8 +1021,8 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] cell nuclide \\\n",
"0 0.00e+00 6.25e-07 10000 total \n",
" energy low [eV] energy high [eV] cell nuclide \\\n",
"0 0.00e+00 6.25e-01 10000 total \n",
"\n",
" score mean std. dev. \n",
"0 (nu-fission / absorption) 1.66e+00 1.57e-02 "
@ -1060,8 +1061,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1072,7 +1073,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>total</td>\n",
" <td>(absorption + current)</td>\n",
" <td>0.985102</td>\n",
@ -1083,11 +1084,11 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] nuclide score \\\n",
"0 0.00e+00 6.25e-07 total (absorption + current) \n",
" energy low [eV] energy high [eV] nuclide score mean \\\n",
"0 0.00e+00 6.25e-01 total (absorption + current) 9.85e-01 \n",
"\n",
" mean std. dev. \n",
"0 9.85e-01 5.86e-03 "
" std. dev. \n",
"0 5.86e-03 "
]
},
"execution_count": 29,
@ -1122,8 +1123,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1134,7 +1135,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>total</td>\n",
" <td>(absorption / (absorption + current))</td>\n",
" <td>0.997407</td>\n",
@ -1145,8 +1146,8 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] nuclide \\\n",
"0 0.00e+00 6.25e-07 total \n",
" energy low [eV] energy high [eV] nuclide \\\n",
"0 0.00e+00 6.25e-01 total \n",
"\n",
" score mean std. dev. \n",
"0 (absorption / (absorption + current)) 9.97e-01 8.49e-03 "
@ -1184,8 +1185,8 @@
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>cell</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
@ -1197,7 +1198,7 @@
" <tr>\n",
" <th>0</th>\n",
" <td>0.0</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.625</td>\n",
" <td>10000</td>\n",
" <td>total</td>\n",
" <td>((((((absorption + current) * nu-fission) * ab...</td>\n",
@ -1209,8 +1210,8 @@
"</div>"
],
"text/plain": [
" energy low [MeV] energy high [MeV] cell nuclide \\\n",
"0 0.00e+00 6.25e-07 10000 total \n",
" energy low [eV] energy high [eV] cell nuclide \\\n",
"0 0.00e+00 6.25e-01 10000 total \n",
"\n",
" score mean std. dev. \n",
"0 ((((((absorption + current) * nu-fission) * ab... 1.02e+00 2.06e-02 "
@ -1267,8 +1268,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1279,8 +1280,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>6.662479e-07</td>\n",
@ -1289,8 +1290,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.099897e-01</td>\n",
@ -1299,8 +1300,8 @@
" <tr>\n",
" <th>2</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>3.568130e-01</td>\n",
@ -1309,8 +1310,8 @@
" <tr>\n",
" <th>3</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>5.555326e-03</td>\n",
@ -1319,8 +1320,8 @@
" <tr>\n",
" <th>4</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>7.215044e-03</td>\n",
@ -1329,8 +1330,8 @@
" <tr>\n",
" <th>5</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>(U238 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>2.273966e-01</td>\n",
@ -1339,8 +1340,8 @@
" <tr>\n",
" <th>6</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(nu-fission / flux)</td>\n",
" <td>7.969615e-03</td>\n",
@ -1349,8 +1350,8 @@
" <tr>\n",
" <th>7</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>(U235 / total)</td>\n",
" <td>(scatter / flux)</td>\n",
" <td>3.362798e-03</td>\n",
@ -1361,15 +1362,15 @@
"</div>"
],
"text/plain": [
" 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",
" cell energy low [eV] energy high [eV] nuclide \\\n",
"0 10000 0.00e+00 6.25e-01 (U238 / total) \n",
"1 10000 0.00e+00 6.25e-01 (U238 / total) \n",
"2 10000 0.00e+00 6.25e-01 (U235 / total) \n",
"3 10000 0.00e+00 6.25e-01 (U235 / total) \n",
"4 10000 6.25e-01 2.00e+07 (U238 / total) \n",
"5 10000 6.25e-01 2.00e+07 (U238 / total) \n",
"6 10000 6.25e-01 2.00e+07 (U235 / total) \n",
"7 10000 6.25e-01 2.00e+07 (U235 / total) \n",
"\n",
" score mean std. dev. \n",
"0 (nu-fission / flux) 6.66e-07 6.04e-09 \n",
@ -1474,7 +1475,7 @@
"source": [
"# Show how to use Tally.get_values(...) with a CrossFilter and CrossScore\n",
"fast_scatter_xs = fuel_xs.get_values(filters=[openmc.EnergyFilter], \n",
" filter_bins=[((0.625e-6, 20.),)], \n",
" filter_bins=[((0.625, 20.0e6),)], \n",
" scores=['(scatter / flux)'])\n",
"print(fast_scatter_xs)"
]
@ -1502,8 +1503,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1514,8 +1515,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>U238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.000002</td>\n",
@ -1524,8 +1525,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>10000</td>\n",
" <td>0.000000e+00</td>\n",
" <td>6.250000e-07</td>\n",
" <td>0.000</td>\n",
" <td>6.250000e-01</td>\n",
" <td>U235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.856784</td>\n",
@ -1534,8 +1535,8 @@
" <tr>\n",
" <th>2</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>U238</td>\n",
" <td>nu-fission</td>\n",
" <td>0.082495</td>\n",
@ -1544,8 +1545,8 @@
" <tr>\n",
" <th>3</th>\n",
" <td>10000</td>\n",
" <td>6.250000e-07</td>\n",
" <td>2.000000e+01</td>\n",
" <td>0.625</td>\n",
" <td>2.000000e+07</td>\n",
" <td>U235</td>\n",
" <td>nu-fission</td>\n",
" <td>0.091123</td>\n",
@ -1556,11 +1557,11 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide score mean \\\n",
"0 10000 0.00e+00 6.25e-07 U238 nu-fission 1.60e-06 \n",
"1 10000 0.00e+00 6.25e-07 U235 nu-fission 8.57e-01 \n",
"2 10000 6.25e-07 2.00e+01 U238 nu-fission 8.25e-02 \n",
"3 10000 6.25e-07 2.00e+01 U235 nu-fission 9.11e-02 \n",
" cell energy low [eV] energy high [eV] nuclide score mean \\\n",
"0 10000 0.00e+00 6.25e-01 U238 nu-fission 1.60e-06 \n",
"1 10000 0.00e+00 6.25e-01 U235 nu-fission 8.57e-01 \n",
"2 10000 6.25e-01 2.00e+07 U238 nu-fission 8.25e-02 \n",
"3 10000 6.25e-01 2.00e+07 U235 nu-fission 9.11e-02 \n",
"\n",
" std. dev. \n",
"0 1.06e-08 \n",
@ -1596,8 +1597,8 @@
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>cell</th>\n",
" <th>energy low [MeV]</th>\n",
" <th>energy high [MeV]</th>\n",
" <th>energy low [eV]</th>\n",
" <th>energy high [eV]</th>\n",
" <th>nuclide</th>\n",
" <th>score</th>\n",
" <th>mean</th>\n",
@ -1608,8 +1609,8 @@
" <tr>\n",
" <th>0</th>\n",
" <td>10002</td>\n",
" <td>1.000000e-08</td>\n",
" <td>1.080060e-07</td>\n",
" <td>1.000000e-02</td>\n",
" <td>1.080060e-01</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>4.547947</td>\n",
@ -1618,8 +1619,8 @@
" <tr>\n",
" <th>1</th>\n",
" <td>10002</td>\n",
" <td>1.080060e-07</td>\n",
" <td>1.166529e-06</td>\n",
" <td>1.080060e-01</td>\n",
" <td>1.166529e+00</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.003068</td>\n",
@ -1628,8 +1629,8 @@
" <tr>\n",
" <th>2</th>\n",
" <td>10002</td>\n",
" <td>1.166529e-06</td>\n",
" <td>1.259921e-05</td>\n",
" <td>1.166529e+00</td>\n",
" <td>1.259921e+01</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>1.647225</td>\n",
@ -1638,8 +1639,8 @@
" <tr>\n",
" <th>3</th>\n",
" <td>10002</td>\n",
" <td>1.259921e-05</td>\n",
" <td>1.360790e-04</td>\n",
" <td>1.259921e+01</td>\n",
" <td>1.360790e+02</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>1.831367</td>\n",
@ -1648,8 +1649,8 @@
" <tr>\n",
" <th>4</th>\n",
" <td>10002</td>\n",
" <td>1.360790e-04</td>\n",
" <td>1.469734e-03</td>\n",
" <td>1.360790e+02</td>\n",
" <td>1.469734e+03</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.039613</td>\n",
@ -1658,8 +1659,8 @@
" <tr>\n",
" <th>5</th>\n",
" <td>10002</td>\n",
" <td>1.469734e-03</td>\n",
" <td>1.587401e-02</td>\n",
" <td>1.469734e+03</td>\n",
" <td>1.587401e+04</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.137523</td>\n",
@ -1668,8 +1669,8 @@
" <tr>\n",
" <th>6</th>\n",
" <td>10002</td>\n",
" <td>1.587401e-02</td>\n",
" <td>1.714488e-01</td>\n",
" <td>1.587401e+04</td>\n",
" <td>1.714488e+05</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.170725</td>\n",
@ -1678,8 +1679,8 @@
" <tr>\n",
" <th>7</th>\n",
" <td>10002</td>\n",
" <td>1.714488e-01</td>\n",
" <td>1.851749e+00</td>\n",
" <td>1.714488e+05</td>\n",
" <td>1.851749e+06</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>2.002724</td>\n",
@ -1688,8 +1689,8 @@
" <tr>\n",
" <th>8</th>\n",
" <td>10002</td>\n",
" <td>1.851749e+00</td>\n",
" <td>2.000000e+01</td>\n",
" <td>1.851749e+06</td>\n",
" <td>2.000000e+07</td>\n",
" <td>H1</td>\n",
" <td>scatter</td>\n",
" <td>0.371624</td>\n",
@ -1700,16 +1701,16 @@
"</div>"
],
"text/plain": [
" cell energy low [MeV] energy high [MeV] nuclide score mean \\\n",
"0 10002 1.00e-08 1.08e-07 H1 scatter 4.55e+00 \n",
"1 10002 1.08e-07 1.17e-06 H1 scatter 2.00e+00 \n",
"2 10002 1.17e-06 1.26e-05 H1 scatter 1.65e+00 \n",
"3 10002 1.26e-05 1.36e-04 H1 scatter 1.83e+00 \n",
"4 10002 1.36e-04 1.47e-03 H1 scatter 2.04e+00 \n",
"5 10002 1.47e-03 1.59e-02 H1 scatter 2.14e+00 \n",
"6 10002 1.59e-02 1.71e-01 H1 scatter 2.17e+00 \n",
"7 10002 1.71e-01 1.85e+00 H1 scatter 2.00e+00 \n",
"8 10002 1.85e+00 2.00e+01 H1 scatter 3.72e-01 \n",
" cell energy low [eV] energy high [eV] nuclide score mean \\\n",
"0 10002 1.00e-02 1.08e-01 H1 scatter 4.55e+00 \n",
"1 10002 1.08e-01 1.17e+00 H1 scatter 2.00e+00 \n",
"2 10002 1.17e+00 1.26e+01 H1 scatter 1.65e+00 \n",
"3 10002 1.26e+01 1.36e+02 H1 scatter 1.83e+00 \n",
"4 10002 1.36e+02 1.47e+03 H1 scatter 2.04e+00 \n",
"5 10002 1.47e+03 1.59e+04 H1 scatter 2.14e+00 \n",
"6 10002 1.59e+04 1.71e+05 H1 scatter 2.17e+00 \n",
"7 10002 1.71e+05 1.85e+06 H1 scatter 2.00e+00 \n",
"8 10002 1.85e+06 2.00e+07 H1 scatter 3.72e-01 \n",
"\n",
" std. dev. \n",
"0 2.80e-02 \n",
@ -1735,15 +1736,6 @@
" filters=[openmc.CellFilter], filter_bins=[(moderator_cell.id,)])\n",
"slice_test.get_pandas_dataframe()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {

View file

@ -105,19 +105,6 @@ standard deviation.
*Default*: false
.. _cross_sections:
``<cross_sections>`` Element
----------------------------
The ``<cross_sections>`` element has no attributes and simply indicates the path
to an XML cross section listing file (usually named cross_sections.xml). If this
element is absent from the settings.xml file, the
:envvar:`OPENMC_CROSS_SECTIONS` environment variable will be used to find the
path to the XML cross section listing when in continuous-energy mode, and the
:envvar:`OPENMC_MG_CROSS_SECTIONS` environment variable will be used in
multi-group mode.
``<cutoff>`` Element
--------------------
@ -289,20 +276,6 @@ based on the recommended value in LA-UR-14-24530_.
.. note:: This element is not used in the multi-group :ref:`energy_mode`.
.. _multipole_library:
``<multipole_library>`` Element
-------------------------------
The ``<multipole_library>`` element indicates the directory containing a
windowed multipole library. If a windowed multipole library is available,
OpenMC can use it for on-the-fly Doppler-broadening of resolved resonance range
cross sections. If this element is absent from the settings.xml file, the
:envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used.
.. note:: The <temperature_multipole> element must also be set to "true" for
windowed multipole functionality.
``<max_order>`` Element
---------------------------
@ -316,29 +289,6 @@ then, OpenMC will only use up to the :math:`P_1` data.
.. note:: This element is not used in the continuous-energy
:ref:`energy_mode`.
.. _natural_elements:
``<natural_elements>`` Element
------------------------------
The ``<natural_elements>`` element indicates to OpenMC what nuclides are
available in the cross section library when expanding an ``<element>`` into
separate isotopes (see :ref:`material`). The accepted values are:
- ENDF/B-VII.0
- ENDF/B-VII.1
- JEFF-3.1.1
- JEFF-3.1.2
- JEFF-3.2
- JENDL-3.2
- JENDL-3.3
- JENDL-4.0
Note that the value is case-insensitive, so "ENDF/B-VII.1" is equivalent to
"endf/b-vii.1".
*Default*: ENDF/B-VII.1
``<no_reduce>`` Element
-----------------------
@ -578,6 +528,9 @@ attributes/sub-elements:
sub-elements/attributes are those of a univariate probability distribution
(see the description in :ref:`univariate`).
*Default*: Watt spectrum with :math:`a` = 0.988 MeV and :math:`b` =
2.249 MeV :sup:`-1`
:write_initial:
An element specifying whether to write out the initial source bank used at
the beginning of the first batch. The output file is named
@ -1368,6 +1321,33 @@ Here is an example of a properly defined 2d hexagonal lattice:
Materials Specification -- materials.xml
----------------------------------------
.. _cross_sections:
``<cross_sections>`` Element
----------------------------
The ``<cross_sections>`` element has no attributes and simply indicates the path
to an XML cross section listing file (usually named cross_sections.xml). If this
element is absent from the settings.xml file, the
:envvar:`OPENMC_CROSS_SECTIONS` environment variable will be used to find the
path to the XML cross section listing when in continuous-energy mode, and the
:envvar:`OPENMC_MG_CROSS_SECTIONS` environment variable will be used in
multi-group mode.
.. _multipole_library:
``<multipole_library>`` Element
-------------------------------
The ``<multipole_library>`` element indicates the directory containing a
windowed multipole library. If a windowed multipole library is available,
OpenMC can use it for on-the-fly Doppler-broadening of resolved resonance range
cross sections. If this element is absent from the settings.xml file, the
:envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used.
.. note:: The <temperature_multipole> element must also be set to "true" for
windowed multipole functionality.
.. _material:
``<material>`` Element
@ -1440,43 +1420,6 @@ Each ``material`` element can have the following attributes or sub-elements:
.. note:: The ``scattering`` attribute/sub-element is not used in the
multi-group :ref:`energy_mode`.
:element:
Specifies that a natural element is present in the material. The natural
element is split up into individual isotopes based on `IUPAC Isotopic
Compositions of the Elements 2009`_. This element has
attributes/sub-elements called ``name``, and ``ao``. The ``name``
attribute is the atomic symbol of the element. Finally, the ``ao``
attribute specifies the atom percent of the element within the material,
respectively. One example would be as follows:
.. code-block:: xml
<element name="Al" ao="8.7115e-03" />
<element name="Mg" ao="1.5498e-04" />
<element name="Mn" ao="2.7426e-05" />
<element name="Cu" ao="1.6993e-04" />
In some cross section libraries, certain naturally occurring isotopes do not
have cross sections. The :ref:`natural_elements` option determines how a
natural element is split into isotopes in these cases.
*Default*: None
An optional attribute/sub-element for each element is ``scattering``. This
attribute may be set to "data" to use the scattering laws specified by the
cross section library (default). Alternatively, when set to "iso-in-lab",
the scattering laws are used to sample the outgoing energy but an
isotropic-in-lab distribution is used to sample the outgoing angle at each
scattering interaction. The ``scattering`` attribute may be most useful
when using OpenMC to compute multi-group cross-sections for deterministic
transport codes and to quantify the effects of anisotropic scattering.
*Default*: None
.. note:: The ``scattering`` attribute/sub-element is not used in the
multi-group :ref:`energy_mode`.
:sab:
Associates an S(a,b) table with the material. This element has one
attribute/sub-element called ``name``. The ``name`` attribute
@ -1503,9 +1446,6 @@ Each ``material`` element can have the following attributes or sub-elements:
*Default*: None
.. _IUPAC Isotopic Compositions of the Elements 2009:
http://pac.iupac.org/publications/pac/pdf/2011/pdf/8302x0397.pdf
------------------------------------
Tallies Specification -- tallies.xml
------------------------------------
@ -1583,7 +1523,7 @@ The ``<tally>`` element accepts the following sub-elements:
.. code-block:: xml
<filter type="energy" bins="0.0 1.0 20.0" />
<filter type="energy" bins="0.0 1.0e6 20.0e6" />
then two energy bins will be created, one with energies between 0 and
1 MeV and the other with energies between 1 and 20 MeV.
@ -1598,7 +1538,7 @@ The ``<tally>`` element accepts the following sub-elements:
.. code-block:: xml
<filter type="energyout" bins="0.0 1.0 20.0" />
<filter type="energyout" bins="0.0 1.0e6 20.0e6" />
then two post-collision energy bins will be created, one with
energies between 0 and 1 MeV and the other with energies between
@ -1917,7 +1857,7 @@ The ``<tally>`` element accepts the following sub-elements:
| |particles. The neutrino energy does not contribute |
| |to this response. The prompt and delayed |
| |:math:`\gamma`-rays are assumed to deposit their |
| |energy locally. Units are MeV per source particle. |
| |energy locally. Units are eV per source particle. |
+----------------------+---------------------------------------------------+
|fission-q-prompt |The prompt fission energy production rate. This |
| |energy comes in the form of fission fragment |
@ -1926,7 +1866,7 @@ The ``<tally>`` element accepts the following sub-elements:
| |incident energy and it requires that the nuclear |
| |data library contains the optional fission energy |
| |release data. Energy is assumed to be deposited |
| |locally. Units are MeV per source particle. |
| |locally. Units are eV per source particle. |
+----------------------+---------------------------------------------------+
|fission-q-recoverable |The recoverable fission energy production rate. |
| |This energy comes in the form of fission fragment |
@ -1937,7 +1877,7 @@ The ``<tally>`` element accepts the following sub-elements:
| |incident neutron energy and it requires that the |
| |nuclear data library contains the optional fission |
| |energy release data. Energy is assumed to be |
| |deposited locally. Units are MeV per source |
| |deposited locally. Units are eV per source |
| |paticle. |
+----------------------+---------------------------------------------------+
|decay-rate |The delayed-nu-fission-weighted decay rate where |
@ -2319,7 +2259,7 @@ attributes/sub-elements:
The width of mesh cells in each direction.
:energy:
Energy bins [in MeV], listed in ascending order (e.g. 0.0 0.625e-7 20.0)
Energy bins [in eV], listed in ascending order (e.g. 0.0 0.625 20.0e6)
for CMFD tallies and acceleration. If no energy bins are listed, OpenMC
automatically assumes a one energy group calculation over the entire
energy range.

View file

@ -101,8 +101,8 @@ settings_file.export_to_xml()
# Instantiate some tally Filters
cell_filter = openmc.CellFilter(100)
energy_filter = openmc.EnergyFilter([0., 20.])
energyout_filter = openmc.EnergyoutFilter([0., 20.])
energy_filter = openmc.EnergyFilter([0., 20.e6])
energyout_filter = openmc.EnergyoutFilter([0., 20.e6])
# Instantiate the first Tally
first_tally = openmc.Tally(tally_id=1, name='first tally')

View file

@ -45,18 +45,14 @@ sn119 = openmc.Nuclide('Sn119')
sn120 = openmc.Nuclide('Sn120')
sn122 = openmc.Nuclide('Sn122')
sn124 = openmc.Nuclide('Sn124')
u234 = openmc.Nuclide('U234')
u235 = openmc.Nuclide('U235')
u238 = openmc.Nuclide('U238')
u = openmc.Element('U')
o = openmc.Element('O')
# Instantiate some Materials and register the appropriate Nuclides
uo2 = openmc.Material(material_id=1, name='UO2 fuel at 2.4% wt enrichment')
uo2.set_density('g/cm3', 10.29769)
uo2.add_nuclide(u234, 4.4843e-6)
uo2.add_nuclide(u235, 5.5815e-4)
uo2.add_nuclide(u238, 2.2408e-2)
uo2.add_nuclide(o16, 4.5829e-2)
uo2.add_nuclide(o17, 1.1164e-4)
uo2.add_element(u, 1., enrichment=0.024)
uo2.add_element(o, 2.)
helium = openmc.Material(material_id=2, name='Helium for gap')
helium.set_density('g/cm3', 0.001598)
@ -185,7 +181,7 @@ mesh.lower_left = [-0.62992, -0.62992, -1.e50]
mesh.upper_right = [0.62992, 0.62992, 1.e50]
# Instantiate some tally Filters
energy_filter = openmc.EnergyFilter([0., 4.e-6, 20.])
energy_filter = openmc.EnergyFilter([0., 4., 20.e6])
mesh_filter = openmc.MeshFilter(mesh)
# Instantiate the Tally

View file

@ -15,8 +15,8 @@ particles = 1000
###############################################################################
# Instantiate the energy group data
groups = openmc.mgxs.EnergyGroups(group_edges=[1E-11, 0.0635E-6, 10.0E-6,
1.0E-4, 1.0E-3, 0.5, 1.0, 20.0])
groups = openmc.mgxs.EnergyGroups(group_edges=[
1e-5, 0.0635, 10.0, 1.0e2, 1.0e3, 0.5e6, 1.0e6, 20.0e6])
# Instantiate the 7-group (C5G7) cross section data
uo2_xsdata = openmc.XSdata('UO2', groups)
@ -83,6 +83,7 @@ water.add_macroscopic(h2o_data)
# Instantiate a Materials collection and export to XML
materials_file = openmc.Materials([uo2, water])
materials_file.cross_sections = "./mgxs.h5"
materials_file.export_to_xml()
@ -132,7 +133,6 @@ geometry.export_to_xml()
# Instantiate a Settings object, set all runtime parameters, and export to XML
settings_file = openmc.Settings()
settings_file.energy_mode = "multi-group"
settings_file.cross_sections = "./mgxs.h5"
settings_file.batches = batches
settings_file.inactive = inactive
settings_file.particles = particles
@ -156,8 +156,8 @@ mesh.lower_left = [-0.63, -0.63, -1.e50]
mesh.upper_right = [0.63, 0.63, 1.e50]
# Instantiate some tally Filters
energy_filter = openmc.EnergyFilter([1E-11, 0.0635E-6, 10.0E-6, 1.0E-4, 1.0E-3,
0.5, 1.0, 20.0])
energy_filter = openmc.EnergyFilter([1e-5, 0.0635, 10.0, 1.0e2, 1.0e3, 0.5e6,
1.0e6, 20.0e6])
mesh_filter = openmc.MeshFilter(mesh)
# Instantiate the Tally

View file

@ -8,14 +8,14 @@
<tally id="2">
<filter type="cell" bins="100" />
<filter type="energy" bins="0 20.0" />
<filter type="energy" bins="0 20.0e6" />
<scores>total scatter nu-scatter absorption fission nu-fission</scores>
</tally>
<tally id="3">
<filter type="cell" bins="100" />
<filter type="energy" bins="0 20.0" />
<filter type="energyout" bins="0 20.0" />
<filter type="energy" bins="0 20.0e6" />
<filter type="energyout" bins="0 20.0e6" />
<scores>scatter nu-scatter nu-fission</scores>
</tally>

View file

@ -9,7 +9,7 @@
<tally id="1">
<filter type="mesh" bins="1" />
<filter type="energy" bins="0. 4.e-6 20.0" />
<filter type="energy" bins="0. 4. 20.0e6" />
<scores>flux fission nu-fission</scores>
</tally>

View file

@ -1,5 +1,8 @@
<?xml version="1.0"?>
<materials>
<cross_sections>./mgxs.h5</cross_sections>
<!-- UO2 -->
<material id="1">
<density units="macro" value="1.0" />

View file

@ -34,6 +34,4 @@
<survival_biasing>false</survival_biasing>
<cross_sections>./mgxs.h5</cross_sections>
</settings>

View file

@ -39,8 +39,8 @@ class CMFDMesh(object):
width : Iterable of float
The width of mesh cells in each direction.
energy : Iterable of float
Energy bins in MeV, listed in ascending order (e.g. [0.0, 0.625e-7,
20.0]) for CMFD tallies and acceleration. If no energy bins are listed,
Energy bins in eV, listed in ascending order (e.g. [0.0, 0.625e-1,
20.0e6]) for CMFD tallies and acceleration. If no energy bins are listed,
OpenMC automatically assumes a one energy group calculation over the
entire energy range.
albedo : Iterable of float

View file

@ -1,3 +1,9 @@
# Version of HDF5 nuclear data format
HDF5_VERSION_MAJOR = 1
HDF5_VERSION_MINOR = 0
HDF5_VERSION = (HDF5_VERSION_MAJOR, HDF5_VERSION_MINOR)
from .data import *
from .neutron import *
from .reaction import *

View file

@ -9,6 +9,7 @@ import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from openmc.stats import Univariate, Tabular, Uniform, Legendre
from .function import INTERPOLATION_SCHEME
from .data import EV_PER_MEV
from .endf import get_head_record, get_cont_record, get_tab1_record, \
get_list_record, get_tab2_record
@ -19,14 +20,14 @@ class AngleDistribution(EqualityMixin):
Parameters
----------
energy : Iterable of float
Incoming energies at which distributions exist
Incoming energies in eV at which distributions exist
mu : Iterable of openmc.stats.Univariate
Distribution of scattering cosines corresponding to each incoming energy
Attributes
----------
energy : Iterable of float
Incoming energies at which distributions exist
Incoming energies in eV at which distributions exist
mu : Iterable of openmc.stats.Univariate
Distribution of scattering cosines corresponding to each incoming energy
@ -167,7 +168,7 @@ class AngleDistribution(EqualityMixin):
idx += 1
# Incoming energy grid
energy = ace.xss[idx:idx + n_energies]
energy = ace.xss[idx:idx + n_energies]*EV_PER_MEV
idx += n_energies
# Read locations for angular distributions

View file

@ -9,6 +9,7 @@ from openmc.stats import Tabular, Univariate, Discrete, Mixture, \
Uniform, Legendre
from .function import INTERPOLATION_SCHEME
from .angle_energy import AngleEnergy
from .data import EV_PER_MEV
from .endf import get_list_record, get_tab2_record
@ -328,7 +329,7 @@ class CorrelatedAngleEnergy(AngleEnergy):
# Incoming energies at which distributions exist
idx += 2*n_regions + 1
energy = ace.xss[idx:idx + n_energy_in]
energy = ace.xss[idx:idx + n_energy_in]*EV_PER_MEV
# Location of distributions
idx += n_energy_in
@ -353,12 +354,13 @@ class CorrelatedAngleEnergy(AngleEnergy):
# Secondary energy distribution
n_energy_out = int(ace.xss[idx + 1])
data = ace.xss[idx + 2:idx + 2 + 4*n_energy_out]
data = ace.xss[idx + 2:idx + 2 + 4*n_energy_out].copy()
data.shape = (4, n_energy_out)
data[0,:] *= EV_PER_MEV
# Create continuous distribution
eout_continuous = Tabular(data[0][n_discrete_lines:],
data[1][n_discrete_lines:],
data[1][n_discrete_lines:]/EV_PER_MEV,
INTERPOLATION_SCHEME[intt],
ignore_negative=True)
eout_continuous.c = data[2][n_discrete_lines:]

View file

@ -165,7 +165,10 @@ def atomic_mass(isotope):
return _ATOMIC_MASS.get(isotope.lower())
# The value of the Boltzman constant in units of MeV / K
# The value of the Boltzman constant in units of eV / K
# Values here are from the Committee on Data for Science and Technology
# (CODATA) 2010 recommendation (doi:10.1103/RevModPhys.84.1527).
K_BOLTZMANN = 8.6173324E-11
K_BOLTZMANN = 8.6173324e-5
# Used for converting units in ACE data
EV_PER_MEV = 1.0e6

View file

@ -27,7 +27,7 @@ LIBRARIES = {0: 'ENDF/B', 1: 'ENDF/A', 2: 'JEFF', 3: 'EFF',
35: 'BROND', 36: 'INGDB-90', 37: 'FENDL/A', 41: 'BROND'}
SUM_RULES = {1: [2, 3],
3: [4, 5, 11, 16, 17, 22, 23, 24, 25, 28, 29, 30, 32, 33, 34, 35,
3: [4, 5, 11, 16, 17, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35,
36, 37, 41, 42, 44, 45, 152, 153, 154, 156, 157, 158, 159, 160,
161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
173, 174, 175, 176, 177, 178, 179, 180, 181, 183, 184, 185,
@ -35,7 +35,7 @@ SUM_RULES = {1: [2, 3],
4: list(range(50, 92)),
16: list(range(875, 892)),
18: [19, 20, 21, 38],
27: [8, 101],
27: [18, 101],
101: [102, 103, 104, 105, 106, 107, 108, 109, 111, 112, 113, 114,
115, 116, 117, 155, 182, 191, 192, 193, 197],
103: list(range(600, 650)),

View file

@ -10,6 +10,7 @@ from .function import Tabulated1D, INTERPOLATION_SCHEME
from openmc.stats.univariate import Univariate, Tabular, Discrete, Mixture
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from .data import EV_PER_MEV
from .endf import get_tab1_record, get_tab2_record
@ -318,13 +319,14 @@ class MaxwellEnergy(EnergyDistribution):
Maxwell distribution
"""
# Read nuclear temperature
# Read nuclear temperature -- since units are MeV, convert to eV
theta = Tabulated1D.from_ace(ace, idx)
theta.y *= EV_PER_MEV
# Restriction energy
nr = int(ace.xss[idx])
ne = int(ace.xss[idx + 1 + 2*nr])
u = ace.xss[idx + 2 + 2*nr + 2*ne]
u = ace.xss[idx + 2 + 2*nr + 2*ne]*EV_PER_MEV
return cls(theta, u)
@ -450,13 +452,14 @@ class Evaporation(EnergyDistribution):
Evaporation spectrum
"""
# Read nuclear temperature
# Read nuclear temperature -- since units are MeV, convert to eV
theta = Tabulated1D.from_ace(ace, idx)
theta.y *= EV_PER_MEV
# Restriction energy
nr = int(ace.xss[idx])
ne = int(ace.xss[idx + 1 + 2*nr])
u = ace.xss[idx + 2 + 2*nr + 2*ne]
u = ace.xss[idx + 2 + 2*nr + 2*ne]*EV_PER_MEV
return cls(theta, u)
@ -597,16 +600,18 @@ class WattEnergy(EnergyDistribution):
Watt fission spectrum
"""
# Energy-dependent a parameter
# Energy-dependent a parameter -- units are MeV, convert to eV
a = Tabulated1D.from_ace(ace, idx)
a.y *= EV_PER_MEV
# Advance index
nr = int(ace.xss[idx])
ne = int(ace.xss[idx + 1 + 2*nr])
idx += 2 + 2*nr + 2*ne
# Energy-dependent b parameter
# Energy-dependent b parameter -- units are MeV^-1
b = Tabulated1D.from_ace(ace, idx)
b.y /= EV_PER_MEV
# Advance index
nr = int(ace.xss[idx])
@ -614,7 +619,7 @@ class WattEnergy(EnergyDistribution):
idx += 2 + 2*nr + 2*ne
# Restriction energy
u = ace.xss[idx]
u = ace.xss[idx]*EV_PER_MEV
return cls(a, b, u)
@ -887,7 +892,7 @@ class DiscretePhoton(EnergyDistribution):
"""
primary_flag = int(ace.xss[idx])
energy = ace.xss[idx + 1]
energy = ace.xss[idx + 1]*EV_PER_MEV
return cls(primary_flag, energy, ace.atomic_weight_ratio)
@ -983,7 +988,8 @@ class LevelInelastic(EnergyDistribution):
Level inelastic scattering distribution
"""
threshold, mass_ratio = ace.xss[idx:idx + 2]
threshold = ace.xss[idx]*EV_PER_MEV
mass_ratio = ace.xss[idx + 1]
return cls(threshold, mass_ratio)
@ -1221,7 +1227,7 @@ class ContinuousTabular(EnergyDistribution):
# Incoming energies at which distributions exist
idx += 2*n_regions + 1
energy = ace.xss[idx:idx + n_energy_in]
energy = ace.xss[idx:idx + n_energy_in]*EV_PER_MEV
# Location of distributions
idx += n_energy_in
@ -1244,12 +1250,13 @@ class ContinuousTabular(EnergyDistribution):
intt = 2
n_energy_out = int(ace.xss[idx + 1])
data = ace.xss[idx + 2:idx + 2 + 3*n_energy_out]
data = ace.xss[idx + 2:idx + 2 + 3*n_energy_out].copy()
data.shape = (3, n_energy_out)
data[0,:] *= EV_PER_MEV
# Create continuous distribution
eout_continuous = Tabular(data[0][n_discrete_lines:],
data[1][n_discrete_lines:],
data[1][n_discrete_lines:]/EV_PER_MEV,
INTERPOLATION_SCHEME[intt])
eout_continuous.c = data[2][n_discrete_lines:]

View file

@ -6,22 +6,20 @@ import sys
import h5py
import numpy as np
from .data import ATOMIC_SYMBOL
from .data import ATOMIC_SYMBOL, EV_PER_MEV
from .endf import get_cont_record, get_list_record, Evaluation
from .function import Function1D, Tabulated1D, Polynomial, Sum
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
def _extract_458_data(ev, units='eV'):
def _extract_458_data(ev):
"""Read an ENDF file and extract the MF=1, MT=458 values.
Parameters
----------
ev : openmc.data.Evaluation
ENDF evaluation
units : {'eV', 'MeV'}
The units that are used in values returned.
Returns
-------
@ -38,7 +36,6 @@ def _extract_458_data(ev, units='eV'):
"""
cv.check_type('evaluation', ev, Evaluation)
cv.check_value('energy units', units, ('eV', 'MeV'))
if not ev.target['fissionable']:
# This nuclide isn't fissionable.
@ -84,17 +81,10 @@ def _extract_458_data(ev, units='eV'):
# If we found the error, reduce all 2nd-order coeffs by 10**6.
if error_present:
for coeffs in value.values(): coeffs[2] *= 1e-6
for coeffs in uncertainty.values(): coeffs[2] *= 1e-6
# Convert eV to MeV.
if units == 'MeV':
for coeffs in value.values():
for i in range(len(coeffs)):
coeffs[i] *= 10**(-6 + 6*i)
for coeffs in uncertainty.values():
for i in range(len(coeffs)):
coeffs[i] *= 10**(-6 + 6*i)
for coeffs in value.values():
coeffs[2] /= EV_PER_MEV
for coeffs in uncertainty.values():
coeffs[2] /= EV_PER_MEV
return value, uncertainty
@ -161,7 +151,7 @@ def write_compact_458_library(endf_files, output_name='fission_Q_data.h5',
continue
# Get the important bits.
data = _extract_458_data(ev, 'MeV')
data = _extract_458_data(ev)
if data is None: continue
value, uncertainty = data
@ -356,7 +346,7 @@ class FissionEnergyRelease(EqualityMixin):
self._neutrinos = energy_release
@classmethod
def _from_dictionary(cls, energy_release, incident_neutron, units='eV'):
def _from_dictionary(cls, energy_release, incident_neutron):
"""Generate fission energy release data from a dictionary.
Parameters
@ -368,8 +358,6 @@ class FissionEnergyRelease(EqualityMixin):
data, more for polynomial data.
incident_neutron : openmc.data.IncidentNeutron
Corresponding incident neutron dataset
units : {'eV', 'MeV'}
The energy units used in the returned object.
Returns
-------
@ -377,8 +365,6 @@ class FissionEnergyRelease(EqualityMixin):
Fission energy release data
"""
cv.check_value('energy units', units, ('eV', 'MeV'))
out = cls()
# How many coefficients are given for each component? If we only find
@ -429,28 +415,24 @@ class FissionEnergyRelease(EqualityMixin):
raise ValueError('Ambiguous prompt/total nu value.')
nu = nu[0]
if units == 'eV':
nu_const = 8.07e6
else:
nu_const = 8.07
if isinstance(nu, Tabulated1D):
ENP = deepcopy(nu)
ENP.y = (energy_release['ENP'] + 1.307 * nu.x
- nu_const * (nu.y - nu.y[0]))
- 8.07e6 * (nu.y - nu.y[0]))
elif isinstance(nu, Polynomial):
if len(nu) == 1:
ENP = Polynomial([energy_release['ENP'][0], 1.307])
else:
ENP = Polynomial(
[energy_release['ENP'][0], 1.307 - nu_const*nu.coef[1]]
+ [-nu_const*c for c in nu.coef[2:]])
[energy_release['ENP'][0], 1.307 - 8.07e6*nu.coef[1]]
+ [-8.07e6*c for c in nu.coef[2:]])
out.prompt_neutrons = ENP
return out
@classmethod
def from_endf(cls, ev, incident_neutron, units='eV'):
def from_endf(cls, ev, incident_neutron):
"""Generate fission energy release data from an ENDF file.
Parameters
@ -459,8 +441,6 @@ class FissionEnergyRelease(EqualityMixin):
ENDF evaluation
incident_neutron : openmc.data.IncidentNeutron
Corresponding incident neutron dataset
units : {'eV', 'MeV'}
The energy units used in the returned object.
Returns
-------
@ -484,10 +464,10 @@ class FissionEnergyRelease(EqualityMixin):
raise ValueError('The ENDF evaluation is not fissionable.')
# Read the 458 data from the ENDF file.
value, uncertainty = _extract_458_data(ev, units)
value, uncertainty = _extract_458_data(ev)
# Build the object.
return cls._from_dictionary(value, incident_neutron, units)
return cls._from_dictionary(value, incident_neutron)
@classmethod
def from_hdf5(cls, group):

View file

@ -8,6 +8,7 @@ import numpy as np
import openmc.data
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from .data import EV_PER_MEV
INTERPOLATION_SCHEME = {1: 'histogram', 2: 'linear-linear', 3: 'linear-log',
4: 'log-linear', 5: 'log-log'}
@ -315,7 +316,7 @@ class Tabulated1D(Function1D):
return cls(x, y, breakpoints, interpolation)
@classmethod
def from_ace(cls, ace, idx=0):
def from_ace(cls, ace, idx=0, convert_units=True):
"""Create a Tabulated1D object from an ACE table.
Parameters
@ -324,6 +325,9 @@ class Tabulated1D(Function1D):
An ACE table
idx : int
Offset to read from in XSS array (default of zero)
convert_units : bool
If the abscissa represents energy, indicate whether to convert MeV
to eV.
Returns
-------
@ -348,8 +352,11 @@ class Tabulated1D(Function1D):
# Get (x,y) pairs
idx += 2*n_regions + 1
x = ace.xss[idx:idx + n_pairs]
y = ace.xss[idx + n_pairs:idx + 2*n_pairs]
x = ace.xss[idx:idx + n_pairs].copy()
y = ace.xss[idx + n_pairs:idx + 2*n_pairs].copy()
if convert_units:
x *= EV_PER_MEV
return Tabulated1D(x, y, breakpoints, interpolation)

View file

@ -8,6 +8,7 @@ import openmc.checkvalue as cv
from openmc.stats import Tabular, Univariate, Discrete, Mixture
from .function import Tabulated1D, INTERPOLATION_SCHEME
from .angle_energy import AngleEnergy
from .data import EV_PER_MEV
from .endf import get_list_record, get_tab2_record
@ -290,7 +291,7 @@ class KalbachMann(AngleEnergy):
# Incoming energies at which distributions exist
idx += 2*n_regions + 1
energy = ace.xss[idx:idx + n_energy_in]
energy = ace.xss[idx:idx + n_energy_in]*EV_PER_MEV
# Location of distributions
idx += n_energy_in
@ -315,12 +316,13 @@ class KalbachMann(AngleEnergy):
intt = 2
n_energy_out = int(ace.xss[idx + 1])
data = ace.xss[idx + 2:idx + 2 + 5*n_energy_out]
data = ace.xss[idx + 2:idx + 2 + 5*n_energy_out].copy()
data.shape = (5, n_energy_out)
data[0,:] *= EV_PER_MEV
# Create continuous distribution
eout_continuous = Tabular(data[0][n_discrete_lines:],
data[1][n_discrete_lines:],
data[1][n_discrete_lines:]/EV_PER_MEV,
INTERPOLATION_SCHEME[intt],
ignore_negative=True)
eout_continuous.c = data[2][n_discrete_lines:]

View file

@ -18,7 +18,7 @@ class NBodyPhaseSpace(AngleEnergy):
atomic_weight_ratio : float
Atomic weight ratio of target nuclide
q_value : float
Q value for reaction in MeV or eV, depending on the data source.
Q value for reaction in eV
Attributes
----------
@ -29,7 +29,7 @@ class NBodyPhaseSpace(AngleEnergy):
atomic_weight_ratio : float
Atomic weight ratio of target nuclide
q_value : float
Q value for reaction in MeV or eV, depending on the data source.
Q value for reaction in eV
"""
@ -130,7 +130,7 @@ class NBodyPhaseSpace(AngleEnergy):
Index in XSS array of the start of the energy distribution data
(LDIS + LOCC - 1)
q_value : float
Q-value for reaction in MeV
Q-value for reaction in eV
Returns
-------

View file

@ -9,8 +9,9 @@ from six import string_types
import numpy as np
import h5py
from . import HDF5_VERSION, HDF5_VERSION_MAJOR
from .ace import Table, get_table
from .data import ATOMIC_SYMBOL, K_BOLTZMANN
from .data import ATOMIC_SYMBOL, K_BOLTZMANN, EV_PER_MEV
from .fission_energy import FissionEnergyRelease
from .function import Tabulated1D, Sum, ResonancesWithBackground
from .endf import Evaluation, SUM_RULES
@ -110,7 +111,7 @@ class IncidentNeutron(EqualityMixin):
Atomic mass ratio of the target nuclide.
kTs : Iterable of float
List of temperatures of the target nuclide in the data set.
The temperatures have units of MeV.
The temperatures have units of eV.
Attributes
----------
@ -121,7 +122,7 @@ class IncidentNeutron(EqualityMixin):
atomic_weight_ratio : float
Atomic weight ratio of the target nuclide.
energy : dict of numpy.ndarray
The energy values (MeV) at which reaction cross-sections are tabulated.
The energy values (eV) at which reaction cross-sections are tabulated.
They keys of the dict are the temperature string ('294K') for each
set of energies
fission_energy : None or openmc.data.FissionEnergyRelease
@ -148,7 +149,7 @@ class IncidentNeutron(EqualityMixin):
rounded to the nearest integer; e.g., '294K'
kTs : Iterable of float
List of temperatures of the target nuclide in the data set.
The temperatures have units of MeV.
The temperatures have units of eV.
urr : dict
Dictionary whose keys are temperatures (e.g., '294K') and values are
unresolved resonance region probability tables.
@ -391,7 +392,9 @@ class IncidentNeutron(EqualityMixin):
raise NotImplementedError('Cannot export incident neutron data that '
'originated from an ENDF file.')
# Open file and write version
f = h5py.File(path, mode, libver='latest')
f.attrs['version'] = np.array(HDF5_VERSION)
# Write basic data
g = f.create_group(self.name)
@ -454,6 +457,21 @@ class IncidentNeutron(EqualityMixin):
group = group_or_filename
else:
h5file = h5py.File(group_or_filename, 'r')
# Make sure version matches
if 'version' in h5file.attrs:
major, minor = h5file.attrs['version']
if major != HDF5_VERSION_MAJOR:
raise IOError(
'HDF5 data format uses version {}.{} whereas your '
'installation of the OpenMC Python API expects version '
'{}.x.'.format(major, minor, HDF5_VERSION_MAJOR))
else:
raise IOError(
'HDF5 data does not indicate a version. Your installation of '
'the OpenMC Python API expects version {}.x data.'
.format(HDF5_VERSION_MAJOR))
group = list(h5file.values())[0]
name = group.name[1:]
@ -546,7 +564,7 @@ class IncidentNeutron(EqualityMixin):
_get_metadata(int(zaid), metastable_scheme)
# Assign temperature to the running list
kTs = [ace.temperature]
kTs = [ace.temperature*EV_PER_MEV]
data = cls(name, Z, mass_number, metastable,
ace.atomic_weight_ratio, kTs)
@ -556,7 +574,7 @@ class IncidentNeutron(EqualityMixin):
# Read energy grid
n_energy = ace.nxs[3]
energy = ace.xss[ace.jxs[1]:ace.jxs[1] + n_energy]
energy = ace.xss[ace.jxs[1]:ace.jxs[1] + n_energy]*EV_PER_MEV
data.energy[strT] = energy
total_xs = ace.xss[ace.jxs[1] + n_energy:ace.jxs[1] + 2 * n_energy]
absorption_xs = ace.xss[ace.jxs[1] + 2 * n_energy:ace.jxs[1] +

View file

@ -14,7 +14,7 @@ from openmc.stats import Uniform, Tabular, Legendre
from .angle_distribution import AngleDistribution
from .angle_energy import AngleEnergy
from .correlated import CorrelatedAngleEnergy
from .data import ATOMIC_SYMBOL, K_BOLTZMANN
from .data import ATOMIC_SYMBOL, K_BOLTZMANN, EV_PER_MEV
from .endf import get_head_record, get_tab1_record, get_list_record, \
get_tab2_record, get_cont_record
from .energy_distribution import EnergyDistribution, LevelInelastic, \
@ -222,7 +222,9 @@ def _get_fission_products_ace(ace):
if LNU == 1:
# Polynomial function form of nu
NC = int(ace.xss[idx+1])
coefficients = ace.xss[idx+2 : idx+2+NC]
coefficients = ace.xss[idx+2 : idx+2+NC].copy()
for i in range(coefficients.size):
coefficients[i] *= EV_PER_MEV**(-i)
neutron.yield_ = Polynomial(coefficients)
elif LNU == 2:
# Tabular data form of nu
@ -241,7 +243,9 @@ def _get_fission_products_ace(ace):
if LNU == 1:
# Polynomial function form of nu
NC = int(ace.xss[idx+1])
coefficients = ace.xss[idx+2 : idx+2+NC]
coefficients = ace.xss[idx+2 : idx+2+NC].copy()
for i in range(coefficients.size):
coefficients[i] *= EV_PER_MEV**(-i)
prompt_neutron.yield_ = Polynomial(coefficients)
elif LNU == 2:
# Tabular data form of nu
@ -257,7 +261,9 @@ def _get_fission_products_ace(ace):
if LNU == 1:
# Polynomial function form of nu
NC = int(ace.xss[idx+1])
coefficients = ace.xss[idx+2 : idx+2+NC]
coefficients = ace.xss[idx+2 : idx+2+NC].copy()
for i in range(coefficients.size):
coefficients[i] *= EV_PER_MEV**(-i)
total_neutron.yield_ = Polynomial(coefficients)
elif LNU == 2:
# Tabular data form of nu
@ -521,7 +527,7 @@ def _get_photon_products_ace(ace, rx):
threshold_idx = int(ace.xss[idx]) - 1
n_energy = int(ace.xss[idx + 1])
energy = ace.xss[ace.jxs[1] + threshold_idx:
ace.jxs[1] + threshold_idx + n_energy]
ace.jxs[1] + threshold_idx + n_energy]*EV_PER_MEV
# Get photon production cross section
photon_prod_xs = ace.xss[idx + 2:idx + 2 + n_energy]
@ -697,7 +703,7 @@ class Reaction(EqualityMixin):
mt : int
The ENDF MT number for this reaction.
q_value : float
The Q-value of this reaction in MeV or eV, depending on the data source.
The Q-value of this reaction in eV.
xs : dict of str to openmc.data.Function1D
Microscopic cross section for this reaction as a function of incident
energy; these cross sections are provided in a dictionary where the key
@ -861,18 +867,18 @@ class Reaction(EqualityMixin):
def from_ace(cls, ace, i_reaction):
# Get nuclide energy grid
n_grid = ace.nxs[3]
grid = ace.xss[ace.jxs[1]:ace.jxs[1] + n_grid]
grid = ace.xss[ace.jxs[1]:ace.jxs[1] + n_grid]*EV_PER_MEV
# Convert data temperature to a "300.0K" number for indexing
# temperature data
strT = str(int(round(ace.temperature / K_BOLTZMANN))) + "K"
strT = str(int(round(ace.temperature*EV_PER_MEV / K_BOLTZMANN))) + "K"
if i_reaction > 0:
mt = int(ace.xss[ace.jxs[3] + i_reaction - 1])
rx = cls(mt)
# Get Q-value of reaction
rx.q_value = ace.xss[ace.jxs[4] + i_reaction - 1]
rx.q_value = ace.xss[ace.jxs[4] + i_reaction - 1]*EV_PER_MEV
# ==================================================================
# CROSS SECTION

View file

@ -8,7 +8,8 @@ import h5py
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from .data import K_BOLTZMANN, ATOMIC_SYMBOL
from . import HDF5_VERSION, HDF5_VERSION_MAJOR
from .data import K_BOLTZMANN, ATOMIC_SYMBOL, EV_PER_MEV
from .ace import Table, get_table
from .angle_energy import AngleEnergy
from .function import Tabulated1D
@ -69,14 +70,14 @@ class CoherentElastic(EqualityMixin):
Parameters
----------
bragg_edges : Iterable of float
Bragg edge energies in MeV
Bragg edge energies in eV
factors : Iterable of float
Partial sum of structure factors, :math:`\sum\limits_{i=1}^{E_i<E} S_i`
Attributes
----------
bragg_edges : Iterable of float
Bragg edge energies in MeV
Bragg edge energies in eV
factors : Iterable of float
Partial sum of structure factors, :math:`\sum\limits_{i=1}^{E_i<E} S_i`
@ -161,7 +162,7 @@ class ThermalScattering(EqualityMixin):
Atomic mass ratio of the target nuclide.
kTs : Iterable of float
List of temperatures of the target nuclide in the data set.
The temperatures have units of MeV.
The temperatures have units of eV.
Attributes
----------
@ -181,7 +182,7 @@ class ThermalScattering(EqualityMixin):
rounded to the nearest integer; e.g., '294K'
kTs : Iterable of float
List of temperatures of the target nuclide in the data set.
The temperatures have units of MeV.
The temperatures have units of eV.
nuclides : Iterable of str
Nuclide names that the thermal scattering data applies to
@ -222,8 +223,9 @@ class ThermalScattering(EqualityMixin):
to the :class:`h5py.File` constructor.
"""
# Open file and write version
f = h5py.File(path, mode, libver='latest')
f.attrs['version'] = np.array(HDF5_VERSION)
# Write basic data
g = f.create_group(self.name)
@ -331,6 +333,21 @@ class ThermalScattering(EqualityMixin):
group = group_or_filename
else:
h5file = h5py.File(group_or_filename, 'r')
# Make sure version matches
if 'version' in h5file.attrs:
major, minor = h5file.attrs['version']
if major != HDF5_VERSION_MAJOR:
raise IOError(
'HDF5 data format uses version {}.{} whereas your '
'installation of the OpenMC Python API expects version '
'{}.x.'.format(major, minor, HDF5_VERSION_MAJOR))
else:
raise IOError(
'HDF5 data does not indicate a version. Your installation of '
'the OpenMC Python API expects version {}.x data.'
.format(HDF5_VERSION_MAJOR))
group = list(h5file.values())[0]
name = group.name[1:]
@ -426,15 +443,16 @@ class ThermalScattering(EqualityMixin):
'Assigning a name of {}.'.format(ace.name, name))
# Assign temperature to the running list
kTs = [ace.temperature]
temperatures = [str(int(round(ace.temperature / K_BOLTZMANN))) + "K"]
kTs = [ace.temperature*EV_PER_MEV]
temperatures = [str(int(round(ace.temperature*EV_PER_MEV
/ K_BOLTZMANN))) + "K"]
table = cls(name, ace.atomic_weight_ratio, kTs)
# Incoherent inelastic scattering cross section
idx = ace.jxs[1]
n_energy = int(ace.xss[idx])
energy = ace.xss[idx+1 : idx+1+n_energy]
energy = ace.xss[idx+1 : idx+1+n_energy]*EV_PER_MEV
xs = ace.xss[idx+1+n_energy : idx+1+2*n_energy]
table.inelastic_xs[temperatures[0]] = Tabulated1D(energy, xs)
@ -451,7 +469,7 @@ class ThermalScattering(EqualityMixin):
idx = ace.jxs[3]
table.inelastic_e_out[temperatures[0]] = \
ace.xss[idx:idx + n_energy * n_energy_out * (n_mu + 2):
n_mu + 2]
n_mu + 2]*EV_PER_MEV
table.inelastic_e_out[temperatures[0]].shape = \
(n_energy, n_energy_out)
@ -474,9 +492,9 @@ class ThermalScattering(EqualityMixin):
# Outgoing energy distribution for incoming energy i
e = ace.xss[idx + 1:idx + 1 + n_energy_out[i]*(n_mu + 3):
n_mu + 3]
n_mu + 3]*EV_PER_MEV
p = ace.xss[idx + 2:idx + 2 + n_energy_out[i]*(n_mu + 3):
n_mu + 3]
n_mu + 3]/EV_PER_MEV
c = ace.xss[idx + 3:idx + 3 + n_energy_out[i]*(n_mu + 3):
n_mu + 3]
eout_i = Tabular(e, p, 'linear-linear', ignore_negative=True)
@ -507,11 +525,12 @@ class ThermalScattering(EqualityMixin):
idx = ace.jxs[4]
if idx != 0:
n_energy = int(ace.xss[idx])
energy = ace.xss[idx + 1: idx + 1 + n_energy]
energy = ace.xss[idx + 1: idx + 1 + n_energy]*EV_PER_MEV
P = ace.xss[idx + 1 + n_energy: idx + 1 + 2 * n_energy]
if ace.nxs[5] == 4:
table.elastic_xs[temperatures[0]] = CoherentElastic(energy, P)
table.elastic_xs[temperatures[0]] = CoherentElastic(
energy, P*EV_PER_MEV)
else:
table.elastic_xs[temperatures[0]] = Tabulated1D(energy, P)

View file

@ -5,6 +5,7 @@ import numpy as np
import openmc.checkvalue as cv
from openmc.mixin import EqualityMixin
from .data import EV_PER_MEV
class ProbabilityTables(EqualityMixin):
@ -13,7 +14,7 @@ class ProbabilityTables(EqualityMixin):
Parameters
----------
energy : Iterable of float
Energies in MeV at which probability tables exist
Energies in eV at which probability tables exist
table : numpy.ndarray
Probability tables for each energy. This array is of shape (N, 6, M)
where N is the number of energies and M is the number of bands. The
@ -40,7 +41,7 @@ class ProbabilityTables(EqualityMixin):
Attributes
----------
energy : Iterable of float
Energies in MeV at which probability tables exist
Energies in eV at which probability tables exist
table : numpy.ndarray
Probability tables for each energy. This array is of shape (N, 6, M)
where N is the number of energies and M is the number of bands. The
@ -200,12 +201,15 @@ class ProbabilityTables(EqualityMixin):
idx += 6
# Get energies at which tables exist
energy = ace.xss[idx : idx+N]
energy = ace.xss[idx : idx+N]*EV_PER_MEV
idx += N
# Get probability tables
table = ace.xss[idx : idx+N*6*M]
table = ace.xss[idx : idx+N*6*M].copy()
table.shape = (N, 6, M)
# Convert units on heating numbers
table[:,5,:] *= EV_PER_MEV
return cls(energy, table, interpolation, inelastic_flag,
absorption_flag, multiply_smooth)

View file

@ -1,17 +1,21 @@
from collections import OrderedDict
import re
import sys
import os
from six import string_types
from xml.etree import ElementTree as ET
import openmc
from openmc.checkvalue import check_type, check_length
from openmc.data import NATURAL_ABUNDANCE
from openmc.data import NATURAL_ABUNDANCE, atomic_mass
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
abundances.
"""A natural element that auto-expands to add the isotopes of an element to
a material in their natural abundance. Internally, the OpenMC Python API
expands the natural element into isotopes only when the materials.xml file
is created.
Parameters
----------
@ -83,16 +87,37 @@ class Element(object):
@scattering.setter
def scattering(self, scattering):
if not scattering in ['data', 'iso-in-lab']:
msg = 'Unable to set scattering for Element to {0} ' \
'which is not "data" or "iso-in-lab"'.format(scattering)
if not scattering in ['data', 'iso-in-lab', None]:
msg = 'Unable to set scattering for Element to {0} which ' \
'is not "data", "iso-in-lab", or None'.format(scattering)
raise ValueError(msg)
self._scattering = scattering
def expand(self):
def expand(self, percent, percent_type, enrichment=None,
cross_sections=None):
"""Expand natural element into its naturally-occurring isotopes.
An optional cross_sections argument or the OPENMC_CROSS_SECTIONS
environment variable is used to specify a cross_sections.xml file.
If the cross_sections.xml file is found, the element is expanded only
into the isotopes/nuclides present in cross_sections.xml. If no
cross_sections.xml file is found, the element is expanded based on its
naturally occurring isotopes.
Parameters
----------
percent : float
Atom or weight percent
percent_type : {'ao', 'wo'}
'ao' for atom percent and 'wo' for weight percent
enrichment : float, optional
Enrichment for U235 in weight percent. For example, input 4.95 for
4.95 weight percent enriched U. Default is None
(natural composition).
cross_sections : str, optional
Location of cross_sections.xml file. Default is None.
Returns
-------
isotopes : list
@ -102,9 +127,133 @@ class Element(object):
"""
# Get the nuclides present in nature
natural_nuclides = set()
for nuclide in sorted(NATURAL_ABUNDANCE.keys()):
if re.match(r'{}\d+'.format(self.name), nuclide):
natural_nuclides.add(nuclide)
# Create dict to store the expanded nuclides and abundances
abundances = OrderedDict()
# If cross_sections is None, get the cross sections from the
# OPENMC_CROSS_SECTIONS environment variable
if cross_sections is None:
cross_sections = os.environ.get('OPENMC_CROSS_SECTIONS')
# If a cross_sections library is present, check natural nuclides
# against the nuclides in the library
if cross_sections is not None:
library_nuclides = set()
tree = ET.parse(cross_sections)
root = tree.getroot()
for child in root:
nuclide = child.attrib['materials']
if re.match(r'{}\d+'.format(self.name), nuclide) and \
'_m' not in nuclide:
library_nuclides.add(nuclide)
# Get a set of the mutual and absent nuclides. Convert to lists
# and sort to avoid different ordering between Python 2 and 3.
mutual_nuclides = natural_nuclides.intersection(library_nuclides)
absent_nuclides = natural_nuclides.difference(mutual_nuclides)
mutual_nuclides = sorted(list(mutual_nuclides))
absent_nuclides = sorted(list(absent_nuclides))
# If all natural nuclides are present in the library, expand element
# using all natural nuclides
if len(absent_nuclides) == 0:
for nuclide in mutual_nuclides:
abundances[nuclide] = NATURAL_ABUNDANCE[nuclide]
# If no natural elements are present in the library, check if the
# 0 nuclide is present. If so, set the abundance to 1 for this
# nuclide. Else, raise an error.
elif len(mutual_nuclides) == 0:
nuclide_0 = self.name + '0'
if nuclide_0 in library_nuclides:
abundances[nuclide_0] = 1.0
else:
msg = 'Unable to expand element {0} because the cross '\
'section library provided does not contain any of '\
'the natural isotopes for that element.'\
.format(self.name)
raise ValueError(msg)
# If some, but not all, natural nuclides are in the library, add
# the mutual nuclides. For the absent nuclides, add them based on
# our knowledge of the common cross section libraries
# (ENDF, JEFF, and JENDL)
else:
# Add the mutual isotopes
for nuclide in mutual_nuclides:
abundances[nuclide] = NATURAL_ABUNDANCE[nuclide]
# Adjust the abundances for the absent nuclides
for nuclide in absent_nuclides:
if nuclide in ['O17', 'O18'] and 'O16' in mutual_nuclides:
abundances['O16'] += NATURAL_ABUNDANCE[nuclide]
elif nuclide == 'Ta180' and 'Ta181' in mutual_nuclides:
abundances['Ta181'] += NATURAL_ABUNDANCE[nuclide]
elif nuclide == 'W180' and 'W182' in mutual_nuclides:
abundances['W182'] += NATURAL_ABUNDANCE[nuclide]
else:
msg = 'Unsure how to partition natural abundance of ' \
'isotope {0} into other natural isotopes of ' \
'this element that are present in the cross ' \
'section library provided. Consider adding ' \
'the isotopes of this element individually.'
raise ValueError(msg)
# If a cross_section library is not present, expand the element into
# its natural nuclides
else:
for nuclide in natural_nuclides:
abundances[nuclide] = NATURAL_ABUNDNACE[nuclide]
# Modify mole fractions if enrichment provided
if enrichment is not None:
# Calculate the mass fractions of isotopes
abundances['U234'] = 0.008 * enrichment
abundances['U235'] = enrichment
abundances['U238'] = 100.0 - 1.008 * enrichment
# Convert the mass fractions to mole fractions
for nuclide in abundances.keys():
abundances[nuclide] /= atomic_mass(nuclide)
# Normalize the mole fractions to one
sum_abundances = sum(abundances.values())
for nuclide in abundances.keys():
abundances[nuclide] /= sum_abundances
# Compute the ratio of the nuclide atomic masses to the element
# atomic mass
if percent_type == 'wo':
# Compute the element atomic mass
element_am = 0.
for nuclide in abundances.keys():
element_am += atomic_mass(nuclide) * abundances[nuclide]
# Convert the molar fractions to mass fractions
for nuclide in abundances.keys():
abundances[nuclide] *= atomic_mass(nuclide) / element_am
# Normalize the mass fractions to one
sum_abundances = sum(abundances.values())
for nuclide in abundances.keys():
abundances[nuclide] /= sum_abundances
# Create a list of the isotopes in this element
isotopes = []
for isotope, abundance in sorted(NATURAL_ABUNDANCE.items()):
if re.match(r'{}\d+'.format(self.name), isotope):
nuc = openmc.Nuclide(isotope)
isotopes.append((nuc, abundance))
for nuclide, abundance in abundances.items():
nuc = openmc.Nuclide(nuclide)
nuc.scattering = self.scattering
isotopes.append((nuc, percent*abundance, percent_type))
return isotopes

View file

@ -818,10 +818,10 @@ class RealFilter(Filter):
return False
if self.bins[0] == other.bins[-1]:
# This low energy edge coincides with other's high edge
# This low edge coincides with other's high edge
return True
elif self.bins[-1] == other.bins[0]:
# This high energy edge coincides with other's low edge
# This high edge coincides with other's low edge
return True
else:
return False
@ -888,12 +888,12 @@ class EnergyFilter(RealFilter):
Parameters
----------
bins : Iterable of Real
A grid of energy values (in MeV).
A grid of energy values in eV.
Attributes
----------
bins : Iterable of Real
A grid of energy values (in MeV).
A grid of energy values in eV.
num_bins : Integral
The number of filter bins
stride : Integral
@ -978,8 +978,8 @@ class EnergyFilter(RealFilter):
hi_bins = np.tile(hi_bins, tile_factor)
# Add the new energy columns to the DataFrame.
df.loc[:, self.short_name.lower() + ' low [MeV]'] = lo_bins
df.loc[:, self.short_name.lower() + ' high [MeV]'] = hi_bins
df.loc[:, self.short_name.lower() + ' low [eV]'] = lo_bins
df.loc[:, self.short_name.lower() + ' high [eV]'] = hi_bins
return df
@ -990,12 +990,12 @@ class EnergyoutFilter(EnergyFilter):
Parameters
----------
bins : Iterable of Real
A grid of energy values (in MeV).
A grid of energy values in eV.
Attributes
----------
bins : Iterable of Real
A grid of energy values (in MeV).
A grid of energy values in eV.
num_bins : Integral
The number of filter bins
stride : Integral

View file

@ -57,9 +57,9 @@ class Material(object):
'atom/b-cm', 'atom/cm3', 'sum', or 'macro'. The 'macro' unit only
applies in the case of a multi-group calculation.
elements : list of tuple
List in which each item is a 3-tuple consisting of an
:class:`openmc.Element` instance, the percent density, and the percent
type ('ao' or 'wo').
List in which each item is a 4-tuple consisting of an
:class:`openmc.Element` instance, the percent density, the percent
type ('ao' or 'wo'), and enrichment.
nuclides : list of tuple
List in which each item is a 3-tuple consisting of an
:class:`openmc.Nuclide` instance, the percent density, and the percent
@ -82,7 +82,7 @@ class Material(object):
# (only one is allowed, hence this is different than _nuclides, etc)
self._macroscopic = None
# A list of tuples (element, percent, percent type)
# A list of tuples (element, percent, percent type, enrichment)
self._elements = []
# If specified, a list of table names
@ -148,9 +148,13 @@ class Material(object):
string += '{0: <16}\n'.format('\tElements')
for element, percent, percent_type in self._elements:
for element, percent, percent_type, enr in self._elements:
string += '{0: <16}'.format('\t{0.name}'.format(element))
string += '=\t{0: <12} [{1}]\n'.format(percent, percent_type)
if enr is None:
string += '=\t{0: <12} [{1}]\n'.format(percent, percent_type)
else:
string += '=\t{0: <12} [{1}] @ {2} w/o enrichment\n'\
.format(percent, percent_type, enr)
return string
@ -401,7 +405,7 @@ class Material(object):
if macroscopic.name == self._macroscopic.name:
self._macroscopic = None
def add_element(self, element, percent, percent_type='ao', expand=False):
def add_element(self, element, percent, percent_type='ao', enrichment=None):
"""Add a natural element to the material
Parameters
@ -413,9 +417,10 @@ class Material(object):
percent_type : {'ao', 'wo'}, optional
'ao' for atom percent and 'wo' for weight percent. Defaults to atom
percent.
expand : bool, optional
Whether to expand the natural element into its naturally-occurring
isotopes. Defaults to False.
enrichment : float, optional
Enrichment for U235 in weight percent. For example, input 4.95 for
4.95 weight percent enriched U. Default is None
(natural composition).
"""
@ -445,14 +450,33 @@ class Material(object):
else:
element = openmc.Element(element)
if expand:
if percent_type == 'wo':
raise NotImplementedError('Expanding natural element based on '
'weight percent is not yet supported.')
for isotope, abundance in element.expand():
self._nuclides.append((isotope, percent*abundance, percent_type))
else:
self._elements.append((element, percent, percent_type))
if enrichment is not None:
if not isinstance(enrichment, Real):
msg = 'Unable to add an Element to Material ID="{0}" with a ' \
'non-floating point enrichment value "{1}"'\
.format(self._id, enrichment)
raise ValueError(msg)
elif element.name != 'U':
msg = 'Unable to use enrichment for element {0} which is not ' \
'uranium for Material ID="{1}"'.format(element.name,
self._id)
raise ValueError(msg)
# Check that the enrichment is in the valid range
cv.check_less_than('enrichment', enrichment, 100./1.008)
cv.check_greater_than('enrichment', enrichment, 0., equality=True)
if enrichment > 5.0:
msg = 'A uranium enrichment of {0} was given for Material ID='\
'"{1}". OpenMC assumes the U234/U235 mass ratio is '\
'constant at 0.008, which is only valid at low ' \
'enrichments. Consider setting the isotopic ' \
'composition manually for enrichments over 5%.'.\
format(enrichment, self._id)
warnings.warn(msg)
self._elements.append((element, percent, percent_type, enrichment))
def remove_element(self, element):
"""Remove a natural element from the material
@ -469,10 +493,10 @@ class Material(object):
'since it is not an Element'.format(self.id, element)
raise ValueError(msg)
# If the Material contains the Nuclide, delete it
# If the Material contains the Element, delete it
for elm in self._elements:
if element == elm:
self._nuclides.remove(elm)
self._elements.remove(elm)
def add_s_alpha_beta(self, name):
r"""Add an :math:`S(\alpha,\beta)` table to the material
@ -502,7 +526,6 @@ class Material(object):
self._sab.append(new_name)
def make_isotropic_in_lab(self):
for nuclide, percent, percent_type in self._nuclides:
nuclide.scattering = 'iso-in-lab'
@ -521,13 +544,15 @@ class Material(object):
nuclides = []
for nuclide, density, density_type in self._nuclides:
for nuclide, percent, percent_type in self._nuclides:
nuclides.append(nuclide.name)
for element, density, density_type in self._elements:
for ele, ele_pct, ele_pct_type, enr in self._elements:
# Expand natural element into isotopes
for isotope, abundance in element.expand():
nuclides.append(isotope.name)
isotopes = ele.expand(ele_pct, ele_pct_type, enr)
for iso, iso_pct, iso_pct_type in isotopes:
nuclides.append(iso.name)
return nuclides
@ -537,8 +562,8 @@ class Material(object):
Returns
-------
nuclides : dict
Dictionary whose keys are nuclide names and values are 2-tuples of
(nuclide, density)
Dictionary whose keys are nuclide names and values are 3-tuples of
(nuclide, density percent, density percent type)
"""
@ -547,10 +572,12 @@ class Material(object):
for nuclide, density, density_type in self._nuclides:
nuclides[nuclide.name] = (nuclide, density)
for element, density, density_type in self._elements:
for ele, ele_pct, ele_pct_type, enr in self._elements:
# Expand natural element into isotopes
for isotope, abundance in element.expand():
nuclides[isotope.name] = (isotope, density*abundance)
isotopes = ele.expand(ele_pct, ele_pct_type, enr)
for iso, iso_pct, iso_pct_type in isotopes:
nuclides[iso.name] = (iso, iso_pct, iso_pct_type)
return nuclides
@ -575,22 +602,20 @@ class Material(object):
return xml_element
def _get_element_xml(self, element, distrib=False):
xml_element = ET.Element("element")
xml_element.set("name", str(element[0].name))
def _get_element_xml(self, element, cross_sections, distrib=False):
if not distrib:
if element[2] == 'ao':
xml_element.set("ao", str(element[1]))
else:
xml_element.set("wo", str(element[1]))
# Get the nuclides in this element
nuclides = element[0].expand(element[1], element[2], element[3],
cross_sections)
if not element[0].scattering is None:
xml_element.set("scattering", element[0].scattering)
xml_elements = []
for nuclide in nuclides:
xml_elements.append(self._get_nuclide_xml(nuclide, distrib))
return xml_element
return xml_elements
def _get_nuclides_xml(self, nuclides, distrib=False):
xml_elements = []
for nuclide in nuclides:
@ -598,15 +623,19 @@ class Material(object):
return xml_elements
def _get_elements_xml(self, elements, distrib=False):
def _get_elements_xml(self, elements, cross_sections, distrib=False):
xml_elements = []
for element in elements:
xml_elements.append(self._get_element_xml(element, distrib))
nuclide_elements = self._get_element_xml(element, cross_sections,
distrib)
for nuclide_element in nuclide_elements:
xml_elements.append(nuclide_element)
return xml_elements
def get_material_xml(self):
def get_material_xml(self, cross_sections):
"""Return XML representation of the material
Returns
@ -642,7 +671,8 @@ class Material(object):
element.append(subelement)
# Create element XML subelements
subelements = self._get_elements_xml(self._elements)
subelements = self._get_elements_xml(self._elements,
cross_sections)
for subelement in subelements:
element.append(subelement)
else:
@ -656,12 +686,12 @@ class Material(object):
comps = []
allnucs = self._nuclides + self._elements
dist_per_type = allnucs[0][2]
for nuc, per, typ in allnucs:
if not typ == dist_per_type:
for nuc in allnucs:
if nuc[2] != dist_per_type:
msg = 'All nuclides and elements in a distributed ' \
'material must have the same type, either ao or wo'
raise ValueError(msg)
comps.append(per)
comps.append(nuc[1])
if self._distrib_otf_file is None:
# Create values and units subelements
@ -676,12 +706,15 @@ class Material(object):
if self._macroscopic is None:
# Create nuclide XML subelements
subelements = self._get_nuclides_xml(self._nuclides, distrib=True)
subelements = self._get_nuclides_xml(self._nuclides,
distrib=True)
for subelement_nuc in subelements:
subelement.append(subelement_nuc)
# Create element XML subelements
subelements = self._get_elements_xml(self._elements, distrib=True)
subelements = self._get_elements_xml(self._elements,
cross_sections,
distrib=True)
for subsubelement in subelements:
subelement.append(subsubelement)
else:
@ -716,15 +749,49 @@ class Materials(cv.CheckedList):
----------
materials : Iterable of openmc.Material
Materials to add to the collection
cross_sections : str
Indicates the path to an XML cross section listing file (usually named
cross_sections.xml). If it is not set, the
:envvar:`OPENMC_CROSS_SECTIONS` environment variable will be used for
continuous-energy calculations and
:envvar:`OPENMC_MG_CROSS_SECTIONS` will be used for multi-group
calculations to find the path to the XML cross section file.
multipole_library : str
Indicates the path to a directory containing a windowed multipole
cross section library. If it is not set, the
:envvar:`OPENMC_MULTIPOLE_LIBRARY` environment variable will be used. A
multipole library is optional.
"""
def __init__(self, materials=None):
super(Materials, self).__init__(Material, 'materials collection')
self._materials_file = ET.Element("materials")
self._cross_sections = None
self._multipole_library = None
if materials is not None:
self += materials
@property
def cross_sections(self):
return self._cross_sections
@property
def multipole_library(self):
return self._multipole_library
@cross_sections.setter
def cross_sections(self, cross_sections):
cv.check_type('cross sections', cross_sections, string_types)
self._cross_sections = cross_sections
@multipole_library.setter
def multipole_library(self, multipole_library):
cv.check_type('cross sections', multipole_library, string_types)
self._multipole_library = multipole_library
def add_material(self, material):
"""Append material to collection
@ -807,9 +874,19 @@ class Materials(cv.CheckedList):
def _create_material_subelements(self):
for material in self:
xml_element = material.get_material_xml()
xml_element = material.get_material_xml(self.cross_sections)
self._materials_file.append(xml_element)
def _create_cross_sections_subelement(self):
if self._cross_sections is not None:
element = ET.SubElement(self._materials_file, "cross_sections")
element.text = str(self._cross_sections)
def _create_multipole_library_subelement(self):
if self._multipole_library is not None:
element = ET.SubElement(self._materials_file, "multipole_library")
element.text = str(self._multipole_library)
def export_to_xml(self, path='materials.xml'):
"""Export material collection to an XML file.
@ -824,6 +901,8 @@ class Materials(cv.CheckedList):
self._materials_file.clear()
self._create_material_subelements()
self._create_cross_sections_subelement()
self._create_multipole_library_subelement()
# Clean the indentation in the file to be user-readable
sort_xml_elements(self._materials_file)

View file

@ -14,12 +14,12 @@ class EnergyGroups(object):
Parameters
----------
group_edges : Iterable of Real
The energy group boundaries [MeV]
The energy group boundaries [eV]
Attributes
----------
group_edges : Iterable of Real
The energy group boundaries [MeV]
The energy group boundaries [eV]
num_groups : int
The number of energy groups
@ -83,7 +83,7 @@ class EnergyGroups(object):
Parameters
----------
energy : float
The energy of interest in MeV
The energy of interest in eV
Returns
-------
@ -98,7 +98,7 @@ class EnergyGroups(object):
"""
if self.group_edges is None:
msg = 'Unable to get energy group for energy "{0}" MeV since ' \
msg = 'Unable to get energy group for energy "{0}" eV since ' \
'the group edges have not yet been set'.format(energy)
raise ValueError(msg)
@ -117,7 +117,7 @@ class EnergyGroups(object):
Returns
-------
2-tuple
The low and high energy bounds for the group in MeV
The low and high energy bounds for the group in eV
Raises
------

View file

@ -599,7 +599,7 @@ class MDGXS(MGXS):
string += template.format('', delayed_group)
string += '\n'
template = '{0: <12}Group {1} [{2: <10} - {3: <10}MeV]:\t'
template = '{0: <12}Group {1} [{2: <10} - {3: <10}eV]:\t'
# Loop over energy groups ranges
for group in range(1, self.num_groups+1):
@ -784,36 +784,36 @@ class MDGXS(MGXS):
# Override energy groups bounds with indices
all_groups = np.arange(self.num_groups, 0, -1, dtype=np.int)
all_groups = np.repeat(all_groups, len(query_nuclides))
if 'energy low [MeV]' in df and 'energyout low [MeV]' in df:
df.rename(columns={'energy low [MeV]': 'group in'},
if 'energy low [eV]' in df and 'energyout low [eV]' in df:
df.rename(columns={'energy low [eV]': 'group in'},
inplace=True)
in_groups = np.tile(all_groups, int(self.num_subdomains *
self.num_delayed_groups))
in_groups = np.repeat(in_groups, int(df.shape[0] / in_groups.size))
df['group in'] = in_groups
del df['energy high [MeV]']
del df['energy high [eV]']
df.rename(columns={'energyout low [MeV]': 'group out'},
df.rename(columns={'energyout low [eV]': 'group out'},
inplace=True)
out_groups = np.repeat(all_groups, self.xs_tally.num_scores)
out_groups = np.tile(out_groups, int(df.shape[0] / out_groups.size))
df['group out'] = out_groups
del df['energyout high [MeV]']
del df['energyout high [eV]']
columns = ['group in', 'group out']
elif 'energyout low [MeV]' in df:
df.rename(columns={'energyout low [MeV]': 'group out'},
elif 'energyout low [eV]' in df:
df.rename(columns={'energyout low [eV]': 'group out'},
inplace=True)
in_groups = np.tile(all_groups, int(df.shape[0] / all_groups.size))
df['group out'] = in_groups
del df['energyout high [MeV]']
del df['energyout high [eV]']
columns = ['group out']
elif 'energy low [MeV]' in df:
df.rename(columns={'energy low [MeV]': 'group in'}, inplace=True)
elif 'energy low [eV]' in df:
df.rename(columns={'energy low [eV]': 'group in'}, inplace=True)
in_groups = np.tile(all_groups, int(df.shape[0] / all_groups.size))
df['group in'] = in_groups
del df['energy high [MeV]']
del df['energy high [eV]']
columns = ['group in']
# Select out those groups the user requested

View file

@ -1217,7 +1217,7 @@ class MGXS(object):
# Build header for cross section type
string += '{0: <16}\n'.format(xs_header)
template = '{0: <12}Group {1} [{2: <10} - {3: <10}MeV]:\t'
template = '{0: <12}Group {1} [{2: <10} - {3: <10}eV]:\t'
# Loop over energy groups ranges
for group in range(1, self.num_groups+1):
@ -1529,35 +1529,35 @@ class MGXS(object):
# Override energy groups bounds with indices
all_groups = np.arange(self.num_groups, 0, -1, dtype=np.int)
all_groups = np.repeat(all_groups, len(query_nuclides))
if 'energy low [MeV]' in df and 'energyout low [MeV]' in df:
df.rename(columns={'energy low [MeV]': 'group in'},
if 'energy low [eV]' in df and 'energyout low [eV]' in df:
df.rename(columns={'energy low [eV]': 'group in'},
inplace=True)
in_groups = np.tile(all_groups, int(self.num_subdomains))
in_groups = np.repeat(in_groups, int(df.shape[0] / in_groups.size))
df['group in'] = in_groups
del df['energy high [MeV]']
del df['energy high [eV]']
df.rename(columns={'energyout low [MeV]': 'group out'},
df.rename(columns={'energyout low [eV]': 'group out'},
inplace=True)
out_groups = np.repeat(all_groups, self.xs_tally.num_scores)
out_groups = np.tile(out_groups, int(df.shape[0] / out_groups.size))
df['group out'] = out_groups
del df['energyout high [MeV]']
del df['energyout high [eV]']
columns = ['group in', 'group out']
elif 'energyout low [MeV]' in df:
df.rename(columns={'energyout low [MeV]': 'group out'},
elif 'energyout low [eV]' in df:
df.rename(columns={'energyout low [eV]': 'group out'},
inplace=True)
in_groups = np.tile(all_groups, int(df.shape[0] / all_groups.size))
df['group out'] = in_groups
del df['energyout high [MeV]']
del df['energyout high [eV]']
columns = ['group out']
elif 'energy low [MeV]' in df:
df.rename(columns={'energy low [MeV]': 'group in'}, inplace=True)
elif 'energy low [eV]' in df:
df.rename(columns={'energy low [eV]': 'group in'}, inplace=True)
in_groups = np.tile(all_groups, int(df.shape[0] / all_groups.size))
df['group in'] = in_groups
del df['energy high [MeV]']
del df['energy high [eV]']
columns = ['group in']
# Select out those groups the user requested
@ -1981,7 +1981,7 @@ class MatrixMGXS(MGXS):
return
string += '{0: <16}\n'.format('\tEnergy Groups:')
template = '{0: <12}Group {1} [{2: <10} - {3: <10}MeV]\n'
template = '{0: <12}Group {1} [{2: <10} - {3: <10}eV]\n'
# Loop over energy groups ranges
for group in range(1, self.num_groups + 1):
@ -3936,7 +3936,7 @@ class ScatterMatrixXS(MatrixMGXS):
return
string += '{0: <16}\n'.format('\tEnergy Groups:')
template = '{0: <12}Group {1} [{2: <10} - {3: <10}MeV]\n'
template = '{0: <12}Group {1} [{2: <10} - {3: <10}eV]\n'
# Loop over energy groups ranges
for group in range(1, self.num_groups + 1):

View file

@ -87,9 +87,9 @@ class Nuclide(object):
@scattering.setter
def scattering(self, scattering):
if not scattering in ['data', 'iso-in-lab']:
msg = 'Unable to set scattering for Nuclide to {0} ' \
'which is not "data" or "iso-in-lab"'.format(scattering)
if not scattering in ['data', 'iso-in-lab', None]:
msg = 'Unable to set scattering for Nuclide to {0} which ' \
'is not "data", "iso-in-lab", or None'.format(scattering)
raise ValueError(msg)
self._scattering = scattering

View file

@ -24,7 +24,7 @@ class Particle(object):
weight : float
Weight of the particle
energy : float
Energy of the particle in MeV
Energy of the particle in eV
xyz : list of float
Position of the particle
uvw : list of float

View file

@ -93,7 +93,7 @@ class Settings(object):
should be a float indicating weight cutoff below which particle undergo
Russian roulette. Value for 'weight_avg' should be a float indicating
weight assigned to particles that are not killed after Russian
roulette. Value of energy should be a float indicating energy in MeV
roulette. Value of energy should be a float indicating energy in eV
below which particle will be killed.
entropy_dimension : tuple or list
Number of Shannon entropy mesh cells in the x, y, and z directions,
@ -603,12 +603,19 @@ class Settings(object):
@cross_sections.setter
def cross_sections(self, cross_sections):
warnings.warn('Settings.cross_sections has been deprecated and will be '
'removed in a future version. Materials.cross_sections '
'should defined instead.', DeprecationWarning)
cv.check_type('cross sections', cross_sections, string_types)
self._cross_sections = cross_sections
@multipole_library.setter
def multipole_library(self, multipole_library):
cv.check_type('cross sections', multipole_library, string_types)
warnings.warn('Settings.multipole_library has been deprecated and will '
'be removed in a future version. '
'Materials.multipole_library should defined instead.',
DeprecationWarning)
cv.check_type('multipole library', multipole_library, string_types)
self._multipole_library = multipole_library
@ptables.setter
@ -713,6 +720,7 @@ class Settings(object):
@temperature.setter
def temperature(self, temperature):
cv.check_type('temperature settings', temperature, Mapping)
for key, value in temperature.items():
cv.check_value('temperature key', key,

View file

@ -263,7 +263,7 @@ class Watt(Univariate):
"""
def __init__(self, a=0.988, b=2.249):
def __init__(self, a=0.988e6, b=2.249e-6):
super(Watt, self).__init__()
self.a = a
self.b = b

View file

@ -121,7 +121,7 @@ contains
end if
else
if(.not.allocated(cmfd % egrid)) allocate(cmfd % egrid(2))
cmfd % egrid = [ ZERO, 20.0_8 ]
cmfd % egrid = [ ZERO, energy_max_neutron ]
cmfd % indices(4) = 1 ! one energy group
end if

View file

@ -10,6 +10,10 @@ module constants
integer, parameter :: VERSION_MINOR = 8
integer, parameter :: VERSION_RELEASE = 0
! HDF5 data format
integer, parameter :: HDF5_VERSION_MAJOR = 1
integer, parameter :: HDF5_VERSION_MINOR = 0
! Revision numbers for binary files
integer, parameter :: REVISION_STATEPOINT = 15
integer, parameter :: REVISION_PARTICLE_RESTART = 1
@ -67,12 +71,12 @@ module constants
PI = 3.1415926535898_8, & ! pi
SQRT_PI = 1.7724538509055_8, & ! square root of pi
MASS_NEUTRON = 1.008664916_8, & ! mass of a neutron in amu
MASS_NEUTRON_MEV = 939.565379_8, & ! mass of a neutron in MeV/c^2
MASS_NEUTRON_EV = 939.565379e6_8, & ! mass of a neutron in eV/c^2
MASS_PROTON = 1.007276466812_8, & ! mass of a proton in amu
AMU = 1.660538921e-27_8, & ! 1 amu in kg
C_LIGHT = 2.99792458e8_8, & ! speed of light in m/s
N_AVOGADRO = 0.602214129_8, & ! Avogadro's number in 10^24/mol
K_BOLTZMANN = 8.6173324e-11_8, & ! Boltzmann constant in MeV/K
K_BOLTZMANN = 8.6173324e-5_8, & ! Boltzmann constant in eV/K
INFINITY = huge(0.0_8), & ! positive infinity
ZERO = 0.0_8, &
HALF = 0.5_8, &
@ -257,17 +261,6 @@ module constants
! Maximum number of partial fission reactions
integer, parameter :: PARTIAL_FISSION_MAX = 4
! Major cross section libraries
integer, parameter :: &
ENDF_BVII0 = 1, &
ENDF_BVII1 = 2, &
JEFF_311 = 3, &
JEFF_312 = 4, &
JEFF_32 = 5, &
JENDL_32 = 6, &
JENDL_33 = 7, &
JENDL_40 = 8
! Temperature treatment method
integer, parameter :: &
TEMPERATURE_NEAREST = 1, &

View file

@ -147,46 +147,17 @@ contains
integer :: i_low ! lower logarithmic mapping index
integer :: i_high ! upper logarithmic mapping index
real(8) :: f ! interp factor on nuclide energy grid
real(8) :: kT ! temperature in MeV
real(8) :: kT ! temperature in eV
real(8) :: sigT, sigA, sigF ! Intermediate multipole variables
associate (nuc => nuclides(i_nuclide))
! Check to see if there is multipole data present at this energy
use_mp = .false.
if (nuc % mp_present) then
if (E >= nuc % multipole % start_E/1.0e6_8 .and. &
E <= nuc % multipole % end_E/1.0e6_8) then
if (E >= nuc % multipole % start_E .and. &
E <= nuc % multipole % end_E) then
use_mp = .true.
else
! If using multipole data but outside the RRR, pick the nearest
! temperature. Note that there is no tolerance here, so this
! temperature could be very far off!
kT = sqrtkT**2
i_temp = minloc(abs(nuclides(i_nuclide) % kTs - kT), dim=1)
end if
else
kT = sqrtkT**2
select case (temperature_method)
case (TEMPERATURE_NEAREST)
! If using nearest temperature, do linear search on temperature
do i_temp = 1, size(nuc % kTs)
if (abs(nuc % kTs(i_temp) - kT) < K_BOLTZMANN * &
temperature_tolerance) exit
end do
case (TEMPERATURE_INTERPOLATION)
! Find temperatures that bound the actual temperature
do i_temp = 1, size(nuc % kTs) - 1
if (nuc % kTs(i_temp) <= kT .and. kT < nuc % kTs(i_temp + 1)) exit
end do
! Randomly sample between temperature i and i+1
f = (kT - nuc % kTs(i_temp)) / &
(nuc % kTs(i_temp + 1) - nuc % kTs(i_temp))
if (f > prn()) i_temp = i_temp + 1
end select
end if
! Evaluate multipole or interpolate
@ -213,22 +184,44 @@ contains
! 3. tally.F90 - score_general - For tallying on MTxxx reactions.
! 4. cross_section.F90 - calculate_urr_xs - For unresolved purposes.
! It is worth noting that none of these occur in the resolved
! resonance range, so the value here does not matter.
micro_xs(i_nuclide) % index_temp = i_temp
! resonance range, so the value here does not matter. index_temp is
! set to -1 to force a segfault in case a developer messes up and tries
! to use it with multipole.
micro_xs(i_nuclide) % index_temp = -1
micro_xs(i_nuclide) % index_grid = 0
micro_xs(i_nuclide) % interp_factor = ZERO
else
! Find the appropriate temperature index.
kT = sqrtkT**2
select case (temperature_method)
case (TEMPERATURE_NEAREST)
i_temp = minloc(abs(nuclides(i_nuclide) % kTs - kT), dim=1)
case (TEMPERATURE_INTERPOLATION)
! Find temperatures that bound the actual temperature
do i_temp = 1, size(nuc % kTs) - 1
if (nuc % kTs(i_temp) <= kT .and. kT < nuc % kTs(i_temp + 1)) exit
end do
! Randomly sample between temperature i and i+1
f = (kT - nuc % kTs(i_temp)) / &
(nuc % kTs(i_temp + 1) - nuc % kTs(i_temp))
if (f > prn()) i_temp = i_temp + 1
end select
associate (grid => nuc % grid(i_temp), xs => nuc % sum_xs(i_temp))
! Determine the energy grid index using a logarithmic mapping to reduce
! the energy range over which a binary search needs to be performed
! Determine the energy grid index using a logarithmic mapping to
! reduce the energy range over which a binary search needs to be
! performed
if (E < grid % energy(1)) then
i_grid = 1
elseif (E > grid % energy(size(grid % energy))) then
i_grid = size(grid % energy) - 1
else
! Determine bounding indices based on which equal log-spaced interval
! the energy is in
! Determine bounding indices based on which equal log-spaced
! interval the energy is in
i_low = grid % grid_index(i_log_union)
i_high = grid % grid_index(i_log_union + 1) + 1
@ -592,14 +585,13 @@ contains
! sections in the resolved resonance regions
!===============================================================================
subroutine multipole_eval(multipole, Emev, sqrtkT_, sigT, sigA, sigF)
subroutine multipole_eval(multipole, E, sqrtkT, sigT, sigA, sigF)
type(MultipoleArray), intent(in) :: multipole ! The windowed multipole
! object to process.
real(8), intent(in) :: Emev ! The energy at which to
real(8), intent(in) :: E ! The energy at which to
! evaluate the cross section
! in MeV
real(8), intent(in) :: sqrtkT_ ! The temperature in the form
! sqrt(kT (in MeV)), at which
real(8), intent(in) :: sqrtkT ! The temperature in the form
! sqrt(kT), at which
! to evaluate the XS.
real(8), intent(out) :: sigT ! Total cross section
real(8), intent(out) :: sigA ! Absorption cross section
@ -615,8 +607,6 @@ contains
real(8) :: invE ! 1/E, eV
real(8) :: dopp ! sqrt(atomic weight ratio / kT) = 1 / (2 sqrt(xi))
real(8) :: temp ! real temporary value
real(8) :: E ! energy, eV
real(8) :: sqrtkT ! sqrt(kT (in eV))
integer :: i_pole ! index of pole
integer :: i_poly ! index of curvefit
integer :: i_window ! index of window
@ -626,10 +616,6 @@ contains
! ==========================================================================
! Bookkeeping
! Convert to eV.
E = Emev * 1.0e6_8
sqrtkT = sqrtkT_ * 1.0e3_8
! Define some frequently used variables.
sqrtE = sqrt(E)
invE = ONE / E

View file

@ -41,7 +41,7 @@ contains
real(8) :: a, b ! values of x(k)-y and x(k+1)-y
real(8) :: sigma ! broadened cross section at one point
! Determine alpha parameter -- have to convert k to MeV/K
! Determine alpha parameter -- have to convert k to eV/K
alpha = A_target/(K_BOLTZMANN * T)
! Allocate memory for x and assign values

View file

@ -144,7 +144,7 @@ module geometry_header
integer :: distribcell_index ! Index corresponding to this cell in
! distribcell arrays
real(8), allocatable :: sqrtkT(:) ! Square root of k_Boltzmann *
! temperature in MeV. Multiple for
! temperature in eV. Multiple for
! distribcell
! Rotation matrix and translation vector

View file

@ -96,9 +96,6 @@ module global
! Unreoslved resonance probablity tables
logical :: urr_ptables_on = .true.
! What to assume for expanding natural elements
integer :: default_expand = ENDF_BVII1
! Default temperature and method for choosing temperatures
integer :: temperature_method = TEMPERATURE_NEAREST
logical :: temperature_multipole = .false.
@ -320,14 +317,14 @@ module global
logical :: restart_run = .false.
integer :: restart_batch
character(MAX_FILE_LEN) :: path_input ! Path to input file
character(MAX_FILE_LEN) :: path_cross_sections ! Path to cross_sections.xml
character(MAX_FILE_LEN) :: path_multipole ! Path to wmp library
character(MAX_FILE_LEN) :: path_source = '' ! Path to binary source
character(MAX_FILE_LEN) :: path_state_point ! Path to binary state point
character(MAX_FILE_LEN) :: path_source_point ! Path to binary source point
character(MAX_FILE_LEN) :: path_particle_restart ! Path to particle restart
character(MAX_FILE_LEN) :: path_output = '' ! Path to output directory
character(MAX_FILE_LEN) :: path_input ! Path to input file
character(MAX_FILE_LEN) :: path_cross_sections = '' ! Path to cross_sections.xml
character(MAX_FILE_LEN) :: path_multipole ! Path to wmp library
character(MAX_FILE_LEN) :: path_source = '' ! Path to binary source
character(MAX_FILE_LEN) :: path_state_point ! Path to binary state point
character(MAX_FILE_LEN) :: path_source_point ! Path to binary source point
character(MAX_FILE_LEN) :: path_particle_restart ! Path to particle restart
character(MAX_FILE_LEN) :: path_output = '' ! Path to output directory
! The verbosity controls how much information will be printed to the
! screen and in logs

File diff suppressed because it is too large Load diff

View file

@ -200,7 +200,7 @@ contains
end subroutine create_macro_xs
!===============================================================================
! GET_MAT_kTs returns a list of temperatures (in MeV) that each
! GET_MAT_kTs returns a list of temperatures (in eV) that each
! material appears at in the model.
!===============================================================================
@ -209,7 +209,7 @@ contains
integer :: i, j
integer :: i_material ! Index in materials array
real(8) :: kT ! temperature in MeV
real(8) :: kT ! temperature in eV
allocate(kTs(size(materials)))

View file

@ -53,7 +53,7 @@ module mgxs_header
type, abstract :: Mgxs
character(len=MAX_WORD_LEN) :: name ! name of dataset, e.g. UO2
real(8) :: awr ! Atomic Weight Ratio
real(8), allocatable :: kTs(:) ! temperature in MeV (k*T)
real(8), allocatable :: kTs(:) ! temperature in eV (k*T)
! Fission information
logical :: fissionable ! mgxs object is fissionable?
@ -242,7 +242,7 @@ module mgxs_header
do i = 1, size(dset_names)
! Read temperature value
call read_dataset(temps_available(i), kT_group, trim(dset_names(i)))
! Convert MeV to Kelvin
! Convert eV to Kelvin
temps_available(i) = temps_available(i) / K_BOLTZMANN
end do
call sort(temps_available)
@ -1239,7 +1239,7 @@ module mgxs_header
subroutine mgxsiso_combine(this, temps, mat, nuclides, groups, max_order, &
tolerance, method)
class(MgxsIso), intent(inout) :: this ! The Mgxs to initialize
type(VectorReal), intent(in) :: temps ! Temperatures to obtain [MeV]
type(VectorReal), intent(in) :: temps ! Temperatures to obtain [eV]
type(Material), pointer, intent(in) :: mat ! base material
type(MgxsContainer), intent(in) :: nuclides(:) ! List of nuclides to harvest from
integer, intent(in) :: groups ! Number of E groups
@ -2079,12 +2079,12 @@ module mgxs_header
!===============================================================================
! MGXS_FIND_TEMPERATURE sets the temperature index for the given
! sqrt(temperature), (with temperature in units of MeV)
! sqrt(temperature), (with temperature in units of eV)
!===============================================================================
subroutine mgxs_find_temperature(this, sqrtkT)
class(Mgxs), intent(inout) :: this
real(8), intent(in) :: sqrtkT ! Temperature (in units of of MeV)
real(8), intent(in) :: sqrtkT ! Temperature (in units of eV)
this % index_temp = minloc(abs(this % kTs - (sqrtkT * sqrtkT)), dim=1)

View file

@ -53,7 +53,7 @@ module nuclide_header
integer :: A ! mass number
integer :: metastable ! metastable state
real(8) :: awr ! Atomic Weight Ratio
real(8), allocatable :: kTs(:) ! temperature in MeV (k*T)
real(8), allocatable :: kTs(:) ! temperature in eV (k*T)
! Fission information
logical :: fissionable = .false. ! nuclide is fissionable?
@ -115,8 +115,8 @@ module nuclide_header
type Nuclide0K
character(10) :: nuclide ! name of nuclide, e.g. U238
character(16) :: scheme = 'ares' ! target velocity sampling scheme
real(8) :: E_min = 0.01e-6_8 ! lower cutoff energy for res scattering
real(8) :: E_max = 1000.0e-6_8 ! upper cutoff energy for res scattering
real(8) :: E_min = 0.01_8 ! lower cutoff energy for res scattering
real(8) :: E_max = 1000.0_8 ! upper cutoff energy for res scattering
end type Nuclide0K
!===============================================================================
@ -146,7 +146,7 @@ module nuclide_header
! Information for Doppler broadening
real(8) :: last_sqrtkT = ZERO ! Last temperature in sqrt(Boltzmann
! constant * temperature (MeV))
! constant * temperature (eV))
end type NuclideMicroXS
!===============================================================================

View file

@ -87,7 +87,7 @@ module particle_header
integer :: last_material ! index for last material
! Temperature of the current cell
real(8) :: sqrtkT ! sqrt(k_Boltzmann * temperature) in MeV
real(8) :: sqrtkT ! sqrt(k_Boltzmann * temperature) in eV
real(8) :: last_sqrtKT ! last temperature
! Statistical data

View file

@ -47,7 +47,7 @@ contains
if (verbosity >= 10 .or. trace) then
call write_message(" " // trim(reaction_name(p % event_MT)) &
&// " with " // trim(adjustl(nuclides(p % event_nuclide) % name)) &
&// ". Energy = " // trim(to_str(p % E * 1e6_8)) // " eV.")
&// ". Energy = " // trim(to_str(p % E)) // " eV.")
end if
! check for very low energy
@ -97,10 +97,10 @@ contains
if (nuc % fissionable) then
if (run_mode == MODE_EIGENVALUE) then
call sample_fission(i_nuclide, i_reaction)
call sample_fission(i_nuclide, p % E, i_reaction)
call create_fission_sites(p, i_nuclide, i_reaction, fission_bank, n_bank)
elseif (run_mode == MODE_FIXEDSOURCE .and. create_fission_neutrons) then
call sample_fission(i_nuclide, i_reaction)
call sample_fission(i_nuclide, p % E, i_reaction)
call create_fission_sites(p, i_nuclide, i_reaction, &
p % secondary_bank, p % n_secondary)
end if
@ -202,8 +202,9 @@ contains
! SAMPLE_FISSION
!===============================================================================
subroutine sample_fission(i_nuclide, i_reaction)
subroutine sample_fission(i_nuclide, E, i_reaction)
integer, intent(in) :: i_nuclide ! index in nuclides array
real(8), intent(in) :: E ! incident neutron energy
integer, intent(out) :: i_reaction ! index in nuc % reactions array
integer :: i
@ -220,13 +221,22 @@ contains
! If we're in the URR, by default use the first fission reaction. We also
! default to the first reaction if we know that there are no partial fission
! reactions
if (micro_xs(i_nuclide) % use_ptable .or. &
.not. nuc % has_partial_fission) then
i_reaction = nuc % index_fission(1)
return
end if
! Check to see if we are in a windowed multipole range. WMP only supports
! the first fission reaction.
if (nuc % mp_present) then
if (E >= nuc % multipole % start_E .and. &
E <= nuc % multipole % end_E) then
i_reaction = nuc % index_fission(1)
return
end if
end if
! Get grid index and interpolatoin factor and sample fission cdf
i_temp = micro_xs(i_nuclide) % index_temp
i_grid = micro_xs(i_nuclide) % index_grid
@ -312,7 +322,7 @@ contains
real(8) :: uvw_new(3) ! outgoing uvw for iso-in-lab scattering
real(8) :: uvw_old(3) ! incoming uvw for iso-in-lab scattering
real(8) :: phi ! azimuthal angle for iso-in-lab scattering
real(8) :: kT ! temperature in MeV
real(8) :: kT ! temperature in eV
type(Nuclide), pointer :: nuc
! copy incoming direction
@ -426,7 +436,7 @@ contains
subroutine elastic_scatter(i_nuclide, rxn, kT, E, uvw, mu_lab, wgt)
integer, intent(in) :: i_nuclide
type(Reaction), intent(in) :: rxn
real(8), intent(in) :: kT ! temperature in MeV
real(8), intent(in) :: kT ! temperature in eV
real(8), intent(inout) :: E
real(8), intent(inout) :: uvw(3)
real(8), intent(out) :: mu_lab
@ -775,7 +785,7 @@ contains
real(8), intent(in) :: v_neut(3) ! neutron velocity
real(8), intent(inout) :: wgt ! particle weight
real(8), intent(in) :: xs_eff ! effective elastic xs at temperature T
real(8), intent(in) :: kT ! equilibrium temperature of target in MeV
real(8), intent(in) :: kT ! equilibrium temperature of target in eV
real(8) :: awr ! target/neutron mass ratio
real(8) :: E_rel ! trial relative energy
@ -1016,7 +1026,7 @@ contains
real(8), intent(out) :: v_target(3)
real(8), intent(in) :: E
real(8), intent(in) :: uvw(3)
real(8), intent(in) :: kT ! equilibrium temperature of target in MeV
real(8), intent(in) :: kT ! equilibrium temperature of target in eV
real(8) :: awr ! target/neutron mass ratio
real(8) :: alpha ! probability of sampling f2 over f1

View file

@ -42,4 +42,8 @@ element materials {
(element name { xsd:string } | attribute name { xsd:string })
}*
}+
element cross_sections { xsd:string { maxLength = "255" } }? &
element multipole_library { xsd:string { maxLength = "255" } }? &
}

View file

@ -25,10 +25,6 @@ element settings {
}
) &
element cross_sections { xsd:string { maxLength = "255" } }? &
element multipole_library { xsd:string { maxLength = "255" } }? &
element cutoff {
(element weight { xsd:double } | attribute weight { xsd:double })? &
(element weight_avg { xsd:double } | attribute weight_avg { xsd:double })?

View file

@ -68,7 +68,7 @@ module sab_header
type SAlphaBeta
character(150) :: name ! name of table, e.g. lwtr.10t
real(8) :: awr ! weight of nucleus in neutron masses
real(8), allocatable :: kTs(:) ! temperatures in MeV (k*T)
real(8), allocatable :: kTs(:) ! temperatures in eV (k*T)
character(10), allocatable :: nuclides(:) ! List of valid nuclides
integer :: secondary_mode ! secondary mode (equal/skewed/continuous)

View file

@ -186,12 +186,12 @@ contains
! Score the flux weighted inverse velocity with velocity in units of
! cm/s
score = score / material_xs % total &
/ (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0_8) * flux
/ (sqrt(TWO * E / MASS_NEUTRON_EV) * C_LIGHT * 100.0_8) * flux
else
! For inverse velocity, we don't need a cross section. The velocity is
! in units of cm/s.
score = flux / (sqrt(TWO * E / (MASS_NEUTRON_MEV)) * C_LIGHT * 100.0_8)
score = flux / (sqrt(TWO * E / MASS_NEUTRON_EV) * C_LIGHT * 100.0_8)
end if
@ -897,6 +897,8 @@ contains
end if
case (SCORE_FISS_Q_PROMPT)
score = ZERO
if (t % estimator == ESTIMATOR_ANALOG) then
if (survival_biasing) then
! No fission events occur if survival biasing is on -- need to
@ -938,11 +940,8 @@ contains
if (allocated(nuclides(i_nuclide) % fission_q_prompt)) then
score = micro_xs(i_nuclide) % fission * atom_density * flux &
* nuclides(i_nuclide) % fission_q_prompt % evaluate(E)
else
score = ZERO
end if
else
score = ZERO
do l = 1, materials(p % material) % n_nuclides
atom_density_ = materials(p % material) % atom_density(l)
i_nuc = materials(p % material) % nuclide(l)
@ -956,6 +955,8 @@ contains
end if
case (SCORE_FISS_Q_RECOV)
score = ZERO
if (t % estimator == ESTIMATOR_ANALOG) then
if (survival_biasing) then
! No fission events occur if survival biasing is on -- need to
@ -997,11 +998,8 @@ contains
if (allocated(nuclides(i_nuclide) % fission_q_recov)) then
score = micro_xs(i_nuclide) % fission * atom_density * flux &
* nuclides(i_nuclide) % fission_q_recov % evaluate(E)
else
score = ZERO
end if
else
score = ZERO
do l = 1, materials(p % material) % n_nuclides
atom_density_ = materials(p % material) % atom_density(l)
i_nuc = materials(p % material) % nuclide(l)
@ -1607,7 +1605,6 @@ contains
t % results(score_index, filter_index) % value = &
t % results(score_index, filter_index) % value + score
end select
end subroutine expand_and_score

Binary file not shown.

View file

@ -524,31 +524,22 @@ class PinCellInputSet(object):
# Instantiate ZCylinder surfaces
fuel_or = openmc.ZCylinder(x0=0, y0=0, R=0.39218, name='Fuel OR')
clad_or = openmc.ZCylinder(x0=0, y0=0, R=0.45720, name='Clad OR')
left = openmc.XPlane(x0=-0.63, name='left')
right = openmc.XPlane(x0=0.63, name='right')
bottom = openmc.YPlane(y0=-0.63, name='bottom')
top = openmc.YPlane(y0=0.63, name='top')
left.boundary_type = 'reflective'
right.boundary_type = 'reflective'
top.boundary_type = 'reflective'
bottom.boundary_type = 'reflective'
left = openmc.XPlane(x0=-0.63, name='left', boundary_type='reflective')
right = openmc.XPlane(x0=0.63, name='right', boundary_type='reflective')
bottom = openmc.YPlane(y0=-0.63, name='bottom',
boundary_type='reflective')
top = openmc.YPlane(y0=0.63, name='top', boundary_type='reflective')
# Instantiate Cells
fuel_pin = openmc.Cell(name='cell 1')
cladding = openmc.Cell(name='cell 3')
water = openmc.Cell(name='cell 2')
fuel_pin = openmc.Cell(name='cell 1', fill=fuel)
cladding = openmc.Cell(name='cell 3', fill=clad)
water = openmc.Cell(name='cell 2', fill=hot_water)
# Use surface half-spaces to define regions
fuel_pin.region = -fuel_or
cladding.region = +fuel_or & -clad_or
water.region = +clad_or & +left & -right & +bottom & -top
# Register Materials with Cells
fuel_pin.fill = fuel
cladding.fill = clad
water.fill = hot_water
# Instantiate Universe
root = openmc.Universe(universe_id=0, name='root universe')
@ -757,6 +748,7 @@ class MGInputSet(InputSet):
# Define the materials file
self.xs_data = xs
self.materials += mats
self.materials.cross_sections = "../1d_mgxs.h5"
# Define surfaces.
# Assembly/Problem Boundary
@ -793,7 +785,6 @@ class MGInputSet(InputSet):
self.settings.source = Source(space=Box([0.0, 0.0, 0.0],
[10.0, 10.0, 5.]))
self.settings.energy_mode = "multi-group"
self.settings.cross_sections = "../1d_mgxs.h5"
def build_defualt_plots(self):
plot = openmc.Plot()

View file

@ -1 +1 @@
a2848fdb0a12c99ce31f4ddee766e0cf33bd5c6feca927bcb4bceca6fbb094bb1309fb8548589a99fcb09a830911457b9175b460aa45773822f8112a34b3b5c1
e18c2318bab6c42a263e5079fd796b1bee609e4274884fbc7bfd8b33e59aeb5e5a167da8e093f339f766815e007bd606c002939e3f730af523cbc9cf75c53faa

View file

@ -86,8 +86,8 @@ class AsymmetricLatticeTestHarness(PyAPITestHarness):
# Create a string of all mean, std. dev. values for both tallies
outstr = ''
outstr += ', '.join(map(str, tally.mean.flatten())) + '\n'
outstr += ', '.join(map(str, tally.std_dev.flatten())) + '\n'
outstr += '\n'.join(map('{:.8e}'.format, tally.mean.flatten())) + '\n'
outstr += '\n'.join(map('{:.8e}'.format, tally.std_dev.flatten())) + '\n'
# Extract fuel assembly lattices from the summary
core = sp.summary.get_cell_by_id(1)

View file

@ -11,11 +11,11 @@
</material>
<material id="3">
<density value="2.0" units="g/cc" />
<element name="Zr" ao="1.0" />
<nuclide name="Zr90" ao="1.0" />
</material>
<material id="4">
<density value="0.1" units="g/cc" />
<element name="N" ao="1.0" />
<nuclide name="N14" ao="1.0" />
</material>
</materials>

View file

@ -1,11 +1,11 @@
k-combined:
2.531110E-01 3.041974E-03
2.511523E-01 2.296777E-03
tally 1:
2.594626E+00
1.346701E+00
2.683653E+00
1.440725E+00
9.933862E-01
1.977011E-01
1.112289E-01
2.476655E-03
2.578905E+00
1.331155E+00
2.688693E+00
1.447930E+00
9.863774E-01
1.948549E-01
1.123802E-01
2.527538E-03

View file

@ -1 +1 @@
c3581501d1486293c255390251d20584431a198fbb7c07dc2879dc95dc96e26786d3913ce0db8007f542468fd137ff3267824844c03b4687fdad81ea568c92d7
2feaef10cd32d90d89bf3f1c10cddcb7b1c2daaf739dfe13427c3453168cef0d9f57d272bab24d4493bdcae6f97e2afdf636f5b966a7a93d1d16edb6728cc2eb

View file

@ -0,0 +1,43 @@
#!/usr/bin/env python
import os
import sys
import numpy as np
sys.path.insert(0, os.pardir)
sys.path.insert(0, os.path.join(os.pardir, os.pardir))
from openmc import Material
from openmc.data import NATURAL_ABUNDANCE, atomic_mass
if __name__ == '__main__':
# This test doesn't require an OpenMC run. We just need to make sure the
# element.expand() method expands elements with the proper nuclide
# compositions.
h_am = (NATURAL_ABUNDANCE['H1'] * atomic_mass('H1') +
NATURAL_ABUNDANCE['H2'] * atomic_mass('H2'))
o_am = (NATURAL_ABUNDANCE['O17'] * atomic_mass('O17') +
(NATURAL_ABUNDANCE['O16'] + NATURAL_ABUNDANCE['O18'])
* atomic_mass('O16'))
water_am = 2 * h_am + o_am
water = Material()
water.add_element('O', o_am / water_am, 'wo')
water.add_element('H', 2 * h_am / water_am, 'wo')
densities = water.get_nuclide_densities()
for nuc in densities.keys():
assert nuc in ('H1', 'H2', 'O16', 'O17')
if nuc in ('H1', 'H2'):
val = 2 * NATURAL_ABUNDANCE[nuc] * atomic_mass(nuc) / water_am
assert np.isclose(densities[nuc][1], val, rtol=1.e-8)
if nuc == 'O16':
val = (NATURAL_ABUNDANCE[nuc] + NATURAL_ABUNDANCE['O18']) \
* atomic_mass(nuc) / water_am
assert np.isclose(densities[nuc][1], val, rtol=1.e-8)
if nuc == 'O17':
val = NATURAL_ABUNDANCE[nuc] * atomic_mass(nuc) / water_am
assert np.isclose(densities[nuc][1], val, rtol=1.e-8)

View file

@ -1 +1 @@
4dc6a7b131f6757ecc9b06e93d425712f0813c546ed9eaa0aafa4990383b2f3a5b742a5a39ef5f27300d2c861b344e78de2d2c569b9439e7893dc06b03bf3b02
3c242912caf520c09de59edc2911d886fe77041577c1ab6a57985527f5b9e34d79d74c1fefff13d83462909d37d2318626cc14dcc717ce42f32420a799bd5c58

View file

@ -10,7 +10,7 @@ import openmc
class EnergyCutoffTestHarness(PyAPITestHarness):
def _build_inputs(self):
# Set energy cutoff
energy_cutoff = 4e-6
energy_cutoff = 4.0
# Material is composed of H-1
mat = openmc.Material(material_id=1, name='mat')

View file

@ -0,0 +1,33 @@
#!/usr/bin/env python
import os
import sys
import numpy as np
sys.path.insert(0, os.pardir)
sys.path.insert(0, os.path.join(os.pardir, os.pardir))
from openmc import Material
from openmc.data import NATURAL_ABUNDANCE, atomic_mass
if __name__ == '__main__':
# This test doesn't require an OpenMC run. We just need to make sure the
# element.expand() method expands Uranium to the proper enrichment.
uranium = Material()
uranium.add_element('U', 1.0, 'wo', 4.95)
densities = uranium.get_nuclide_densities()
sum_densities = 0.
for nuc in densities.keys():
assert nuc in ('U234', 'U235', 'U238')
sum_densities += densities[nuc][1]
# Compute the weight percent U235
enrichment = densities['U235'][1] / sum_densities
assert np.isclose(enrichment, 0.0495, rtol=1.e-8)
# Compute the ratio of U234/U235
u234_to_u235 = densities['U234'][1] / densities['U235'][1]
assert np.isclose(u234_to_u235, 0.008, rtol=1.e-8)

View file

@ -1 +1 @@
115218221500e60ea43145875324a9a6800366fcc97357ef4cd8182f9253e114cbe1c7481dd3bdd8d7dce5983e2cb757ae0a2e05ede236d94cba7909703ba7f7
12abd69924751d1cf2a296ce799bfb2a6a4e744ffc49eef5a5cee8b764254caa3783c406cff71238c5608b454f451953479fb4caad45460a013225ab8de2271e

View file

@ -1 +1 @@
139d760cd83eab001ed3fd52d7146fb5f30b7021b26ada6a1e425f5446185ac6fa61ac2ac58aa9e895981e10540160b7ae7428c833024679ef1ca762715e2d51
1f82e622b36562a0a14536fe24c95ee9c901c428f7f082f245afae5c699ccd647aaf31a49790822ceb7ec136bdb75f8e25c3677642f73702ca2e30b058f6b440

View file

@ -1 +1 @@
6d03b988671fe21dfe2a908685536edb3059e5bdda7974ddfa65c7f63cecb7f6b3fce49bc1533ef2787e284121779653cb14a66cfd709258e4b07d8bd7571843
ec7f0697d22668dcc4cdaf134c58b9f84137730d52cb44264ee9205369abcf995b2f66847d620715cd609bd2f5f865294374978f8fb89f182962e40801171cba

View file

@ -1 +1 @@
8c496e13f9456bedcc0789ffdca81913596cca3c7867717ced38c3063b6cdc8949bd204c98723b72c1b456e3fc85fc90e6710482b0c74e5e29283902a5d9ed50
8f9b2d1ba196fc0ad2e70647fb8691c5fc06b64b78f17414149a7fadfe63dd7e431830f73cb239e9c84f01e88896bf3f3d3cad1f57645bd63936dcc7db67e8a9

View file

@ -21,8 +21,8 @@ class MGTalliesTestHarness(HashedPyAPITestHarness):
mesh.upper_right = [10, 10, 5]
# Instantiate some tally filters
energy_filter = openmc.EnergyFilter([0.0, 20.0])
energyout_filter = openmc.EnergyoutFilter([0.0, 20.0])
energy_filter = openmc.EnergyFilter([0.0, 20.0e6])
energyout_filter = openmc.EnergyoutFilter([0.0, 20.0e6])
mesh_filter = openmc.MeshFilter(mesh)
mat_ids = [mat.id for mat in self._input_set.materials]

View file

@ -1 +1 @@
5c35e26926a43abf3ddcf782b09d96ce82d447a7db9ee9994c0aa811e431f8c06c11ce022c2a6ccf8d5f79f1cdedee2e8c20ca6d1e7cc5129ebcfae9568b2f87
74f306b40647c6d7125af404234bbd6883ae88a446b00f828fcda9adc8bca5167b544b23d083c802e2c0630f7fcec9052e31bced490cc94b3e3193512359cb96

View file

@ -20,8 +20,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize MGXS Library for a few cross section types
self.mgxs_lib = openmc.mgxs.Library(self._input_set.geometry)
@ -60,8 +59,8 @@ class MGXSTestHarness(PyAPITestHarness):
self._input_set.mgxs_file, self._input_set.materials, \
self._input_set.geometry = self.mgxs_lib.create_mg_mode()
# Modify settings so we can run in MG mode
self._input_set.settings.cross_sections = './mgxs.h5'
# Modify materials and settings so we can run in MG mode
self._input_set.materials.cross_sections = './mgxs.h5'
self._input_set.settings.energy_mode = 'multi-group'
# Write modified input files

View file

@ -1 +1 @@
723ce48152faa9ec1576c26a825dfa45cdd858e721bd698d72d559ac3b9e5c37e5048305bd9af9c3137a781798ab2eee20e5df46455bfd9d6819a08fd2bff47d
e86f24e20f37096c7898f459fc5bf336f3e0670fb30f321443f2bb3a01a154ef3d234bb48d4cee8e0d3730fd182b6a2051ec1b4c09d771420886a56ba928fdd9

View file

@ -12,8 +12,8 @@
0 10000 1 total 0.036855 0.002622
material group in nuclide mean std. dev.
0 10000 1 total 0.090649 0.00641
material group in nuclide mean std. dev.
0 10000 1 total 7.137955 0.507364
material group in nuclide mean std. dev.
0 10000 1 total 7.137955e+06 507363.814553
material group in nuclide mean std. dev.
0 10000 1 total 0.388721 0.01783
material group in nuclide mean std. dev.

View file

@ -20,8 +20,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize a six-delayed-group structure
delayed_groups = list(range(1,7))
@ -55,7 +54,7 @@ class MGXSTestHarness(PyAPITestHarness):
self.mgxs_lib.load_from_statepoint(sp)
# Build a condensed 1-group MGXS Library
one_group = openmc.mgxs.EnergyGroups([0., 20.])
one_group = openmc.mgxs.EnergyGroups([0., 20.e6])
condense_lib = self.mgxs_lib.get_condensed_library(one_group)
# Build a string from Pandas Dataframe for each 1-group MGXS

View file

@ -1 +1 @@
7d95d5cf3f4d1f3277d1a1bbc638b47888d7eb1e6afeedea73140ae5caeebead7c5f1a2945f2a18b49ce75adbd9df17773390530fee129d981a3af50141fe116
67ee414eed54f596464831e734ac365e43b88bf03297e2b08adfb97510e1d8e631ff45061d5b99aa0ad85ec08d5b51e341866e60f35cdbfae078030bcde6c794

View file

@ -12,8 +12,8 @@
0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... 1 total 0.037577 0.001487
avg(distribcell) group in nuclide mean std. dev.
0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... 1 total 0.092377 0.003628
avg(distribcell) group in nuclide mean std. dev.
0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... 1 total 7.276707 0.287579
avg(distribcell) group in nuclide mean std. dev.
0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... 1 total 7.276707e+06 287579.26286
avg(distribcell) group in nuclide mean std. dev.
0 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,... 1 total 0.390797 0.008717
avg(distribcell) group in nuclide mean std. dev.

View file

@ -20,7 +20,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a one-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.e6])
# Initialize a six-delayed-group structure
delayed_groups = list(range(1,7))

View file

@ -1 +1 @@
723ce48152faa9ec1576c26a825dfa45cdd858e721bd698d72d559ac3b9e5c37e5048305bd9af9c3137a781798ab2eee20e5df46455bfd9d6819a08fd2bff47d
e86f24e20f37096c7898f459fc5bf336f3e0670fb30f321443f2bb3a01a154ef3d234bb48d4cee8e0d3730fd182b6a2051ec1b4c09d771420886a56ba928fdd9

View file

@ -1,378 +1,378 @@
domain=10000 type=total
[ 0.41482549 0.66016992]
[ 0.02279291 0.04751893]
[4.14825490e-01 6.60169919e-01]
[2.27929091e-02 4.75189279e-02]
domain=10000 type=transport
[ 0.35685964 0.64764766]
[ 0.0254936 0.02370374]
[3.56859637e-01 6.47647660e-01]
[2.54935956e-02 2.37037352e-02]
domain=10000 type=nu-transport
[ 0.35685964 0.64764766]
[ 0.0254936 0.02370374]
[3.56859637e-01 6.47647660e-01]
[2.54935956e-02 2.37037352e-02]
domain=10000 type=absorption
[ 0.02740784 0.26451074]
[ 0.0026925 0.02336708]
[2.74078449e-02 2.64510742e-01]
[2.69249711e-03 2.33670774e-02]
domain=10000 type=capture
[ 0.01984455 0.07171935]
[ 0.0026433 0.02520786]
[1.98445499e-02 7.17193529e-02]
[2.64330433e-03 2.52078594e-02]
domain=10000 type=fission
[ 0.00756329 0.19279139]
[ 0.00050848 0.01710592]
[7.56329498e-03 1.92791389e-01]
[5.08483678e-04 1.71059219e-02]
domain=10000 type=nu-fission
[ 0.01943174 0.46977478]
[ 0.00132298 0.041682 ]
[1.94317404e-02 4.69774777e-01]
[1.32297561e-03 4.16819998e-02]
domain=10000 type=kappa-fission
[ 1.47456982 37.28689641]
[ 0.09923532 3.30837772]
[1.47456982e+06 3.72868964e+07]
[9.92353211e+04 3.30837772e+06]
domain=10000 type=scatter
[ 0.38741765 0.39565918]
[ 0.02062573 0.02512506]
[3.87417645e-01 3.95659177e-01]
[2.06257321e-02 2.51250568e-02]
domain=10000 type=nu-scatter
[ 0.38518839 0.4123894 ]
[ 0.02694562 0.01542528]
[3.85188388e-01 4.12389399e-01]
[2.69456211e-02 1.54252770e-02]
domain=10000 type=scatter matrix
[[[ 3.84199458e-01 5.18702843e-02 2.00688453e-02 9.47771571e-03]
[ 9.88930393e-04 -2.07234596e-04 -1.03366181e-04 2.34290623e-04]]
[[[3.84199458e-01 5.18702843e-02 2.00688453e-02 9.47771571e-03]
[9.88930393e-04 -2.07234596e-04 -1.03366181e-04 2.34290623e-04]]
[[ 9.24639909e-04 -7.67704968e-04 4.93788872e-04 -1.71497229e-04]
[ 4.11464759e-01 1.64817280e-02 6.37149049e-03 -1.04991221e-02]]]
[[[ 0.02700101 0.00698255 0.0028465 0.00223352]
[ 0.00048242 0.00014901 0.00018432 0.00012817]]
[[9.24639909e-04 -7.67704968e-04 4.93788872e-04 -1.71497229e-04]
[4.11464759e-01 1.64817280e-02 6.37149049e-03 -1.04991221e-02]]]
[[[2.70010136e-02 6.98254888e-03 2.84649518e-03 2.23351977e-03]
[4.82419445e-04 1.49010775e-04 1.84316312e-04 1.28173111e-04]]
[[ 0.00092488 0.00076791 0.00049392 0.00017154]
[ 0.01524494 0.00450173 0.01055075 0.01043819]]]
[[9.24883464e-04 7.67907186e-04 4.93918938e-04 1.71542403e-04]
[1.52449354e-02 4.50172796e-03 1.05507493e-02 1.04381877e-02]]]
domain=10000 type=nu-scatter matrix
[[[ 3.84199458e-01 5.18702843e-02 2.00688453e-02 9.47771571e-03]
[ 9.88930393e-04 -2.07234596e-04 -1.03366181e-04 2.34290623e-04]]
[[[3.84199458e-01 5.18702843e-02 2.00688453e-02 9.47771571e-03]
[9.88930393e-04 -2.07234596e-04 -1.03366181e-04 2.34290623e-04]]
[[ 9.24639909e-04 -7.67704968e-04 4.93788872e-04 -1.71497229e-04]
[ 4.11464759e-01 1.64817280e-02 6.37149049e-03 -1.04991221e-02]]]
[[[ 0.02700101 0.00698255 0.0028465 0.00223352]
[ 0.00048242 0.00014901 0.00018432 0.00012817]]
[[9.24639909e-04 -7.67704968e-04 4.93788872e-04 -1.71497229e-04]
[4.11464759e-01 1.64817280e-02 6.37149049e-03 -1.04991221e-02]]]
[[[2.70010136e-02 6.98254888e-03 2.84649518e-03 2.23351977e-03]
[4.82419445e-04 1.49010775e-04 1.84316312e-04 1.28173111e-04]]
[[ 0.00092488 0.00076791 0.00049392 0.00017154]
[ 0.01524494 0.00450173 0.01055075 0.01043819]]]
[[9.24883464e-04 7.67907186e-04 4.93918938e-04 1.71542403e-04]
[1.52449354e-02 4.50172796e-03 1.05507493e-02 1.04381877e-02]]]
domain=10000 type=multiplicity matrix
[[ 1. 1.]
[ 1. 1.]]
[[ 0.07851646 0.68718427]
[ 1.41421356 0.04113035]]
[[1.00000000e+00 1.00000000e+00]
[1.00000000e+00 1.00000000e+00]]
[[7.85164550e-02 6.87184271e-01]
[1.41421356e+00 4.11303488e-02]]
domain=10000 type=nu-fission matrix
[[ 0.02014243 0. ]
[ 0.45436647 0. ]]
[[ 0.00314909 0. ]
[ 0.02742551 0. ]]
[[2.01424282e-02 0.00000000e+00]
[4.54366467e-01 0.00000000e+00]]
[[3.14909168e-03 0.00000000e+00]
[2.74255069e-02 0.00000000e+00]]
domain=10000 type=chi
[ 1. 0.]
[ 0.04607052 0. ]
[1.00000000e+00 0.00000000e+00]
[4.60705235e-02 0.00000000e+00]
domain=10000 type=chi-prompt
[ 1. 0.]
[ 0.05147146 0. ]
[1.00000000e+00 0.00000000e+00]
[5.14714567e-02 0.00000000e+00]
domain=10000 type=inverse-velocity
[ 5.70932329e-08 2.85573950e-06]
[ 4.68792969e-09 2.44216503e-07]
[5.70932329e-08 2.85573950e-06]
[4.68792969e-09 2.44216503e-07]
domain=10000 type=prompt-nu-fission
[ 0.01923922 0.46671903]
[ 0.00130951 0.04141087]
[1.92392215e-02 4.66719027e-01]
[1.30950595e-03 4.14108704e-02]
domain=10000 type=delayed-nu-fission
[[ 2.29808234e-05 1.06974158e-04]
[ 1.43606337e-04 5.52167907e-04]
[ 1.51382216e-04 5.27147681e-04]
[ 7.42603178e-05 2.22018043e-04]
[ 4.14908454e-05 9.10244403e-05]
[ 1.70016000e-05 3.81298119e-05]]
[[ 1.66363133e-06 9.49156242e-06]
[ 1.05907806e-05 4.89925426e-05]
[ 1.12671238e-05 4.67725567e-05]
[ 5.22610273e-06 1.87563195e-05]
[ 2.99830766e-06 7.68984041e-06]
[ 1.22654684e-06 3.22124663e-06]]
[[2.29808234e-05 1.06974158e-04]
[1.43606337e-04 5.52167907e-04]
[1.51382216e-04 5.27147681e-04]
[7.42603178e-05 2.22018043e-04]
[4.14908454e-05 9.10244403e-05]
[1.70016000e-05 3.81298119e-05]]
[[1.66363133e-06 9.49156242e-06]
[1.05907806e-05 4.89925426e-05]
[1.12671238e-05 4.67725567e-05]
[5.22610273e-06 1.87563195e-05]
[2.99830766e-06 7.68984041e-06]
[1.22654684e-06 3.22124663e-06]]
domain=10000 type=chi-delayed
[[ 0. 0.]
[ 1. 0.]
[ 1. 0.]
[ 1. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0. ]
[ 0.86912776 0. ]
[ 1.41421356 0. ]
[ 0.36035904 0. ]
[ 0. 0. ]
[ 0. 0. ]]
[[0.00000000e+00 0.00000000e+00]
[1.00000000e+00 0.00000000e+00]
[1.00000000e+00 0.00000000e+00]
[1.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[8.69127759e-01 0.00000000e+00]
[1.41421356e+00 0.00000000e+00]
[3.60359043e-01 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10000 type=beta
[[ 4.89188107e-05 2.27713711e-04]
[ 3.05691886e-04 1.17538858e-03]
[ 3.22244241e-04 1.12212853e-03]
[ 3.82159891e-03 1.14255357e-02]
[ 2.13520995e-03 4.68431744e-03]
[ 8.74939644e-04 1.96224379e-03]]
[[ 4.67388620e-06 2.46946810e-05]
[ 2.95223877e-05 1.27466393e-04]
[ 3.12885004e-05 1.21690543e-04]
[ 3.21434855e-04 1.09939816e-03]
[ 1.82980497e-04 4.50738567e-04]
[ 7.48899920e-05 1.88812772e-04]]
[[4.89188107e-05 2.27713711e-04]
[3.05691886e-04 1.17538858e-03]
[3.22244241e-04 1.12212853e-03]
[3.82159891e-03 1.14255357e-02]
[2.13520995e-03 4.68431744e-03]
[8.74939644e-04 1.96224379e-03]]
[[4.67388620e-06 2.46946810e-05]
[2.95223877e-05 1.27466393e-04]
[3.12885004e-05 1.21690543e-04]
[3.21434855e-04 1.09939816e-03]
[1.82980497e-04 4.50738567e-04]
[7.48899920e-05 1.88812772e-04]]
domain=10000 type=decay-rate
[[ 0. 0. ]
[ 0. 0.032739]
[ 0. 0.12078 ]
[ 0. 0.30278 ]
[ 0. 0. ]
[ 0. 0. ]]
[[ 0. 0. ]
[ 0. 0.02845437]
[ 0. 0.17080871]
[ 0. 0.10910951]
[ 0. 0. ]
[ 0. 0. ]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 3.27390000e-02]
[0.00000000e+00 1.20780000e-01]
[0.00000000e+00 3.02780000e-01]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 2.84543737e-02]
[0.00000000e+00 1.70808714e-01]
[0.00000000e+00 1.09109511e-01]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10001 type=total
[ 0.31373767 0.3008214 ]
[ 0.0155819 0.02805245]
[3.13737671e-01 3.00821402e-01]
[1.55819024e-02 2.80524484e-02]
domain=10001 type=transport
[ 0.27322787 0.31237484]
[ 0.03311537 0.04960583]
[2.73227872e-01 3.12374836e-01]
[3.31153664e-02 4.96058317e-02]
domain=10001 type=nu-transport
[ 0.27322787 0.31237484]
[ 0.03311537 0.04960583]
[2.73227872e-01 3.12374836e-01]
[3.31153664e-02 4.96058317e-02]
domain=10001 type=absorption
[ 0.00157499 0.00540038]
[ 0.00032255 0.00061814]
[1.57499139e-03 5.40037883e-03]
[3.22547891e-04 6.18138308e-04]
domain=10001 type=capture
[ 0.00157499 0.00540038]
[ 0.00032255 0.00061814]
[1.57499139e-03 5.40037883e-03]
[3.22547891e-04 6.18138308e-04]
domain=10001 type=fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=nu-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=kappa-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=scatter
[ 0.31216268 0.29542102]
[ 0.01532192 0.02744549]
[3.12162680e-01 2.95421023e-01]
[1.53219231e-02 2.74454889e-02]
domain=10001 type=nu-scatter
[ 0.31012074 0.29626427]
[ 0.03378811 0.04379223]
[3.10120735e-01 2.96264270e-01]
[3.37881061e-02 4.37922257e-02]
domain=10001 type=scatter matrix
[[[ 0.31012074 0.03822959 0.02074494 0.0079643 ]
[ 0. 0. 0. 0. ]]
[[[3.10120735e-01 3.82295904e-02 2.07449420e-02 7.96429677e-03]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]
[[ 0. 0. 0. 0. ]
[ 0.29626427 -0.01121364 0.00883657 -0.00327007]]]
[[[ 0.03378811 0.008484 0.00469561 0.00373162]
[ 0. 0. 0. 0. ]]
[[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[2.96264270e-01 -1.12136361e-02 8.83656630e-03 -3.27006731e-03]]]
[[[3.37881061e-02 8.48399710e-03 4.69561068e-03 3.73162261e-03]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]
[[ 0. 0. 0. 0. ]
[ 0.04379223 0.01618037 0.01150396 0.00732885]]]
[[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[4.37922257e-02 1.61803665e-02 1.15039645e-02 7.32884580e-03]]]
domain=10001 type=nu-scatter matrix
[[[ 0.31012074 0.03822959 0.02074494 0.0079643 ]
[ 0. 0. 0. 0. ]]
[[[3.10120735e-01 3.82295904e-02 2.07449420e-02 7.96429677e-03]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]
[[ 0. 0. 0. 0. ]
[ 0.29626427 -0.01121364 0.00883657 -0.00327007]]]
[[[ 0.03378811 0.008484 0.00469561 0.00373162]
[ 0. 0. 0. 0. ]]
[[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[2.96264270e-01 -1.12136361e-02 8.83656630e-03 -3.27006731e-03]]]
[[[3.37881061e-02 8.48399710e-03 4.69561068e-03 3.73162261e-03]
[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]
[[ 0. 0. 0. 0. ]
[ 0.04379223 0.01618037 0.01150396 0.00732885]]]
[[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]
[4.37922257e-02 1.61803665e-02 1.15039645e-02 7.32884580e-03]]]
domain=10001 type=multiplicity matrix
[[ 1. 0.]
[ 0. 1.]]
[[ 0.1087787 0. ]
[ 0. 0.14242717]]
[[1.00000000e+00 0.00000000e+00]
[0.00000000e+00 1.00000000e+00]]
[[1.08778697e-01 0.00000000e+00]
[0.00000000e+00 1.42427173e-01]]
domain=10001 type=nu-fission matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10001 type=chi
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=chi-prompt
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=inverse-velocity
[ 5.99598048e-08 2.98549021e-06]
[ 4.55309296e-09 3.41701554e-07]
[5.99598048e-08 2.98549021e-06]
[4.55309296e-09 3.41701554e-07]
domain=10001 type=prompt-nu-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10001 type=delayed-nu-fission
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10001 type=chi-delayed
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10001 type=beta
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10001 type=decay-rate
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10002 type=total
[ 0.66457226 2.05238401]
[ 0.03121475 0.22434291]
[6.64572261e-01 2.05238401e+00]
[3.12147519e-02 2.24342907e-01]
domain=10002 type=transport
[ 0.29056526 1.51643801]
[ 0.02385185 0.23519727]
[2.90565257e-01 1.51643801e+00]
[2.38518546e-02 2.35197269e-01]
domain=10002 type=nu-transport
[ 0.29056526 1.51643801]
[ 0.02385185 0.23519727]
[2.90565257e-01 1.51643801e+00]
[2.38518546e-02 2.35197269e-01]
domain=10002 type=absorption
[ 0.0006904 0.03168726]
[ 4.41475687e-05 3.74655858e-03]
[6.90399522e-04 3.16872566e-02]
[4.41475687e-05 3.74655858e-03]
domain=10002 type=capture
[ 0.0006904 0.03168726]
[ 4.41475687e-05 3.74655858e-03]
[6.90399522e-04 3.16872566e-02]
[4.41475687e-05 3.74655858e-03]
domain=10002 type=fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=nu-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=kappa-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=scatter
[ 0.66388186 2.02069676]
[ 0.03117268 0.22060445]
[6.63881861e-01 2.02069676e+00]
[3.11726840e-02 2.20604454e-01]
domain=10002 type=nu-scatter
[ 0.6712692 2.03538833]
[ 0.02618637 0.25806033]
[6.71269205e-01 2.03538833e+00]
[2.61863712e-02 2.58060329e-01]
domain=10002 type=scatter matrix
[[[ 6.39901485e-01 3.81167449e-01 1.52391898e-01 9.14802229e-03]
[ 3.13677198e-02 8.75772321e-03 -2.56790106e-03 -3.78480288e-03]]
[[[6.39901485e-01 3.81167449e-01 1.52391898e-01 9.14802229e-03]
[3.13677198e-02 8.75772321e-03 -2.56790106e-03 -3.78480288e-03]]
[[ 4.43343134e-04 3.99960414e-04 3.19562707e-04 2.13846969e-04]
[ 2.03494499e+00 5.09940513e-01 1.11174609e-01 2.49884357e-02]]]
[[[ 2.47091228e-02 1.62432649e-02 8.15627770e-03 3.88856214e-03]
[ 1.72811290e-03 9.25670501e-04 1.01398475e-03 8.17075571e-04]]
[[4.43343134e-04 3.99960414e-04 3.19562707e-04 2.13846969e-04]
[2.03494499e+00 5.09940513e-01 1.11174609e-01 2.49884357e-02]]]
[[[2.47091228e-02 1.62432649e-02 8.15627770e-03 3.88856214e-03]
[1.72811290e-03 9.25670501e-04 1.01398475e-03 8.17075571e-04]]
[[ 4.44850393e-04 4.01320183e-04 3.20649143e-04 2.14573997e-04]
[ 2.57799889e-01 5.12359063e-02 1.30198170e-02 8.31235256e-03]]]
[[4.44850393e-04 4.01320183e-04 3.20649143e-04 2.14573997e-04]
[2.57799889e-01 5.12359063e-02 1.30198170e-02 8.31235256e-03]]]
domain=10002 type=nu-scatter matrix
[[[ 6.39901485e-01 3.81167449e-01 1.52391898e-01 9.14802229e-03]
[ 3.13677198e-02 8.75772321e-03 -2.56790106e-03 -3.78480288e-03]]
[[[6.39901485e-01 3.81167449e-01 1.52391898e-01 9.14802229e-03]
[3.13677198e-02 8.75772321e-03 -2.56790106e-03 -3.78480288e-03]]
[[ 4.43343134e-04 3.99960414e-04 3.19562707e-04 2.13846969e-04]
[ 2.03494499e+00 5.09940513e-01 1.11174609e-01 2.49884357e-02]]]
[[[ 2.47091228e-02 1.62432649e-02 8.15627770e-03 3.88856214e-03]
[ 1.72811290e-03 9.25670501e-04 1.01398475e-03 8.17075571e-04]]
[[4.43343134e-04 3.99960414e-04 3.19562707e-04 2.13846969e-04]
[2.03494499e+00 5.09940513e-01 1.11174609e-01 2.49884357e-02]]]
[[[2.47091228e-02 1.62432649e-02 8.15627770e-03 3.88856214e-03]
[1.72811290e-03 9.25670501e-04 1.01398475e-03 8.17075571e-04]]
[[ 4.44850393e-04 4.01320183e-04 3.20649143e-04 2.14573997e-04]
[ 2.57799889e-01 5.12359063e-02 1.30198170e-02 8.31235256e-03]]]
[[4.44850393e-04 4.01320183e-04 3.20649143e-04 2.14573997e-04]
[2.57799889e-01 5.12359063e-02 1.30198170e-02 8.31235256e-03]]]
domain=10002 type=multiplicity matrix
[[ 1. 1.]
[ 1. 1.]]
[[ 0.03860919 0.06766735]
[ 1.41421356 0.13592921]]
[[1.00000000e+00 1.00000000e+00]
[1.00000000e+00 1.00000000e+00]]
[[3.86091908e-02 6.76673480e-02]
[1.41421356e+00 1.35929207e-01]]
domain=10002 type=nu-fission matrix
[[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10002 type=chi
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=chi-prompt
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=inverse-velocity
[ 6.02207831e-08 3.04495537e-06]
[ 3.78043696e-09 3.60007673e-07]
[6.02207831e-08 3.04495537e-06]
[3.78043696e-09 3.60007673e-07]
domain=10002 type=prompt-nu-fission
[ 0. 0.]
[ 0. 0.]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
domain=10002 type=delayed-nu-fission
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10002 type=chi-delayed
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10002 type=beta
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
domain=10002 type=decay-rate
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]
[ 0. 0.]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]
[[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]
[0.00000000e+00 0.00000000e+00]]

View file

@ -4,7 +4,10 @@ import os
import sys
import glob
import hashlib
import numpy as np
import h5py
sys.path.insert(0, os.pardir)
from testing_harness import PyAPITestHarness
from input_set import PinCellInputSet
@ -12,6 +15,9 @@ import openmc
import openmc.mgxs
np.set_printoptions(formatter={'float_kind': '{:.8e}'.format})
class MGXSTestHarness(PyAPITestHarness):
def _build_inputs(self):
# Set the input set to use the pincell model
@ -21,8 +27,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize a six-delayed-group structure
delayed_groups = list(range(1,7))
@ -66,10 +71,9 @@ class MGXSTestHarness(PyAPITestHarness):
for domain in self.mgxs_lib.domains:
for mgxs_type in self.mgxs_lib.mgxs_types:
outstr += 'domain={0} type={1}\n'.format(domain.id, mgxs_type)
key = 'material/{0}/{1}/average'.format(domain.id, mgxs_type)
outstr += str(f[key][...]) + '\n'
key = 'material/{0}/{1}/std. dev.'.format(domain.id, mgxs_type)
outstr += str(f[key][...]) + '\n'
avg_key = 'material/{0}/{1}/average'.format(domain.id, mgxs_type)
std_key = 'material/{0}/{1}/std. dev.'.format(domain.id, mgxs_type)
outstr += '{}\n{}\n'.format(f[avg_key][...], f[std_key][...])
# Close the MGXS HDF5 file
f.close()

View file

@ -1 +1 @@
5011f0aec7bb04e22f96cec2c23ae485fe21371dc03e16cb38695b3765cb92545459a897184b501bb99f8e7d162cfbf85eb3fb52ce2d82b2d2ca722b567cbff3
a0d62fc011ae33756cd87202432f5c49f847793a40ec50efc6e4366755a70196f9ae970b24244766c011e2991961ea92317b53f6839b89363262b4e67ed4b289

View file

@ -40,12 +40,12 @@
1 1 2 1 1 total 0.020546 0.008145
2 2 1 1 1 total 0.026008 0.003213
3 2 2 1 1 total 0.021015 0.004911
mesh 1 group in nuclide mean std. dev.
x y z
0 1 1 1 1 total 1.596880 0.348354
1 1 2 1 1 total 1.610266 0.638515
2 2 1 1 1 total 2.048209 0.257682
3 2 2 1 1 total 1.660283 0.390011
mesh 1 group in nuclide mean std. dev.
x y z
0 1 1 1 1 total 1.596880e+06 348353.788370
1 1 2 1 1 total 1.610266e+06 638514.814974
2 2 1 1 1 total 2.048209e+06 257681.654621
3 2 2 1 1 total 1.660283e+06 390011.391278
mesh 1 group in nuclide mean std. dev.
x y z
0 1 1 1 1 total 0.633490 0.094536

View file

@ -16,7 +16,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a one-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 20.e6])
# Initialize a six-delayed-group structure
delayed_groups = list(range(1,7))

View file

@ -1 +1 @@
723ce48152faa9ec1576c26a825dfa45cdd858e721bd698d72d559ac3b9e5c37e5048305bd9af9c3137a781798ab2eee20e5df46455bfd9d6819a08fd2bff47d
e86f24e20f37096c7898f459fc5bf336f3e0670fb30f321443f2bb3a01a154ef3d234bb48d4cee8e0d3730fd182b6a2051ec1b4c09d771420886a56ba928fdd9

View file

@ -19,9 +19,9 @@
material group in nuclide mean std. dev.
1 10000 1 total 0.019432 0.001323
0 10000 2 total 0.469775 0.041682
material group in nuclide mean std. dev.
1 10000 1 total 1.474570 0.099235
0 10000 2 total 37.286896 3.308378
material group in nuclide mean std. dev.
1 10000 1 total 1.474570e+06 9.923532e+04
0 10000 2 total 3.728690e+07 3.308378e+06
material group in nuclide mean std. dev.
1 10000 1 total 0.387418 0.020626
0 10000 2 total 0.395659 0.025125

View file

@ -20,8 +20,7 @@ class MGXSTestHarness(PyAPITestHarness):
super(MGXSTestHarness, self)._build_inputs()
# Initialize a two-group structure
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625e-6,
20.])
energy_groups = openmc.mgxs.EnergyGroups(group_edges=[0, 0.625, 20.e6])
# Initialize a six-delayed-group structure
delayed_groups = list(range(1,7))

View file

@ -1 +1 @@
63f6f8ae24e0d8e23731c903a59e3f5e0edff730933ef6f8836ebf78949db75542c5794a6486c27016ad22e4375b8a18092cd1d1e025162afd01936cac2f205b
1e8d0f408ba9d47fc9278e750dbf68d3104d248f7783ca1185c8b7666c9ee2ba3ec6fcf4a49bb614956bb8eb3a57dc1c104725b4160171dfbe6dc972a268df56

View file

@ -1 +1 @@
e494320a213b5704a2ac915a2ba504857be91961ceb6735b6ad05d81eb31c44c9584d5bd9d40baececf1dcb5b030e6ecec63cfbd20639baf69bcb596c5c46591
ce682f577fd65dd9b6e5da58763cf2ae4cf8e5041b38b5d1ed64d3ba7a3a4df7338aadfa8830a0764fc9ffb737f05fc989a494158c714047186dd18605a7d2b8

Some files were not shown because too many files have changed in this diff Show more