mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Respond to @nelsonag comments on #852
This commit is contained in:
parent
f658bf85eb
commit
7156d7cd98
4 changed files with 59 additions and 13 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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
-----------------------
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ import openmc.model
|
|||
def pwr_pin_cell():
|
||||
"""Create a PWR pin-cell model.
|
||||
|
||||
This model is a single fuel pin with 2.4 w/o enriched UO2 corresponding to a
|
||||
beginning-of-cycle condition and borated water. The specifications are from
|
||||
the `BEAVRS <http://crpg.mit.edu/research/beavrs>`_ benchmark. Note that the
|
||||
number of particles/batches is initially set very low for testing purposes.
|
||||
|
||||
Returns
|
||||
-------
|
||||
model : openmc.model.Model
|
||||
|
|
@ -85,7 +90,8 @@ def pwr_core():
|
|||
|
||||
This model is the OECD/NEA Monte Carlo Performance benchmark which is a
|
||||
grossly simplified pressurized water reactor (PWR) with 241 fuel
|
||||
assemblies.
|
||||
assemblies. Note that the number of particles/batches is initially set very
|
||||
low for testing purposes.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
|
@ -428,6 +434,11 @@ def pwr_core():
|
|||
def pwr_assembly():
|
||||
"""Create a PWR assembly model.
|
||||
|
||||
This model is a reflected 17x17 fuel assembly from the the `BEAVRS
|
||||
<http://crpg.mit.edu/research/beavrs>`_ benchmark. The fuel is 2.4 w/o
|
||||
enriched UO2 corresponding to a beginning-of-cycle condition. Note that the
|
||||
number of particles/batches is initially set very low for testing purposes.
|
||||
|
||||
Returns
|
||||
-------
|
||||
model : openmc.model.Model
|
||||
|
|
@ -538,8 +549,12 @@ def slab_mg(reps=None, as_macro=True):
|
|||
Parameters
|
||||
----------
|
||||
reps : list, optional
|
||||
List of angular representations. Items can be 'ang', 'ang_mu', 'iso', or
|
||||
'iso_mu'.
|
||||
List of angular representations. Each item corresponds to materials and
|
||||
dictates the angular representation of the multi-group cross
|
||||
sections---isotropic ('iso') or angle-dependent ('ang'), and if Legendre
|
||||
scattering or tabular scattering ('mu') is used. Thus, items can be
|
||||
'ang', 'ang_mu', 'iso', or 'iso_mu'.
|
||||
|
||||
as_macro : bool, optional
|
||||
Whether :class:`openmc.Macroscopic` is used
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,10 @@ class Model(object):
|
|||
This class can be used to store instances of :class:`openmc.Geometry`,
|
||||
:class:`openmc.Materials`, :class:`openmc.Settings`,
|
||||
:class:`openmc.Tallies`, :class:`openmc.Plots`, and :class:`openmc.CMFD`,
|
||||
thus making a complete model.
|
||||
thus making a complete model. The :meth:`Model.export_to_xml` method will
|
||||
export XML files for all attributes that have been set. If the
|
||||
:meth:`Model.materials` attribute is not set, it will attempt to create a
|
||||
``materials.xml`` file based on all materials appearing in the geometry.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
|
@ -50,9 +53,8 @@ class Model(object):
|
|||
self.materials = openmc.Materials()
|
||||
self.settings = openmc.Settings()
|
||||
self.cmfd = cmfd
|
||||
|
||||
self._tallies = openmc.Tallies()
|
||||
self._plots = openmc.Plots()
|
||||
self.tallies = openmc.Tallies()
|
||||
self.plots = openmc.Plots()
|
||||
|
||||
if geometry is not None:
|
||||
self.geometry = geometry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue