diff --git a/docs/source/pythonapi/base.rst b/docs/source/pythonapi/base.rst index ff849b92c..721f3d113 100644 --- a/docs/source/pythonapi/base.rst +++ b/docs/source/pythonapi/base.rst @@ -90,6 +90,7 @@ Building geometry openmc.Complement openmc.Cell openmc.Universe + openmc.DAGMCUniverse openmc.RectLattice openmc.HexLattice openmc.Geometry @@ -143,6 +144,8 @@ Constructing Tallies openmc.ParticleFilter openmc.RegularMesh openmc.RectilinearMesh + openmc.CylindricalMesh + openmc.SphericalMesh openmc.UnstructuredMesh openmc.Trigger openmc.TallyDerivative diff --git a/docs/source/pythonapi/capi.rst b/docs/source/pythonapi/capi.rst index 44094ffd4..03be25abf 100644 --- a/docs/source/pythonapi/capi.rst +++ b/docs/source/pythonapi/capi.rst @@ -13,10 +13,12 @@ Functions :template: myfunction.rst calculate_volumes + export_properties finalize find_cell find_material hard_reset + import_properties init iter_batches keff diff --git a/docs/source/releasenotes/0.13.0.rst b/docs/source/releasenotes/0.13.0.rst new file mode 100644 index 000000000..6416234d4 --- /dev/null +++ b/docs/source/releasenotes/0.13.0.rst @@ -0,0 +1,100 @@ +==================== +What's New in 0.13.0 +==================== + +.. currentmodule:: openmc + +------- +Summary +------- + +This release of OpenMC includes several noteworthy and unique features. Most +importantly, mesh-based weight windows have been added and work with all +supported mesh types (regular, rectilinear, cylindrical, spherical, and +unstructured). Other additions include torus surfaces, an ability to place +CAD-based geometries in universes, a feature to export/import physical +properties, and a filter for particle time. + +There is one breaking changing in the Python API. The +:class:`openmc.deplete.Operator` class used to accept :class:`~openmc.Geometry` +and :class:`~openmc.Settings` objects as its first two arguments; users now need +to pass a :class:`~openmc.model.Model` class instead. + +The minimum supported Python version is now 3.6. + +------------ +New Features +------------ + +- Variance reduction using mesh-based weight windows is now possible with the + :class:`~openmc.WeightWindows` class. +- Users can now model axis-aligned tori using the :class:`~openmc.XTorus`, + :class:`~openmc.YTorus`, and :class:`~openmc.ZTorus` classes. +- DAGMC CAD-based geometries can now be placed in a single universe using + :class:`~openmc.DAGMCUniverse`, allowing users to combine CSG and CAD-based + geometry in a single model. +- The C/C++ API has two new functions ``openmc_properties_export`` and + ``openmc_properties_import`` with corresponding Python API bindings, + :func:`~openmc.lib.export_properties` and + :func:`~openmc.lib.import_properties`. These functions allow physical + properties (temperatures, densities, material compositions) to be written to + an HDF5 file and re-used for subsequent simulations. +- A new :class:`~openmc.stats.PowerLaw` univariate distribution +- The capabilities of the :class:`~openmc.Model` class have been substantially + expanded (e.g., the :meth:`~openmc.model.Model.deplete`, + :meth:`~openmc.model.Model.plot_geometry`, and + :meth:`~openmc.model.Model.rotate_cells` methods). +- A new :class:`~openmc.TimeFilter` class that allows tallies to be filtered + by the particle's time, which is now tracked. +- The :class:`~openmc.Source` class now allows you to specify a time + distribution. +- The new :class:`~openmc.CylindricalMesh` and :class:`~openmc.SphericalMesh` + can be used for mesh tallies over cylidrical and spherical meshes, + respectively. +- Geometry plotting, which used to produce the files in the unusual .ppm format, + now produces .png files by default. + +--------- +Bug Fixes +--------- + +- `Fix for shared fission bank memory errors `_ +- `Make sure properties export only happens from root process `_ +- `Fix pathlib use error in openmc-ace-to-hdf5 `_ +- `Fix DAGMC and libMesh variable in CMake config `_ +- `Fix bug associated with volume calc in MG mode `_ +- `Add missing Settings.write_initial_source property `_ +- `Bug fixes for specifying Materials.cross_sections `_ +- `Removing Legendre filter in diffusion coefficient results `_ +- `Ensure particles lost during event_calculate_xs are terminated `_ +- `Fixed parsing of xsdir entries with a continuation line `_ +- `openmc.RegularMesh attribute consistency `_ +- `Ensure secondary particles below energy cutoff are not created `_ +- `Allow compilation with g++ 11 `_ +- `Depletion-related bug fixes `_ +- `Miscellaneous bug fixes `_ +- `Fixes for various bugs `_ +- `Reset triggers in openmc_reset `_ + +------------ +Contributors +------------ + +- `Hunter Belanger `_ +- `Helen Brooks `_ +- `Andrew Davis `_ +- `Valerio Giusti `_ +- `Jeff Hammond `_ +- `Yuan Hu `_ +- `Andrew Johnson `_ +- `Miriam Kreher `_ +- `Amanda Lund `_ +- `Adam Nelson `_ +- `April Novak `_ +- `Ariful Islam Pranto `_ +- `Gavin Ridley `_ +- `Paul Romano `_ +- `Olaf Schumann `_ +- `Jonathan Shimwell `_ +- `Patrick Shriwise `_ +- `John Tramm `_ diff --git a/docs/source/releasenotes/index.rst b/docs/source/releasenotes/index.rst index f3c02f039..75db7ebc9 100644 --- a/docs/source/releasenotes/index.rst +++ b/docs/source/releasenotes/index.rst @@ -7,6 +7,7 @@ Release Notes .. toctree:: :maxdepth: 1 + 0.13.0 0.12.2 0.12.1 0.12.0 diff --git a/openmc/filter.py b/openmc/filter.py index 65255bd3d..f0e9219b7 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -1354,6 +1354,8 @@ class EnergyoutFilter(EnergyFilter): class TimeFilter(RealFilter): """Bins tally events based on the particle's time. + .. versionadded:: 0.13.0 + Parameters ---------- values : iterable of float diff --git a/openmc/lib/core.py b/openmc/lib/core.py index e585444fb..de5f4adf2 100644 --- a/openmc/lib/core.py +++ b/openmc/lib/core.py @@ -144,8 +144,7 @@ def current_batch(): def export_properties(filename=None, output=True): """Export physical properties. - .. versionchanged:: 0.13.0 - The *output* argument was added. + .. versionadded:: 0.13.0 Parameters ---------- @@ -228,6 +227,8 @@ def hard_reset(): def import_properties(filename): """Import physical properties. + .. versionadded:: 0.13.0 + Parameters ---------- filename : str diff --git a/openmc/settings.py b/openmc/settings.py index 18d1fa4d9..ccb3d3861 100644 --- a/openmc/settings.py +++ b/openmc/settings.py @@ -1566,6 +1566,8 @@ class Settings: def from_xml(cls, path='settings.xml'): """Generate settings from XML file + .. versionadded:: 0.13.0 + Parameters ---------- path : str, optional diff --git a/openmc/stats/univariate.py b/openmc/stats/univariate.py index 8d10104fd..f8e50044f 100644 --- a/openmc/stats/univariate.py +++ b/openmc/stats/univariate.py @@ -244,11 +244,14 @@ class Uniform(Univariate): params = get_text(elem, 'parameters').split() return cls(*map(float, params)) + class PowerLaw(Univariate): """Distribution with power law probability over a finite interval [a,b] - + The power law distribution has density function :math:`p(x) dx = c x^n dx`. + .. versionadded:: 0.13.0 + Parameters ---------- a : float, optional @@ -914,6 +917,8 @@ class Mixture(Univariate): def to_xml_element(self, element_name): """Return XML representation of the mixture distribution + .. versionadded:: 0.13.0 + Parameters ---------- element_name : str @@ -939,6 +944,8 @@ class Mixture(Univariate): def from_xml_element(cls, elem): """Generate mixture distribution from an XML element + .. versionadded:: 0.13.0 + Parameters ---------- elem : xml.etree.ElementTree.Element diff --git a/openmc/surface.py b/openmc/surface.py index 4a174a23b..4661f2de9 100644 --- a/openmc/surface.py +++ b/openmc/surface.py @@ -2193,6 +2193,8 @@ class XTorus(TorusMixin, Surface): r"""A torus of the form :math:`(x - x_0)^2/B^2 + (\sqrt{(y - y_0)^2 + (z - z_0)^2} - A)^2/C^2 - 1 = 0`. + .. versionadded:: 0.13.0 + Parameters ---------- x0 : float @@ -2262,6 +2264,8 @@ class YTorus(TorusMixin, Surface): r"""A torus of the form :math:`(y - y_0)^2/B^2 + (\sqrt{(x - x_0)^2 + (z - z_0)^2} - A)^2/C^2 - 1 = 0`. + .. versionadded:: 0.13.0 + Parameters ---------- x0 : float @@ -2331,6 +2335,8 @@ class ZTorus(TorusMixin, Surface): r"""A torus of the form :math:`(z - z_0)^2/B^2 + (\sqrt{(x - x_0)^2 + (y - y_0)^2} - A)^2/C^2 - 1 = 0`. + .. versionadded:: 0.13.0 + Parameters ---------- x0 : float diff --git a/openmc/tallies.py b/openmc/tallies.py index 6755e805d..1ab5000ca 100644 --- a/openmc/tallies.py +++ b/openmc/tallies.py @@ -869,6 +869,8 @@ class Tally(IDManagerMixin): def from_xml_element(cls, elem, **kwargs): """Generate tally object from an XML element + .. versionadded:: 0.13.0 + Parameters ---------- elem : xml.etree.ElementTree.Element diff --git a/openmc/universe.py b/openmc/universe.py index e971be1c0..a7d7f096c 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -629,6 +629,8 @@ class Universe(UniverseBase): class DAGMCUniverse(UniverseBase): """A reference to a DAGMC file to be used in the model. + .. versionadded:: 0.13.0 + Parameters ---------- filename : str diff --git a/openmc/volume.py b/openmc/volume.py index 67f4b7abe..8740a6600 100644 --- a/openmc/volume.py +++ b/openmc/volume.py @@ -358,6 +358,8 @@ class VolumeCalculation: def from_xml_element(cls, elem): """Generate volume calculation object from an XML element + .. versionadded:: 0.13.0 + Parameters ---------- elem : xml.etree.ElementTree.Element diff --git a/openmc/weight_windows.py b/openmc/weight_windows.py index 5e4f57bd9..e07e8a84f 100644 --- a/openmc/weight_windows.py +++ b/openmc/weight_windows.py @@ -18,7 +18,7 @@ class WeightWindows(IDManagerMixin): This class enables you to specify weight window parameters that are used in a simulation. Multiple sets of weight windows can be defined for different meshes and different particles. An iterable of :class:`WeightWindows` - instances can be assigned to the :attr:`~openmc.Settings.weight_windows` + instances can be assigned to the :attr:`openmc.Settings.weight_windows` attribute, which is then exported to XML. Weight window lower/upper bounds are to be specified for each combination of