mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Merge pull request #852 from paulromano/model
Model class and test suite improvements
This commit is contained in:
commit
b7440ae3e3
111 changed files with 1481 additions and 1819 deletions
|
|
@ -105,15 +105,20 @@ in the tests directory. We recommend to developers to test their branches
|
|||
before submitting a formal pull request using gfortran and Intel compilers
|
||||
if available.
|
||||
|
||||
The test suite is designed to integrate with cmake using ctest_.
|
||||
It is configured to run with cross sections from NNDC_. To
|
||||
download these cross sections please do the following:
|
||||
The test suite is designed to integrate with cmake using ctest_. It is
|
||||
configured to run with cross sections from NNDC_ augmented with 0 K elastic
|
||||
scattering data for select nuclides as well as multipole data. To download the
|
||||
proper data, run the following commands:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
cd ../scripts
|
||||
./openmc-get-nndc-data
|
||||
export OPENMC_CROSS_SECTIONS=<path_to_data_folder>/nndc_hdf5/cross_sections.xml
|
||||
wget -O nndc_hdf5.tar.xz $(cat <openmc_root>/.travis.yml | grep anl.box | awk '{print $2}')
|
||||
tar xJvf nndc_hdf5.tar.xz
|
||||
export OPENMC_CROSS_SECTIONS=$(pwd)/nndc_hdf5/cross_sections.xml
|
||||
|
||||
git clone --branch=master git://github.com/smharper/windowed_multipole_library.git wmp_lib
|
||||
tar xzvf wmp_lib/multipole_lib.tar.gz
|
||||
export OPENMC_MULTIPOLE_LIBRARY=$(pwd)/multipole_lib
|
||||
|
||||
The test suite can be run on an already existing build using:
|
||||
|
||||
|
|
|
|||
25
docs/source/pythonapi/examples.rst
Normal file
25
docs/source/pythonapi/examples.rst
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
----------------------------------------
|
||||
:mod:`openmc.examples` -- Example Models
|
||||
----------------------------------------
|
||||
|
||||
Simple Models
|
||||
-------------
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myfunction.rst
|
||||
|
||||
openmc.examples.slab_mg
|
||||
|
||||
Reactor Models
|
||||
--------------
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
:nosignatures:
|
||||
:template: myfunction.rst
|
||||
|
||||
openmc.examples.pwr_pin_cell
|
||||
openmc.examples.pwr_assembly
|
||||
openmc.examples.pwr_core
|
||||
|
|
@ -47,4 +47,5 @@ Modules
|
|||
mgxs
|
||||
model
|
||||
data
|
||||
examples
|
||||
openmoc
|
||||
|
|
|
|||
|
|
@ -199,6 +199,30 @@ OpenMC.
|
|||
etc. For a more thorough overview of the capabilities of this class,
|
||||
see the :ref:`notebook_nuclear_data` example notebook.
|
||||
|
||||
Enabling Resonance Scattering Treatments
|
||||
----------------------------------------
|
||||
|
||||
In order for OpenMC to correctly treat elastic scattering in heavy nuclides
|
||||
where low-lying resonances might be present (see
|
||||
:ref:`energy_dependent_xs_model`), the elastic scattering cross section at 0 K
|
||||
must be present. To add the 0 K elastic scattering cross section to existing
|
||||
:class:`IncidentNeutron` instance, you can use the
|
||||
:meth:`IncidentNeutron.add_elastic_0K_from_endf` method which requires an ENDF
|
||||
file for the nuclide you are modifying::
|
||||
|
||||
u238 = openmc.data.IncidentNeutron.from_hdf5('U238.h5')
|
||||
u238.add_elastic_0K_from_endf('n-092_U_238.endf')
|
||||
u238.export_to_hdf5('U238_with_0K.h5')
|
||||
|
||||
With 0 K elastic scattering data present, you can turn on a resonance scattering
|
||||
method using :attr:`Settings.resonance_scattering`.
|
||||
|
||||
.. note:: The process of reconstructing resonances and generating tabulated 0 K
|
||||
cross sections can be computationally expensive, especially for
|
||||
nuclides like U-238 where thousands of resonances are present. Thus,
|
||||
running the :meth:`IncidentNeutron.add_elastic_0K_from_endf` method
|
||||
may take several minutes to complete.
|
||||
|
||||
-----------------------
|
||||
Windowed Multipole Data
|
||||
-----------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue