mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-27 21:55:41 -04:00
Merge remote-tracking branch 'upstream/develop' into search
This commit is contained in:
commit
5c7230d506
15 changed files with 153 additions and 124 deletions
|
|
@ -37,9 +37,8 @@ In order to be considered suitable for inclusion in the *develop* branch, the
|
|||
following criteria must be satisfied for all proposed changes:
|
||||
|
||||
- Changes have a clear purpose and are useful.
|
||||
- Compiles under all conditions (MPI, OpenMP, HDF5, etc.). This is checked as
|
||||
part of the test suite.
|
||||
- Passes the regression suite.
|
||||
- Compiles and passes the regression suite with all configurations (This is
|
||||
checked by Travis CI).
|
||||
- If appropriate, test cases are added to regression suite.
|
||||
- No memory leaks (checked with valgrind_).
|
||||
- Conforms to the OpenMC `style guide`_.
|
||||
|
|
@ -81,8 +80,7 @@ features and bug fixes. The general steps for contributing are as follows:
|
|||
|
||||
At a minimum, you should describe what the changes you've made are and why
|
||||
you are making them. If the changes are related to an oustanding issue, make
|
||||
sure it is cross-referenced. A wise developer would also check whether their
|
||||
changes do indeed pass the regression test suite.
|
||||
sure it is cross-referenced.
|
||||
|
||||
5. A trusted developer will review your pull request based on the criteria
|
||||
above. Any issues with the pull request can be discussed directly on the pull
|
||||
|
|
@ -104,7 +102,7 @@ full OpenMC code is executed. Results from simulations are compared with
|
|||
expected results. The test suite is comprised of many build configurations
|
||||
(e.g. debug, mpi, hdf5) and the actual tests which reside in sub-directories
|
||||
in the tests directory. We recommend to developers to test their branches
|
||||
before submitting a formal pull request using gfortran and intel compilers
|
||||
before submitting a formal pull request using gfortran and Intel compilers
|
||||
if available.
|
||||
|
||||
The test suite is designed to integrate with cmake using ctest_.
|
||||
|
|
@ -113,9 +111,9 @@ download these cross sections please do the following:
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
cd ../data
|
||||
python get_nndc_data.py
|
||||
export CROSS_SECTIONS=<path_to_data_folder>/nndc/cross_sections.xml
|
||||
cd ../scripts
|
||||
./openmc-get-nndc-data
|
||||
export OPENMC_CROSS_SECTIONS=<path_to_data_folder>/nndc_hdf5/cross_sections.xml
|
||||
|
||||
The test suite can be run on an already existing build using:
|
||||
|
||||
|
|
@ -137,21 +135,29 @@ more control over which tests are executed.
|
|||
Before running the test suite python script, the following environmental
|
||||
variables should be set if the default paths are incorrect:
|
||||
|
||||
* **FC** - The command of the Fortran compiler (e.g. gfotran, ifort).
|
||||
* **FC** - The command for a Fortran compiler (e.g. gfotran, ifort).
|
||||
|
||||
* Default - *gfortran*
|
||||
|
||||
* **CC** - The command for a C compiler (e.g. gcc, icc).
|
||||
|
||||
* Default - *gcc*
|
||||
|
||||
* **CXX** - The command for a C++ compiler (e.g. g++, icpc).
|
||||
|
||||
* Default - *g++*
|
||||
|
||||
* **MPI_DIR** - The path to the MPI directory.
|
||||
|
||||
* Default - */opt/mpich/3.1.3-gnu*
|
||||
* Default - */opt/mpich/3.2-gnu*
|
||||
|
||||
* **HDF5_DIR** - The path to the HDF5 directory.
|
||||
|
||||
* Default - */opt/hdf5/1.8.14-gnu*
|
||||
* Default - */opt/hdf5/1.8.16-gnu*
|
||||
|
||||
* **PHDF5_DIR** - The path to the parallel HDF5 directory.
|
||||
|
||||
* Default - */opt/phdf5/1.8.14-gnu*
|
||||
* Default - */opt/phdf5/1.8.16-gnu*
|
||||
|
||||
To run the full test suite, the following command can be executed in the
|
||||
tests directory:
|
||||
|
|
@ -192,15 +198,12 @@ a test you need to add the following files to your new test directory,
|
|||
*test_name* for example:
|
||||
|
||||
* OpenMC input XML files
|
||||
* **test_name.py** - python test driver script, please refer to other
|
||||
* **test_name.py** - Python test driver script, please refer to other
|
||||
tests to see how to construct. Any output files that are generated
|
||||
during testing must be removed at the end of this script.
|
||||
* **results.py** - python script that extracts results from statepoint
|
||||
output files. By default it should look for a binary file, but can
|
||||
take an argument to overwrite which statepoint file is processed,
|
||||
whether it is at a different batch or with an HDF5 extension. This
|
||||
script must output a results file that is named *results_test.dat*.
|
||||
It is recommended that any real numbers reported use *12.6E* format.
|
||||
* **inputs_true.dat** - ASCII file that contains Python API-generated XML
|
||||
files concatenated together. When the test is run, inputs that are
|
||||
generated are compared to this file.
|
||||
* **results_true.dat** - ASCII file that contains the expected results
|
||||
from the test. The file *results_test.dat* is compared to this file
|
||||
during the execution of the python test driver script. When the
|
||||
|
|
|
|||
|
|
@ -183,45 +183,43 @@ Multi-Group Data
|
|||
|
||||
The data governing the interaction of particles with various nuclei or materials
|
||||
are represented using a multi-group library format specific to the OpenMC code.
|
||||
The format is described in the :ref:`mgxs_lib_spec`.
|
||||
The data itself can be prepared via traditional paths or directly from a
|
||||
continuous-energy OpenMC calculation by use of the Python API as is shown in the
|
||||
:ref:`notebook_mgxs_part_iv` example notebook. This multi-group
|
||||
library consists of meta-data (such as the energy group structure) and multiple
|
||||
`xsdata` objects which contains the required microscopic or macroscopic
|
||||
multi-group data.
|
||||
The format is described in the :ref:`mgxs_lib_spec`. The data itself can be
|
||||
prepared via traditional paths or directly from a continuous-energy OpenMC
|
||||
calculation by use of the Python API as is shown in the
|
||||
:ref:`notebook_mg_mode_part_i` example notebook. This multi-group library
|
||||
consists of meta-data (such as the energy group structure) and multiple `xsdata`
|
||||
objects which contains the required microscopic or macroscopic multi-group data.
|
||||
|
||||
At a minimum, the library must contain the absorption cross section
|
||||
(:math:`\sigma_{a,g}`) and a scattering matrix. If the problem is an eigenvalue
|
||||
problem then all fissionable materials must also contain either
|
||||
a fission production matrix cross section
|
||||
(:math:`\nu\sigma_{f,g\rightarrow g'}`), or
|
||||
both the fission spectrum data (:math:`\chi_{g'}`) and a fission production
|
||||
cross section (:math:`\nu\sigma_{f,g}`), or, . The library must also contain
|
||||
the fission cross section (:math:`\sigma_{f,g}`) or the fission energy release
|
||||
cross section (:math:`\kappa\sigma_{f,g}`) if the associated tallies are
|
||||
required by the model using the library.
|
||||
problem then all fissionable materials must also contain either a fission
|
||||
production matrix cross section (:math:`\nu\sigma_{f,g\rightarrow g'}`), or both
|
||||
the fission spectrum data (:math:`\chi_{g'}`) and a fission production cross
|
||||
section (:math:`\nu\sigma_{f,g}`), or, . The library must also contain the
|
||||
fission cross section (:math:`\sigma_{f,g}`) or the fission energy release cross
|
||||
section (:math:`\kappa\sigma_{f,g}`) if the associated tallies are required by
|
||||
the model using the library.
|
||||
|
||||
After a scattering collision, the outgoing particle experiences a change in both
|
||||
energy and angle. The probability of a particle resulting in a given outgoing
|
||||
energy group (`g'`) given a certain incoming energy group (`g`) is provided
|
||||
by the scattering matrix data. The angular information can be expressed either
|
||||
via Legendre expansion of the particle's change-in-angle (:math:`\mu`), a
|
||||
tabular representation of the probability distribution function of :math:`\mu`,
|
||||
or a histogram representation of the same PDF. The formats used to
|
||||
represent these are described in the :ref:`mgxs_lib_spec`.
|
||||
energy group (`g'`) given a certain incoming energy group (`g`) is provided by
|
||||
the scattering matrix data. The angular information can be expressed either via
|
||||
Legendre expansion of the particle's change-in-angle (:math:`\mu`), a tabular
|
||||
representation of the probability distribution function of :math:`\mu`, or a
|
||||
histogram representation of the same PDF. The formats used to represent these
|
||||
are described in the :ref:`mgxs_lib_spec`.
|
||||
|
||||
Unlike the continuous-energy mode, the multi-group mode does not explicitly
|
||||
track particles produced from scattering multiplication (i.e., :math:`(n,xn)`)
|
||||
reactions. These are instead accounted for by adjusting the weight of the
|
||||
particle after the collision such that the correct total weight is maintained.
|
||||
The weight adjustment factor is optionally provided by the `multiplicity` data
|
||||
which is required to be provided in the form of a group-wise matrix.
|
||||
This data is provided as a group-wise matrix since the probability of producing
|
||||
multiple particles in a scattering reaction depends on both the incoming energy,
|
||||
`g`, and the sampled outgoing energy, `g'`. This data represents the average
|
||||
number of particles emitted from a scattering reaction, given a scattering
|
||||
reaction has occurred:
|
||||
which is required to be provided in the form of a group-wise matrix. This data
|
||||
is provided as a group-wise matrix since the probability of producing multiple
|
||||
particles in a scattering reaction depends on both the incoming energy, `g`, and
|
||||
the sampled outgoing energy, `g'`. This data represents the average number of
|
||||
particles emitted from a scattering reaction, given a scattering reaction has
|
||||
occurred:
|
||||
|
||||
.. math::
|
||||
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ Constructing Tallies
|
|||
openmc.EnergyFunctionFilter
|
||||
openmc.Mesh
|
||||
openmc.Trigger
|
||||
openmc.TallyDerivative
|
||||
openmc.Tally
|
||||
openmc.Tallies
|
||||
|
||||
|
|
@ -483,6 +484,28 @@ Functions
|
|||
openmc.data.endf.get_tab2_record
|
||||
openmc.data.endf.get_text_record
|
||||
|
||||
---------------------------------------------------------
|
||||
:mod:`openmc.openmoc_compatible` -- OpenMOC Compatibility
|
||||
---------------------------------------------------------
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myfunction.rst
|
||||
|
||||
openmc.openmoc_compatible.get_openmoc_material
|
||||
openmc.openmoc_compatible.get_openmc_material
|
||||
openmc.openmoc_compatible.get_openmoc_surface
|
||||
openmc.openmoc_compatible.get_openmc_surface
|
||||
openmc.openmoc_compatible.get_openmoc_cell
|
||||
openmc.openmoc_compatible.get_openmc_cell
|
||||
openmc.openmoc_compatible.get_openmoc_universe
|
||||
openmc.openmoc_compatible.get_openmc_universe
|
||||
openmc.openmoc_compatible.get_openmoc_lattice
|
||||
openmc.openmoc_compatible.get_openmc_lattice
|
||||
openmc.openmoc_compatible.get_openmoc_geometry
|
||||
openmc.openmoc_compatible.get_openmc_geometry
|
||||
|
||||
.. _Jupyter: https://jupyter.org/
|
||||
.. _NumPy: http://www.numpy.org/
|
||||
.. _Codecademy: https://www.codecademy.com/tracks/python
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
.. _pythonapi_openmoc_compatible:
|
||||
|
||||
=====================
|
||||
OpenMOC Compatibility
|
||||
=====================
|
||||
|
||||
.. automodule:: openmc.openmoc_compatible
|
||||
:members:
|
||||
|
|
@ -87,6 +87,22 @@ be validated using the following command:
|
|||
|
||||
/opt/openmc/bin/openmc-validate-xml
|
||||
|
||||
--------------
|
||||
Physical Units
|
||||
--------------
|
||||
|
||||
Unless specified otherwise, all length quantities are assumed to be in units of
|
||||
centimeters, all energy quantities are assumed to be in electronvolts, and all
|
||||
time quantities are assumed to be in seconds.
|
||||
|
||||
======= ============ ======
|
||||
Measure Default unit Symbol
|
||||
======= ============ ======
|
||||
length centimeter cm
|
||||
energy electronvolt eV
|
||||
time second s
|
||||
======= ============ ======
|
||||
|
||||
--------------------------------------
|
||||
Settings Specification -- settings.xml
|
||||
--------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue