mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Merge branch 'multipole' into diff_tally5
This commit is contained in:
commit
f303b3ed8d
131 changed files with 11847 additions and 9138 deletions
6
docs/source/_templates/myfunction.rst
Normal file
6
docs/source/_templates/myfunction.rst
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{{ fullname }}
|
||||
{{ underline }}
|
||||
|
||||
.. currentmodule:: {{ module }}
|
||||
|
||||
.. autofunction:: {{ objname }}
|
||||
|
|
@ -13,11 +13,14 @@ OpenMC was originally developed by members of the `Computational Reactor Physics
|
|||
Group`_ at the `Massachusetts Institute of Technology`_ starting
|
||||
in 2011. Various universities, laboratories, and other organizations now
|
||||
contribute to the development of OpenMC. For more information on OpenMC, feel
|
||||
free to send a message to the User's Group `mailing list`_.
|
||||
free to send a message to the User's Group `mailing list`_. Documentation for
|
||||
the latest developmental version of the develop branch can be found on
|
||||
`Read the Docs`_.
|
||||
|
||||
.. _Computational Reactor Physics Group: http://crpg.mit.edu
|
||||
.. _Massachusetts Institute of Technology: http://web.mit.edu
|
||||
.. _mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-users
|
||||
.. _Read the Docs: http://openmc.readthedocs.io/en/latest/
|
||||
|
||||
.. only:: html
|
||||
|
||||
|
|
@ -34,6 +37,7 @@ free to send a message to the User's Group `mailing list`_.
|
|||
usersguide/index
|
||||
devguide/index
|
||||
pythonapi/index
|
||||
io_formats/index
|
||||
publications
|
||||
license
|
||||
developers
|
||||
|
|
|
|||
92
docs/source/io_formats/data_wmp.rst
Normal file
92
docs/source/io_formats/data_wmp.rst
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
.. _io_data_wmp:
|
||||
|
||||
==========================================
|
||||
The Windowed Multipole Library Format v0.2
|
||||
==========================================
|
||||
|
||||
**/nuclide/**
|
||||
- **broaden_poly** (*int[]*)
|
||||
If 1, Doppler broaden curve fit for window with corresponding index.
|
||||
If 0, do not.
|
||||
- **curvefit** (*double[][][]*)
|
||||
Curve fit coefficients. Indexed by (reaction type, coefficient index,
|
||||
window index).
|
||||
- **data** (*complex[][]*)
|
||||
Complex poles and residues. Each pole has a corresponding set of
|
||||
residues. For example, the `i`th pole and corresponding residues are
|
||||
stored as `data[:,i] = [pole, residue_1, residue_2, ...]`. The
|
||||
residues are in the order: total, competitive if present, absorption,
|
||||
fission. Complex numbers are stored by forming a type with `"r"` and
|
||||
`"i"` identifiers, similar to how `h5py` does it.
|
||||
- **start_E** (*double*)
|
||||
Lowest energy the windowed multipole part of the library is valid for.
|
||||
- **end_E** (*double*)
|
||||
Highest energy the windowed multipole part of the library is valid for.
|
||||
- **energy_points** (*double[]*)
|
||||
Energy grid for the pointwise library in the reaction group.
|
||||
- **fissionable** (*int*)
|
||||
1 if this nuclide has fission data. 0 if it does not.
|
||||
- **fit_order** (*int*)
|
||||
The order of the curve fit.
|
||||
- **formalism** (*int*)
|
||||
The formalism of the underlying data. Uses the `ENDF-6`_ format
|
||||
formalism numbers.
|
||||
|
||||
.. table:: Table of supported formalisms.
|
||||
|
||||
+-------------+------------------+
|
||||
| Formalism | Formalism number |
|
||||
+=============+==================+
|
||||
| MLBW | 2 |
|
||||
+-------------+------------------+
|
||||
| Reich-Moore | 3 |
|
||||
+-------------+------------------+
|
||||
|
||||
- **l_value** (*int[]*)
|
||||
The index for a corresponding pole. Equivalent to the :math:`l` quantum
|
||||
number of the resonance the pole comes from :math:`+1`.
|
||||
- **length** (*int*)
|
||||
Total count of poles in `data`.
|
||||
- **max_w** (*int*)
|
||||
Maximum number of poles in a window.
|
||||
- **MT_count** (*int*)
|
||||
Number of pointwise tables in the library.
|
||||
- **MT_list** (*int[]*)
|
||||
A list of available MT identifiers. See `ENDF-6`_ for meaning.
|
||||
- **n_grid** (*int*)
|
||||
Total length of the pointwise data.
|
||||
- **num_l** (*int*)
|
||||
Number of possible :math:`l` quantum states for this nuclide.
|
||||
- **pseudo_K0RS** (*double[]*)
|
||||
:math:`l` dependent value of
|
||||
|
||||
.. math::
|
||||
\sqrt{\frac{2 m_n}{\hbar}}\frac{AWR}{AWR + 1} r_{s,l}
|
||||
|
||||
Where :math:`m_n` is mass of neutron, :math:`AWR` is the atomic weight
|
||||
ratio of the target to the neutron, and :math:`r_{s,l}` is the
|
||||
scattering radius for a given :math:`l`.
|
||||
- **spacing** (*double*)
|
||||
.. math::
|
||||
\frac{\sqrt{E_{max}}- \sqrt{E_{min}}}{n_w}
|
||||
|
||||
Where :math:`E_{max}` is the maximum energy the windows go up to. This
|
||||
is not equivalent to the maximum energy for which the windowed multipole
|
||||
data is valid for. It is slightly higher to ensure an integer number of
|
||||
windows. :math:`E_{min}` is the minimum energy and equivalent to
|
||||
`start_E`, and :math:`n_w` is the number of windows, given by `windows`.
|
||||
- **sqrtAWR** (*double*)
|
||||
Square root of the atomic weight ratio.
|
||||
- **w_start** (*int[]*)
|
||||
The pole to start from for each window.
|
||||
- **w_end** (*int[]*)
|
||||
The pole to end at for each window.
|
||||
- **windows** (*int*)
|
||||
Number of windows.
|
||||
|
||||
**/nuclide/reactions/MT<i>**
|
||||
- **MT_sigma** (*double[]*) -- Cross section value for this reaction.
|
||||
- **Q_value** (*double*) -- Energy released in this reaction, in eV.
|
||||
- **threshold** (*int*) -- The first non-zero entry in `MT_sigma`.
|
||||
|
||||
.. _ENDF-6: https://www.oecd-nea.org/dbdata/data/manual-endf/endf102.pdf
|
||||
|
|
@ -1,13 +1,15 @@
|
|||
.. _usersguide_output:
|
||||
.. _io_file_formats:
|
||||
|
||||
===================
|
||||
Output File Formats
|
||||
===================
|
||||
===============
|
||||
IO File Formats
|
||||
===============
|
||||
|
||||
.. toctree::
|
||||
:numbered:
|
||||
:maxdepth: 3
|
||||
|
||||
data_wmp
|
||||
mgxs_library
|
||||
statepoint
|
||||
source
|
||||
summary
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_mgxs_library:
|
||||
.. _io_mgxs_library:
|
||||
|
||||
========================================
|
||||
Multi-Group Cross Section Library Format
|
||||
|
|
@ -8,10 +8,10 @@ OpenMC can be run in continuous-energy mode or multi-group mode, provided the
|
|||
nuclear data is available. In continuous-energy mode, the
|
||||
``cross_sections.xml`` file contains necessary meta-data for each data set,
|
||||
including the name and a file system location where the complete library
|
||||
can be found. In multi-group mode, this ``cross_sections.xml`` file contains
|
||||
can be found. In multi-group mode, this ``mgxs.xml`` file contains
|
||||
this same meta-data describing the nuclide or material, but also contains the
|
||||
group-wise nuclear data. This portion of the manual describes the format of
|
||||
the multi-group data library required to be used in the ``cross_sections.xml``
|
||||
the multi-group data library required to be used in the ``mgxs.xml``
|
||||
file.
|
||||
|
||||
Similar to the other input file types, the multi-group library is provided in
|
||||
|
|
@ -22,9 +22,9 @@ materials.
|
|||
|
||||
.. _XML: http://www.w3.org/XML/
|
||||
|
||||
------------------------------------------------
|
||||
MGXS Library Specification -- cross_sections.xml
|
||||
------------------------------------------------
|
||||
--------------------------------------
|
||||
MGXS Library Specification -- mgxs.xml
|
||||
--------------------------------------
|
||||
|
||||
The multi-group library meta-data is contained within the groups_,
|
||||
group_structure_, and inverse_velocities_ elements.
|
||||
|
|
@ -33,7 +33,7 @@ The actual multi-group data itself is contained within the xsdata_ element.
|
|||
.. _groups:
|
||||
|
||||
``<groups>`` Element
|
||||
----------------------------------
|
||||
--------------------
|
||||
|
||||
The ``<groups>`` element has no attributes and simply provides the number of
|
||||
energy groups contained within the library.
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_particle_restart:
|
||||
.. _io_particle_restart:
|
||||
|
||||
============================
|
||||
Particle Restart File Format
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_source:
|
||||
.. _io_source:
|
||||
|
||||
==================
|
||||
Source File Format
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_statepoint:
|
||||
.. _io_statepoint:
|
||||
|
||||
=======================
|
||||
State Point File Format
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_summary:
|
||||
.. _io_summary:
|
||||
|
||||
===================
|
||||
Summary File Format
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_track:
|
||||
.. _io_track:
|
||||
|
||||
=================
|
||||
Track File Format
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
.. _usersguide_voxel:
|
||||
.. _io_voxel:
|
||||
|
||||
======================
|
||||
Voxel Plot File Format
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
License Agreement
|
||||
=================
|
||||
|
||||
Copyright © 2011-2015 Massachusetts Institute of Technology
|
||||
Copyright © 2011-2016 Massachusetts Institute of Technology
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
|
|||
|
|
@ -136,6 +136,9 @@ Note that the implementation of WMP in OpenMC currently assumes that inelastic
|
|||
scattering does not occur in the resolved resonance region. This is usually,
|
||||
but not always the case. Future library versions may eliminate this issue.
|
||||
|
||||
The data format used by OpenMC to represent windowed multipole data is specified
|
||||
in :ref:`io_data_wmp`
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. rubric:: References
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"With our material, we can now create a `MaterialsFile` object that can be exported to an actual XML file."
|
||||
"With our material, we can now create a `Materials` object that can be exported to an actual XML file."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -212,10 +212,9 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate a MaterialsFile, register all Materials, and export to XML\n",
|
||||
"materials_file = openmc.MaterialsFile()\n",
|
||||
"# Instantiate a Materials collection and export to XML\n",
|
||||
"materials_file = openmc.Materials([inf_medium])\n",
|
||||
"materials_file.default_xs = '71c'\n",
|
||||
"materials_file.add_material(inf_medium)\n",
|
||||
"materials_file.export_to_xml()"
|
||||
]
|
||||
},
|
||||
|
|
@ -290,7 +289,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We now must create a geometry that is assigned a root universe, put the geometry into a `GeometryFile` object, and export it to XML."
|
||||
"We now must create a geometry that is assigned a root universe and export it to XML."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -305,12 +304,8 @@
|
|||
"openmc_geometry = openmc.Geometry()\n",
|
||||
"openmc_geometry.root_universe = root_universe\n",
|
||||
"\n",
|
||||
"# Instantiate a GeometryFile\n",
|
||||
"geometry_file = openmc.GeometryFile()\n",
|
||||
"geometry_file.geometry = openmc_geometry\n",
|
||||
"\n",
|
||||
"# Export to \"geometry.xml\"\n",
|
||||
"geometry_file.export_to_xml()"
|
||||
"openmc_geometry.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -333,8 +328,8 @@
|
|||
"inactive = 10\n",
|
||||
"particles = 2500\n",
|
||||
"\n",
|
||||
"# Instantiate a SettingsFile\n",
|
||||
"settings_file = openmc.SettingsFile()\n",
|
||||
"# Instantiate a Settings object\n",
|
||||
"settings_file = openmc.Settings()\n",
|
||||
"settings_file.batches = batches\n",
|
||||
"settings_file.inactive = inactive\n",
|
||||
"settings_file.particles = particles\n",
|
||||
|
|
@ -377,10 +372,12 @@
|
|||
"\n",
|
||||
"* `TotalXS`\n",
|
||||
"* `TransportXS`\n",
|
||||
"* `NuTransportXS`\n",
|
||||
"* `AbsorptionXS`\n",
|
||||
"* `CaptureXS`\n",
|
||||
"* `FissionXS`\n",
|
||||
"* `NuFissionXS`\n",
|
||||
"* `KappaFissionXS`\n",
|
||||
"* `ScatterXS`\n",
|
||||
"* `NuScatterXS`\n",
|
||||
"* `ScatterMatrixXS`\n",
|
||||
|
|
@ -399,9 +396,9 @@
|
|||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate a few different sections\n",
|
||||
"total = mgxs.TotalXS(domain=cell, domain_type='cell', groups=groups)\n",
|
||||
"absorption = mgxs.AbsorptionXS(domain=cell, domain_type='cell', groups=groups)\n",
|
||||
"scattering = mgxs.ScatterXS(domain=cell, domain_type='cell', groups=groups)"
|
||||
"total = mgxs.TotalXS(domain=cell, groups=groups)\n",
|
||||
"absorption = mgxs.AbsorptionXS(domain=cell, groups=groups)\n",
|
||||
"scattering = mgxs.ScatterXS(domain=cell, groups=groups)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -455,7 +452,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The `Absorption` object includes tracklength tallies for the 'absorption' and 'flux' scores in the 2-group structure in cell 1. Now that each `MGXS` object contains the tallies that it needs, we must add these tallies to a `TalliesFile` object to generate the \"tallies.xml\" input file for OpenMC."
|
||||
"The `Absorption` object includes tracklength tallies for the 'absorption' and 'flux' scores in the 2-group structure in cell 1. Now that each `MGXS` object contains the tallies that it needs, we must add these tallies to a `Tallies` object to generate the \"tallies.xml\" input file for OpenMC."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -466,21 +463,18 @@
|
|||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate an empty TalliesFile\n",
|
||||
"tallies_file = openmc.TalliesFile()\n",
|
||||
"# Instantiate an empty Tallies object\n",
|
||||
"tallies_file = openmc.Tallies()\n",
|
||||
"\n",
|
||||
"# Add total tallies to the tallies file\n",
|
||||
"for tally in total.tallies.values():\n",
|
||||
" tallies_file.add_tally(tally)\n",
|
||||
"tallies_file += total.tallies.values()\n",
|
||||
"\n",
|
||||
"# Add absorption tallies to the tallies file\n",
|
||||
"for tally in absorption.tallies.values():\n",
|
||||
" tallies_file.add_tally(tally)\n",
|
||||
"tallies_file += absorption.tallies.values()\n",
|
||||
"\n",
|
||||
"# Add scattering tallies to the tallies file\n",
|
||||
"for tally in scattering.tallies.values():\n",
|
||||
" tallies_file.add_tally(tally)\n",
|
||||
" \n",
|
||||
"tallies_file += scattering.tallies.values()\n",
|
||||
"\n",
|
||||
"# Export to \"tallies.xml\"\n",
|
||||
"tallies_file.export_to_xml()"
|
||||
]
|
||||
|
|
@ -516,11 +510,11 @@
|
|||
" 888\n",
|
||||
" 888\n",
|
||||
"\n",
|
||||
" Copyright: 2011-2015 Massachusetts Institute of Technology\n",
|
||||
" License: http://mit-crpg.github.io/openmc/license.html\n",
|
||||
" Copyright: 2011-2016 Massachusetts Institute of Technology\n",
|
||||
" License: http://openmc.readthedocs.io/en/latest/license.html\n",
|
||||
" Version: 0.7.1\n",
|
||||
" Git SHA1: eeb5091ca3a34cc85df73a3318cae2b6c7097413\n",
|
||||
" Date/Time: 2016-04-13 11:24:09\n",
|
||||
" Git SHA1: 19feb55e6d5e8350398627f39fb55ee8e2e63011\n",
|
||||
" Date/Time: 2016-05-13 10:19:16\n",
|
||||
" MPI Processes: 1\n",
|
||||
"\n",
|
||||
" ===========================================================================\n",
|
||||
|
|
@ -606,20 +600,20 @@
|
|||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 4.6300E-01 seconds\n",
|
||||
" Reading cross sections = 1.2100E-01 seconds\n",
|
||||
" Total time in simulation = 1.6504E+01 seconds\n",
|
||||
" Time in transport only = 1.6479E+01 seconds\n",
|
||||
" Time in inactive batches = 1.9620E+00 seconds\n",
|
||||
" Time in active batches = 1.4542E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 1.0000E-02 seconds\n",
|
||||
" Sampling source sites = 4.0000E-03 seconds\n",
|
||||
" SEND/RECV source sites = 3.0000E-03 seconds\n",
|
||||
" Total time for initialization = 4.2300E-01 seconds\n",
|
||||
" Reading cross sections = 9.3000E-02 seconds\n",
|
||||
" Total time in simulation = 1.6549E+01 seconds\n",
|
||||
" Time in transport only = 1.6535E+01 seconds\n",
|
||||
" Time in inactive batches = 2.3650E+00 seconds\n",
|
||||
" Time in active batches = 1.4184E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 5.0000E-03 seconds\n",
|
||||
" Sampling source sites = 3.0000E-03 seconds\n",
|
||||
" SEND/RECV source sites = 0.0000E+00 seconds\n",
|
||||
" Time accumulating tallies = 0.0000E+00 seconds\n",
|
||||
" Total time for finalization = 0.0000E+00 seconds\n",
|
||||
" Total time elapsed = 1.6977E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 12742.1 neutrons/second\n",
|
||||
" Calculation Rate (active) = 6876.63 neutrons/second\n",
|
||||
" Total time elapsed = 1.6981E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 10570.8 neutrons/second\n",
|
||||
" Calculation Rate (active) = 7050.20 neutrons/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
|
|
@ -644,8 +638,7 @@
|
|||
],
|
||||
"source": [
|
||||
"# Run OpenMC\n",
|
||||
"executor = openmc.Executor()\n",
|
||||
"executor.run_simulation()"
|
||||
"openmc.run()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -678,20 +671,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"In addition to the statepoint file, our simulation also created a summary file which encapsulates information about the materials and geometry. This is necessary for the `openmc.mgxs` module to properly process the tally data. We first create a `Summary` object and link it with the statepoint."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Load the summary file and link it with the statepoint\n",
|
||||
"su = openmc.Summary('summary.h5')\n",
|
||||
"sp.link_with_summary(su)"
|
||||
"In addition to the statepoint file, our simulation also created a summary file which encapsulates information about the materials and geometry. By default, a `Summary` object is automatically linked when a `StatePoint` is loaded. This is necessary for the `openmc.mgxs` module to properly process the tally data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -703,7 +683,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"execution_count": 17,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -738,7 +718,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"execution_count": 18,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -773,7 +753,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"execution_count": 19,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -820,7 +800,7 @@
|
|||
"0 1 2 total 1.292013 0.007642"
|
||||
]
|
||||
},
|
||||
"execution_count": 20,
|
||||
"execution_count": 19,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -839,7 +819,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": 20,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -857,7 +837,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 21,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -884,7 +864,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": 22,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -941,7 +921,7 @@
|
|||
"1 (((total / flux) - (absorption / flux)) - (sca... 1.44e-15 2.57e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
"execution_count": 22,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -963,7 +943,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"execution_count": 23,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1020,7 +1000,7 @@
|
|||
"1 ((absorption / flux) / (total / flux)) 1.93e-02 9.46e-05 "
|
||||
]
|
||||
},
|
||||
"execution_count": 24,
|
||||
"execution_count": 23,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1035,7 +1015,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"execution_count": 24,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1092,7 +1072,7 @@
|
|||
"1 ((scatter / flux) / (total / flux)) 9.81e-01 3.74e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1114,7 +1094,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"execution_count": 25,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1144,7 +1124,7 @@
|
|||
" <td>6.250000e-07</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>(((absorption / flux) / (total / flux)) + ((sc...</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>0.007763</td>\n",
|
||||
" </tr>\n",
|
||||
" <tr>\n",
|
||||
|
|
@ -1154,7 +1134,7 @@
|
|||
" <td>2.000000e+01</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>(((absorption / flux) / (total / flux)) + ((sc...</td>\n",
|
||||
" <td>1</td>\n",
|
||||
" <td>1.0</td>\n",
|
||||
" <td>0.003739</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
|
|
@ -1171,7 +1151,7 @@
|
|||
"1 (((absorption / flux) / (total / flux)) + ((sc... 1.00e+00 3.74e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 26,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1461
docs/source/pythonapi/examples/mgxs-part-iv.ipynb
Normal file
1461
docs/source/pythonapi/examples/mgxs-part-iv.ipynb
Normal file
File diff suppressed because one or more lines are too long
13
docs/source/pythonapi/examples/mgxs-part-iv.rst
Normal file
13
docs/source/pythonapi/examples/mgxs-part-iv.rst
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
.. _notebook_mgxs_part_iv:
|
||||
|
||||
====================================================
|
||||
MGXS Part IV: Multi-Group Mode Cross-Section Library
|
||||
====================================================
|
||||
|
||||
.. only:: html
|
||||
|
||||
.. notebook:: mgxs-part-iv.ipynb
|
||||
|
||||
.. only:: latex
|
||||
|
||||
IPython notebooks must be viewed in the online HTML documentation.
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -4,9 +4,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This notebook shows the how tallies can be combined (added, subtracted, multiplied, etc.) using the Python API in order to create derived tallies. Since no covariance information is obtained, it is assumed that tallies are completely independent of one another when propagating uncertainties. The target problem is a simple pin cell.\n",
|
||||
"\n",
|
||||
"**Note:** that this Notebook was created using the latest Pandas v0.16.1. Everything in the Notebook will wun with older versions of Pandas, but the multi-indexing option in >v0.15.0 makes the tables look prettier."
|
||||
"This notebook shows the how tallies can be combined (added, subtracted, multiplied, etc.) using the Python API in order to create derived tallies. Since no covariance information is obtained, it is assumed that tallies are completely independent of one another when propagating uncertainties. The target problem is a simple pin cell."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -15,27 +13,6 @@
|
|||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"The autoreload extension is already loaded. To reload it, use:\n",
|
||||
" %reload_ext autoreload\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"%load_ext autoreload\n",
|
||||
"%autoreload 2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import glob\n",
|
||||
|
|
@ -61,7 +38,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -85,7 +62,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 3,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -120,17 +97,14 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 4,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate a MaterialsFile, add Materials\n",
|
||||
"materials_file = openmc.MaterialsFile()\n",
|
||||
"materials_file.add_material(fuel)\n",
|
||||
"materials_file.add_material(water)\n",
|
||||
"materials_file.add_material(zircaloy)\n",
|
||||
"# Instantiate a Materials collection\n",
|
||||
"materials_file = openmc.Materials((fuel, water, zircaloy))\n",
|
||||
"materials_file.default_xs = '71c'\n",
|
||||
"\n",
|
||||
"# Export to \"materials.xml\"\n",
|
||||
|
|
@ -146,7 +120,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 5,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -175,7 +149,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": 6,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -212,7 +186,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": 7,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -239,7 +213,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": 8,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -252,18 +226,14 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": 9,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate a GeometryFile\n",
|
||||
"geometry_file = openmc.GeometryFile()\n",
|
||||
"geometry_file.geometry = geometry\n",
|
||||
"\n",
|
||||
"# Export to \"geometry.xml\"\n",
|
||||
"geometry_file.export_to_xml()"
|
||||
"geometry.export_to_xml()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -275,7 +245,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 10,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -286,8 +256,8 @@
|
|||
"inactive = 5\n",
|
||||
"particles = 2500\n",
|
||||
"\n",
|
||||
"# Instantiate a SettingsFile\n",
|
||||
"settings_file = openmc.SettingsFile()\n",
|
||||
"# Instantiate a Settings object\n",
|
||||
"settings_file = openmc.Settings()\n",
|
||||
"settings_file.batches = batches\n",
|
||||
"settings_file.inactive = inactive\n",
|
||||
"settings_file.particles = particles\n",
|
||||
|
|
@ -311,7 +281,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 11,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -325,9 +295,8 @@
|
|||
"plot.pixels = [250, 250]\n",
|
||||
"plot.color = 'mat'\n",
|
||||
"\n",
|
||||
"# Instantiate a PlotsFile, add Plot, and export to \"plots.xml\"\n",
|
||||
"plot_file = openmc.PlotsFile()\n",
|
||||
"plot_file.add_plot(plot)\n",
|
||||
"# Instantiate a Plots collection and export to \"plots.xml\"\n",
|
||||
"plot_file = openmc.Plots([plot])\n",
|
||||
"plot_file.export_to_xml()"
|
||||
]
|
||||
},
|
||||
|
|
@ -340,7 +309,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 12,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -351,32 +320,31 @@
|
|||
"0"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Run openmc in plotting mode\n",
|
||||
"executor = openmc.Executor()\n",
|
||||
"executor.plot_geometry(output=False)"
|
||||
"openmc.plot_geometry(output=False)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": 13,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAAAFzUkdC\nAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAxQTFRF\n////chIS6YCRTb/E6kGE+wAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAALKSURB\nVGje7dpLcqQwDAbgHHE2YeEj+D4cwQucBUfo+3CEXoSp8OhuhF70T4qpKXmdr21LogK2Pj7A8QmN\nP+HDhw8fPnz48Kf6VH9G+66vy+je8k19jnf8C5dXIPv86ms56lPdjvaYbyodx3ze+XLE76cXFiD4\nzPji99z0/AJ4n1lfvJ6fnl0A6x+578efMSg1wPr172/jPO5yFXM+Ef78gdblM+WPHyguP//t1/g6\npA0wfln+ho/fwgYYn19C/xwDvwHGc9OvC+hs37DTrwuwfWanXxdQTC9Mvyygs3wjTL8uwPJpn/tN\nDbSGz7T0SBEWw4vLXzbQ6b6RoveIoO6TvPxlA63qs7z8ZQPF9F+SH22vbX8OQKf5Rtv+EgDNJ3X5\n8wZaxWd1+fMGiuFvir8bvjp8J/tGy/6jAmRvhW8fwL3vVT+o3grfPoB7r/IpALI3tz8FoJN84/NV\n873hB8UnM3xzANtf8nb4dwmg3grfFEDJO8JPE0i9Ff4pAYL3pI8mkHor/HMCeO9JH00g9SafEsh7\nT/ppARBvp48UwJnelT5SACd7O31TAlnvKx9SQCd7B58KgPO+8iMFuPWe9E8F8BveWX7bAjzX9y4/\n/Jve+fhsH6Ctv7n8PTzjvY/v9gEOHz58+PBX+6v/f/wPvnd54f3j6venE/yl769Xv7+j3x/o98/V\n32/o9+fl389Xnx+g5x/o+Qt6/oOeP6HnX+j5G3z+h54/ouefV5/foufP6Pk3ev4On/+j9w/o/Qd6\n/4Le/6D3T/D9V67Y/ZsVQBq+s+8f0ftP+P41axXguP9NWgDuu/Cdfv+N3r/D9/9TAID+A7T/Ae2/\ngPs/0P4TtP8F7r9J3AIO9P+g/Udw/9Oygbf7r9D+L7j/DO1/Q/vv4P4/tP8Q7n9E+y/h/k+0/xTu\nf4X7b+H+X7T/+BPuf3aM8OHDhw8fPnz4w/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIw\nMTYtMDQtMTNUMTE6Mzk6MTQtMDQ6MDALPlLjAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA0LTEz\nVDExOjM5OjE0LTA0OjAwemPqXwAAAABJRU5ErkJggg==\n",
|
||||
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6AgMAAAD1grKuAAAABGdBTUEAALGPC/xhBQAAACBjSFJN\nAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEX///9yEhLpgJFNv8Tq\nQYT7AAAAAWJLR0QAiAUdSAAAAAd0SU1FB+AFBRQzLY81/IkAAALKSURBVGje7dpLcqQwDAbgHHE2\nYeEj+D4cwQucBUfo+3CEXoSp8OhuhF70T4qpKXmdr21LogK2Pj7A8QmNP+HDhw8fPnz48Kf6VH9G\n+66vy+je8k19jnf8C5dXIPv86ms56lPdjvaYbyodx3ze+XLE76cXFiD4zPji99z0/AJ4n1lfvJ6f\nnl0A6x+578efMSg1wPr172/jPO5yFXM+Ef78gdblM+WPHyguP//t1/g6pA0wfln+ho/fwgYYn19C\n/xwDvwHGc9OvC+hs37DTrwuwfWanXxdQTC9Mvyygs3wjTL8uwPJpn/tNDbSGz7T0SBEWw4vLXzbQ\n6b6RoveIoO6TvPxlA63qs7z8ZQPF9F+SH22vbX8OQKf5Rtv+EgDNJ3X58wZaxWd1+fMGiuFvir8b\nvjp8J/tGy/6jAmRvhW8fwL3vVT+o3grfPoB7r/IpALI3tz8FoJN84/NV873hB8UnM3xzANtf8nb4\ndwmg3grfFEDJO8JPE0i9Ff4pAYL3pI8mkHor/HMCeO9JH00g9SafEsh7T/ppARBvp48UwJnelT5S\nACd7O31TAlnvKx9SQCd7B58KgPO+8iMFuPWe9E8F8BveWX7bAjzX9y4//Jve+fhsH6Ctv7n8PTzj\nvY/v9gEOHz58+PBX+6v/f/wPvnd54f3j6venE/yl769Xv7+j3x/o98/V32/o9+fl389Xnx+g5x/o\n+Qt6/oOeP6HnX+j5G3z+h54/ouefV5/foufP6Pk3ev4On/+j9w/o/Qd6/4Le/6D3T/D9V67Y/ZsV\nQBq+s+8f0ftP+P41axXguP9NWgDuu/Cdfv+N3r/D9/9TAID+A7T/Ae2/gPs/0P4TtP8F7r9J3AIO\n9P+g/Udw/9Oygbf7r9D+L7j/DO1/Q/vv4P4/tP8Q7n9E+y/h/k+0/xTuf4X7b+H+X7T/+BPuf3aM\n8OHDhw8fPnz4w/4vzcvgeY10sY0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMTYtMDUtMDVUMTQ6NTE6\nNDUtMDY6MDCqOITjAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE2LTA1LTA1VDE0OjUxOjQ1LTA2OjAw\n22U8XwAAAABJRU5ErkJggg==\n",
|
||||
"text/plain": [
|
||||
"<IPython.core.display.Image object>"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -398,19 +366,19 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"execution_count": 14,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Instantiate an empty TalliesFile\n",
|
||||
"tallies_file = openmc.TalliesFile()"
|
||||
"# Instantiate an empty Tallies object\n",
|
||||
"tallies_file = openmc.Tallies()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"execution_count": 15,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -426,7 +394,7 @@
|
|||
"tally.filters = [openmc.Filter(type='cell', bins=[fuel_cell.id, moderator_cell.id])]\n",
|
||||
"tally.filters.append(energy_filter)\n",
|
||||
"tally.scores = ['flux']\n",
|
||||
"tallies_file.add_tally(tally)\n",
|
||||
"tallies_file.append(tally)\n",
|
||||
"\n",
|
||||
"# Instantiate reaction rate Tally in fuel\n",
|
||||
"tally = openmc.Tally(name='fuel rxn rates')\n",
|
||||
|
|
@ -434,7 +402,7 @@
|
|||
"tally.filters.append(energy_filter)\n",
|
||||
"tally.scores = ['nu-fission', 'scatter']\n",
|
||||
"tally.nuclides = [u238, u235]\n",
|
||||
"tallies_file.add_tally(tally)\n",
|
||||
"tallies_file.append(tally)\n",
|
||||
"\n",
|
||||
"# Instantiate reaction rate Tally in moderator\n",
|
||||
"tally = openmc.Tally(name='moderator rxn rates')\n",
|
||||
|
|
@ -442,12 +410,12 @@
|
|||
"tally.filters.append(energy_filter)\n",
|
||||
"tally.scores = ['absorption', 'total']\n",
|
||||
"tally.nuclides = [o16, h1]\n",
|
||||
"tallies_file.add_tally(tally)"
|
||||
"tallies_file.append(tally)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"execution_count": 16,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -458,8 +426,22 @@
|
|||
"abs_rate = openmc.Tally(name='abs. rate')\n",
|
||||
"fiss_rate.scores = ['nu-fission']\n",
|
||||
"abs_rate.scores = ['absorption']\n",
|
||||
"tallies_file.add_tally(fiss_rate)\n",
|
||||
"tallies_file.add_tally(abs_rate)"
|
||||
"tallies_file += (fiss_rate, abs_rate)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# 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.Filter(type='energy', bins=[0., 0.625e-6])]\n",
|
||||
"tallies_file.append(therm_abs_rate)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -469,33 +451,18 @@
|
|||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# 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.Filter(type='energy', bins=[0., 0.625e-6])]\n",
|
||||
"tallies_file.add_tally(therm_abs_rate)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# 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.Filter(type='energy', bins=[0., 0.625e-6]),\n",
|
||||
" openmc.Filter(type='cell', bins=[fuel_cell.id])]\n",
|
||||
"tallies_file.add_tally(fuel_therm_abs_rate)"
|
||||
"tallies_file.append(fuel_therm_abs_rate)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"execution_count": 19,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -505,12 +472,12 @@
|
|||
"therm_fiss_rate = openmc.Tally(name='therm. fiss. rate')\n",
|
||||
"therm_fiss_rate.scores = ['nu-fission']\n",
|
||||
"therm_fiss_rate.filters = [openmc.Filter(type='energy', bins=[0., 0.625e-6])]\n",
|
||||
"tallies_file.add_tally(therm_fiss_rate)"
|
||||
"tallies_file.append(therm_fiss_rate)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"execution_count": 20,
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
|
|
@ -525,12 +492,12 @@
|
|||
"tally.filters.append(energy_filter)\n",
|
||||
"tally.scores = ['nu-fission', 'scatter']\n",
|
||||
"tally.nuclides = [h1, u238]\n",
|
||||
"tallies_file.add_tally(tally)"
|
||||
"tallies_file.append(tally)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": 21,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -549,7 +516,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"execution_count": 22,
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"scrolled": true
|
||||
|
|
@ -572,12 +539,11 @@
|
|||
" 888\n",
|
||||
" 888\n",
|
||||
"\n",
|
||||
" Copyright: 2011-2015 Massachusetts Institute of Technology\n",
|
||||
" License: http://mit-crpg.github.io/openmc/license.html\n",
|
||||
" Copyright: 2011-2016 Massachusetts Institute of Technology\n",
|
||||
" License: http://openmc.readthedocs.org/en/latest/license.html\n",
|
||||
" Version: 0.7.1\n",
|
||||
" Git SHA1: eeb5091ca3a34cc85df73a3318cae2b6c7097413\n",
|
||||
" Date/Time: 2016-04-13 11:39:14\n",
|
||||
" MPI Processes: 1\n",
|
||||
" Git SHA1: df280b60eb1c6d7b7f842e05ede734a4883a0fc8\n",
|
||||
" Date/Time: 2016-05-05 14:51:45\n",
|
||||
"\n",
|
||||
" ===========================================================================\n",
|
||||
" ========================> INITIALIZATION <=========================\n",
|
||||
|
|
@ -633,20 +599,20 @@
|
|||
"\n",
|
||||
" =======================> TIMING STATISTICS <=======================\n",
|
||||
"\n",
|
||||
" Total time for initialization = 4.0300E-01 seconds\n",
|
||||
" Reading cross sections = 8.6000E-02 seconds\n",
|
||||
" Total time in simulation = 1.4439E+01 seconds\n",
|
||||
" Time in transport only = 1.4430E+01 seconds\n",
|
||||
" Time in inactive batches = 2.2790E+00 seconds\n",
|
||||
" Time in active batches = 1.2160E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 2.0000E-03 seconds\n",
|
||||
" Sampling source sites = 1.0000E-03 seconds\n",
|
||||
" SEND/RECV source sites = 1.0000E-03 seconds\n",
|
||||
" Time accumulating tallies = 0.0000E+00 seconds\n",
|
||||
" Total time for finalization = 1.0000E-03 seconds\n",
|
||||
" Total time elapsed = 1.4856E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 5484.86 neutrons/second\n",
|
||||
" Calculation Rate (active) = 3083.88 neutrons/second\n",
|
||||
" Total time for initialization = 7.2500E-01 seconds\n",
|
||||
" Reading cross sections = 4.4400E-01 seconds\n",
|
||||
" Total time in simulation = 1.5547E+01 seconds\n",
|
||||
" Time in transport only = 1.5527E+01 seconds\n",
|
||||
" Time in inactive batches = 2.2880E+00 seconds\n",
|
||||
" Time in active batches = 1.3259E+01 seconds\n",
|
||||
" Time synchronizing fission bank = 1.0000E-03 seconds\n",
|
||||
" Sampling source sites = 0.0000E+00 seconds\n",
|
||||
" SEND/RECV source sites = 0.0000E+00 seconds\n",
|
||||
" Time accumulating tallies = 1.0000E-03 seconds\n",
|
||||
" Total time for finalization = 2.0000E-03 seconds\n",
|
||||
" Total time elapsed = 1.6291E+01 seconds\n",
|
||||
" Calculation Rate (inactive) = 5463.29 neutrons/second\n",
|
||||
" Calculation Rate (active) = 2828.27 neutrons/second\n",
|
||||
"\n",
|
||||
" ============================> RESULTS <============================\n",
|
||||
"\n",
|
||||
|
|
@ -664,7 +630,7 @@
|
|||
"0"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
"execution_count": 22,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -673,8 +639,8 @@
|
|||
"# Remove old HDF5 (summary, statepoint) files\n",
|
||||
"!rm statepoint.*\n",
|
||||
"\n",
|
||||
"# Run OpenMC with MPI!\n",
|
||||
"executor.run_simulation()"
|
||||
"# Run OpenMC!\n",
|
||||
"openmc.run()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -693,7 +659,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"execution_count": 23,
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"scrolled": true
|
||||
|
|
@ -704,27 +670,6 @@
|
|||
"sp = openmc.StatePoint('statepoint.20.h5')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You may have also noticed we instructed OpenMC to create a summary file with lots of geometry information in it. This can help to produce more sensible output from the Python API, so we will use the summary file to link against."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"scrolled": true
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Load the summary file and link with statepoint\n",
|
||||
"su = openmc.Summary('summary.h5')\n",
|
||||
"sp.link_with_summary(su)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
|
@ -736,7 +681,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 26,
|
||||
"execution_count": 24,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -772,7 +717,7 @@
|
|||
"0 total (nu-fission / absorption) 1.04e+00 6.14e-03"
|
||||
]
|
||||
},
|
||||
"execution_count": 26,
|
||||
"execution_count": 24,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -796,7 +741,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"execution_count": 25,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -820,7 +765,7 @@
|
|||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>absorption</td>\n",
|
||||
|
|
@ -836,7 +781,7 @@
|
|||
"0 0.00e+00 6.25e-07 total absorption 6.93e-01 4.11e-03"
|
||||
]
|
||||
},
|
||||
"execution_count": 27,
|
||||
"execution_count": 25,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -858,7 +803,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 28,
|
||||
"execution_count": 26,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -882,7 +827,7 @@
|
|||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>nu-fission</td>\n",
|
||||
|
|
@ -898,7 +843,7 @@
|
|||
"0 0.00e+00 6.25e-07 total nu-fission 1.20e+00 7.60e-03"
|
||||
]
|
||||
},
|
||||
"execution_count": 28,
|
||||
"execution_count": 26,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -919,6 +864,137 @@
|
|||
"where the superscript $F$ denotes fuel."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 27,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>energy low [MeV]</th>\n",
|
||||
" <th>energy high [MeV]</th>\n",
|
||||
" <th>cell</th>\n",
|
||||
" <th>nuclide</th>\n",
|
||||
" <th>score</th>\n",
|
||||
" <th>mean</th>\n",
|
||||
" <th>std. dev.</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>10000</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>absorption</td>\n",
|
||||
" <td>0.748413</td>\n",
|
||||
" <td>0.004723</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</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.48e-01 \n",
|
||||
"\n",
|
||||
" std. dev. \n",
|
||||
"0 4.72e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 27,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Compute thermal flux utilization factor using tally arithmetic\n",
|
||||
"fuel_therm_abs_rate = sp.get_tally(name='fuel therm. abs. rate')\n",
|
||||
"therm_util = fuel_therm_abs_rate / therm_abs_rate\n",
|
||||
"therm_util.get_pandas_dataframe()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The final factor is the number of fission neutrons produced per absorption in fuel, calculated as $$\\eta = \\frac{\\langle \\nu\\Sigma_f\\phi \\rangle_T}{\\langle \\Sigma_a \\phi \\rangle^F_T}$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 28,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>energy low [MeV]</th>\n",
|
||||
" <th>energy high [MeV]</th>\n",
|
||||
" <th>cell</th>\n",
|
||||
" <th>nuclide</th>\n",
|
||||
" <th>score</th>\n",
|
||||
" <th>mean</th>\n",
|
||||
" <th>std. dev.</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>10000</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>(nu-fission / absorption)</td>\n",
|
||||
" <td>1.663385</td>\n",
|
||||
" <td>0.011253</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" energy low [MeV] energy high [MeV] cell nuclide \\\n",
|
||||
"0 0.00e+00 6.25e-07 10000 total \n",
|
||||
"\n",
|
||||
" score mean std. dev. \n",
|
||||
"0 (nu-fission / absorption) 1.66e+00 1.13e-02 "
|
||||
]
|
||||
},
|
||||
"execution_count": 28,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Compute neutrons produced per absorption (eta) using tally arithmetic\n",
|
||||
"eta = therm_fiss_rate / fuel_therm_abs_rate\n",
|
||||
"eta.get_pandas_dataframe()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now we can calculate $k_\\infty$ using the product of the factors form the four-factor formula."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
|
|
@ -946,138 +1022,7 @@
|
|||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>10000</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>absorption</td>\n",
|
||||
" <td>0.748413</td>\n",
|
||||
" <td>0.004723</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</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.48e-01 \n",
|
||||
"\n",
|
||||
" std. dev. \n",
|
||||
"0 4.72e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Compute thermal flux utilization factor using tally arithmetic\n",
|
||||
"fuel_therm_abs_rate = sp.get_tally(name='fuel therm. abs. rate')\n",
|
||||
"therm_util = fuel_therm_abs_rate / therm_abs_rate\n",
|
||||
"therm_util.get_pandas_dataframe()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The final factor is the number of fission neutrons produced per absorption in fuel, calculated as $$\\eta = \\frac{\\langle \\nu\\Sigma_f\\phi \\rangle_T}{\\langle \\Sigma_a \\phi \\rangle^F_T}$$"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 30,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>energy low [MeV]</th>\n",
|
||||
" <th>energy high [MeV]</th>\n",
|
||||
" <th>cell</th>\n",
|
||||
" <th>nuclide</th>\n",
|
||||
" <th>score</th>\n",
|
||||
" <th>mean</th>\n",
|
||||
" <th>std. dev.</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>10000</td>\n",
|
||||
" <td>total</td>\n",
|
||||
" <td>(nu-fission / absorption)</td>\n",
|
||||
" <td>1.663385</td>\n",
|
||||
" <td>0.011253</td>\n",
|
||||
" </tr>\n",
|
||||
" </tbody>\n",
|
||||
"</table>\n",
|
||||
"</div>"
|
||||
],
|
||||
"text/plain": [
|
||||
" energy low [MeV] energy high [MeV] cell nuclide \\\n",
|
||||
"0 0.00e+00 6.25e-07 10000 total \n",
|
||||
"\n",
|
||||
" score mean std. dev. \n",
|
||||
"0 (nu-fission / absorption) 1.66e+00 1.13e-02 "
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"# Compute neutrons produced per absorption (eta) using tally arithmetic\n",
|
||||
"eta = therm_fiss_rate / fuel_therm_abs_rate\n",
|
||||
"eta.get_pandas_dataframe()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now we can calculate $k_\\infty$ using the product of the factors form the four-factor formula."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 31,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/html": [
|
||||
"<div>\n",
|
||||
"<table border=\"1\" class=\"dataframe\">\n",
|
||||
" <thead>\n",
|
||||
" <tr style=\"text-align: right;\">\n",
|
||||
" <th></th>\n",
|
||||
" <th>energy low [MeV]</th>\n",
|
||||
" <th>energy high [MeV]</th>\n",
|
||||
" <th>cell</th>\n",
|
||||
" <th>nuclide</th>\n",
|
||||
" <th>score</th>\n",
|
||||
" <th>mean</th>\n",
|
||||
" <th>std. dev.</th>\n",
|
||||
" </tr>\n",
|
||||
" </thead>\n",
|
||||
" <tbody>\n",
|
||||
" <tr>\n",
|
||||
" <th>0</th>\n",
|
||||
" <td>0</td>\n",
|
||||
" <td>0.0</td>\n",
|
||||
" <td>6.250000e-07</td>\n",
|
||||
" <td>10000</td>\n",
|
||||
" <td>total</td>\n",
|
||||
|
|
@ -1097,7 +1042,7 @@
|
|||
"0 (((absorption * nu-fission) * absorption) * (n... 1.04e+00 1.32e-02 "
|
||||
]
|
||||
},
|
||||
"execution_count": 31,
|
||||
"execution_count": 29,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1118,7 +1063,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 32,
|
||||
"execution_count": 30,
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"scrolled": true
|
||||
|
|
@ -1134,7 +1079,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 33,
|
||||
"execution_count": 31,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1263,7 +1208,7 @@
|
|||
"7 (scatter / flux) 3.37e-03 1.44e-05 "
|
||||
]
|
||||
},
|
||||
"execution_count": 33,
|
||||
"execution_count": 31,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1282,7 +1227,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 34,
|
||||
"execution_count": 32,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1314,7 +1259,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 35,
|
||||
"execution_count": 33,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1338,7 +1283,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 36,
|
||||
"execution_count": 34,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1369,7 +1314,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 37,
|
||||
"execution_count": 35,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1450,7 +1395,7 @@
|
|||
"3 7.32e-04 "
|
||||
]
|
||||
},
|
||||
"execution_count": 37,
|
||||
"execution_count": 35,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1463,7 +1408,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 38,
|
||||
"execution_count": 36,
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
},
|
||||
|
|
@ -1604,7 +1549,7 @@
|
|||
"8 3.20e-03 "
|
||||
]
|
||||
},
|
||||
"execution_count": 38,
|
||||
"execution_count": 36,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
|
|
@ -1620,21 +1565,21 @@
|
|||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 2",
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python2"
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 2
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython2",
|
||||
"version": "2.7.6"
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.1"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
|||
|
|
@ -13,6 +13,21 @@ online. We recommend going through the modules from Codecademy_ and/or the
|
|||
`Scipy lectures`_. The full API documentation serves to provide more information
|
||||
on a given module or class.
|
||||
|
||||
-------------------------
|
||||
Example Jupyter Notebooks
|
||||
-------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
examples/post-processing
|
||||
examples/pandas-dataframes
|
||||
examples/tally-arithmetic
|
||||
examples/mgxs-part-i
|
||||
examples/mgxs-part-ii
|
||||
examples/mgxs-part-iii
|
||||
examples/mgxs-part-iv
|
||||
|
||||
------------------------------------
|
||||
:mod:`openmc` -- Basic Functionality
|
||||
------------------------------------
|
||||
|
|
@ -29,7 +44,7 @@ Classes
|
|||
:template: myclass.rst
|
||||
|
||||
openmc.XSdata
|
||||
openmc.MGXSLibraryFile
|
||||
openmc.MGXSLibrary
|
||||
|
||||
Functions
|
||||
+++++++++
|
||||
|
|
@ -50,7 +65,7 @@ Simulation Settings
|
|||
|
||||
openmc.Source
|
||||
openmc.ResonanceScattering
|
||||
openmc.SettingsFile
|
||||
openmc.Settings
|
||||
|
||||
Material Specification
|
||||
----------------------
|
||||
|
|
@ -64,7 +79,7 @@ Material Specification
|
|||
openmc.Element
|
||||
openmc.Macroscopic
|
||||
openmc.Material
|
||||
openmc.MaterialsFile
|
||||
openmc.Materials
|
||||
|
||||
Building geometry
|
||||
-----------------
|
||||
|
|
@ -96,7 +111,6 @@ Building geometry
|
|||
openmc.RectLattice
|
||||
openmc.HexLattice
|
||||
openmc.Geometry
|
||||
openmc.GeometryFile
|
||||
|
||||
Many of the above classes are derived from several abstract classes:
|
||||
|
||||
|
|
@ -109,6 +123,16 @@ Many of the above classes are derived from several abstract classes:
|
|||
openmc.Region
|
||||
openmc.Lattice
|
||||
|
||||
One function is also available to create a hexagonal region defined by the
|
||||
intersection of six surface half-spaces.
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myfunction.rst
|
||||
|
||||
openmc.make_hexagon_region
|
||||
|
||||
Constructing Tallies
|
||||
--------------------
|
||||
|
||||
|
|
@ -121,7 +145,7 @@ Constructing Tallies
|
|||
openmc.Mesh
|
||||
openmc.Trigger
|
||||
openmc.Tally
|
||||
openmc.TalliesFile
|
||||
openmc.Tallies
|
||||
|
||||
Coarse Mesh Finite Difference Acceleration
|
||||
------------------------------------------
|
||||
|
|
@ -132,7 +156,7 @@ Coarse Mesh Finite Difference Acceleration
|
|||
:template: myclass.rst
|
||||
|
||||
openmc.CMFDMesh
|
||||
openmc.CMFDFile
|
||||
openmc.CMFD
|
||||
|
||||
Plotting
|
||||
--------
|
||||
|
|
@ -143,7 +167,7 @@ Plotting
|
|||
:template: myclass.rst
|
||||
|
||||
openmc.Plot
|
||||
openmc.PlotsFile
|
||||
openmc.Plots
|
||||
|
||||
Running OpenMC
|
||||
--------------
|
||||
|
|
@ -151,9 +175,10 @@ Running OpenMC
|
|||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myclass.rst
|
||||
:template: myfunction.rst
|
||||
|
||||
openmc.Executor
|
||||
openmc.run
|
||||
openmc.plot_geometry
|
||||
|
||||
Post-processing
|
||||
---------------
|
||||
|
|
@ -271,20 +296,6 @@ Multi-group Cross Section Libraries
|
|||
|
||||
openmc.mgxs.Library
|
||||
|
||||
-------------------------
|
||||
Example Jupyter Notebooks
|
||||
-------------------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
examples/post-processing
|
||||
examples/pandas-dataframes
|
||||
examples/tally-arithmetic
|
||||
examples/mgxs-part-i
|
||||
examples/mgxs-part-ii
|
||||
examples/mgxs-part-iii
|
||||
|
||||
.. _Jupyter: https://jupyter.org/
|
||||
.. _NumPy: http://www.numpy.org/
|
||||
.. _Codecademy: https://www.codecademy.com/tracks/python
|
||||
|
|
|
|||
|
|
@ -14,7 +14,5 @@ essential aspects of using OpenMC to perform simulations.
|
|||
beginners
|
||||
install
|
||||
input
|
||||
mgxs_library
|
||||
output/index
|
||||
processing
|
||||
troubleshoot
|
||||
|
|
|
|||
|
|
@ -1066,6 +1066,20 @@ Each ``<cell>`` element can have the following attributes or sub-elements:
|
|||
|
||||
<cell fill="..." rotation="0 0 90" />
|
||||
|
||||
The rotation applied is an intrinsic rotation whose Tait-Bryan angles are
|
||||
given as those specified about the x, y, and z axes respectively. That is to
|
||||
say, if the angles are :math:`(\phi, \theta, \psi)`, then the rotation
|
||||
matrix applied is :math:`R_z(\psi) R_y(\theta) R_x(\phi)` or
|
||||
|
||||
.. math::
|
||||
|
||||
\left [ \begin{array}{ccc} \cos\theta \cos\psi & -\cos\theta \sin\psi +
|
||||
\sin\phi \sin\theta \cos\psi & \sin\phi \sin\psi + \cos\phi \sin\theta
|
||||
\cos\psi \\ \cos\theta \sin\psi & \cos\phi \cos\psi + \sin\phi \sin\theta
|
||||
\sin\psi & -\sin\phi \cos\psi + \cos\phi \sin\theta \sin\psi \\
|
||||
-\sin\theta & \sin\phi \cos\theta & \cos\phi \cos\theta \end{array}
|
||||
\right ]
|
||||
|
||||
*Default*: None
|
||||
|
||||
:translation:
|
||||
|
|
@ -1248,11 +1262,10 @@ Each ``material`` element can have the following attributes or sub-elements:
|
|||
An element with attributes/sub-elements called ``value`` and ``units``. The
|
||||
``value`` attribute is the numeric value of the density while the ``units``
|
||||
can be "g/cm3", "kg/m3", "atom/b-cm", "atom/cm3", or "sum". The "sum" unit
|
||||
indicates that values appearing in ``ao`` attributes for ``<nuclide>`` and
|
||||
``<element>`` sub-elements are to be interpreted as nuclide/element
|
||||
densities in atom/b-cm, and the total density of the material is taken as
|
||||
the sum of all nuclides/elements. The "sum" option cannot be used in
|
||||
conjunction with weight percents. The "macro" unit is used with
|
||||
indicates that values appearing in ``ao`` or ``wo`` attributes for ``<nuclide>``
|
||||
and ``<element>`` sub-elements are to be interpreted as absolute nuclide/element
|
||||
densities in atom/b-cm or g/cm3, and the total density of the material is
|
||||
taken as the sum of all nuclides/elements. The "macro" unit is used with
|
||||
a ``macroscopic`` quantity to indicate that the density is already included
|
||||
in the library and thus not needed here. However, if a value is provided
|
||||
for the ``value``, then this is treated as a number density multiplier on
|
||||
|
|
@ -1976,7 +1989,7 @@ sub-elements:
|
|||
datafiles can be processed into 3D SILO files using the
|
||||
``openmc-voxel-to-silovtk`` utility provided with the OpenMC source, and
|
||||
subsequently viewed with a 3D viewer such as VISIT or Paraview. See the
|
||||
:ref:`usersguide_voxel` for information about the datafile structure.
|
||||
:ref:`io_voxel` for information about the datafile structure.
|
||||
|
||||
.. note:: Since the PPM format is saved without any kind of compression,
|
||||
the resulting file sizes can be quite large. Saving the image in
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ or
|
|||
* `VTK <http://www.vtk.org/>`_ with python bindings. On debian derivatives,
|
||||
these are easily obtained with ``sudo apt-get install python-vtk``
|
||||
|
||||
For the HDF5 file structure, see :ref:`usersguide_voxel`.
|
||||
For the HDF5 file structure, see :ref:`io_voxel`.
|
||||
|
||||
Once processed into a standard 3D file format, colors and masks can be defined
|
||||
using the stored id numbers to better explore the geometry. The process for
|
||||
|
|
@ -195,7 +195,7 @@ Data Extraction
|
|||
---------------
|
||||
|
||||
A great deal of information is available in statepoint files (See
|
||||
:ref:`usersguide_statepoint`), all of which is accessible through the Python
|
||||
:ref:`io_statepoint`), all of which is accessible through the Python
|
||||
API. The :class:`openmc.StatePoint` class can load statepoints and access data
|
||||
as requested; it is used in many of the provided plotting utilities, OpenMC's
|
||||
regression test suite, and can be used in user-created scripts to carry out
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue