Merge branch 'develop' into integrator-class

Need new travis.yml to pass CI
This commit is contained in:
Andrew Johnson 2019-07-30 15:58:49 -05:00
commit b9683dbdba
No known key found for this signature in database
GPG key ID: 253418E91B7F6FEB
114 changed files with 8323 additions and 4462 deletions

View file

@ -4,9 +4,6 @@
Test Suite
==========
Running Tests
-------------
The OpenMC test suite consists of two parts, a regression test suite and a unit
test suite. The regression test suite is based on regression or integrated
testing where different types of input files are configured and the full OpenMC
@ -14,27 +11,35 @@ code is executed. Results from simulations are compared with expected
results. The unit tests are primarily intended to test individual
functions/classes in the OpenMC Python API.
The test suite relies on the third-party `pytest <https://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
module is importable. In development where it would be onerous to continually
install OpenMC every time a small change is made, it is recommended to install
OpenMC in development/editable mode. With setuptools, this is accomplished by
running::
Prerequisites
-------------
python setup.py develop
- The test suite relies on the third-party `pytest <https://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
module is importable. In development where it would be onerous to continually
install OpenMC every time a small change is made, it is recommended to install
OpenMC in development/editable mode. With setuptools, this is accomplished by
running::
or using pip (recommended)::
python setup.py develop
pip install -e .[test]
or using pip (recommended)::
It is also assumed that you have cross section data available that is pointed to
by the :envvar:`OPENMC_CROSS_SECTIONS` environment variables. Furthermore, to
run unit tests for the :mod:`openmc.data` module, it is necessary to have
ENDF/B-VII.1 data available and pointed to by the :envvar:`OPENMC_ENDF_DATA`
environment variable. All data sources can be obtained using the
``tools/ci/travis-before-script.sh`` script.
pip install -e .[test]
- The test suite requires a specific set of cross section data in order for
tests to pass. A download URL for the data that OpenMC expects can be found
within ``tools/ci/download-xs.sh``.
- In addition to the HDF5 data, some tests rely on ENDF files. A download URL
for those can also be found in ``tools/ci/download-xs.sh``.
- Some tests require `NJOY <https://www.njoy21.io/NJOY2016>`_ to preprocess
cross section data. The test suite assumes that you have an ``njoy``
executable available on your :envvar:`PATH`.
Running Tests
-------------
To execute the test suite, go to the ``tests/`` directory and run::
@ -46,6 +51,17 @@ installed and run::
pytest --cov=../openmc --cov-report=html
Generating XML Inputs
---------------------
Many of the regression tests rely on the Python API to build an appropriate
model. However, it can sometimes be desirable to work directly with the XML
input files rather than having to run a script in order to run the problem/test.
To build the input files for a test without actually running the test, you can
run::
pytest --build-inputs <name-of-test>
Adding Tests to the Regression Suite
------------------------------------

View file

@ -51,3 +51,20 @@ attributes:
:type:
The type of data contained in the file. Accepted values are 'neutron',
'thermal', 'photon', and 'wmp'.
.. _depletion_element:
-----------------------------
``<depletion_chain>`` Element
-----------------------------
The ``<depletion_chain>`` element indicates the location of the depletion chain file.
This file contains information describing how nuclides decay and transmute to other
nuclides through the depletion process. This element has a single attribute, ``path``,
pointing to the location of the chain file.
.. code-block:: xml
<depletion_chain path="/opt/data/chain_endfb7.xml"/>
The structure of the depletion chain file is explained in :ref:`io_depletion_chain`.

View file

@ -44,3 +44,10 @@ The current version of the depletion results file format is 1.0.
**/reactions/<name>/**
:Attributes: - **index** (*int*) -- Index user in results for this reaction
.. note::
The reaction rates for some isotopes not originally present may
be non-zero, but should be negligible compared to other atoms.
This can be controlled by changing the
:class:`openmc.deplete.Operator` ``dilute_initial`` attribute.

View file

@ -42,8 +42,7 @@ Each ``material`` element can have the following attributes or sub-elements:
Volume of the material in cm^3.
:temperature:
An element with no attributes which is used to set the default temperature
of the material in Kelvin.
Temperature of the material in Kelvin.
*Default*: If a material default temperature is not given and a cell
temperature is not specified, the :ref:`global default temperature

View file

@ -13,8 +13,9 @@ is that documented here.
:Attributes: - **filetype** (*char[]*) -- String indicating the type of file.
:Datasets:
- **source_bank** (Compound type) -- Source bank information for each
particle. The compound type has fields ``wgt``, ``xyz``, ``uvw``,
``E``, and ``delayed_group``, which represent the weight, position,
direction, energy, energy group, and delayed_group of the source
particle, respectively.
``E``, ``delayed_group``, and ``particle``, which represent the
weight, position, direction, energy, energy group, delayed group,
and type of the source particle, respectively.

View file

@ -116,6 +116,13 @@ The current version of the summary file format is 6.0.
- **sab_names** (*char[][]*) -- Names of
S(:math:`\alpha,\beta`) tables assigned to the material.
:Attributes: - **volume** (*double[]*) -- Volume of this material [cm^3]. Only
present if ``volume`` supplied
- **temperature** (*double[]*) -- Temperature of this material [K].
Only present in ``temperature`` supplied
- **depletable** (*int[]*) -- ``1`` if the material can be depleted,
``0`` otherwise. Always present
**/nuclides/**
:Attributes: - **n_nuclides** (*int*) -- Number of nuclides in the problem.

View file

@ -75,10 +75,24 @@ data, such as number densities and reaction rates for each material.
:template: myclass.rst
AtomNumber
ChainFissionHelper
DirectReactionRateHelper
OperatorResult
ReactionRates
Results
ResultsList
The following classes are abstract classes that can be used to extend the
:mod:`openmc.deplete` capabilities:
.. autosummary::
:toctree: generated
:nosignatures:
:template: myclass.rst
ReactionRateHelper
EnergyHelper
TransportOperator
Each of the integrator functions also relies on a number of "helper" functions

View file

@ -15,6 +15,7 @@ Convenience Functions
openmc.model.hexagonal_prism
openmc.model.rectangular_prism
openmc.model.subdivide
openmc.model.pin
TRISO Fuel Modeling
-------------------