Skip to content

Commit 48fb58a

Browse files
authored
Merge pull request #2174 from paulromano/prepare-0.13.1
Prepare for version 0.13.1
2 parents 3dea073 + 2a7a6b1 commit 48fb58a

File tree

28 files changed

+296
-50
lines changed

28 files changed

+296
-50
lines changed

docs/source/pythonapi/stats.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,10 @@ Spatial Distributions
5151
openmc.stats.SphericalIndependent
5252
openmc.stats.Box
5353
openmc.stats.Point
54+
55+
.. autosummary::
56+
:toctree: generated
57+
:nosignatures:
58+
:template: myfunction.rst
59+
60+
openmc.stats.spherical_uniform
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
====================
2+
What's New in 0.13.1
3+
====================
4+
5+
.. currentmodule:: openmc
6+
7+
-------
8+
Summary
9+
-------
10+
11+
This release of OpenMC includes many bug fixes as well as improvements in
12+
geometry modeling, mesh functionality, source specification, depletion
13+
capabilities, and other general enhancements. The depletion module features a
14+
new transport operator, :class:`openmc.deplete.IndependentOperator`, that allows
15+
a depletion calculation to be performed using arbitrary one-group cross sections
16+
(e.g., generated by an external solver) along with a
17+
:class:`openmc.deplete.MicroXS` class for managing one-group cross sections. The
18+
track file generation capability has been significantly overhauled and a new
19+
:class:`openmc.Tracks` class was introduced to allow access to information in
20+
track files from the Python API. Support has been added for new ENDF thermal
21+
scattering evaluations that use mixed coherent/incoherent elastic scattering.
22+
23+
------------------------------------
24+
Compatibility Notes and Deprecations
25+
------------------------------------
26+
27+
- The ``openmc.deplete.Operator`` class has been renamed
28+
:class:`openmc.deplete.CoupledOperator`.
29+
- The ``openmc.deplete.ResultsList`` class has been renamed to
30+
:class:`openmc.deplete.Results` and no longer requires you to call the
31+
``from_hdf5()`` method in order to create it; instead, you can directly
32+
instantiate it.
33+
- A few methods that represent k-effective have been renamed for the sake of
34+
consistency:
35+
36+
- ``openmc.StatePoint.k_combined`` is now :attr:`openmc.StatePoint.keff`
37+
- ``openmc.deplete.ResultsList.get_eigenvalue`` is now
38+
:meth:`openmc.deplete.Results.get_keff`
39+
40+
- The :class:`openmc.stats.SphericalIndependent` class, which used to
41+
accept a distribution for ``theta`` now accepts a distribution for ``cos_theta``
42+
instead in order to more easily handle the common case of specifying a uniform
43+
spatial distribution over a sphere (also see the new
44+
:func:`openmc.stats.spherical_uniform` function).
45+
46+
- If you are building OpenMC from source, note that several of our CMake options
47+
have been changed:
48+
49+
========== ======================
50+
Old option New option
51+
========== ======================
52+
debug ---
53+
optimize ---
54+
profile OPENMC_ENABLE_PROFILE
55+
coverage OPENMC_ENABLE_COVERAGE
56+
openmp OPENMC_USE_OPENMP
57+
--- OPENMC_USE_MPI
58+
dagmc OPENMC_USE_DAGMC
59+
libmesh OPENMC_USE_LIBMESH
60+
========== ======================
61+
62+
The ``debug`` and ``optimize`` options have been removed; instead, use the
63+
standard `CMAKE_BUILD_TYPE
64+
<https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html>`_
65+
variable.
66+
67+
------------
68+
New Features
69+
------------
70+
71+
- Two new composite surfaces: :class:`openmc.model.IsogonalOctagon` and
72+
:class:`openmc.model.CylinderSector`.
73+
- The :class:`~openmc.DAGMCUniverse` class now has a
74+
:attr:`~openmc.DAGMCUniverse.bounding_box` attribute and a
75+
:meth:`~openmc.DAGMCUniverse.bounding_region` method.
76+
- When translating a :class:`~openmc.Region` using the
77+
:meth:`~openmc.Region.translate` method, there is now an ``inplace`` argument.
78+
- The :class:`~openmc.Material` class has several new methods and attributes:
79+
80+
- The :meth:`~openmc.Material.add_components` methods allows you to add
81+
multiple nuclides/elements to a material with a single call by passing a
82+
dictionary.
83+
- The :meth:`~openmc.Material.get_activity` method returns the activity of a
84+
material in Bq, Bq/g, or Bq/cm³.
85+
- The :meth:`~openmc.Material.remove_element` method removes an element from a
86+
material
87+
- The :meth:`~openmc.Material.get_nuclide_atoms` method gives the number of
88+
atoms of each nuclide in a material
89+
90+
- All mesh classes now have a ``volumes`` property that provides the volume of
91+
each mesh element as well as ``write_data_to_vtk`` methods.
92+
- Support for externally managed MOAB meshes or libMesh meshes.
93+
- Multiple discrete distributions can be merged with the new
94+
:meth:`~openmc.stats.Discrete.merge` method.
95+
- The :func:`openmc.stats.spherical_uniform` function creates a uniform
96+
distribution over a sphere using the
97+
:class:`~openmc.stats.SphericalIndependent` class.
98+
- Univariate distributions in the :mod:`openmc.stats` module now have
99+
``sample()`` methods.
100+
- An ``openmc_sample_external_source`` function has been added to the C API with
101+
a corresponding Python binding :func:`openmc.lib.sample_external_source`.
102+
- The track file generation capability has been completely overhauled. Track
103+
files now include much more information, and a new :class:`~openmc.Tracks`
104+
class allows access to track file information from the Python API and has a
105+
:meth:`~openmc.Tracks.write_to_vtk` method for writing a VTK file. Multiple
106+
tracks are now written to a single file (one per MPI rank).
107+
- A new :func:`openmc.wwinp_to_wws` function that converts weight windows from a
108+
``wwinp`` file to a list of :class:`~openmc.WeightWindows` objects.
109+
- The new :meth:`openmc.EnergyFilter.from_group_structure` method provides a
110+
way of creating an energy filter with a group structure identified by name.
111+
- The :class:`openmc.data.Decay` class now has a
112+
:attr:`~openmc.data.Decay.sources` property that provides radioactive decay
113+
source distributions.
114+
- A :class:`openmc.mgxs.ReducedAbsorptionXS` class produces a multigroup cross
115+
section representing "reduced" absorption (absorption less neutron production
116+
from (n,xn) reactions).
117+
- Added support in the Python API and HDF5 nuclear data format for new ENDF
118+
thermal neutron scattering evaluations with mixed coherent elastic and
119+
incoherent elastic.
120+
- CMake now relies on ``find_package(MPI)`` for a more standard means of
121+
identifying an MPI compiler configuration.
122+
123+
---------
124+
Bug Fixes
125+
---------
126+
127+
- `Fix bug when a rotation matrix is passed to Halfspace.rotate <https://github.com/openmc-dev/openmc/pull/1974>`_
128+
- `Fix bug for spherical mesh string repr <https://github.com/openmc-dev/openmc/pull/1983>`_
129+
- `Fix package_data specification to include pyx files <https://github.com/openmc-dev/openmc/pull/1989>`_
130+
- `Allow meshes with same ID to appear in multiple files <https://github.com/openmc-dev/openmc/pull/1990>`_
131+
- `Fix overwritten variable in get_libraries_from_xsdata <https://github.com/openmc-dev/openmc/pull/1994>`_
132+
- `Write output files to correct directory <https://github.com/openmc-dev/openmc/pull/1998>`_
133+
- `Allow CMake to properly find third-party packages <https://github.com/openmc-dev/openmc/pull/2006>`_
134+
- `Fix Region.from_expression when ")(" appears in specification <https://github.com/openmc-dev/openmc/pull/2012>`_
135+
- `Move lost particle reset from finalize() to reset() <https://github.com/openmc-dev/openmc/pull/2015>`_
136+
- `Minor typo fixes in test_lattice.py <https://github.com/openmc-dev/openmc/pull/2024>`_
137+
- `Fix color assignment in Universe.plot <https://github.com/openmc-dev/openmc/pull/2034>`_
138+
- `Several depletion-related fixes <https://github.com/openmc-dev/openmc/pull/2037>`_
139+
- `Allow control of C++ standard used by compiler <https://github.com/openmc-dev/openmc/pull/2040/files>`_
140+
- `Fix IO format documentation for surface source read/write <https://github.com/openmc-dev/openmc/pull/2048>`_
141+
- `Make sure basis gets set in Plot.from_geometry <https://github.com/openmc-dev/openmc/pull/2050>`_
142+
- `Improve robustness of torus distance calculation <https://github.com/openmc-dev/openmc/pull/2053>`_
143+
- `Allow use of redundant fission when adjusting KERMA in from_njoy <https://github.com/openmc-dev/openmc/pull/2055>`_
144+
- `Disable GNU extensions for CMake target <https://github.com/openmc-dev/openmc/pull/2072>`_
145+
- `Two from_xml fixes <https://github.com/openmc-dev/openmc/pull/2074>`_
146+
- `Fix for rare infinite loop when finding cell <https://github.com/openmc-dev/openmc/pull/2075>`_
147+
- `Allow photon heating to be tallied by nuclide <https://github.com/openmc-dev/openmc/pull/2076>`_
148+
- `Use UTF-8 encoding when reading dose coefficients <https://github.com/openmc-dev/openmc/pull/2078>`_
149+
- `Fix a corner case in Region.from_expression <https://github.com/openmc-dev/openmc/pull/2081>`_
150+
- `Fix bug in spherical and cylindrical meshes <https://github.com/openmc-dev/openmc/pull/2108>`_
151+
- `Ensure weight window bounds are flattened when writing to XML <https://github.com/openmc-dev/openmc/pull/2113>`_
152+
- `Fix for std::cout sync bug in output.cpp <https://github.com/openmc-dev/openmc/pull/2122>`_
153+
- `Allow compiling against fmt v9 <https://github.com/openmc-dev/openmc/pull/2136>`_
154+
- `Fix TimeFilter for small time intervals <https://github.com/openmc-dev/openmc/pull/2168>`_
155+
156+
------------
157+
Contributors
158+
------------
159+
160+
- `David Andrs <https://github.com/andrsd>`_
161+
- `Hunter Belanger <https://github.com/HunterBelanger>`_
162+
- `Helen Brooks <https://github.com/helen-brooks>`_
163+
- `Rémi Delaporte-Mathurin <https://github.com/RemDelaporteMathurin>`_
164+
- `Joffrey Dorville <https://github.com/JoffreyDorville>`_
165+
- `Christopher Fichtlscherer <https://github.com/cfichtlscherer>`_
166+
- `Lewis Gross <https://github.com/lewisgross1296>`_
167+
- `Andrew Johnson <https://github.com/drewejohnson>`_
168+
- `Kalin Kiesling <https://github.com/kkiesling>`_
169+
- `Amanda Lund <https://github.com/amandalund>`_
170+
- `Richard Morrison <https://github.com/richmorrison>`_
171+
- `Patrick Myers <https://github.com/myerspat>`_
172+
- `Adam Nelson <https://github.com/nelsonag>`_
173+
- `April Novak <https://github.com/aprilnovak>`_
174+
- `Ethan Peterson <https://github.com/eepeterson>`_
175+
- `Gavin Ridley <https://github.com/gridley>`_
176+
- `Paul Romano <https://github.com/paulromano>`_
177+
- `Jonathan Shimwell <https://github.com/Shimwell>`_
178+
- `Patrick Shriwise <https://github.com/pshriwise>`_
179+
- `Amelia Trainer <https://github.com/ameliojo>`_
180+
- `John Tramm <https://github.com/jtramm>`_
181+
- `Bob Urberger <https://github.com/burberger>`_
182+
- `Olek Yardas <https://github.com/yardasol>`_

docs/source/releasenotes/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Release Notes
77
.. toctree::
88
:maxdepth: 1
99

10+
0.13.1
1011
0.13.0
1112
0.12.2
1213
0.12.1

docs/source/usersguide/depletion.rst

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ are requested.
1414

1515
The depletion module is designed such that the reaction rate solution (the
1616
transport "operator") is completely isolated from the solution of the
17-
transmutation equations and the method used for advancing time.
17+
transmutation equations and the method used for advancing time.
1818

1919
:mod:`openmc.deplete` supports multiple time-integration methods for determining
2020
material compositions over time. Each method appears as a different class.
@@ -40,7 +40,7 @@ time::
4040
Note that the coupling between the reaction rate solver and the transmutation
4141
solver happens in-memory rather than by reading/writing files on disk. OpenMC
4242
has two categories of transport operators for obtaining transmutation reaction
43-
rates.
43+
rates.
4444

4545
.. _coupled-depletion:
4646

@@ -65,7 +65,7 @@ Any material that contains a fissionable nuclide is depleted by default, but
6565
this can behavior can be changed with the :attr:`Material.depletable` attribute.
6666

6767
.. important::
68-
68+
6969
The volume must be specified for each material that is depleted by setting
7070
the :attr:`Material.volume` attribute. This is necessary in order to
7171
calculate the proper normalization of tally results based on the source rate.
@@ -198,8 +198,8 @@ Transport-independent depletion
198198
===============================
199199

200200
.. warning::
201-
202-
This feature is still under heavy development and has yet to be rigorously
201+
202+
This feature is still under heavy development and has yet to be rigorously
203203
verified. API changes and feature additions are possible and likely in
204204
the near future.
205205

@@ -237,7 +237,7 @@ object::
237237
'U236': 4.57e18,
238238
'O16': 4.64e22,
239239
'O17': 1.76e19}
240-
volume = 0.5
240+
volume = 0.5
241241
op = openmc.deplete.IndependentOperator.from_nuclides(volume,
242242
nuclides,
243243
micro_xs,
@@ -250,8 +250,8 @@ transport-depletion calculation and follow the same steps from there.
250250
.. note::
251251

252252
Ideally, one-group cross section data should be available for every
253-
reaction in the depletion chain. If a nuclide that has a reaction
254-
associated with it in the depletion chain is present in the `nuclides`
253+
reaction in the depletion chain. If a nuclide that has a reaction
254+
associated with it in the depletion chain is present in the `nuclides`
255255
parameter but not the cross section data, that reaction will not be
256256
simulated.
257257

@@ -289,7 +289,7 @@ or from data arrays::
289289
.. important::
290290

291291
Both :meth:`~openmc.deplete.MicroXS.from_csv()` and
292-
:meth:`~openmc.deplete.MicroXS.from_array()` assume the cross section values
292+
:meth:`~openmc.deplete.MicroXS.from_array()` assume the cross section values
293293
provided are in barns by defualt, but have no way of verifying this. Make
294294
sure your cross sections are in the correct units before passing to a
295295
:class:`~openmc.deplete.IndependentOperator` object.
@@ -315,26 +315,28 @@ normalizing reaction rates:
315315
the cross-sections by the ``source-rate``.
316316
2. ``fission-q`` normalization, which uses the ``power`` or ``power_density``
317317
provided by the time integrator to obtain reaction rates by computing a value
318-
for the flux based on this power. The general equation for the flux is
318+
for the flux based on this power. The general equation for the flux is
319319

320320
.. math::
321321
322-
\phi = \frac{P}{V \cdot \sum_i (Q_i \cdot \sigma^f_i \cdot \n_i)}
322+
\phi = \frac{P}{\sum\limits_i (Q_i \sigma^f_i N_i)}
323323
324-
where :math:`\sum_i` is the sum over all nuclides :math:`i`. This equation
325-
makes the same assumptions and issues as discussed in
326-
:ref:`energy-deposition`. Unfortunately, the proposed solution in that
324+
where :math:`P` is the power, :math:`Q_i` is the fission Q value for nuclide
325+
:math:`i`, :math:`\sigma_i^f` is the microscopic fission cross section for
326+
nuclide :math:`i`, and :math:`N_i` is the number of atoms of nuclide
327+
:math:`i`. This equation makes the same assumptions and issues as discussed
328+
in :ref:`energy-deposition`. Unfortunately, the proposed solution in that
327329
section does not apply here since we are decoupled from transport code.
328330
However, there is a method to converge to a more accurate value for flux by
329-
using substeps during time integration.
330-
`This paper <https://doi.org/10.1016/j.anucene.2016.05.031>`_ provides a
331-
good discussion of this method.
331+
using substeps during time integration. `This paper
332+
<https://doi.org/10.1016/j.anucene.2016.05.031>`_ provides a good discussion
333+
of this method.
332334

333335
.. warning::
334336

335337
The accuracy of results when using ``fission-q`` is entirely dependent on
336338
your depletion chain. Make sure it has sufficient data to resolve the
337-
dynamics of your particular scenario.
339+
dynamics of your particular scenario.
338340

339341
Multiple Materials
340342
~~~~~~~~~~~~~~~~~~

examples/pincell_depletion/restart_depletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
# Create depletion "operator"
4545
chain_file = 'chain_simple.xml'
46-
op = openmc.deplete.Operator(model, chain_file, previous_results)
46+
op = openmc.deplete.CoupledOperator(model, chain_file, previous_results)
4747

4848
# Perform simulation using the predictor algorithm
4949
time_steps = [1.0, 1.0, 1.0, 1.0, 1.0] # days

examples/pincell_depletion/run_depletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
# Create depletion "operator"
9090
chain_file = 'chain_simple.xml'
91-
op = openmc.deplete.Operator(model, chain_file)
91+
op = openmc.deplete.CoupledOperator(model, chain_file)
9292

9393
# Perform simulation using the predictor algorithm
9494
time_steps = [1.0, 1.0, 1.0, 1.0, 1.0] # days

openmc/data/kalbach_mann.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@ def kalbach_slope(energy_projectile, energy_emitted, za_projectile,
178178
energies are not calculated with the AWR number, but approximated with
179179
the number of mass instead.
180180
181+
.. versionadded:: 0.13.1
182+
181183
Parameters
182184
----------
183185
energy_projectile : float
@@ -593,6 +595,9 @@ def from_endf(cls, file_obj, za_emitted, za_target, projectile_mass):
593595
If the projectile is a neutron, the slope is calculated when it is
594596
not given explicitly.
595597
598+
.. versionchanged:: 0.13.1
599+
Arguments changed to accommodate slope calculation
600+
596601
Parameters
597602
----------
598603
file_obj : file-like object

openmc/deplete/coupled_operator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def _find_cross_sections(model):
5656
)
5757
return cross_sections
5858

59+
5960
def _get_nuclides_with_data(cross_sections):
6061
"""Loads cross_sections.xml file to find nuclides with neutron data
6162
@@ -81,6 +82,7 @@ def _get_nuclides_with_data(cross_sections):
8182

8283
return nuclides
8384

85+
8486
class CoupledOperator(OpenMCOperator):
8587
"""Transport-coupled transport operator.
8688
@@ -93,6 +95,9 @@ class CoupledOperator(OpenMCOperator):
9395
The geometry and settings parameters have been replaced with a
9496
model parameter that takes a :class:`~openmc.model.Model` object
9597
98+
.. versionchanged:: 0.13.1
99+
Name changed from ``Operator`` to ``CoupledOperator``
100+
96101
Parameters
97102
----------
98103
model : openmc.model.Model
@@ -534,6 +539,7 @@ def finalize(self):
534539
if self.cleanup_when_done:
535540
openmc.lib.finalize()
536541

542+
537543
# Retain deprecated name for the time being
538544
def Operator(*args, **kwargs):
539545
# warn of name change

0 commit comments

Comments
 (0)