Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/source/pythonapi/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Simulation Settings
:nosignatures:
:template: myclass.rst

openmc.ParticleType
openmc.SourceBase
openmc.IndependentSource
openmc.FileSource
Expand Down
3 changes: 3 additions & 0 deletions docs/source/pythonapi/capi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Functions
run_in_memory
run_random_ray
sample_external_source
slice_data
slice_data_overlap_count
slice_data_overlap_info
simulation_finalize
simulation_init
source_bank
Expand Down
2 changes: 2 additions & 0 deletions docs/source/pythonapi/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Simple Models
:nosignatures:
:template: myfunction.rst

openmc.examples.random_ray_pin_cell
openmc.examples.random_ray_three_region_cube_with_detectors
openmc.examples.slab_mg
openmc.examples.sphere_with_shielded_pocket

Expand Down
408 changes: 408 additions & 0 deletions docs/source/releasenotes/0.16.0.rst

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/source/releasenotes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Release Notes
.. toctree::
:maxdepth: 1

0.16.0
0.15.3
0.15.2
0.15.1
Expand Down
4 changes: 2 additions & 2 deletions openmc/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def half_life(

.. versionadded:: 0.13.1

.. versionchanged:: 0.15.4
.. versionchanged:: 0.16.0
Added the ``chain_file`` argument.

Parameters
Expand Down Expand Up @@ -367,7 +367,7 @@ def decay_constant(

.. versionadded:: 0.13.1

.. versionchanged:: 0.15.4
.. versionchanged:: 0.16.0
Added the ``chain_file`` argument.

Parameters
Expand Down
4 changes: 4 additions & 0 deletions openmc/data/dose/mass_attenuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def mass_energy_absorption_coefficient(
from `NIST Standard Reference Database 126
<https://doi.org/10.18434/T4D01F>`_: X-Ray Mass Attenuation Coefficients.

.. versionadded:: 0.16.0

Parameters
----------
material : str or int
Expand Down Expand Up @@ -162,6 +164,8 @@ def mass_attenuation_coefficient(element):
Reference Database 8 <https://doi.org/10.18434/T48G6X>`_: XCOM Photon Cross
Sections Database.

.. versionadded:: 0.16.0

Parameters
----------
element : str or int
Expand Down
6 changes: 3 additions & 3 deletions openmc/deplete/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ class Integrator(ABC):
factorizations may be reused across them, improving accuracy for
nuclides with large decay-constant × timestep products.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0
continue_timesteps : bool, optional
Whether or not to treat the current solve as a continuation of a
previous simulation. Defaults to `False`. When `False`, the depletion
Expand Down Expand Up @@ -1192,7 +1192,7 @@ def add_keff_search_control(
...>
... )

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

"""
self._keff_search_control = _KeffSearchControl(
Expand Down Expand Up @@ -1256,7 +1256,7 @@ class SIIntegrator(Integrator):
factorizations may be reused across them, improving accuracy for
nuclides with large decay-constant × timestep products.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0
continue_timesteps : bool, optional
Whether or not to treat the current solve as a continuation of a
previous simulation. Defaults to `False`. If `False`, all time steps and
Expand Down
2 changes: 1 addition & 1 deletion openmc/deplete/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def get_activity(
``None`` or an explicit chain, nuclides absent from the chain fall
back to ENDF/B-VIII.0 data.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Returns
-------
Expand Down
6 changes: 6 additions & 0 deletions openmc/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,8 @@ def random_ray_pin_cell(second_temp = False) -> openmc.Model:
"""Create a PWR pin cell example using C5G7 cross section data.
cross section data.

.. versionadded:: 0.16.0

Parameters
----------
second_temp : bool, optional
Expand Down Expand Up @@ -1327,6 +1329,8 @@ def random_ray_three_region_cube_with_detectors() -> openmc.Model:
region. The model returned by this function contains cell tallies on each
detector.

.. versionadded:: 0.16.0

Returns
-------
model : openmc.Model
Expand Down Expand Up @@ -1624,6 +1628,8 @@ def fill_cube(N, n_1, n_2, fill_1, fill_2, fill_3):
def sphere_with_shielded_pocket() -> openmc.Model:
"""Create a continuous energy deep-shielding model with a far detector pocket.

.. versionadded:: 0.16.0

A concrete sphere is centered at the origin. A 2 MeV isotropic neutron
source sits in a small air cavity just inside the sphere surface on the -x
side, and a small steel pocket is embedded flush with the surface on the
Expand Down
4 changes: 2 additions & 2 deletions openmc/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ def check_bins(self, bins):
class ReactionFilter(Filter):
"""Bins tally events based on the reaction type (MT number).

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -1821,7 +1821,7 @@ class ParticleProductionFilter(Filter):

The incident particle type can be filtered using :class:`ParticleFilter`.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down
2 changes: 2 additions & 0 deletions openmc/lib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ def run(output=True):
def run_random_ray(output=True):
"""Run a random ray simulation

.. versionadded:: 0.16.0

Parameters
----------
output : bool, optional
Expand Down
12 changes: 12 additions & 0 deletions openmc/lib/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,12 @@ def bins(self):


class ParticleProductionFilter(Filter):
"""Filter secondary-particle production events.

.. versionadded:: 0.16.0

"""

filter_type = 'particleproduction'


Expand All @@ -617,6 +623,12 @@ class PolarFilter(Filter):


class ReactionFilter(Filter):
"""Filter tally events by reaction type.

.. versionadded:: 0.16.0

"""

filter_type = 'reaction'


Expand Down
8 changes: 8 additions & 0 deletions openmc/lib/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def slice_data(origin, width=None, basis='xy', u_span=None, v_span=None,
include_properties=True):
"""Generate a 2D raster of geometry and property data for plotting.

.. versionadded:: 0.16.0

Parameters
----------
origin : sequence of float
Expand Down Expand Up @@ -274,6 +276,8 @@ def property_map(plot):
def slice_data_overlap_count() -> int:
"""Return the number of unique overlaps from the last slice plot.

.. versionadded:: 0.16.0

Returns
-------
int
Expand All @@ -288,6 +292,8 @@ def slice_data_overlap_count() -> int:
def slice_data_overlap_info() -> np.ndarray:
"""Return identifying information for overlaps from the last slice plot.

.. versionadded:: 0.16.0

Returns
-------
numpy.ndarray
Expand Down Expand Up @@ -432,6 +438,8 @@ class SolidRayTracePlot(_FortranObjectWithID):
the OpenMC library. To obtain a view of an existing plot with a given ID,
use the :data:`openmc.lib.plots` mapping.

.. versionadded:: 0.16.0

Parameters
----------
uid : int or None
Expand Down
2 changes: 1 addition & 1 deletion openmc/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@ def get_activity(
``None`` or an explicit chain, nuclides absent from the chain fall
back to ENDF/B-VIII.0 data.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Returns
-------
Expand Down
6 changes: 3 additions & 3 deletions openmc/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ def build_cells(self, bc: str | None = None):
def get_indices_at_coords(self, coords: Sequence[float]) -> tuple:
"""Finds the index of the mesh element at the specified coordinates.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -1768,7 +1768,7 @@ def to_xml_element(self):
def get_indices_at_coords(self, coords: Sequence[float]) -> tuple[int, int, int]:
"""Find the mesh cell indices containing the specified coordinates.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -2665,7 +2665,7 @@ def get_indices_at_coords(
) -> tuple[int, int, int]:
"""Find the mesh cell indices containing the specified coordinates.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down
7 changes: 4 additions & 3 deletions openmc/mgxs/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def convert_flux_groups(flux, source_groups, target_groups):
unit lethargy within each source group and distributes flux to target
groups proportionally to their lethargy width.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -348,8 +348,9 @@ def convert_flux_groups(flux, source_groups, target_groups):
-----
The assumption of constant flux per unit lethargy within each source
group is physically reasonable for most reactor spectra but is not
exact. For best accuracy, use source spectra with sufficiently fine
energy resolution.
exact [1]_. For best accuracy, use source spectra with sufficiently fine
energy resolution. A similar group-conversion approach is available in
FISPACT-II [2]_.

Examples
--------
Expand Down
10 changes: 5 additions & 5 deletions openmc/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from openmc.checkvalue import (check_type, check_value, check_greater_than,
check_length, PathLike)
from openmc.exceptions import InvalidIDError
from openmc.plots import add_plot_params, _BASIS_INDICES, id_map_to_rgb
from openmc.plots import add_plot_params, _BASIS_INDICES, _id_map_to_rgb
from openmc.utility_funcs import change_directory, set_xml_input_path


Expand Down Expand Up @@ -1399,7 +1399,7 @@ def plot(
colors = plot.colors

# Convert ID map to RGB image
img = id_map_to_rgb(
img = _id_map_to_rgb(
id_map=id_map,
color_by=color_by,
colors=colors,
Expand Down Expand Up @@ -2677,7 +2677,7 @@ def convert_to_multigroup(
Number of particles to simulate per batch when generating MGXS.
Defaults to 2000.

.. deprecated:: 0.15.4
.. deprecated:: 0.16.0
Pass ``particles`` as a keyword argument instead.
overwrite_mgxs_library : bool, optional
Whether to overwrite an existing MGXS library file.
Expand Down Expand Up @@ -2713,7 +2713,7 @@ def convert_to_multigroup(
Valid entries for temperature_settings are the same as the valid
entries in openmc.Settings.temperature_settings.

.. deprecated:: 0.15.4
.. deprecated:: 0.16.0
Pass ``temperature`` as a keyword argument instead.
**kwargs
:class:`openmc.Settings` attributes used to customize the continuous
Expand All @@ -2730,7 +2730,7 @@ def convert_to_multigroup(
enables. Cannot be combined with the deprecated ``nparticles`` or
``temperature_settings`` arguments.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0
"""
if not isinstance(groups, openmc.mgxs.EnergyGroups):
groups = openmc.mgxs.EnergyGroups(groups)
Expand Down
4 changes: 4 additions & 0 deletions openmc/particle_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ class ParticleType:
to uniquely identify particle types. This includes elementary particles
(neutrons, photons, etc.) and nuclear codes for isotopes.

.. versionchanged:: 0.16.0
Changed from an ``IntEnum`` to a class backed by PDG Monte Carlo
particle numbers.

Parameters
----------
value : str, int, or ParticleType
Expand Down
8 changes: 4 additions & 4 deletions openmc/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def voxel_to_vtk(voxel_file: PathLike, output: PathLike = 'plot.vti'):
return output


def id_map_to_rgb(
def _id_map_to_rgb(
id_map: np.ndarray,
color_by: str = 'cell',
colors: dict | None = None,
Expand Down Expand Up @@ -716,7 +716,7 @@ class SlicePlot(PlotBase):
(255, 255, 255) would be white, or by a string indicating a
valid `SVG color <https://www.w3.org/TR/SVG11/types.html#ColorKeywords>`_.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -1140,7 +1140,7 @@ class VoxelPlot(PlotBase):
(255, 255, 255) would be white, or by a string indicating a
valid `SVG color <https://www.w3.org/TR/SVG11/types.html#ColorKeywords>`_.

.. versionadded:: 0.15.1
.. versionadded:: 0.16.0

Parameters
----------
Expand Down Expand Up @@ -1382,7 +1382,7 @@ def to_vtk(self, output: PathLike | None = None,
def Plot(plot_id=None, name=''):
"""Legacy Plot class for backward compatibility.

.. deprecated:: 0.15.4
.. deprecated:: 0.16.0
Use :class:`SlicePlot` for 2D slice plots or :class:`VoxelPlot` for 3D voxel plots.

"""
Expand Down
2 changes: 1 addition & 1 deletion openmc/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class Settings:
enabled automatically for fixed-source simulations with weight
windows active, and disabled otherwise.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0
source : Iterable of openmc.SourceBase
Distribution of source sites in space, angle, and energy
source_rejection_fraction : float
Expand Down
2 changes: 1 addition & 1 deletion openmc/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ class TokamakSource(SourceBase):
:math:`\Delta` is the Shafranov shift, and :math:`Z_\mathrm{shift}` is
the vertical shift.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion openmc/stats/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ def cylindrical_uniform(
a flat ring (annulus) at z=0 in the local coordinate frame. Optionally, the
range of angles can be restricted by the `phis` argument.

.. versionadded:: 0.15.4
.. versionadded:: 0.16.0

Parameters
----------
Expand Down
Loading
Loading