mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #1795 from paulromano/prepare-0.12.1
Preparation for release of version 0.12.1
This commit is contained in:
commit
e6bee33a14
48 changed files with 447 additions and 293 deletions
|
|
@ -215,7 +215,7 @@ Documentation
|
|||
-------------
|
||||
|
||||
Classes, structs, and functions are to be annotated for the `Doxygen
|
||||
<http://www.doxygen.nl/>`_ documentation generation tool. Use the ``\`` form of
|
||||
<https://www.doxygen.nl/>`_ documentation generation tool. Use the ``\`` form of
|
||||
Doxygen commands, e.g., ``\brief`` instead of ``@brief``.
|
||||
|
||||
------
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ functions/classes in the OpenMC Python API.
|
|||
Prerequisites
|
||||
-------------
|
||||
|
||||
- The test suite relies on the third-party `pytest <https://pytest.org>`_
|
||||
- The test suite relies on the third-party `pytest <https://docs.pytest.org>`_
|
||||
package. To run either or both the regression and unit test suites, it is
|
||||
assumed that you have OpenMC fully installed, i.e., the :ref:`scripts_openmc`
|
||||
executable is available on your :envvar:`PATH` and the :mod:`openmc` Python
|
||||
|
|
@ -46,7 +46,7 @@ To execute the test suite, go to the ``tests/`` directory and run::
|
|||
pytest
|
||||
|
||||
If you want to collect information about source line coverage in the Python API,
|
||||
you must have the `pytest-cov <https://pypi.python.org/pypi/pytest-cov>`_ plugin
|
||||
you must have the `pytest-cov <https://pypi.org/project/pytest-cov>`_ plugin
|
||||
installed and run::
|
||||
|
||||
pytest --cov=../openmc --cov-report=html
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ developer or send a message to the `developers mailing list`_.
|
|||
.. _property attribute: https://docs.python.org/3.6/library/functions.html#property
|
||||
.. _XML Schema Part 2: http://www.w3.org/TR/xmlschema-2/
|
||||
.. _boolean: http://www.w3.org/TR/xmlschema-2/#boolean
|
||||
.. _RELAX NG: http://relaxng.org/
|
||||
.. _compact syntax: http://relaxng.org/compact-tutorial-20030326.html
|
||||
.. _trang: http://www.thaiopensource.com/relaxng/trang.html
|
||||
.. _RELAX NG: https://relaxng.org/
|
||||
.. _compact syntax: https://relaxng.org/compact-tutorial-20030326.html
|
||||
.. _trang: https://relaxng.org/jclark/trang.html
|
||||
.. _developers mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-dev
|
||||
|
|
|
|||
|
|
@ -122,11 +122,11 @@ can interfere with virtual environments.
|
|||
|
||||
.. _git: http://git-scm.com/
|
||||
.. _GitHub: https://github.com/
|
||||
.. _git flow: http://nvie.com/git-model
|
||||
.. _valgrind: http://valgrind.org/
|
||||
.. _git flow: https://nvie.com/git-model
|
||||
.. _valgrind: https://www.valgrind.org/
|
||||
.. _style guide: https://docs.openmc.org/en/latest/devguide/styleguide.html
|
||||
.. _pull request: https://help.github.com/articles/using-pull-requests
|
||||
.. _pull request: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests
|
||||
.. _openmc-dev/openmc: https://github.com/openmc-dev/openmc
|
||||
.. _paid plan: https://github.com/plans
|
||||
.. _paid plan: https://github.com/pricing
|
||||
.. _Bitbucket: https://bitbucket.org
|
||||
.. _pip: https://pip.pypa.io/en/stable/
|
||||
|
|
|
|||
1
docs/source/examples/capi.ipynb
Symbolic link
1
docs/source/examples/capi.ipynb
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../../examples/jupyter/capi.ipynb
|
||||
|
|
@ -19,7 +19,7 @@ General Usage
|
|||
post-processing
|
||||
pandas-dataframes
|
||||
tally-arithmetic
|
||||
CAPI
|
||||
capi
|
||||
expansion-filters
|
||||
search
|
||||
nuclear-data
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ programming model.
|
|||
|
||||
OpenMC was originally developed by members of the `Computational Reactor Physics
|
||||
Group <http://crpg.mit.edu>`_ at the `Massachusetts Institute of Technology
|
||||
<http://web.mit.edu>`_ starting in 2011. Various universities, laboratories, and
|
||||
other organizations now contribute to the development of OpenMC. For more
|
||||
<https://web.mit.edu>`_ starting in 2011. Various universities, laboratories,
|
||||
and other organizations now contribute to the development of OpenMC. For more
|
||||
information on OpenMC, feel free to post a message on the `OpenMC Discourse
|
||||
Forum <https://openmc.discourse.group/>`_.
|
||||
|
||||
|
|
|
|||
|
|
@ -49,4 +49,4 @@ Windowed Multipole Library Format
|
|||
windows[i, 1] are, respectively, the indexes (1-based) of the first and
|
||||
last pole in window i.
|
||||
|
||||
.. _h5py: http://docs.h5py.org/en/latest/
|
||||
.. _h5py: https://docs.h5py.org/en/latest/
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ nuclides or materials.
|
|||
|
||||
The current version of the multi-group library file format is 1.0.
|
||||
|
||||
.. _HDF5: http://www.hdfgroup.org/HDF5/
|
||||
.. _HDF5: https://www.hdfgroup.org/solutions/hdf5/
|
||||
|
||||
.. _mgxs_lib_spec:
|
||||
|
||||
|
|
|
|||
|
|
@ -269,12 +269,12 @@ or even isotropic scattering.
|
|||
|
||||
.. _logarithmic mapping technique:
|
||||
https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-14-24530.pdf
|
||||
.. _Hwang: http://www.ans.org/pubs/journals/nse/a_16381
|
||||
.. _Hwang: https://doi.org/10.13182/NSE87-A16381
|
||||
.. _Josey: https://doi.org/10.1016/j.jcp.2015.08.013
|
||||
.. _WMP Library: https://github.com/mit-crpg/WMP_Library
|
||||
.. _MCNP: http://mcnp.lanl.gov
|
||||
.. _MCNP: https://mcnp.lanl.gov
|
||||
.. _Serpent: http://montecarlo.vtt.fi
|
||||
.. _NJOY: http://t2.lanl.gov/codes.shtml
|
||||
.. _ENDF/B data: http://www.nndc.bnl.gov/endf
|
||||
.. _NJOY: https://www.njoy21.io/NJOY21/
|
||||
.. _ENDF/B data: https://www.nndc.bnl.gov/endf/b8.0/
|
||||
.. _Leppanen: https://doi.org/10.1016/j.anucene.2009.03.019
|
||||
.. _algorithms: http://ab-initio.mit.edu/wiki/index.php/Faddeeva_Package
|
||||
|
|
|
|||
|
|
@ -962,6 +962,6 @@ surface is known as in :ref:`reflection`.
|
|||
|
||||
.. _constructive solid geometry: https://en.wikipedia.org/wiki/Constructive_solid_geometry
|
||||
.. _surfaces: https://en.wikipedia.org/wiki/Surface
|
||||
.. _MCNP: http://mcnp.lanl.gov
|
||||
.. _MCNP: https://mcnp.lanl.gov
|
||||
.. _Serpent: http://montecarlo.vtt.fi
|
||||
.. _Monte Carlo Performance benchmark: https://github.com/mit-crpg/benchmarks/tree/master/mc-performance/openmc
|
||||
|
|
|
|||
|
|
@ -1695,7 +1695,7 @@ another.
|
|||
|
||||
.. _SIGMA1 method: https://doi.org/10.13182/NSE76-1
|
||||
|
||||
.. _scaled interpolation: http://www.ans.org/pubs/journals/nse/a_26575
|
||||
.. _scaled interpolation: https://doi.org/10.13182/NSE73-A26575
|
||||
|
||||
.. _probability table method: https://doi.org/10.13182/NSE72-3
|
||||
|
||||
|
|
@ -1703,23 +1703,23 @@ another.
|
|||
|
||||
.. _Foderaro: http://hdl.handle.net/1721.1/1716
|
||||
|
||||
.. _OECD: http://www.oecd-nea.org/tools/abstract/detail/NEA-1792
|
||||
.. _OECD: https://www.oecd-nea.org/tools/abstract/detail/NEA-1792
|
||||
|
||||
.. _NJOY: https://www.njoy21.io/NJOY2016/
|
||||
|
||||
.. _PREPRO: http://www-nds.iaea.org/ndspub/endf/prepro/
|
||||
.. _PREPRO: https://www-nds.iaea.org/ndspub/endf/prepro/
|
||||
|
||||
.. _endf102: https://www.oecd-nea.org/dbdata/data/manual-endf/endf102.pdf
|
||||
|
||||
.. _Monte Carlo Sampler: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-9721.pdf
|
||||
.. _Monte Carlo Sampler: https://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-09721-MS
|
||||
|
||||
.. _LA-UR-14-27694: http://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-14-27694
|
||||
.. _LA-UR-14-27694: https://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-14-27694
|
||||
|
||||
.. _MC21: http://www.osti.gov/bridge/servlets/purl/903083-HT5p1o/903083.pdf
|
||||
.. _MC21: https://www.osti.gov/biblio/903083
|
||||
|
||||
.. _Romano: https://doi.org/10.1016/j.cpc.2014.11.001
|
||||
|
||||
.. _Sutton and Brown: http://www.osti.gov/bridge/product.biblio.jsp?osti_id=307911
|
||||
.. _Sutton and Brown: https://www.osti.gov/biblio/307911
|
||||
|
||||
.. _lectures: https://laws.lanl.gov/vhosts/mcnp.lanl.gov/pdf_files/la-ur-05-4983.pdf
|
||||
|
||||
|
|
|
|||
|
|
@ -251,8 +251,8 @@ depending on how many nodes are communicating and the size of the message. Using
|
|||
multiple algorithms allows one to minimize latency for small messages and
|
||||
minimize bandwidth for long messages.
|
||||
|
||||
We will focus here on the implementation of broadcast in the MPICH2_
|
||||
implementation. For short messages, MPICH2 uses a `binomial tree`_ algorithm. In
|
||||
We will focus here on the implementation of broadcast in the MPICH_
|
||||
implementation. For short messages, MPICH uses a `binomial tree`_ algorithm. In
|
||||
this algorithm, the root process sends the data to one node in the first step,
|
||||
and then in the subsequent, both the root and the other node can send the data
|
||||
to other nodes. Thus, it takes a total of :math:`\lceil \log_2 p \rceil` steps
|
||||
|
|
@ -266,7 +266,7 @@ to complete the communication. The time to complete the communication is
|
|||
This algorithm works well for short messages since the latency term scales
|
||||
logarithmically with the number of nodes. However, for long messages, an
|
||||
algorithm that has lower bandwidth has been proposed by Barnett_ and implemented
|
||||
in MPICH2. Rather than using a binomial tree, the broadcast is divided into a
|
||||
in MPICH. Rather than using a binomial tree, the broadcast is divided into a
|
||||
scatter and an allgather. The time to complete the scatter is :math:` \log_2 p
|
||||
\: \alpha + \frac{p-1}{p} N\beta` using a binomial tree algorithm. The allgather
|
||||
is performed using a ring algorithm that completes in :math:`p-1) \alpha +
|
||||
|
|
@ -613,7 +613,7 @@ is actually independent of the number of nodes:
|
|||
|
||||
.. _Brissenden and Garlick: https://doi.org/10.1016/0306-4549(86)90095-2
|
||||
|
||||
.. _MPICH2: http://www.mcs.anl.gov/mpi/mpich
|
||||
.. _MPICH: http://www.mpich.org
|
||||
|
||||
.. _binomial tree: https://www.mcs.anl.gov/~thakur/papers/ijhpca-coll.pdf
|
||||
|
||||
|
|
@ -629,19 +629,19 @@ is actually independent of the number of nodes:
|
|||
|
||||
.. _message-passing interface: https://en.wikipedia.org/wiki/Message_Passing_Interface
|
||||
|
||||
.. _PVM: http://www.csm.ornl.gov/pvm/pvm_home.html
|
||||
.. _PVM: https://www.csm.ornl.gov/pvm/pvm_home.html
|
||||
|
||||
.. _MPI: http://www.mcs.anl.gov/research/projects/mpi/
|
||||
.. _MPI: https://www.mcs.anl.gov/research/projects/mpi/
|
||||
|
||||
.. _embarrassingly parallel: https://en.wikipedia.org/wiki/Embarrassingly_parallel
|
||||
|
||||
.. _sends: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Send.html
|
||||
.. _sends: https://www.mpich.org//static/docs/latest/www3/MPI_Send.html
|
||||
|
||||
.. _broadcasts: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Bcast.html
|
||||
.. _broadcasts: https://www.mpich.org//static/docs/latest/www3/MPI_Bcast.html
|
||||
|
||||
.. _scatter: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Scatter.html
|
||||
.. _scatter: https://www.mpich.org//static/docs/latest/www3/MPI_Scatter.html
|
||||
|
||||
.. _allgather: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Allgather.html
|
||||
.. _allgather: https://www.mpich.org//static/docs/latest/www3/MPI_Allgather.html
|
||||
|
||||
.. _Cauchy distribution: https://en.wikipedia.org/wiki/Cauchy_distribution
|
||||
|
||||
|
|
|
|||
|
|
@ -1069,6 +1069,6 @@ emitted photon.
|
|||
|
||||
.. _Kaltiaisenaho: https://aaltodoc.aalto.fi/bitstream/handle/123456789/21004/master_Kaltiaisenaho_Toni_2016.pdf
|
||||
|
||||
.. _Salvat: http://www.oecd-nea.org/globalsearch/download.php?doc=77434
|
||||
.. _Salvat: https://www.oecd-nea.org/globalsearch/download.php?doc=77434
|
||||
|
||||
.. _Sternheimer: https://doi.org/10.1103/PhysRevB.26.6067
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ Python API
|
|||
OpenMC includes a rich Python API that enables programmatic pre- and
|
||||
post-processing. The easiest way to begin using the API is to take a look at the
|
||||
:ref:`examples`. This assumes that you are already familiar with Python and
|
||||
common third-party packages such as `NumPy <http://www.numpy.org/>`_. If you
|
||||
have never used Python before, the prospect of learning a new code *and* a
|
||||
common third-party packages such as `NumPy <https://numpy.org/>`_. If you have
|
||||
never used Python before, the prospect of learning a new code *and* a
|
||||
programming language might sound daunting. However, you should keep in mind that
|
||||
there are many substantial benefits to using the Python API, including:
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ there are many substantial benefits to using the Python API, including:
|
|||
For those new to Python, there are many good tutorials available online. We
|
||||
recommend going through the modules from `Codecademy
|
||||
<https://www.codecademy.com/learn/learn-python-3>`_ and/or the `Scipy lectures
|
||||
<https://scipy-lectures.github.io/>`_.
|
||||
<https://scipy-lectures.org/>`_.
|
||||
|
||||
The full API documentation serves to provide more information on a given module
|
||||
or class.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ OpenMC, see :ref:`usersguide_install` in the User's Manual.
|
|||
Installing on Linux/Mac with conda-forge
|
||||
----------------------------------------
|
||||
|
||||
`Conda <http://conda.pydata.org/docs/>`_ is an open source package management
|
||||
`Conda <https://conda.io/en/latest/>`_ is an open source package management
|
||||
system and environment management system for installing multiple versions of
|
||||
software packages and their dependencies and switching easily between them. If
|
||||
you have `conda` installed on your system, OpenMC can be installed via the
|
||||
|
|
@ -25,16 +25,16 @@ you have `conda` installed on your system, OpenMC can be installed via the
|
|||
To list the versions of OpenMC that are available on the `conda-forge` channel,
|
||||
in your terminal window or an Anaconda Prompt run:
|
||||
|
||||
.. code-block:: sh
|
||||
.. code-block:: sh
|
||||
|
||||
conda search openmc
|
||||
|
||||
|
||||
OpenMC can then be installed with:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
conda create -n openmc-env openmc
|
||||
|
||||
|
||||
This will install OpenMC in a conda environment called `openmc-env`. To activate
|
||||
the environment, run:
|
||||
|
||||
|
|
@ -42,53 +42,26 @@ the environment, run:
|
|||
|
||||
conda activate openmc-env
|
||||
|
||||
--------------------------------
|
||||
Installing on Ubuntu through PPA
|
||||
--------------------------------
|
||||
|
||||
For users with Ubuntu 15.04 or later, a binary package for OpenMC is available
|
||||
through a `Personal Package Archive`_ (PPA) and can be installed through the
|
||||
`APT package manager`_. First, add the following PPA to the repository sources:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-add-repository ppa:paulromano/staging
|
||||
|
||||
Next, resynchronize the package index files:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt update
|
||||
|
||||
Now OpenMC should be recognized within the repository and can be installed:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install openmc
|
||||
|
||||
Binary packages from this PPA may exist for earlier versions of Ubuntu, but they
|
||||
are no longer supported.
|
||||
|
||||
.. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging
|
||||
.. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto
|
||||
|
||||
-------------------------------------------
|
||||
Installing on Linux/Mac/Windows with Docker
|
||||
-------------------------------------------
|
||||
|
||||
OpenMC can be easily deployed using `Docker <https://www.docker.com/>`_ on any
|
||||
Windows, Mac or Linux system. With Docker running, execute the following
|
||||
command in the shell to download and run a `Docker image`_ with the most recent release of OpenMC from `DockerHub <https://hub.docker.com/>`_ called ``openmc/openmc:v0.10.0``:
|
||||
Windows, Mac, or Linux system. With Docker running, execute the following command
|
||||
in the shell to download and run a `Docker image`_ with the most recent release
|
||||
of OpenMC from `DockerHub <https://hub.docker.com/>`_:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
docker run openmc/openmc:v0.10.0
|
||||
docker run openmc/openmc:latest
|
||||
|
||||
This will take several minutes to run depending on your internet download speed. The command will place you in an interactive shell running in a `Docker container`_ with OpenMC installed.
|
||||
This will take several minutes to run depending on your internet download speed.
|
||||
The command will place you in an interactive shell running in a `Docker
|
||||
container`_ with OpenMC installed.
|
||||
|
||||
.. note:: The ``docker run`` command supports many `options`_ for spawning
|
||||
containers -- including `mounting volumes`_ from the host
|
||||
filesystem -- which many users will find useful.
|
||||
containers including `mounting volumes`_ from the host filesystem,
|
||||
which many users will find useful.
|
||||
|
||||
.. _Docker image: https://docs.docker.com/engine/reference/commandline/images/
|
||||
.. _Docker container: https://www.docker.com/resources/what-container
|
||||
|
|
@ -112,18 +85,18 @@ To install the latest OpenMC with the Python API, use the following command:
|
|||
For more information about customizations including MPI, see the
|
||||
:ref:`detailed installation instructions using Spack <install-spack>`.
|
||||
Once installed, environment/lmod modules can be generated or Spack's `load` feature
|
||||
can be used to access the installed packages.
|
||||
can be used to access the installed packages.
|
||||
|
||||
.. _Spack: https://spack.readthedocs.io/en/latest/
|
||||
.. _setup guide: https://spack.readthedocs.io/en/latest/getting_started.html
|
||||
|
||||
---------------------------------------
|
||||
Installing from Source on Ubuntu 15.04+
|
||||
---------------------------------------
|
||||
--------------------------------
|
||||
Installing from Source on Ubuntu
|
||||
--------------------------------
|
||||
|
||||
To build OpenMC from source, several :ref:`prerequisites <prerequisites>` are
|
||||
needed. If you are using Ubuntu 15.04 or higher, all prerequisites can be
|
||||
installed directly from the package manager.
|
||||
needed. If you are using Ubuntu or higher, all prerequisites can be installed
|
||||
directly from the package manager:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -139,9 +112,9 @@ Installing from Source on Linux or Mac OS X
|
|||
All OpenMC source code is hosted on `GitHub
|
||||
<https://github.com/openmc-dev/openmc>`_. If you have `git
|
||||
<https://git-scm.com>`_, the `gcc <https://gcc.gnu.org/>`_ compiler suite,
|
||||
`CMake <http://www.cmake.org>`_, and `HDF5 <https://www.hdfgroup.org/HDF5/>`_
|
||||
installed, you can download and install OpenMC by entering the following
|
||||
commands in a terminal:
|
||||
`CMake <https://cmake.org>`_, and `HDF5
|
||||
<https://www.hdfgroup.org/solutions/hdf5/>`_ installed, you can download and
|
||||
install OpenMC be entering the following commands in a terminal:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -162,8 +135,8 @@ should specify an installation directory where you have write access, e.g.
|
|||
|
||||
The :mod:`openmc` Python package must be installed separately. The easiest way
|
||||
to install it is using `pip <https://pip.pypa.io/en/stable/>`_, which is
|
||||
included by default in Python 2.7 and Python 3.4+. From the root directory of
|
||||
the OpenMC distribution/repository, run:
|
||||
included by default in Python 3.4+. From the root directory of the OpenMC
|
||||
distribution/repository, run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
|
|||
129
docs/source/releasenotes/0.12.1.rst
Normal file
129
docs/source/releasenotes/0.12.1.rst
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
====================
|
||||
What's New in 0.12.1
|
||||
====================
|
||||
|
||||
.. currentmodule:: openmc
|
||||
|
||||
-------
|
||||
Summary
|
||||
-------
|
||||
|
||||
This release of OpenMC includes an assortment of new features and many bug fixes.
|
||||
In particular, the :mod:`openmc.deplete` module has been heavily tested which
|
||||
has resulted in a number of usability improvements, bug fixes, and other
|
||||
enhancements. Energy deposition calculations, particularly for coupled
|
||||
neutron-photon simulations, have been improved as well.
|
||||
|
||||
Improvements in modeling capabilities continue to be added to the code,
|
||||
including the ability to rotate surfaces in the Python API, several new
|
||||
"composite" surfaces, a variety of new methods on :class:`openmc.Material`,
|
||||
unstructured mesh tallies that leverage the existing DAGMC infrastructure,
|
||||
effective dose coefficients from ICRP-116, and a new cell instance tally
|
||||
filter.
|
||||
|
||||
------------
|
||||
New Features
|
||||
------------
|
||||
|
||||
- Boundary conditions have been refactored and generalized. Rotational periodic
|
||||
boundary conditions can now be applied to any N-fold symmetric geometry.
|
||||
- External source distributions have been refactored and extended. Users writing
|
||||
their own C++ custom sources need to write a class that derives from
|
||||
``openmc::Source``. These changes have enabled new functionality, such as:
|
||||
|
||||
- Mixing more than one custom source library together
|
||||
- Mixing a normal source with a custom source
|
||||
- Using a file-based source for fixed source simulations
|
||||
- Using a file-based source for eigenvalue simulations even when the number of
|
||||
particles doesn't match
|
||||
|
||||
- New capability to read and write a source file based on particles that cross a
|
||||
surface (known as a "surface source").
|
||||
- Various improvements related to depletion:
|
||||
|
||||
- Reactions used in a depletion chain can now be configured through the
|
||||
``reactions`` argument to :meth:`openmc.deplete.Chain.from_endf`.
|
||||
- Specifying a power of zero during a depletion simulation no longer results
|
||||
in an unnecessary transport solve.
|
||||
- Reaction rates can be computed either directly or using multigroup flux
|
||||
tallies that are used to collapse reaction rates afterward. This is enabled
|
||||
through the ``reaction_rate_mode`` and ``reaction_rate_opts`` to
|
||||
:class:`openmc.deplete.Operator`.
|
||||
- Depletion results can be used to create a new :class:`openmc.Materials`
|
||||
object using the :meth:`openmc.deplete.ResultsList.export_to_materials`
|
||||
method.
|
||||
|
||||
- Multigroup current and diffusion cross sections can be generated through the
|
||||
:class:`openmc.mgxs.Current` and :class:`openmc.mgxs.DiffusionCoefficient`
|
||||
classes.
|
||||
- Added :func:`openmc.data.isotopes` function that returns a list of naturally
|
||||
occurring isotopes for a given element.
|
||||
- Windowed multipole libraries can now be generated directly from the Python API
|
||||
using :meth:`openmc.data.WindowedMultipole.from_endf`.
|
||||
- The new :func:`openmc.write_source_file` function allows source files to be
|
||||
generated programmatically.
|
||||
|
||||
---------
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
- `Proper detection of MPI wrappers <https://github.com/openmc-dev/openmc/pull/1619>`_
|
||||
- `Fix related to declaration order of maps/vectors <https://github.com/openmc-dev/openmc/pull/1622>`_
|
||||
- `Check for existence of decay rate attribute <https://github.com/openmc-dev/openmc/pull/1629>`_
|
||||
- `Small updates to deal with JEFF 3.3 data <https://github.com/openmc-dev/openmc/pull/1638>`_
|
||||
- `Fix for depletion chain generation <https://github.com/openmc-dev/openmc/pull/1642>`_
|
||||
- `Fix call to superclass constructor in MeshPlotter <https://github.com/openmc-dev/openmc/pull/1644>`_
|
||||
- `Fix for data crossover in VTK files <https://github.com/openmc-dev/openmc/pull/1645>`_
|
||||
- `Make sure reaction names are recognized as valid tally scores <https://github.com/openmc-dev/openmc/pull/1647>`_
|
||||
- `Fix bug related to logging of particle restarts <https://github.com/openmc-dev/openmc/pull/1649>`_
|
||||
- `Examine if region exists before removing redundant surfaces <https://github.com/openmc-dev/openmc/pull/1650>`_
|
||||
- `Fix plotting of individual universe levels <https://github.com/openmc-dev/openmc/pull/1651>`_
|
||||
- `Mixed materials should inherit depletable attribute <https://github.com/openmc-dev/openmc/pull/1657>`_
|
||||
- `Fix typo in energy units in dose coefficients <https://github.com/openmc-dev/openmc/pull/1659/files>`_
|
||||
- `Fixes for large tally cases <https://github.com/openmc-dev/openmc/pull/1666>`_
|
||||
- `Fix verification of volume calculation results <https://github.com/openmc-dev/openmc/pull/1677>`_
|
||||
- `Fix calculation of decay energy for depletion chains <https://github.com/openmc-dev/openmc/pull/1679>`_
|
||||
- `Fix pointers in CartesianIndependent <https://github.com/openmc-dev/openmc/pull/1681>`_
|
||||
- `Ensure correct initialization of members for RegularMesh <https://github.com/openmc-dev/openmc/pull/1683>`_
|
||||
- `Add missing import in depletion module <https://github.com/openmc-dev/openmc/pull/1715>`_
|
||||
- `Fixed several bugs related to decay-rate <https://github.com/openmc-dev/openmc/pull/1718>`_
|
||||
- `Fix how depletion operator distributes burnable materials <https://github.com/openmc-dev/openmc/pull/1719>`_
|
||||
- `Fix assignment of elemental carbon in JEFF 3.3 <https://github.com/openmc-dev/openmc/pull/1722>`_
|
||||
- `Fix typo in RectangularParallelepiped.__pos__ <https://github.com/openmc-dev/openmc/pull/1724>`_
|
||||
- `Fix temperature tolerance with S(a,b) data <https://github.com/openmc-dev/openmc/pull/1733>`_
|
||||
- `Fix sampling or normal distribution <https://github.com/openmc-dev/openmc/pull/1739>`_
|
||||
- `Fix for SharedArray relaxed memory ordering <https://github.com/openmc-dev/openmc/pull/1764>`_
|
||||
- `Check for proper format of source files <https://github.com/openmc-dev/openmc/pull/1771>`_
|
||||
- `Ensure (n,gamma) reaction rate tally uses sampled cross section <https://github.com/openmc-dev/openmc/pull/1776>`_
|
||||
- `Fix for temperature range behavior <https://github.com/openmc-dev/openmc/pull/1777>`_
|
||||
|
||||
------------
|
||||
Contributors
|
||||
------------
|
||||
|
||||
This release contains new contributions from the following people:
|
||||
|
||||
- `Andrew Davis <https://github.com/makeclean>`_
|
||||
- `Guillaume Giudicelli <https://github.com/GiudGiud>`_
|
||||
- `Sterling Harper <https://github.com/smharper>`_
|
||||
- `Bryan Herman <https://github.com/bryanherman>`_
|
||||
- `Yue Jin <https://github.com/kingyue737>`_
|
||||
- `Andrew Johnson <https://github.com/drewejohnson>`_
|
||||
- `Miriam Kreher <https://github.com/mkreher13>`_
|
||||
- `Shikhar Kumar <https://github.com/shikhar413>`_
|
||||
- `Jingang Liang <https://github.com/liangjg>`_
|
||||
- `Amanda Lund <https://github.com/amandalund>`_
|
||||
- `Adam Nelson <https://github.com/nelsonag>`_
|
||||
- `April Novak <https://github.com/aprilnovak>`_
|
||||
- `YoungHui Park <https://github.com/ypark234>`_
|
||||
- `Ariful Islam Pranto <https://github.com/AI-Pranto>`_
|
||||
- `Ron Rahaman <https://github.com/RonRahaman>`_
|
||||
- `Gavin Ridley <https://github.com/gridley>`_
|
||||
- `Paul Romano <https://github.com/paulromano>`_
|
||||
- `Jonathan Shimwell <https://github.com/Shimwell>`_
|
||||
- `Dan Short <https://github.com/DanShort12>`_
|
||||
- `Patrick Shriwise <https://github.com/pshriwise>`_
|
||||
- `Roy Stogner <https://github.com/roystgnr>`_
|
||||
- `John Tramm <https://github.com/jtramm>`_
|
||||
- `Cyrus Wyett <https://github.com/cjwyett>`_
|
||||
- `Jiankai Yu <https://github.com/rockfool>`_
|
||||
|
|
@ -7,6 +7,7 @@ Release Notes
|
|||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
0.12.1
|
||||
0.12.0
|
||||
0.11.0
|
||||
0.10.0
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ or Mac OS X (also Unix-derived), `this tutorial
|
|||
commonly-used commands.
|
||||
|
||||
To reap the full benefits of OpenMC, you should also have basic proficiency in
|
||||
the use of `Python <http://www.python.org/>`_, as OpenMC includes a rich Python
|
||||
the use of `Python <https://www.python.org/>`_, as OpenMC includes a rich Python
|
||||
API that offers many usability improvements over dealing with raw XML input
|
||||
files.
|
||||
|
||||
|
|
@ -126,8 +126,9 @@ at the git documentation website. The `OpenMC source code`_ and documentation
|
|||
are hosted at `GitHub`_. In order to receive updates to the code directly,
|
||||
submit `bug reports`_, and perform other development tasks, you may want to sign
|
||||
up for a free account on GitHub. Once you have an account, you can follow `these
|
||||
instructions <https://help.github.com/articles/set-up-git/>`_ on how to set up
|
||||
your computer for using GitHub.
|
||||
instructions
|
||||
<https://docs.github.com/en/github/getting-started-with-github/set-up-git>`_ on
|
||||
how to set up your computer for using GitHub.
|
||||
|
||||
If you are new to nuclear engineering, you may want to review the NRC's `Reactor
|
||||
Concepts Manual`_. This manual describes the basics of nuclear power for
|
||||
|
|
@ -149,7 +150,7 @@ and `Volume II`_. You may also find it helpful to review the following terms:
|
|||
.. _discretization: https://en.wikipedia.org/wiki/Discretization
|
||||
.. _constructive solid geometry: https://en.wikipedia.org/wiki/Constructive_solid_geometry
|
||||
.. _git: http://git-scm.com/
|
||||
.. _git tutorials: http://git-scm.com/documentation
|
||||
.. _git tutorials: https://git-scm.com/doc
|
||||
.. _Reactor Concepts Manual: http://www.tayloredge.com/periodic/trivia/ReactorConcepts.pdf
|
||||
.. _Volume I: https://www.standards.doe.gov/standards-documents/1000/1019-bhdbk-1993-v1
|
||||
.. _Volume II: https://www.standards.doe.gov/standards-documents/1000/1019-bhdbk-1993-v2
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ For an example of how to create a multi-group library, see the `example notebook
|
|||
.. _MCNP: https://mcnp.lanl.gov
|
||||
.. _Serpent: http://montecarlo.vtt.fi
|
||||
.. _ENDF/B: https://www.nndc.bnl.gov/endf/b7.1/acefiles.html
|
||||
.. _JEFF: http://www.oecd-nea.org/dbdata/jeff/jeff33/
|
||||
.. _JEFF: https://www.oecd-nea.org/dbdata/jeff/jeff33/
|
||||
.. _TENDL: https://tendl.web.psi.ch/tendl_2017/tendl2017.html
|
||||
.. _Seltzer and Berger: https://doi.org/10.1016/0092-640X(86)90014-8
|
||||
.. _NIST ESTAR database: https://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html
|
||||
|
|
|
|||
|
|
@ -30,6 +30,12 @@ operator class requires a :class:`openmc.Geometry` instance and a
|
|||
|
||||
Any material that contains a fissionable nuclide is depleted by default, but
|
||||
this can behavior can be changed with the :attr:`Material.depletable` attribute.
|
||||
|
||||
.. important:: The volume must be specified for each material that is depleted by
|
||||
setting the :attr:`Material.volume` attribute. This is necessary
|
||||
in order to calculate the proper normalization of tally results
|
||||
based on the source rate.
|
||||
|
||||
:mod:`openmc.deplete` supports multiple time-integration methods for determining
|
||||
material compositions over time. Each method appears as a different class.
|
||||
For example, :class:`openmc.deplete.CECMIntegrator` runs a depletion calculation
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ lowest-level cell at that location::
|
|||
|
||||
As you are building a geometry, it is also possible to display a plot of single
|
||||
universe using the :meth:`Universe.plot` method. This method requires that you
|
||||
have `matplotlib <http://matplotlib.org/>`_ installed.
|
||||
have `matplotlib <https://matplotlib.org/>`_ installed.
|
||||
|
||||
.. _usersguide_lattices:
|
||||
|
||||
|
|
|
|||
|
|
@ -42,37 +42,31 @@ the environment, run:
|
|||
|
||||
conda activate openmc-env
|
||||
|
||||
.. _install_ppa:
|
||||
-------------------------------------------
|
||||
Installing on Linux/Mac/Windows with Docker
|
||||
-------------------------------------------
|
||||
|
||||
-----------------------------
|
||||
Installing on Ubuntu with PPA
|
||||
-----------------------------
|
||||
|
||||
For users with Ubuntu 15.04 or later, a binary package for OpenMC is available
|
||||
through a `Personal Package Archive`_ (PPA) and can be installed through the
|
||||
`APT package manager`_. First, add the following PPA to the repository sources:
|
||||
OpenMC can be easily deployed using `Docker <https://www.docker.com/>`_ on any
|
||||
Windows, Mac, or Linux system. With Docker running, execute the following
|
||||
command in the shell to download and run a `Docker image`_ with the most recent
|
||||
release of OpenMC from `DockerHub <https://hub.docker.com/>`_:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt-add-repository ppa:paulromano/staging
|
||||
docker run openmc/openmc:latest
|
||||
|
||||
Next, resynchronize the package index files:
|
||||
This will take several minutes to run depending on your internet download speed.
|
||||
The command will place you in an interactive shell running in a `Docker
|
||||
container`_ with OpenMC installed.
|
||||
|
||||
.. code-block:: sh
|
||||
.. note:: The ``docker run`` command supports many `options`_ for spawning
|
||||
containers including `mounting volumes`_ from the host filesystem,
|
||||
which many users will find useful.
|
||||
|
||||
sudo apt update
|
||||
|
||||
Now OpenMC should be recognized within the repository and can be installed:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
sudo apt install openmc
|
||||
|
||||
Binary packages from this PPA may exist for earlier versions of Ubuntu, but they
|
||||
are no longer supported.
|
||||
|
||||
.. _Personal Package Archive: https://launchpad.net/~paulromano/+archive/staging
|
||||
.. _APT package manager: https://help.ubuntu.com/community/AptGet/Howto
|
||||
.. _Docker image: https://docs.docker.com/engine/reference/commandline/images/
|
||||
.. _Docker container: https://www.docker.com/resources/what-container
|
||||
.. _options: https://docs.docker.com/engine/reference/commandline/run/
|
||||
.. _mounting volumes: https://docs.docker.com/storage/volumes/
|
||||
|
||||
.. _install-spack:
|
||||
|
||||
|
|
@ -84,9 +78,9 @@ Spack_ is a package management tool designed to support multiple versions and
|
|||
configurations of software on a wide variety of platforms and environments.
|
||||
Please follow Spack's `setup guide`_ to configure the Spack system.
|
||||
|
||||
The OpenMC Spack recipe has been configured with variants that match most options
|
||||
provided in the CMakeLists.txt file. To see a list of these variants and other
|
||||
information use:
|
||||
The OpenMC Spack recipe has been configured with variants that match most
|
||||
options provided in the CMakeLists.txt file. To see a list of these variants and
|
||||
other information use:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -109,7 +103,8 @@ Spack recipe can be found with the following command:
|
|||
|
||||
The only variant for the Python API is ``mpi``.
|
||||
|
||||
The most basic installation of OpenMC can be accomplished by entering the following command:
|
||||
The most basic installation of OpenMC can be accomplished by entering the
|
||||
following command:
|
||||
|
||||
.. code-block::
|
||||
|
||||
|
|
@ -117,14 +112,17 @@ The most basic installation of OpenMC can be accomplished by entering the follow
|
|||
|
||||
.. caution::
|
||||
|
||||
When installing any Spack package, dependencies are assumed to be at configured defaults unless otherwise specfied in the
|
||||
specification on the command line. In the above example, assuming the default options weren't changed in Spack's package
|
||||
configuration, py-openmc will link against a non-optimized non-MPI openmc. Even if an optimized openmc was built separately,
|
||||
it will rebuild openmc with optimization OFF. Thus, if you are trying to link against dependencies that were configured
|
||||
different than defaults, ``^openmc[variants]`` will have to be present in the command.
|
||||
When installing any Spack package, dependencies are assumed to be at
|
||||
configured defaults unless otherwise specfied in the specification on the
|
||||
command line. In the above example, assuming the default options weren't
|
||||
changed in Spack's package configuration, py-openmc will link against a
|
||||
non-optimized non-MPI openmc. Even if an optimized openmc was built
|
||||
separately, it will rebuild openmc with optimization OFF. Thus, if you are
|
||||
trying to link against dependencies that were configured different than
|
||||
defaults, ``^openmc[variants]`` will have to be present in the command.
|
||||
|
||||
For a more performant build of OpenMC with optimization turned ON and MPI provided by OpenMPI, the following command can be
|
||||
used:
|
||||
For a more performant build of OpenMC with optimization turned ON and MPI
|
||||
provided by OpenMPI, the following command can be used:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -136,24 +134,27 @@ used:
|
|||
|
||||
.. tip::
|
||||
|
||||
When installing py-openmc, it will use Spack's preferred Python. For example, assuming Spack's preferred Python
|
||||
is 3.8.7, to build py-openmc against the latest Python 3.7 instead, ``^python@3.7.0:3.7.99`` should be added to the
|
||||
specification on the command line. Additionally, a compiler type and version can be specified at the end of the
|
||||
command using ``%gcc@<version>``, ``%intel@<version>``, etc.
|
||||
When installing py-openmc, it will use Spack's preferred Python. For
|
||||
example, assuming Spack's preferred Python is 3.8.7, to build py-openmc
|
||||
against the latest Python 3.7 instead, ``^python@3.7.0:3.7.99`` should be
|
||||
added to the specification on the command line. Additionally, a compiler
|
||||
type and version can be specified at the end of the command using
|
||||
``%gcc@<version>``, ``%intel@<version>``, etc.
|
||||
|
||||
A useful tool in Spack is to look at the dependency tree before installation. This can be observed using
|
||||
Spack's `spec` tool:
|
||||
A useful tool in Spack is to look at the dependency tree before installation.
|
||||
This can be observed using Spack's ``spec`` tool:
|
||||
|
||||
.. code-block::
|
||||
|
||||
spack spec py-openmc+mpi ^openmc+optimize
|
||||
|
||||
Once installed, environment/lmod modules can be generated or Spack's `load` feature
|
||||
can be used to access the installed packages.
|
||||
Once installed, environment/lmod modules can be generated or Spack's ``load``
|
||||
feature can be used to access the installed packages.
|
||||
|
||||
.. _Spack: https://spack.readthedocs.io/en/latest/
|
||||
.. _setup guide: https://spack.readthedocs.io/en/latest/getting_started.html
|
||||
|
||||
|
||||
.. _install_source:
|
||||
|
||||
----------------------
|
||||
|
|
@ -242,9 +243,9 @@ Prerequisites
|
|||
|
||||
|
||||
.. _gcc: https://gcc.gnu.org/
|
||||
.. _CMake: http://www.cmake.org
|
||||
.. _OpenMPI: http://www.open-mpi.org
|
||||
.. _MPICH: http://www.mpich.org
|
||||
.. _CMake: https://cmake.org
|
||||
.. _OpenMPI: https://www.open-mpi.org
|
||||
.. _MPICH: https://www.mpich.org
|
||||
.. _HDF5: https://www.hdfgroup.org/solutions/hdf5/
|
||||
.. _DAGMC: https://svalinn.github.io/DAGMC/index.html
|
||||
|
||||
|
|
@ -256,10 +257,10 @@ directly from GitHub or, if you have the git_ version control software installed
|
|||
on your computer, you can use git to obtain the source code. The latter method
|
||||
has the benefit that it is easy to receive updates directly from the GitHub
|
||||
repository. GitHub has a good set of `instructions
|
||||
<http://help.github.com/set-up-git-redirect>`_ for how to set up git to work
|
||||
with GitHub since this involves setting up ssh_ keys. With git installed and
|
||||
setup, the following command will download the full source code from the GitHub
|
||||
repository::
|
||||
<https://docs.github.com/en/github/getting-started-with-github/set-up-git>`_ for
|
||||
how to set up git to work with GitHub since this involves setting up ssh_ keys.
|
||||
With git installed and setup, the following command will download the full
|
||||
source code from the GitHub repository::
|
||||
|
||||
git clone --recurse-submodules https://github.com/openmc-dev/openmc.git
|
||||
|
||||
|
|
@ -408,36 +409,11 @@ Compiling on Windows 10
|
|||
|
||||
Recent versions of Windows 10 include a subsystem for Linux that allows one to
|
||||
run Bash within Ubuntu running in Windows. First, follow the installation guide
|
||||
`here <https://msdn.microsoft.com/en-us/commandline/wsl/install_guide>`_ to get
|
||||
Bash on Ubuntu on Windows setup. Once you are within bash, obtain the necessary
|
||||
`here <https://docs.microsoft.com/en-us/windows/wsl/install-win10>`_ to get Bash
|
||||
on Ubuntu on Windows setup. Once you are within bash, obtain the necessary
|
||||
:ref:`prerequisites <prerequisites>` via ``apt``. Finally, follow the
|
||||
:ref:`instructions for compiling on linux <compile_linux>`.
|
||||
|
||||
Compiling for the Intel Xeon Phi
|
||||
--------------------------------
|
||||
|
||||
For the second generation Knights Landing architecture, nothing special is
|
||||
required to compile OpenMC. You may wish to experiment with compiler flags that
|
||||
control generation of vector instructions to see what configuration gives
|
||||
optimal performance for your target problem.
|
||||
|
||||
For the first generation Knights Corner architecture, it is necessary to
|
||||
cross-compile OpenMC. If you are using the Intel compiler, it is necessary to
|
||||
specify that all objects be compiled with the ``-mmic`` flag as follows:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
mkdir build && cd build
|
||||
CXX=icpc CXXFLAGS=-mmic cmake -Dopenmp=on ..
|
||||
make
|
||||
|
||||
Note that unless an HDF5 build for the Intel Xeon Phi (Knights Corner) is
|
||||
already on your target machine, you will need to cross-compile HDF5 for the Xeon
|
||||
Phi. An `example script`_ to build zlib and HDF5 provides several necessary
|
||||
workarounds.
|
||||
|
||||
.. _example script: https://github.com/paulromano/install-scripts/blob/master/install-hdf5-mic
|
||||
|
||||
Testing Build
|
||||
-------------
|
||||
|
||||
|
|
@ -449,16 +425,16 @@ section library along with windowed multipole data. Please refer to our
|
|||
Installing Python API
|
||||
---------------------
|
||||
|
||||
If you installed OpenMC using :ref:`Conda <install_conda>` or :ref:`PPA
|
||||
<install_ppa>`, no further steps are necessary in order to use OpenMC's
|
||||
:ref:`Python API <pythonapi>`. However, if you are :ref:`installing from source
|
||||
<install_source>`, the Python API is not installed by default when ``make
|
||||
install`` is run because in many situations it doesn't make sense to install a
|
||||
Python package in the same location as the ``openmc`` executable (for example,
|
||||
if you are installing the package into a `virtual environment
|
||||
<https://docs.python.org/3/tutorial/venv.html>`_). The easiest way to install
|
||||
the :mod:`openmc` Python package is to use pip_, which is included by default in
|
||||
Python 3.4+. From the root directory of the OpenMC distribution/repository, run:
|
||||
If you installed OpenMC using :ref:`Conda <install_conda>`, no further steps are
|
||||
necessary in order to use OpenMC's :ref:`Python API <pythonapi>`. However, if
|
||||
you are :ref:`installing from source <install_source>`, the Python API is not
|
||||
installed by default when ``make install`` is run because in many situations it
|
||||
doesn't make sense to install a Python package in the same location as the
|
||||
``openmc`` executable (for example, if you are installing the package into a
|
||||
`virtual environment <https://docs.python.org/3/tutorial/venv.html>`_). The
|
||||
easiest way to install the :mod:`openmc` Python package is to use pip_, which is
|
||||
included by default in Python 3.4+. From the root directory of the OpenMC
|
||||
distribution/repository, run:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
|
|
@ -494,7 +470,7 @@ distributions.
|
|||
.. admonition:: Required
|
||||
:class: error
|
||||
|
||||
`NumPy <http://www.numpy.org/>`_
|
||||
`NumPy <https://numpy.org/>`_
|
||||
NumPy is used extensively within the Python API for its powerful
|
||||
N-dimensional array.
|
||||
|
||||
|
|
@ -502,7 +478,7 @@ distributions.
|
|||
SciPy's special functions, sparse matrices, and spatial data structures
|
||||
are used for several optional features in the API.
|
||||
|
||||
`pandas <http://pandas.pydata.org/>`_
|
||||
`pandas <https://pandas.pydata.org/>`_
|
||||
Pandas is used to generate tally DataFrames as demonstrated in
|
||||
an `example notebook <../examples/pandas-dataframes.ipynb>`_.
|
||||
|
||||
|
|
@ -511,14 +487,14 @@ distributions.
|
|||
various HDF5 files, h5py is needed to provide access to data within these
|
||||
files from Python.
|
||||
|
||||
`Matplotlib <http://matplotlib.org/>`_
|
||||
`Matplotlib <https://matplotlib.org/>`_
|
||||
Matplotlib is used to providing plotting functionality in the API like the
|
||||
:meth:`Universe.plot` method and the :func:`openmc.plot_xs` function.
|
||||
|
||||
`uncertainties <https://pythonhosted.org/uncertainties/>`_
|
||||
Uncertainties are used for decay data in the :mod:`openmc.data` module.
|
||||
|
||||
`lxml <http://lxml.de/>`_
|
||||
`lxml <https://lxml.de/>`_
|
||||
lxml is used for the :ref:`scripts_validate` script and various other
|
||||
parts of the Python API.
|
||||
|
||||
|
|
@ -530,11 +506,11 @@ distributions.
|
|||
parallel runs. This package is needed if you plan on running depletion
|
||||
simulations in parallel using MPI.
|
||||
|
||||
`Cython <http://cython.org/>`_
|
||||
`Cython <https://cython.org/>`_
|
||||
Cython is used for resonance reconstruction for ENDF data converted to
|
||||
:class:`openmc.data.IncidentNeutron`.
|
||||
|
||||
`vtk <http://www.vtk.org/>`_
|
||||
`vtk <https://vtk.org/>`_
|
||||
The Python VTK bindings are needed to convert voxel and track files to VTK
|
||||
format.
|
||||
|
||||
|
|
@ -588,7 +564,7 @@ schemas.xml file in your own OpenMC source directory.
|
|||
|
||||
.. _GNU Emacs: http://www.gnu.org/software/emacs/
|
||||
.. _validation: https://en.wikipedia.org/wiki/XML_validation
|
||||
.. _RELAX NG: http://relaxng.org/
|
||||
.. _RELAX NG: https://relaxng.org/
|
||||
.. _ctest: https://cmake.org/cmake/help/latest/manual/ctest.1.html
|
||||
.. _Conda: https://conda.io/en/latest/
|
||||
.. _pip: https://pip.pypa.io/en/stable/
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ This method can also accept case-insensitive element names such as
|
|||
::
|
||||
|
||||
mat.add_element('aluminium', 1.0)
|
||||
|
||||
|
||||
Internally, OpenMC stores data on the atomic masses and natural abundances of
|
||||
all known isotopes and then uses this data to determine what isotopes should be
|
||||
added to the material. When the material is later exported to XML for use by the
|
||||
|
|
@ -105,7 +105,7 @@ you would need to add hydrogen and oxygen to a material and then assign the
|
|||
Naming Conventions
|
||||
------------------
|
||||
|
||||
OpenMC uses the GND_ naming convention for nuclides, metastable states, and
|
||||
OpenMC uses the GNDS_ naming convention for nuclides, metastable states, and
|
||||
compounds:
|
||||
|
||||
:Nuclides: ``SymA`` where "A" is the mass number (e.g., ``Fe56``)
|
||||
|
|
@ -122,7 +122,7 @@ compounds:
|
|||
ENDF/B-VII.1! If you are adding an element via
|
||||
:meth:`Material.add_element`, just use ``Sym``.
|
||||
|
||||
.. _GND: https://www.oecd-nea.org/science/wpec/sg38/Meetings/2016_May/tlh4gnd-main.pdf
|
||||
.. _GNDS: https://www.oecd-nea.org/jcms/pl_39689/specifications-for-the-generalised-nuclear-database-structure-gnds
|
||||
|
||||
-----------
|
||||
Temperature
|
||||
|
|
@ -160,26 +160,26 @@ Material Mixtures
|
|||
-----------------
|
||||
|
||||
In OpenMC it is possible to mix any number of materials to create a new material
|
||||
with the correct nuclide composition and density. The
|
||||
with the correct nuclide composition and density. The
|
||||
:meth:`Material.mix_materials` method takes a list of materials and
|
||||
a list of their mixing fractions. Mixing fractions can be provided as atomic
|
||||
a list of their mixing fractions. Mixing fractions can be provided as atomic
|
||||
fractions, weight fractions, or volume fractions. The fraction type
|
||||
can be specified by passing 'ao', 'wo', or 'vo' as the third argument, respectively.
|
||||
For example, assuming the required materials have already been defined, a MOX
|
||||
can be specified by passing 'ao', 'wo', or 'vo' as the third argument, respectively.
|
||||
For example, assuming the required materials have already been defined, a MOX
|
||||
material with 3% plutonium oxide by weight could be created using the following:
|
||||
|
||||
::
|
||||
|
||||
mox = openmc.Material.mix_materials([uo2, puo2], [0.97, 0.03], 'wo')
|
||||
|
||||
It should be noted that, if mixing fractions are specifed as atomic or weight
|
||||
It should be noted that, if mixing fractions are specifed as atomic or weight
|
||||
fractions, the supplied fractions should sum to one. If the fractions are specified
|
||||
as volume fractions, and the sum of the fractions is less than one, then the remaining
|
||||
fraction is set as void material.
|
||||
as volume fractions, and the sum of the fractions is less than one, then the remaining
|
||||
fraction is set as void material.
|
||||
|
||||
.. warning:: Materials with :math:`S(\alpha,\beta)` thermal scattering data
|
||||
cannot be used in :meth:`Material.mix_materials`. However, thermal
|
||||
scattering data can be added to a material created by
|
||||
scattering data can be added to a material created by
|
||||
:meth:`Material.mix_materials`.
|
||||
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ If you are running a simulation on a computer with multiple cores, multiple
|
|||
sockets, or multiple nodes (i.e., a cluster), you can benefit from the fact that
|
||||
OpenMC is able to use all available hardware resources if configured
|
||||
correctly. OpenMC is capable of using both distributed-memory (`MPI
|
||||
<http://mpi-forum.org/>`_) and shared-memory (`OpenMP
|
||||
<http://www.openmp.org/>`_) parallelism. If you are on a single-socket
|
||||
<https://www.mpi-forum.org/>`_) and shared-memory (`OpenMP
|
||||
<https://www.openmp.org/>`_) parallelism. If you are on a single-socket
|
||||
workstation or a laptop, using shared-memory parallelism is likely
|
||||
sufficient. On a multi-socket node, cluster, or supercomputer, chances are you
|
||||
will need to use both distributed-memory (across nodes) and shared-memory
|
||||
|
|
@ -49,7 +49,7 @@ Distributed-Memory Parallelism (MPI)
|
|||
|
||||
MPI defines a library specification for message-passing between processes. There
|
||||
are two major implementations of MPI, `OpenMPI <https://www.open-mpi.org/>`_ and
|
||||
`MPICH <http://www.mpich.org/>`_. Both implementations are known to work with
|
||||
`MPICH <https://www.mpich.org/>`_. Both implementations are known to work with
|
||||
OpenMC; there is no obvious reason to prefer one over the other. Building OpenMC
|
||||
with support for MPI requires that you have one of these implementations
|
||||
installed on your system. For instructions on obtaining MPI, see
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ derivatives: ``sudo apt install imagemagick``). Images are then converted like:
|
|||
|
||||
convert myplot.ppm myplot.png
|
||||
|
||||
Alternatively, if you're working within a `Jupyter <http://jupyter.org/>`_
|
||||
Alternatively, if you're working within a `Jupyter <https://jupyter.org/>`_
|
||||
Notebook or QtConsole, you can use the :func:`openmc.plot_inline` to run OpenMC
|
||||
in plotting mode and display the resulting plot within the notebook.
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ should be three items long, e.g.::
|
|||
|
||||
The voxel plot data is written to an :ref:`HDF5 file <io_voxel>`. The voxel file
|
||||
can subsequently be converted into a standard mesh format that can be viewed in
|
||||
`ParaView <http://www.paraview.org/>`_, `VisIt
|
||||
`ParaView <https://www.paraview.org/>`_, `VisIt
|
||||
<https://wci.llnl.gov/simulation/computer-codes/visit>`_, etc. This typically
|
||||
will compress the size of the file significantly. The provided
|
||||
:ref:`scripts_voxel` script can convert the HDF5 voxel file to VTK formats. Once
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ Getting Data into MATLAB
|
|||
There is currently no front-end utility to dump tally data to MATLAB files, but
|
||||
the process is straightforward. First extract the data using the Python API via
|
||||
``openmc.statepoint`` and then use the `Scipy MATLAB IO routines
|
||||
<http://docs.scipy.org/doc/scipy/reference/tutorial/io.html>`_ to save to a MAT
|
||||
<https://docs.scipy.org/doc/scipy/reference/tutorial/io.html>`_ to save to a MAT
|
||||
file. Note that all arrays that are accessible in a statepoint are already in
|
||||
NumPy arrays that can be reshaped and dumped to MATLAB in one step.
|
||||
|
||||
|
|
|
|||
|
|
@ -102,61 +102,6 @@ otherwise.
|
|||
--fission_energy_release FISSION_ENERGY_RELEASE
|
||||
HDF5 file containing fission energy release data
|
||||
|
||||
.. _scripts_compton:
|
||||
|
||||
-----------------------
|
||||
``openmc-make-compton``
|
||||
-----------------------
|
||||
|
||||
This script generates an HDF5 file called ``compton_profiles.h5`` that contains
|
||||
Compton profile data using an existing data library from `Geant4
|
||||
<http://geant4.cern.ch/>`_. Note that OpenMC includes this data file by default
|
||||
so it should not be necessary in practice to generate it yourself.
|
||||
|
||||
|
||||
.. _scripts_depletion_chain:
|
||||
|
||||
-------------------------------
|
||||
``openmc-make-depletion-chain``
|
||||
-------------------------------
|
||||
|
||||
This script generates a depletion chain file called ``chain_endfb71.xml``
|
||||
using ENDF/B-VII.1 nuclear data. If the :envvar:`OPENMC_ENDF_DATA` variable
|
||||
is not set, and ``"neutron"``, ``"decay"``, ``"nfy"`` directories
|
||||
do not exist, then ENDF/B-VII.1 data will be downloaded.
|
||||
|
||||
.. _scripts_depletion_chain_casl:
|
||||
|
||||
------------------------------------
|
||||
``openmc-make-depletion-chain-casl``
|
||||
------------------------------------
|
||||
|
||||
This script generates a depletion chain called ``chain_casl.xml``
|
||||
using ENDF/B-VII.1 nuclear data for a simplified chain.
|
||||
The nuclides were chosen by CASL-ORIGEN, which can be found in
|
||||
Appendix A of Kang Seog Kim, `"Specification for the VERA Depletion
|
||||
Benchmark Suite" <https://doi.org/10.2172/1256820>`_,
|
||||
CASL-U-2015-1014-000, Rev. 0, ORNL/TM-2016/53, 2016.
|
||||
``Te129`` has been added into this chain due to its link to
|
||||
``I129`` production.
|
||||
|
||||
If the :envvar:`OPENMC_ENDF_DATA` variable is not set,
|
||||
and ``"neutron"``, ``"decay"``, ``"nfy"`` directories
|
||||
to not exist, then ENDF/B-VII.1 data will be downloaded.
|
||||
|
||||
.. _scripts_stopping:
|
||||
|
||||
-------------------------------
|
||||
``openmc-make-stopping-powers``
|
||||
-------------------------------
|
||||
|
||||
This script generates an HDF5 file called ``stopping_power.h5`` that contains
|
||||
radiative and collision stopping powers and mean excitation energy pulled from
|
||||
the `NIST ESTAR database
|
||||
<https://physics.nist.gov/PhysRefData/Star/Text/ESTAR.html>`_. Note that OpenMC
|
||||
includes this data file by default so it should not be necessary in practice to
|
||||
generate it yourself.
|
||||
|
||||
.. _scripts_plot:
|
||||
|
||||
--------------------------
|
||||
|
|
@ -250,7 +195,7 @@ Message Description
|
|||
When OpenMC generates :ref:`voxel plots <usersguide_voxel>`, they are in an
|
||||
:ref:`HDF5 format <io_voxel>` that is not terribly useful by itself. The
|
||||
``openmc-voxel-to-vtk`` script converts a voxel HDF5 file to a `VTK
|
||||
<http://www.vtk.org/>`_ file. To run this script, you will need to have the VTK
|
||||
<https://vtk.org/>`_ file. To run this script, you will need to have the VTK
|
||||
Python bindings installed. To convert a voxel file, simply provide the path to
|
||||
the file:
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ If you don't specify a run mode, the default run mode is 'eigenvalue'.
|
|||
|
||||
.. _usersguide_particles:
|
||||
|
||||
-------------------
|
||||
Number of Particles
|
||||
-------------------
|
||||
------------
|
||||
Run Strategy
|
||||
------------
|
||||
|
||||
For a fixed source simulation, the total number of source particle histories
|
||||
simulated is broken up into a number of *batches*, each corresponding to a
|
||||
|
|
@ -88,6 +88,79 @@ for accumulating tallies.
|
|||
settings.batches = 150
|
||||
settings.inactive = 5
|
||||
|
||||
.. _usersguide_batches:
|
||||
|
||||
Number of Batches
|
||||
-----------------
|
||||
|
||||
In general, the stochastic uncertainty in your simulation results is directly
|
||||
related to how many total active particles are simulated (the product of the
|
||||
number of active batches, number of generations per batch, and number of
|
||||
particles). At a minimum, you should use enough active batches so that the
|
||||
central limit theorem is satisfied (about 30). Otherwise, reducing the overall
|
||||
uncertainty in your simulation by a factor of 2 will require using 4 times as
|
||||
many batches (since the standard deviation decreases as :math:`1/\sqrt{N}`).
|
||||
|
||||
Number of Inactive Batches
|
||||
--------------------------
|
||||
|
||||
For :math:`k` eigenvalue simulations, the source distribution is not known a
|
||||
priori. Thus, a "guess" of the source distribution is made and then iterated on,
|
||||
with the source evolving closer to the true distribution at each iteration. Once
|
||||
the source distribution has converged, it is then safe to start accumulating
|
||||
tallies. Consequently, a preset number of inactive batches are run before the
|
||||
active batches (where tallies are turned on) begin. The number of inactive
|
||||
batches necessary to reach a converged source depends on the spatial extent of
|
||||
the problem, its dominance ratio, what boundary conditions are used, and many
|
||||
other factors. For small problems, using 50--100 inactive batches is likely
|
||||
sufficient. For larger models, many hundreds of inactive batches may be
|
||||
necessary. Users are recommended to use the :ref:`Shannon entropy
|
||||
<usersguide_entropy>` diagnostic as a way of determining how many inactive
|
||||
batches are necessary.
|
||||
|
||||
Specifying the initial source used for the very first batch is described in
|
||||
:ref:`below <usersguide_source>`. Although the initial source is arbitrary in
|
||||
the sense that any source will eventually converge to the correct distribution,
|
||||
using a source guess that is closer to the actual converged source distribution
|
||||
will translate into needing fewer inactive batches (and hence less simulation
|
||||
time).
|
||||
|
||||
For fixed source simulations, the source distribution is known exactly, so no
|
||||
inactive batches are needed. In this case the :attr:`Settings.inactive`
|
||||
attribute can be omitted since it defaults to zero.
|
||||
|
||||
Number of Generations per Batch
|
||||
-------------------------------
|
||||
|
||||
The standard deviation of tally results is calculated assuming that all
|
||||
realizations (batches) are independent. However, in a :math:`k` eigenvalue
|
||||
calculation, the source sites for each batch are produced from fissions in the
|
||||
preceding batch, resulting in a correlation between successive batches. This
|
||||
correlation can result in an underprediction of the variance. That is, the
|
||||
variance reported is actually less than the true variance. To mitigate this
|
||||
effect, OpenMC allows you to group together multiple fission generations into a
|
||||
single batch for statistical purposes, rather than having each fission
|
||||
generation be a separate batch, which is the default behavior.
|
||||
|
||||
Number of Particles per Generation
|
||||
----------------------------------
|
||||
|
||||
There are several considerations for choosing the number of particles per
|
||||
generation. As discussed in :ref:`usersguide_batches`, the total number of
|
||||
active particles will determine the level of stochastic uncertainty in
|
||||
simulation results, so using a higher number of particles will result in less
|
||||
uncertainty. For parallel simulations that use OpenMP and/or MPI, the number of
|
||||
particles per generation should be large enough to ensure good load balancing
|
||||
between threads. For example, if you are running on a single processor with 32
|
||||
cores, each core should have at least 100 particles or so (i.e., at least 3,200
|
||||
particles per generation should be used). Using a larger number of particles per
|
||||
generation can also help reduce the cost of synchronization and communication
|
||||
between batches. For :math:`k` eigenvalue calculations, experts recommend_ at
|
||||
least 10,000 particles per generation to avoid any bias in the estimate of
|
||||
:math:`k` eigenvalue or tallies.
|
||||
|
||||
.. _recommend: https://permalink.lanl.gov/object/tr?what=info:lanl-repo/lareport/LA-UR-09-03136
|
||||
|
||||
.. _usersguide_source:
|
||||
|
||||
-----------------------------
|
||||
|
|
@ -175,6 +248,32 @@ following would generate a photon source::
|
|||
For a full list of all classes related to statistical distributions, see
|
||||
:ref:`pythonapi_stats`.
|
||||
|
||||
File-based Sources
|
||||
------------------
|
||||
|
||||
OpenMC can use a pregenerated HDF5 source file by specifying the ``filename``
|
||||
argument to :class:`openmc.Source`::
|
||||
|
||||
settings.source = openmc.Source(filename='source.h5')
|
||||
|
||||
Statepoint and source files are generated automatically when a simulation is run
|
||||
and can be used as the starting source in a new simulation. Alternatively, a
|
||||
source file can be manually generated with the :func:`openmc.write_source_file`
|
||||
function. This is particularly useful for coupling OpenMC with another program
|
||||
that generates a source to be used in OpenMC.
|
||||
|
||||
A source file based on particles that cross one or more surfaces can be
|
||||
generated during a simulation using the :attr:`Settings.surf_source_write`
|
||||
attribute::
|
||||
|
||||
settings.surf_source_write = {
|
||||
'surfaces_ids': [1, 2, 3],
|
||||
'max_particles': 10000
|
||||
}
|
||||
|
||||
In this example, at most 10,000 source particles are stored when particles cross
|
||||
surfaces with IDs of 1, 2, or 3.
|
||||
|
||||
.. _custom_source:
|
||||
|
||||
Custom Sources
|
||||
|
|
@ -301,6 +400,8 @@ the source class when it is created:
|
|||
As with the basic custom source functionality, the custom source library
|
||||
location must be provided in the :attr:`openmc.Source.library` attribute.
|
||||
|
||||
.. _usersguide_entropy:
|
||||
|
||||
---------------
|
||||
Shannon Entropy
|
||||
---------------
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"metadata": {},
|
||||
"source": [
|
||||
"# Using CAD-Based Geometries\n",
|
||||
"In this notebook we'll be exploring how to use CAD-based geometries in OpenMC via the [DagMC](https://svalinn.github.io/DAGMC/index.html) toolkit. The models we'll be using in this notebook have already been created using [Trelis](https://www.csimsoft.com/trelis) and faceted into a surface mesh represented as `.h5m` files in the [Mesh Oriented DatABase](https://press3.mcs.anl.gov/sigma/moab-library/) format. We'll be retrieving these files using the function below.\n",
|
||||
"In this notebook we'll be exploring how to use CAD-based geometries in OpenMC via the [DagMC](https://svalinn.github.io/DAGMC/index.html) toolkit. The models we'll be using in this notebook have already been created using [Trelis](https://coreform.com/products/trelisnew/) and faceted into a surface mesh represented as `.h5m` files in the [Mesh Oriented DatABase](https://sigma.mcs.anl.gov/moab-library/) format. We'll be retrieving these files using the function below.\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Let's download the DAGMC model. These models come in the form of triangle surface meshes stored using the the Mesh Oriented datABase ([MOAB](https://press3.mcs.anl.gov/sigma/moab-library/)) in an HDF5 file with the extension `.h5m`. An example of a coarse triangle mesh looks like:"
|
||||
"Let's download the DAGMC model. These models come in the form of triangle surface meshes stored using the the Mesh Oriented datABase ([MOAB](https://sigma.mcs.anl.gov/moab-library/)) in an HDF5 file with the extension `.h5m`. An example of a coarse triangle mesh looks like:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -234,7 +234,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"**Note:** Applying tally filters in DagMC models requires prior knowledge of the model. Here, we know that the fuel cell's volume ID in the CAD sofware is 1. To identify cells without use of CAD software, load them into the [OpenMC plotter](https://github.com/openmc/plotter) where cell, material, and volume IDs can be identified for native both OpenMC and DagMC geometries."
|
||||
"**Note:** Applying tally filters in DagMC models requires prior knowledge of the model. Here, we know that the fuel cell's volume ID in the CAD sofware is 1. To identify cells without use of CAD software, load them into the [OpenMC plotter](https://github.com/openmc-dev/plotter) where cell, material, and volume IDs can be identified for native both OpenMC and DagMC geometries."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Using the C/C++ API\n",
|
||||
"This notebook shows how to use the OpenMC C/C++ API through the openmc.lib module. This module is particularly useful for multiphysics coupling because it allows you to update the density of materials and the temperatures of cells in memory, without stopping the simulation.\n",
|
||||
"\n",
|
||||
"Warning: these bindings are still somewhat experimental and may be subject to change in future versions of OpenMC."
|
||||
|
|
@ -466,7 +467,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.0"
|
||||
"version": "3.8.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
"\n",
|
||||
"$$\\nu_d \\sigma_{n,x,k,g} = \\frac{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r} \\nu_d \\sigma_{f,x}(\\mathbf{r},E')\\Phi(\\mathbf{r},E')}{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\Phi(\\mathbf{r},E')}$$\n",
|
||||
"\n",
|
||||
"This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for only the delayed-nu-fission and delayed neutron fraction reaction type at the moment. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](https://docs.openmc.org/en/stable/usersguide/tallies.html#filters) on the energy range and spatial zone (material, cell, universe, or mesh) define the bounds of integration for both numerator and denominator."
|
||||
"This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for only the delayed-nu-fission and delayed neutron fraction reaction type at the moment. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](../usersguide/tallies.rst#filters) on the energy range and spatial zone (material, cell, universe, or mesh) define the bounds of integration for both numerator and denominator."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -702,7 +702,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Since the `openmc.mgxs` module uses [tally arithmetic](https://mit-crpg.github.io/openmc/pythonapi/examples/tally-arithmetic.html) under-the-hood, the cross section is stored as a \"derived\" `Tally` object. This means that it can be queried and manipulated using all of the same methods supported for the `Tally` class in the OpenMC Python API. For example, we can construct a [Pandas](http://pandas.pydata.org/) `DataFrame` of the multi-group cross section data."
|
||||
"Since the `openmc.mgxs` module uses [tally arithmetic](tally-arithmetic.ipynb) under-the-hood, the cross section is stored as a \"derived\" `Tally` object. This means that it can be queried and manipulated using all of the same methods supported for the `Tally` class in the OpenMC Python API. For example, we can construct a [Pandas](https://pandas.pydata.org/) `DataFrame` of the multi-group cross section data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -1077,7 +1077,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](https://mit-crpg.github.io/openmc/pythonapi/examples/tally-arithmetic.html) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to compute the delayed neutron precursor concentrations using the `Beta`, `DelayedNuFissionXS`, and `DecayRate` objects. The delayed neutron precursor concentrations are modeled using the following equations:\n",
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](tally-arithmetic.ipynb) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to compute the delayed neutron precursor concentrations using the `Beta`, `DelayedNuFissionXS`, and `DecayRate` objects. The delayed neutron precursor concentrations are modeled using the following equations:\n",
|
||||
"\n",
|
||||
"$$\\frac{\\partial}{\\partial t} C_{k,d} (t) = \\int_{0}^{\\infty}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r} \\beta_{k,d} (t) \\nu_d \\sigma_{f,x}(\\mathbf{r},E',t)\\Phi(\\mathbf{r},E',t) - \\lambda_{d} C_{k,d} (t) $$\n",
|
||||
"\n",
|
||||
|
|
|
|||
|
|
@ -652,7 +652,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](https://mit-crpg.github.io/openmc/pythonapi/examples/tally-arithmetic.html) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to compute the delayed neutron precursor concentrations using the `Beta` and `DelayedNuFissionXS` objects. The delayed neutron precursor concentrations are modeled using the following equations:\n",
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](tally-arithmetic.ipynb) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to compute the delayed neutron precursor concentrations using the `Beta` and `DelayedNuFissionXS` objects. The delayed neutron precursor concentrations are modeled using the following equations:\n",
|
||||
"\n",
|
||||
"$$\\frac{\\partial}{\\partial t} C_{k,d} (t) = \\int_{0}^{\\infty}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r} \\beta_{k,d} (t) \\nu_d \\sigma_{f,x}(\\mathbf{r},E',t)\\Phi(\\mathbf{r},E',t) - \\lambda_{d} C_{k,d} (t) $$\n",
|
||||
"\n",
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"metadata": {},
|
||||
"source": [
|
||||
"# Multigroup Mode Part I: Introduction\n",
|
||||
"This Notebook illustrates the usage of OpenMC's multi-group calculational mode with the Python API. This example notebook creates and executes the 2-D [C5G7](https://www.oecd-nea.org/science/docs/2003/nsc-doc2003-16.pdf) benchmark model using the `openmc.MGXSLibrary` class to create the supporting data library on the fly."
|
||||
"This Notebook illustrates the usage of OpenMC's multi-group calculational mode with the Python API. This example notebook creates and executes the 2-D [C5G7](https://www.oecd-nea.org/jcms/pl_17882) benchmark model using the `openmc.MGXSLibrary` class to create the supporting data library on the fly."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We will now create the multi-group library using data directly from Appendix A of the [C5G7](https://www.oecd-nea.org/science/docs/2003/nsc-doc2003-16.pdf) benchmark documentation. All of the data below will be created at 294K, consistent with the benchmark.\n",
|
||||
"We will now create the multi-group library using data directly from Appendix A of the [C5G7](https://www.oecd-nea.org/jcms/pl_17882) benchmark documentation. All of the data below will be created at 294K, consistent with the benchmark.\n",
|
||||
"\n",
|
||||
"This notebook will first begin by setting the group structure and building the groupwise data for UO2. As you can see, the cross sections are input in the order of increasing groups (or decreasing energy).\n",
|
||||
"\n",
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
"\n",
|
||||
"$$\\sigma_{n,x,k,g} = \\frac{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\sigma_{n,x}(\\mathbf{r},E')\\Phi(\\mathbf{r},E')}{\\int_{E_{g}}^{E_{g-1}}\\mathrm{d}E'\\int_{\\mathbf{r} \\in V_{k}}\\mathrm{d}\\mathbf{r}\\Phi(\\mathbf{r},E')}$$\n",
|
||||
"\n",
|
||||
"This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](http://openmc.readthedocs.io/en/latest/usersguide/tallies.html#filters) on the energy range and spatial zone (material, cell or universe) define the bounds of integration for both numerator and denominator."
|
||||
"This scalar flux-weighted average microscopic cross section is computed by `openmc.mgxs` for most multi-group cross sections, including total, absorption, and fission reaction types. These double integrals are stochastically computed with OpenMC's tally system - in particular, [filters](../usersguide/tallies.rst#filters) on the energy range and spatial zone (material, cell or universe) define the bounds of integration for both numerator and denominator."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -712,7 +712,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Since the `openmc.mgxs` module uses [tally arithmetic](http://openmc.readthedocs.io/en/latest/examples/tally-arithmetic.html) under-the-hood, the cross section is stored as a \"derived\" `Tally` object. This means that it can be queried and manipulated using all of the same methods supported for the `Tally` class in the OpenMC Python API. For example, we can construct a [Pandas](http://pandas.pydata.org/) `DataFrame` of the multi-group cross section data."
|
||||
"Since the `openmc.mgxs` module uses [tally arithmetic](../examples/tally-arithmetic.rst) under-the-hood, the cross section is stored as a \"derived\" `Tally` object. This means that it can be queried and manipulated using all of the same methods supported for the `Tally` class in the OpenMC Python API. For example, we can construct a [Pandas](https://pandas.pydata.org/) `DataFrame` of the multi-group cross section data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -817,7 +817,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](http://openmc.readthedocs.io/en/latest/examples/tally-arithmetic.html) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to confirm that the `TotalXS` is equal to the sum of the `AbsorptionXS` and `ScatterXS` objects."
|
||||
"Finally, we illustrate how one can leverage OpenMC's [tally arithmetic](../examples/tally-arithmetic.rst) data processing feature with `MGXS` objects. The `openmc.mgxs` module uses tally arithmetic to compute multi-group cross sections with automated uncertainty propagation. Each `MGXS` object includes an `xs_tally` attribute which is a \"derived\" `Tally` based on the tallies needed to compute the cross section type of interest. These derived tallies can be used in subsequent tally arithmetic operations. For example, we can use tally artithmetic to confirm that the `TotalXS` is equal to the sum of the `AbsorptionXS` and `ScatterXS` objects."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@
|
|||
"\n",
|
||||
"* Creation of multi-group cross sections on a **heterogeneous geometry**\n",
|
||||
"* Calculation of cross sections on a **nuclide-by-nuclide basis**\n",
|
||||
"* The use of **[tally precision triggers](http://docs.openmc.org/en/latest/io_formats/settings.html#trigger-element)** with multi-group cross sections\n",
|
||||
"* The use of **[tally precision triggers](../io_formats/settings.rst#trigger-element)** with multi-group cross sections\n",
|
||||
"* Built-in features for **energy condensation** in downstream data processing\n",
|
||||
"* The use of the **`openmc.data`** module to plot continuous-energy vs. multi-group cross sections\n",
|
||||
"* **Validation** of multi-group cross sections with **[OpenMOC](https://mit-crpg.github.io/OpenMOC/)**\n",
|
||||
"\n",
|
||||
"**Note:** This Notebook was created using [OpenMOC](https://mit-crpg.github.io/OpenMOC/) to verify the multi-group cross-sections generated by OpenMC. You must install [OpenMOC](https://mit-crpg.github.io/OpenMOC/) on your system in order to run this Notebook in its entirety. In addition, this Notebook illustrates the use of [Pandas](http://pandas.pydata.org/) `DataFrames` to containerize multi-group cross section data."
|
||||
"**Note:** This Notebook was created using [OpenMOC](https://mit-crpg.github.io/OpenMOC/) to verify the multi-group cross-sections generated by OpenMC. You must install [OpenMOC](https://mit-crpg.github.io/OpenMOC/) on your system in order to run this Notebook in its entirety. In addition, this Notebook illustrates the use of [Pandas](https://pandas.pydata.org/) `DataFrames` to containerize multi-group cross section data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -264,7 +264,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Next, we showcase the use of OpenMC's [tally precision trigger](http://openmc.readthedocs.io/en/latest/io_formats/settings.html#trigger-element) feature in conjunction with the `openmc.mgxs` module. In particular, we will assign a tally trigger of 1E-2 on the standard deviation for each of the tallies used to compute multi-group cross sections."
|
||||
"Next, we showcase the use of OpenMC's [tally precision trigger](../io_formats/settings.rst#trigger-element) feature in conjunction with the `openmc.mgxs` module. In particular, we will assign a tally trigger of 1E-2 on the standard deviation for each of the tallies used to compute multi-group cross sections."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -745,7 +745,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Although a printed report is nice, it is not scalable or flexible. Let's extract the microscopic cross section data for the moderator as a [Pandas](http://pandas.pydata.org/) `DataFrame` ."
|
||||
"Although a printed report is nice, it is not scalable or flexible. Let's extract the microscopic cross section data for the moderator as a [Pandas](https://pandas.pydata.org/) `DataFrame` ."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"* **Validation** of multi-group cross sections with **[OpenMOC](https://mit-crpg.github.io/OpenMOC/)**\n",
|
||||
"* Steady-state pin-by-pin **fission rates comparison** between OpenMC and [OpenMOC](https://mit-crpg.github.io/OpenMOC/)\n",
|
||||
"\n",
|
||||
"**Note:** This Notebook was created using [OpenMOC](https://mit-crpg.github.io/OpenMOC/) to verify the multi-group cross-sections generated by OpenMC. You must install [OpenMOC](https://mit-crpg.github.io/OpenMOC/) on your system to run this Notebook in its entirety. In addition, this Notebook illustrates the use of [Pandas](http://pandas.pydata.org/) `DataFrames` to containerize multi-group cross section data."
|
||||
"**Note:** This Notebook was created using [OpenMOC](https://mit-crpg.github.io/OpenMOC/) to verify the multi-group cross-sections generated by OpenMC. You must install [OpenMOC](https://mit-crpg.github.io/OpenMOC/) on your system to run this Notebook in its entirety. In addition, this Notebook illustrates the use of [Pandas](https://pandas.pydata.org/) `DataFrames` to containerize multi-group cross section data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
@ -811,7 +811,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The `NuFissionXS` object supports all of the methods described previously in the `openmc.mgxs` tutorials, such as [Pandas](http://pandas.pydata.org/) `DataFrames`:\n",
|
||||
"The `NuFissionXS` object supports all of the methods described previously in the `openmc.mgxs` tutorials, such as [Pandas](https://pandas.pydata.org/) `DataFrames`:\n",
|
||||
"Note that since so few histories were simulated, we should expect a few division-by-error errors as some tallies have not yet scored any results."
|
||||
]
|
||||
},
|
||||
|
|
@ -994,7 +994,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The HDF5 store will contain the numerical multi-group cross section data indexed by domain, nuclide and cross section type. Some data workflows may be optimized by storing and retrieving binary representations of the `MGXS` objects in the `Library`. This feature is supported through the `Library.dump_to_file(...)` and `Library.load_from_file(...)` routines which use Python's [`pickle`](https://docs.python.org/2/library/pickle.html) module. This is illustrated as follows."
|
||||
"The HDF5 store will contain the numerical multi-group cross section data indexed by domain, nuclide and cross section type. Some data workflows may be optimized by storing and retrieving binary representations of the `MGXS` objects in the `Library`. This feature is supported through the `Library.dump_to_file(...)` and `Library.load_from_file(...)` routines which use Python's [`pickle`](https://docs.python.org/3/library/pickle.html) module. This is illustrated as follows."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"If had [Cython](http://cython.org/) installed when you built/installed OpenMC, you should be able to evaluate resonant cross sections from ENDF data directly, i.e., OpenMC will reconstruct resonances behind the scenes for you."
|
||||
"If you had [Cython](https://cython.org/) installed when you built/installed OpenMC, you should be able to evaluate resonant cross sections from ENDF data directly, i.e., OpenMC will reconstruct resonances behind the scenes for you."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -567,7 +567,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The statepoint file actually stores the sum and sum-of-squares for each tally bin from which the mean and variance can be calculated as described [here](http://openmc.readthedocs.io/en/latest/methods/tallies.html#variance). The sum and sum-of-squares can be accessed using the ``sum`` and ``sum_sq`` properties:"
|
||||
"The statepoint file actually stores the sum and sum-of-squares for each tally bin from which the mean and variance can be calculated as described [here](../methods/tallies.rst#variance). The sum and sum-of-squares can be accessed using the ``sum`` and ``sum_sq`` properties:"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
"\n",
|
||||
"To perform the search we will use the `openmc.search_for_keff` function. This function requires a different function be defined which creates an parametrized model to analyze. This model is required to be stored in an `openmc.model.Model` object. The first parameter of this function will be modified during the search process for our critical eigenvalue.\n",
|
||||
"\n",
|
||||
"Our model will be a pin-cell from the [Multi-Group Mode Part II](http://docs.openmc.org/en/latest/examples/mg-mode-part-ii.html) assembly, except this time the entire model building process will be contained within a function, and the Boron concentration will be parametrized."
|
||||
"Our model will be a pin-cell from the [Multi-Group Mode Part II](mg-mode-part-ii.ipynb) assembly, except this time the entire model building process will be contained within a function, and the Boron concentration will be parametrized."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#include "openmc/capi.h"
|
||||
#include "openmc/settings.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define UNREACHABLE() __builtin_unreachable()
|
||||
#else
|
||||
#define UNREACHABLE() (void)0
|
||||
|
|
|
|||
|
|
@ -402,7 +402,9 @@ def gnd_name(Z, A, m=0):
|
|||
|
||||
|
||||
def isotopes(element):
|
||||
"""Return naturally-occurring isotopes and their abundances
|
||||
"""Return naturally occurring isotopes and their abundances
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
|
|||
|
|
@ -1018,6 +1018,8 @@ class WindowedMultipole(EqualityMixin):
|
|||
def from_endf(cls, endf_file, log=False, vf_options=None, wmp_options=None):
|
||||
"""Generate windowed multipole neutron data from an ENDF evaluation.
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
endf_file : str
|
||||
|
|
|
|||
|
|
@ -326,6 +326,8 @@ class Chain:
|
|||
`["(n,2n)", "(n,gamma)"]`. Note that fission is always included if
|
||||
it is present. A complete listing of transmutation reactions can be
|
||||
found in :data:`openmc.deplete.chain.REACTIONS`.
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
progress : bool, optional
|
||||
Flag to print status messages during processing. Does not
|
||||
effect warning messages
|
||||
|
|
|
|||
|
|
@ -302,6 +302,8 @@ class ResultsList(list):
|
|||
def export_to_materials(self, burnup_index, nuc_with_data=None) -> Materials:
|
||||
"""Return openmc.Materials object based on results at a given step
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
burn_index : int
|
||||
|
|
|
|||
|
|
@ -3020,6 +3020,8 @@ class DiffusionCoefficient(TransportXS):
|
|||
To incorporate the effect of scattering multiplication in the above
|
||||
relation, the `nu` parameter can be set to `True`.
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
domain : openmc.Material or openmc.Cell or openmc.Universe or openmc.RegularMesh
|
||||
|
|
@ -6610,6 +6612,8 @@ class MeshSurfaceMGXS(MGXS):
|
|||
|
||||
.. note:: Users should instantiate the subclasses of this abstract class.
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
domain : openmc.RegularMesh
|
||||
|
|
@ -6992,6 +6996,8 @@ class Current(MeshSurfaceMGXS):
|
|||
\frac{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE \;
|
||||
J(r, E)}{\int_{r \in S} dS \int_{E_g}^{E_{g-1}} dE}.
|
||||
|
||||
.. versionadded:: 0.12.1
|
||||
|
||||
Parameters
|
||||
----------
|
||||
domain : openmc.RegularMesh
|
||||
|
|
|
|||
|
|
@ -298,6 +298,10 @@ def write_source_file(source_particles, filename, **kwargs):
|
|||
**kwargs
|
||||
Keyword arguments to pass to :class:`h5py.File`
|
||||
|
||||
See Also
|
||||
--------
|
||||
openmc.SourceParticle
|
||||
|
||||
"""
|
||||
# Create compound datatype for source particles
|
||||
pos_dtype = np.dtype([('x', '<f8'), ('y', '<f8'), ('z', '<f8')])
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ check_tally_triggers(double& ratio, int& tally_id, int& score)
|
|||
case TriggerMetric::relative_error:
|
||||
uncertainty = rel_err;
|
||||
break;
|
||||
case TriggerMetric::not_active:
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
// Compute the uncertainty / threshold ratio.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue