Releases: openmc-dev/openmc
OpenMC 0.15.0
This release of OpenMC includes many bug fixes, performance improvements, and several notable new features. The major highlight of this release is the introduction of a new transport solver based on the random ray method, which is fully described in the user's guide. Other notable additions include a mesh-based source class (openmc.MeshSource
), a generalization of source domain rejection through the notion of "constraints", and new methods on mesh-based classes for computing material volume fractions and homogenized materials.
Compatibility Notes and Deprecations
Previously, specifying domain rejection for a source was only possible on the openmc.IndependentSoure
class and worked by specifying a domains
argument. This capability has been generalized to all source classes and expanded as well; specifying a domain to reject on should now be done with the constraints
argument as follows:
source = openmc.IndependentSource(..., constraints={'domains': [cell]})
The domains
argument is deprecated and will be removed in a future version of OpenMC. Similarly, the only_fissionable
argument to openmc.stats.Box
has been replaced by a 'fissionable'
constraint. That is, instead of specifying:
space = openmc.stats.Box(lower_left, upper_right, only_fissionable=True)
source = openmc.IndependentSource(space=space)
You should now provide the constraint as:
space = openmc.stats.Box(lower_left, upper_right)
source = openmc.IndependentSource(space=space, constraints={'fissionable': True})
The openmc.Settings.max_splits
attribute was renamed to max_history_splits
and its default value has been changed to 1e7 (#2954).
New Features
- When running OpenMC in volume calculation mode, only atomic weight ratio data is loaded from data files which reduces initialization time. (#2741)
- Introduced a
GeometryState
class in C++ to better separate particle and geometry data. (#2744)) - A new
openmc.MaterialFromFilter
class allows filtering tallies by which material a particle came from. (#2750) - Implemented a
openmc.deplete.MicroXS.from_multigroup_flux
method that generates microscopic cross sections for depletion from a predetermined multigroup flux. (#2755) - A new
openmc.MeshSource
class enables the specification of a source distribution over a mesh, where each mesh element has a different energy/angle/time distribution. (#2759) - Improve performance of depletion solver by utilizing CSR sparse matrix representation. (#2764,
#2771) - Added a
openmc.CylindricalMesh.get_indices_at_coords
method that provides the mesh element index corresponding to a given point in space. (#2782) - Added a
path
argument to theopenmc.deplete.Integrator.integrate
method. (#2784) - Added a
openmc.Geometry.get_all_nuclides
method. (#2796) - A new capability to compute material volume fractions over mesh elements was added in the
openmc.lib.Mesh.material_volumes
method. (#2802) - A new transport solver was added based on the random ray method. (#2823, #2988)
- Added a
openmc.lib.Material.depletable
attribute. (#2843) - Added a
openmc.lib.Mesh.get_plot_bins
method and correspondingopenmc_mesh_get_plot_bins
C API function that can be utilized to generate mesh tally visualizations in the plotter application. (#2854) - Introduced a
openmc.read_source_file
function that enables reading a source file from the Python API. (#2858) - Added a
bounding_box
property on theopenmc.RectilinearMesh
andopenmc.UnstructuredMesh
classes. (#2861) - Added a
openmc_mesh_get_volumes
C API function. (#2869) - The
openmc.Settings.surf_source_write
dictionary now acceptscell
,cellfrom
, orcellto
keys that limit surface source sites to those entering or leaving specific cells. (#2888) - Added a
openmc.Region.plot
method that allows regions to be plotted directly. (#2895) - Implemented "contains" operator for the
openmc.BoundingBox
class. (#2906) - Generalized source rejection via a new
constraints
argument to all source classes. (#2916) - Added a new
openmc.MeshBornFilter
class that filters tally events based on which mesh element a particle was born in. (#2925) - The
openmc.Trigger
class now has aignore_zeros
argument that results in any bins with zero score to be ignored when checking the trigger. (#2928) - Introduced a
openmc.Settings.max_events
attribute that controls the maximum number of events a particle can undergo. (#2945) - Added support for
openmc.UnstructuredMesh
in theopenmc.MeshSource
class. (#2949) - Added a
openmc.MeshBase.get_homogenized_materials
method that computes homogenized materials over mesh elements. (#2971) - Add an
options
argument toopenmc.UnstructuredMesh
that allows configuring underlying data structures in MOAB. (#2976) - Type hints were added to several classes in the :mod:
openmc.deplete
module. (#2866)
Bug Fixes
- Fix unit conversion in openmc.deplete.Results.get_mass (#2761)
- Fix Lagrangian interpolation (#2775)
- Depletion restart with MPI (#2778)
- Modify depletion transfer rates test to be more robust (#2779)
- Call simulation_finalize if needed when finalizing OpenMC (#2790)
- F90_NONE Removal (MGMC tallying optimization) (#2785)
- Correctly apply volumes to materials when using DAGMC geometries (#2787)
- Add inline to openmc::interpolate (#2789)
- Use huge_tree=True in lxml parsing (#2791)
- OpenMPMutex "Copying" (#2794)
- Do not link against several transitive dependencies of HDF5 (#2797)
- Added check to length of input arguments for IndependantOperator (#2799)
- Pytest Update Documentation (#2801)
- Move 'import lxml' to third-party block of imports (#2803)
- Fix creation of meshes when from loading settings from XML (#2805)
- Avoid high memory use when writing unstructured mesh VTK files (#2806)
- Consolidating thread information into the openmp interface header (#2809)
- Prevent underflow in calculation of speed (#2811)
- Provide error message if a cell path can't be determined (#2812)
- Fix distribcell labels for lattices used as fill in multiple cells (#2813)
- Make creation of spatial trees based on usage for unstructured mesh. (#2815)
- Ensure particle direction is normalized for plotting / volume calculations (#2816)
- Added missing meshes to documentation (#2820)
- Reset timers at correct place in deplete (#2821)
- Fix config change not propagating through to decay energies (#2825)
- Ensure that implicit complement cells appear last in DAGMC universes (#2838)
- Export model.tallies to XML in CoupledOperator (#2840)
- Fix locating h5m files references in DAGMC universes (#2842)
- Prepare for NumPy 2.0 (#2845)
- Added missing functions and classes to openmc.lib docs (#2847)
- Fix compilation on CentOS 7 (missing link to libdl) (#2849)
- Adding resulting nuclide to cross section plot legend (#2851)
- Updating file extension for Excel files when exporting MGXS data (#2852)
- Removed error raising when calling warn (#2853)
- Setting
surf_source_
attribute for DAGMC surfaces. (#2857) - Changing y axis label for heating plots (#2859)
- Removed unused step_index arg from restart (#2867)
- Fix issue with Cell::get_contained_cells() utility function (#2873)
- Adding energy axis units to plot xs (#2876)
- Set OpenMCOperator materials when diff_burnable_mats = True (#2877)
- Fix expansion filter merging (#2882)
- Added checks that tolerance value is between 0 and 1 (#2884)
- Statepoint file loading refactor and CAPI function (#2886)
- Added check for length of value passed into EnergyFilter (#2887)
- Ensure that Model.run() works when specifying a custom XML path (#2889)
- Updating docker file base to bookworm (#2890)
- Clarifying documentation for cones (#2892)
- Abort on cmake config if openmp requested but not found (#2893)
- Tiny updates from experience building on Mac (#2894)
- Added damage-energy as optional reaction for micro (#2903)
- docs: add missing max_splits in settings specification (#2910)
- Changed CI to use latest actions to get away from the Node 16 deprecation. (#2912)
- Mkdir to always allow parents and exist ok (#2914)
- Fixed small sphinx typo (#2915)
- Hexagonal lattice iterators (#2921)
- Fix Chain.form_matrix to work with scipy 1.12 (#2922)
- Allow get_microxs_and_flux to use OPENMC_CHAIN_FILE environment variable (#2934)
- Polygon fix to better handle colinear points (#2935)
- Fix CMFD to work with scipy 1.13 (#2936)
- Print warning if no natural isotopes when using add_element (#2938)
- Update xtl and xtensor submodules (#2941)
- Ensure two surfaces with different boundary type are not considered redundant (#2942)
- Updated package versions in Dockerfile (#2946)
- Add MPI calls to DAGMC external test (#2948)
- Eliminate deprecation warnings from scipy and pandas (#2951)
- Update math function unit test with catch2 (#2955)
- Support track file writing for particle restart runs. (#2957)
- Make UWUW optional (#2965)
- Allow pure decay IndependentOperator (#2966)
- Added fix to cfloat_endf for length 11 endf floats (#2967)
- Moved apt get to optional CI parts (#2970)
- Update bounding_box docstrings (#2972)
- Added extra error checking on spherical mesh creation (#2973)
- Update CODEOWNERS file (#2974)
- Added error checking on cylindrical mesh (#2977)
- Correction for histogram interpolation of Tabular distributions (#2981)
- Enforce lower_left in lattice geometry (#2982)
- Update random_dist.h comment to be less specific (#2991)
- Apply memoization in get_all_universes (#2995)
- Make sure skewed dataset is cast to bool properly (#3001)
- Hexagonal lattice roundtrip (#3003)
- Fix CylinderSector and IsogonalOctagon translations (#3018)
- Sets used instead of lists when membership testing (#3021)
- Fixing plot xs for when plotting element string reaction (#3029)
- Fix shannon entropy broken link (...
OpenMC 0.14.0
This release of OpenMC includes many bug fixes, performance improvements, and several notable new features. Some of the highlights include projection plots, pulse height tallies for photons, weight window generation, and an ability to specify continuous removal or feed of nuclides/elements during depletion. Additionally, one of the longstanding annoyances of depletion calculations, namely the need to include initial "dilute" nuclides, has been eliminated. There are also a wide array of general improvements in the Python API.
Compatibility Notes and Deprecations
- The
openmc.deplete.MicroXS
class has been completely redesigned and improved. See further comments below under "New Features". (#2572, #2579, #2595, #2700) - The
rectangular_prism
function has been replaced by theopenmc.model.RectangularPrism
class and thehexagonal_prism
function has been replaced by theopenmc.model.HexagonalPrism
class. Note that whereas therectangular_prism
andhexagonal_prism
functions returned a region representing the interior of the prism, the newopenmc.model.RectangularPrism
and
openmc.model.HexagonalPrism
classes return composite surfaces, so you need to use the unary-
or+
operators to obtain a region that can be assigned to a cell. (#2739) - The
Source
class has been refactored and split up into three separate classes:openmc.IndependentSource
,openmc.FileSource
, andopenmc.CompiledSource
. (#2524) - The
vertices
andcentroids
attributes on mesh classes now always return Cartesian coordinates and the shape of the returned arrays has changed to allowijk
indexing using a tuple (i.e.,xyz = vertices[i, j, k]
). (#2711) - The
openmc.Material.decay_photon_energy
attribute has been replaced by theopenmc.Material.get_decay_photon_energy
method. (#2715)
New Features
- A new
openmc.ProjectionPlot
class enables the generation of orthographic or perspective projection plots. (#1926) - The
openmc.model.RightCircularCylinder
class now supports optional filleted edges. (#2309) - Continuous removal or feed of nuclides/elements between materials can now be modeled during depletion via the
openmc.deplete.abc.Integrator.add_transfer_rate
method. (#2358, #2564, #2626) - The MAGIC method for global weight window generation has been implemented as part of the C++ API. (#2359)
- A new capability for pulse height tallies (currently limited to photons) has been added and can be used via the "pulse-height" tally score. (#2452)
- A
openmc.model.CruciformPrism
class has been added that provides a generalized cruciform prism composite surface. (#2457) - Type hints have been added in various places throughout the Python API. (#2462 , #2467, #2468, #2470, #2471, #2601)
- Voxel plots can now be generated through the
openmc.Plot.to_vtk
method. (#2464) - The
openmc.mgxs.EnergyGroups
class now allows you to alternatively pass a string of the group structure name (e.g., "CCFE-709") instead of the energy group boundaries. (#2466) - Several enhancements have been made to the
openmc.Universe.plot
method (addition of axis labels with units, ability to show legend and/or outlines, automatic determination of origin/width, ability to pass total number of pixels). (#2472 , #2482, #2483, #2492, #2513, #2575) - Functionality in the Python API dealing with bounding boxes now relies on a new
openmc.BoundingBox
class. (#2475) - Users now have more flexibility in specifying nuclides and reactions in the
openmc.plot_xs
function. (#2478) - The import time of the
openmc
Python module has been improved by deferring the import of matplotlib. (#2488) - Mesh clases in the Python API now support a
bounding_box
property. (#2507, #2620, #2621) - The
Source
class has been refactored and split up into three separate classes:openmc.IndependentSource
,openmc.FileSource
, andopenmc.CompiledSource
. (#2524) - Support was added for curvilinear elements when exporting cylindrical and spherical meshes to VTK. (#2533)
- The
openmc.Tally
class now has aopenmc.Tally.multiply_density
attribute that indicates whether reaction rate tallies should include the number density of the nuclide of interest. (#2539) - The
openmc.wwinp_to_wws
function now supportswwinp
files with cylindrical or spherical meshes. (#2556) - Depletion no longer relies on adding initial "dilute" nuclides to each depletable material in order to compute reaction rates. (#2559, #2568)
- The
openmc.deplete.Results
class now hasopenmc.deplete.Results.get_mass
(#2565),openmc.deplete.Results.get_activity
(#2617), andopenmc.deplete.Results.get_decay_heat
(#2625) methods. - The
openmc.deplete.StepResult.save
method now supports apath
argument. (#2567) - The
openmc.deplete.MicroXS
has been completely redesigned and improved. First, it no longer relies on theopenmc.mgxs
module, no longer subclassespandas.DataFrame
, and doesn't require adding initial "dilute" nuclides into material compositions. It now enables users to specify an energy group structure to collect multigroup cross sections, specify nuclides/reactions, and works with mesh domains in addition to the existing domains. A newopenmc.deplete.get_microxs_and_flux
function was added that improves the workflow for calculating microscopic cross sections along with fluxes. Altogether, these changes make it straightforward to switch between coupled and independent operators for depletion/activation calculations. (#2572, #2579 , #2595, #2700) - The
openmc.Geometry
class now hasmerge_surfaces
andsurface_precision
arguments. (#2602) - Several predefined energy group structures have been added ("MPACT-51", "MPACT-60", "MPACT-69", "SCALE-252"). (#2614)
- When running a depletion calculation, you are now allowed to include nuclides in the initial material compositions that do not have neutron cross sections (decay-only nuclides). (#2616)
- The
openmc.CylindricalMesh
andopenmc.SphericalMesh
classes can now be fully formed using the constructor. (#2619) - A time cutoff can now be specified in the
openmc.Settings.cutoff
attribute. (#2631) - The
openmc.Material.add_element
method now supports across_sections
argument that allows a cross section data source to be specified. (#2633 ) - The
openmc.Cell
class now has aplot
method. (#2648) - The
openmc.Geometry
class now has aplot
method. (#2661) - When weight window checks are performed can now be explicitly specified with the
openmc.Settings.weight_window_checkpoints
attribute. (#2670) - The
openmc.Settings
class now has amax_write_lost_particles
attribute that can limit the number of lost particle files written. (#2688) - The
openmc.deplete.CoupledOperator
class now has adiff_volume_method
argument that specifies how the volume of new materials should be determined. (#2691) - The
openmc.DAGMCUniverse.bounding_region
method now has apadding_distance
argument. (#2701) - A new
openmc.Material.get_decay_photon_energy
method replaces thedecay_photon_energy
attribute and includes an ability to eliminate low-importance points. This is facilitated by a newopenmc.stats.Discrete.clip
method. (#2715) - The
openmc.model.Model.differentiate_depletable_mats
method allows depletable materials to be differentiated independent of the depletion calculation itself. (#2718) - Albedos can now be specified on surface boundary conditions. (#2724)
Bug Fixes
- Enable use of NCrystal materials in plot_xs (#2435)
- Avoid segfault from extern "C" std::string (#2455)
- Fix several issues with the Model class (#2465)
- Provide alternative batch estimation message (#2479)
- Correct index check for remove_tally (#2494)
- Support for NCrystal material in from_xml_element (#2496)
- Fix compilation with gcc 5 (#2498)
- Fixed in the Tally::add_filter method (#2501)
- Fix meaning of "masking" for plots (#2510)
- Fix description of statepoint.batches in Settings class (#2514)
- Reorder list initialization of Plot constructor (#2519)
- Added mkdir to cwd argument in Model.run (#2523)
- Fix export of spherical coordinates in SphericalMesh (#2538)
- Add virtual destructor on PlottableInterface (#2541)
- Ensure parent directory is created during depletion (#2543)
- Fix potential out-of-bounds access in TimeFilter (#2532)
- Remove use of sscanf for reading surface coefficients (#2574)
- Fix torus intersection bug (#2589)
- Multigroup per-thread cache fixes (#2591)
- Bank surface source particles in all active cycles (#2592)
- Fix for muir standard deviation (#2598)
- Check for zero fission cross section (#2600)
- XML read fixes in Plot classes (#2623)
- Added infinity check in VolumeCalculation (#2634)
- Fix sampling issue in Mixture distributions (#2658)
- Prevent segfault in distance to boundary calculation (#2659)
- Several CylindricalMesh fixes (#2676, #2680, #2684, #2710)
- Add type checks on Intersection, Union, Complement (#2685)
- Fixed typo in CF4Integrator docstring (#2704)
- Ensure property setters are used in CylindricalMesh and SphericalMesh (#2709)
- Fix sample_external_source bug (#2713)
- Fix localization issue affecting openmc-plotter (#2723)
- Correct openmc.lib wrapper for evaluate_legendre (#2729)
- Bug fix in Region.from_expression during tokenization (#2733)
- Fix bug in temperature interpolation (#2734)
- Check for invalid domain IDs in volume calculations (#2742)
- Skip boundary condition check for volume calculations (#2743)
- Fix loop over coordinates for source domain rejection (#2751)
Contributors
- @aprilnovak
- @bam241
- @bscollin
- @caderache2014
- @cfichtlscherer
- @christinacai123
- @church89
- @dubway420
- @ecasglez
- @ebknudsen
- @eepeterson
- @egor1abs
- @gonuke
- @gridley
- @HunterBelanger
- @j-fletcher
- @johvincau
- @joshmay1
- @jtramm
- @kevinm387
- @kingyue737
- @lewisgross1296
- @LukeLabrie
- @myerspat
- @nicriz
- @nutcasev15
- @paulromano
...
OpenMC 0.13.3
This release of OpenMC includes many bug fixes, performance improvements, and several notable new features. Some of the highlights include support for MCPL source files, NCrystal thermal scattering materials, and a new openmc.stats.MeshSpatial
class that allows a source distribution to be specified over a mesh. Additionally, OpenMC now allows you to export your model as a single XML file rather than separate XML files for geometry, materials, settings, and tallies.
Compatability Notes and Deprecations
- Atomic mass data used in
openmc.data.atomic_mass
has been updated to AME 2020, which results in slightly different masses.
New Features
- Support was added for MCPL files to be used as external sources. Additionally, source points and surfaces sources can be written as MCPL files instead of HDF5 files. (#2116)
- Support was added for NCrystal thermal scattering materials. (#2222)
- The
openmc.CylindricalMesh
andopenmc.SphericalMesh
classes now have anorigin
attribute that changes the center of the mesh. (#2256) - A new
openmc.model.Polygon
class allows defining generalized 2D polygons. (#2266) - A new
openmc.data.decay_energy
function andopenmc.Material.get_decay_heat
method enable determination of decay heat from a single nuclide or material. (#2287) - Full models can now be written as a single XML file rather than separate geometry, materials, settings, and tallies XML files. (#2291)
- Discrete distributions are now sampled using alias sampling, which is O(1) in time. (#2329)
- The new
openmc.stats.MeshSpatial
allows a spatial source distribution to be specified with source strengths for each mesh element. (#2334) - The new
openmc.Geometry.get_surfaces_by_name
method returns a list of matching surfaces in a geometry. (#2347) - A new
openmc.Settings.create_delayed_neutrons
attribute controls whether delayed neutrons are created during a simulation. (#2348) - The
openmc.deplete.Results.export_to_materials
method now takes apath
argument. (#2364) - A new
openmc.EnergyFilter.get_tabular
method allows one to create a tabular distribution based on tally results using an energy filter. (#2371) - Several methods in the
openmc.Material
class that require a volume to be set (e.g.,openmc.Material.get_mass
) now accept avolume
argument. (#2412)
Bug Fixes
- Fix for finding redundant surfaces (#2263)
- Adds tolerance for temperatures slightly out of bounds (#2265)
- Fix getter/setter for weight window bounds (#2275)
- Make sure Chain.reduce preserves decay source (#2283)
- Fix array shape for weight window bounds (#2284)
- Fix for non-zero CDF start points in TSL data (#2290)
- Fix a case where inelastic scattering yield is zero (#2295)
- Prevent Compton profile out-of-bounds memory access (#2297)
- Produce light particles from decay (#2301)
- Fix zero runtime attributes in depletion statepoints (#2302)
- Fix bug in openmc.Universe.get_nuclide_densities (#2310)
- Only show print output from depletion on rank 0 (#2311)
- Fix photon transport with no atomic relaxation data (#2312)
- Fix for precedence in region expressions (#2318)
- Allow source particles with energy below cutoff (#2319)
- Fix IncidentNeutron.from_njoy for high temperatures (#2320)
- Add capability to unset cell temperatures (#2323)
- Fix in plot_xs when S(a,b) tables are present (#2335)
- Various fixes for tally triggers (#2344)
- Raise error when mesh is flat (#2363)
- Don't call normalize inside Tabular.mean (#2375)
- Avoid out-of-bounds access in inelastic scatter sampling (#2378)
- Use correct direction for anisotropic fission (#2381)
- Fix several thermal scattering nuclide assignments (#2382)
- Fix _materials_by_id attribute in Model (#2385)
- Updates to batch checks for simulation restarts (#2390)
- write_data_to_vtk volume normalization correction (#2397)
- Enable generation of JEFF 3.3 depletion chain (#2410)
- Fix spherical to Cartesian coordinate conversion (#2417)
- Handle zero photon cross sections in IncidentPhoton.from_ace (#2433)
- Fix hybrid depletion when nuclides are not present (#2436)
- Fix bug in cylindrical and spherical meshes (#2439)
- Improvements to mesh radial boundary coincidence (#2443)
Contributors
OpenMC 0.13.2
This release of OpenMC includes several bug fixes, performance improvements for complex geometries and depletion simulations, and other general enhancements. Notably, a capability has been added to compute the photon spectra from decay of unstable nuclides. Alongside that, a new openmc.config
configuration variable has been introduced that allows easier configuration of data sources. Additionally, users can now perform cell or material rejection when sampling external source distributions.
Compatability Notes and Deprecations
- If you are building against libMesh for unstructured mesh tally support, version 1.6 or higher is now required.
- The
openmc.stats.Muir
class has been replaced by aopenmc.stats.muir
function that returns an instance ofopenmc.stats.Normal
.
New Features
- The
openmc.Material.get_nuclide_atom_densities
method now takes an optionalnuclide
argument. - Functions/methods in the
openmc.deplete
module now accept times in Julian years ('a'
). - The
openmc.Universe.plot
method now allows a pre-existing axes object to be passed in. - Performance optimization for geometries with many complex regions.
- Performance optimization for depletion by avoiding deepcopies and caching reaction rates.
- The
openmc.RegularMesh
class now has afrom_domain
classmethod. - The
openmc.CylindricalMesh
class now has afrom_domain
classmethod. - Improved method to condense diffusion coefficients from the
openmc.mgxs
module. - A new :data:
openmc.config
configuration variable has been introduced that allows data sources to be specified at runtime or via environment variables. - The
openmc.EnergyFunctionFilter
class now supports multiple interpolation schemes, not just linear-linear interpolation. - The
openmc.DAGMCUniverse
class now hasmaterial_names
,n_cells
, andn_surfaces
attributes. - A new
openmc.data.decay_photon_energy
function has been added that returns the energy spectrum of photons emitted from the decay of an unstable nuclide. - The
openmc.Material
class also has a newdecay_photon_energy
attribute that gives the decay photon energy spectrum from the material based on its constituent nuclides. - The
openmc.deplete.StepResult
now has aget_material
method. - The
openmc.Source
class now takes adomains
argument that specifies a list of cells, materials, or universes that is used to reject source sites (i.e., if the sampled sites are not within the specified domain, they are rejected).
Bug Fixes
- Delay call to Tally::set_strides
- Fix reading reference direction from XML for angular distributions
- Fix erroneous behavior in Material.add_components
- Fix reading thermal elastic data from ACE
- Fix reading source file with time attribute
- Fix conversion of multiple thermal scattering data files from ACE
- Fix reading values from wwinp file
- Handle possibility of .ppm file in Universe.plot
- Update volume calc types to mitigate overflow issues
Contributors
OpenMC 0.13.1
This release of OpenMC includes many bug fixes as well as improvements in geometry modeling, mesh functionality, source specification, depletion capabilities, and other general enhancements. The depletion module features a new transport operator, openmc.deplete.IndependentOperator
, that allows a depletion calculation to be performed using arbitrary one-group cross sections (e.g., generated by an external solver) along with a openmc.deplete.MicroXS
class for managing one-group cross sections. The track file generation capability has been significantly overhauled and a new openmc.Tracks
class was introduced to allow access to information in track files from the Python API. Support has been added for new ENDF thermal scattering evaluations that use mixed coherent/incoherent elastic scattering.
Compatibility Notes and Deprecations
-
The
openmc.deplete.Operator
class has been renamedopenmc.deplete.CoupledOperator
. -
The
openmc.deplete.ResultsList
class has been renamed toopenmc.deplete.Results
and no longer requires you to call thefrom_hdf5()
method in order to create it; instead, you can directly instantiate it. -
A few methods that represent k-effective have been renamed for the sake of consistency:
openmc.StatePoint.k_combined
is nowopenmc.StatePoint.keff
openmc.deplete.ResultsList.get_eigenvalue
is nowopenmc.deplete.Results.get_keff
-
The
openmc.stats.SphericalIndependent
class, which used to accept a distribution fortheta
now accepts a distribution forcos_theta
instead in order to more easily handle the common case of specifying a uniform spatial distribution over a sphere (also see the newopenmc.stats.spherical_uniform
function). -
If you are building OpenMC from source, note that several of our CMake options have been changed:
Old option New option debug
--- optimize
--- profile
OPENMC_ENABLE_PROFILE
coverage
OPENMC_ENABLE_COVERAGE
openmp
OPENMC_USE_OPENMP
--- OPENMC_USE_MPI
dagmc
OPENMC_USE_DAGMC
libmesh
OPENMC_USE_LIBMESH
The
debug
andoptimize
options have been removed; instead, use the standard CMAKE_BUILD_TYPE variable.
New Features
-
Two new composite surfaces:
openmc.model.IsogonalOctagon
andopenmc.model.CylinderSector
. -
The
DAGMCUniverse
class now has abounding_box
attribute and abounding_region
method. -
When translating a
Region
using thetranslate
method, there is now aninplace
argument. -
The
Material
class has several new methods and attributes:- The
add_components
methods allows you to add multiple nuclides/elements to a material with a single call by passing a dictionary. - The
get_activity
method returns the activity of a material in Bq, Bq/g, or Bq/cm³. - The
remove_element
method removes an element from a material - The
get_nuclide_atoms
method gives the number of atoms of each nuclide in a material
- The
-
All mesh classes now have a
volumes
property that provides the volume of each mesh element as well aswrite_data_to_vtk
methods. -
Support for externally managed MOAB meshes or libMesh meshes.
-
Multiple discrete distributions can be merged with the new
openmc.stats.Discrete.merge
method. -
The
openmc.stats.spherical_uniform
function creates a uniform distribution over a sphere using theSphericalIndependent
class. -
Univariate distributions in the
openmc.stats
module now havesample()
methods. -
An
openmc_sample_external_source
function has been added to the C API with a corresponding Python bindingopenmc.lib.sample_external_source
. -
The track file generation capability has been completely overhauled. Track files now include much more information, and a new
openmc.Tracks
class allows access to track file information from the Python API and has awrite_to_vtk
method for writing a VTK file. Multiple tracks are now written to a single file (one per MPI rank). -
A new
openmc.wwinp_to_wws
function that converts weight windows from awwinp
file to a list ofWeightWindows
objects. -
The new
openmc.EnergyFilter.from_group_structure
method provides a way of creating an energy filter with a group structure identified by name. -
The
openmc.data.Decay
class now has asources
property that provides radioactive decay source distributions. -
A
openmc.mgxs.ReducedAbsorptionXS
class produces a multigroup cross section representing "reduced" absorption (absorption less neutron production from (n,xn) reactions). -
Added support in the Python API and HDF5 nuclear data format for new ENDF thermal neutron scattering evaluations with mixed coherent elastic and incoherent elastic.
-
CMake now relies on
find_package(MPI)
for a more standard means of identifying an MPI compiler configuration.
Bug Fixes
- Fix bug when a rotation matrix is passed to Halfspace.rotate
- Fix bug for spherical mesh string repr
- Fix package_data specification to include pyx files
- Allow meshes with same ID to appear in multiple files
- Fix overwritten variable in get_libraries_from_xsdata
- Write output files to correct directory
- Allow CMake to properly find third-party packages
- Fix Region.from_expression when ")(" appears in specification
- Move lost particle reset from finalize() to reset()
- Minor typo fixes in test_lattice.py
- Fix color assignment in Universe.plot
- Several depletion-related fixes
- Allow control of C++ standard used by compiler
- Fix IO format documentation for surface source read/write
- Make sure basis gets set in Plot.from_geometry
- Improve robustness of torus distance calculation
- Allow use of redundant fission when adjusting KERMA in from_njoy
- Disable GNU extensions for CMake target
- Two from_xml fixes
- Fix for rare infinite loop when finding cell
- Allow photon heating to be tallied by nuclide
- Use UTF-8 encoding when reading dose coefficients
- Fix a corner case in Region.from_expression
- Fix bug in spherical and cylindrical meshes
- Ensure weight window bounds are flattened when writing to XML
- Fix for std::cout sync bug in output.cpp
- Allow compiling against fmt v9
- Fix TimeFilter for small time intervals
Contributors
OpenMC 0.13.0
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 openmc.deplete.Operator
class used to accept Geometry
and Settings
objects as its first two arguments; users now need to pass a 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
WeightWindows
class. - Users can now model axis-aligned tori using the
XTorus
,YTorus
, andZTorus
classes. - DAGMC CAD-based geometries can now be placed in a universe using
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
andopenmc_properties_import
with corresponding Python API bindings,openmc.lib.export_properties
andopenmc.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
openmc.stats.PowerLaw
univariate distribution - The capabilities of the
Model
class have been substantially expanded (e.g., theModel.deplete
,Model.plot_geometry
, andModel.rotate_cells
methods). - A new
TimeFilter
class that allows tallies to be filtered by the particle's time, which is now tracked. - The
Source
class now allows you to specify a time distribution. - The new
CylindricalMesh
andSphericalMesh
classes 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
This release contains new contributions from the following people:
OpenMC 0.12.2
This release of OpenMC is primarily a hotfix release with numerous important bug fixes. Several tally-related enhancements have also been added.
New Features
Three tally-related enhancements were added to the code in this release:
- A new
CollisionFilter
class that allows tallies to be filtered by the number of collisions a particle has undergone. - A
translation
attribute has been added toMeshFilter
that allows a mesh to be translated from its original position before location checks are performed. - The
UnstructuredMesh
class now supports libMesh unstructured meshes to enable better ingration with MOOSE-based applications.
Bug Fixes
- Reset particle coordinates during find cell operation
- Cover quadric edge case
- Prevent divide-by-zero in bins_crossed methods for meshes
- Fix for translational periodic boundary conditions
- Fix angle sampling in CorrelatedAngleEnergy
- Fix typo in fmt string for a lattice error
- Nu-fission tally and stochastic volume bug fixes
- Make sure failed neighbor list triggers exhaustic search
- Change element to element.title to catch lowercase entries
- Disallow non-current scores with a surface filter
- Depletion operator obeys Materials.cross_sections
- Fix for surface_bins_crossed override
Contributors
This release contains new contributions from the following people:
OpenMC 0.12.1
This release of OpenMC includes an assortment of new features and many bug fixes. The openmc.deplete
module incorporates a number of improvements in usability, accuracy, and performance. Other enhancements include generalized rotational periodic boundary conditions, expanded source modeling capabilities, and a capability to generate windowed multipole library files from ENDF files.
New Features
-
Boundary conditions have been refactored and generalized. Rotational periodic boundary conditions can now be applied to any N-fold symmetric geometry.
-
External source distributions have been refactored and extended. Users writing their own C++ custom sources need to write a class that derives from
openmc::Source
. These changes have enabled new functionality, such as:- Mixing more than one custom source library together
- Mixing a normal source with a custom source
- Using a file-based source for fixed source simulations
- Using a file-based source for eigenvalue simulations even when the number of particles doesn't match
-
New capability to read and write a source file based on particles that cross a surface (known as a "surface source").
-
Various improvements related to depletion:
- Reactions used in a depletion chain can now be configured through the
reactions
argument toopenmc.deplete.Chain.from_endf
. - Specifying a power of zero during a depletion simulation no longer results in an unnecessary transport solve.
- Reaction rates can be computed either directly or using multigroup flux tallies that are used to collapse reaction rates afterward. This is enabled through the
reaction_rate_mode
andreaction_rate_opts
toopenmc.deplete.Operator
. - Depletion results can be used to create a new
openmc.Materials
object using theopenmc.deplete.ResultsList.export_to_materials
method.
- Reactions used in a depletion chain can now be configured through the
-
Multigroup current and diffusion cross sections can be generated through the
openmc.mgxs.Current
andopenmc.mgxs.DiffusionCoefficient
classes. -
Added
openmc.data.isotopes
function that returns a list of naturally occurring isotopes for a given element. -
Windowed multipole libraries can now be generated directly from the Python API using
openmc.data.WindowedMultipole.from_endf
. -
The new
openmc.write_source_file
function allows source files to be generated programmatically.
Bug fixes
- Proper detection of MPI wrappers
- Fix related to declaration order of maps/vectors
- Check for existence of decay rate attribute
- Small updates to deal with JEFF 3.3 data
- Fix for depletion chain generation
- Fix call to superclass constructor in MeshPlotter
- Fix for data crossover in VTK files
- Make sure reaction names are recognized as valid tally scores
- Fix bug related to logging of particle restarts
- Examine if region exists before removing redundant surfaces
- Fix plotting of individual universe levels
- Mixed materials should inherit depletable attribute
- Fix typo in energy units in dose coefficients
- Fixes for large tally cases
- Fix verification of volume calculation results
- Fix calculation of decay energy for depletion chains
- Fix pointers in CartesianIndependent
- Ensure correct initialization of members for RegularMesh
- Add missing import in depletion module
- Fixed several bugs related to decay-rate
- Fix how depletion operator distributes burnable materials
- Fix assignment of elemental carbon in JEFF 3.3
- Fix typo in
RectangularParallelepiped.__pos__
- Fix temperature tolerance with S(a,b) data
- Fix sampling or normal distribution
- Fix for SharedArray relaxed memory ordering
- Check for proper format of source files
- Ensure (n,gamma) reaction rate tally uses sampled cross section
- Fix for temperature range behavior
Contributors
This release contains new contributions from the following people:
OpenMC 0.12.0
This release of OpenMC includes an assortment of new features and many bug fixes. In particular, the openmc.deplete
module has been heavily tested which has resulted in a number of usability improvements, bug fixes, and other enhancements. Energy deposition calculations, particularly for coupled neutron-photon simulations, have been improved as well.
Improvements in modeling capabilities continue to be added to the code, including the ability to rotate surfaces in the Python API, several new "composite" surfaces, a variety of new methods on openmc.Material
, unstructured mesh tallies that leverage the existing DAGMC infrastructure, effective dose coefficients from ICRP-116, and a new cell instance tally filter.
New Features
-
All surfaces now have a
rotate
method that allows them to be rotated. -
Several "composite" surfaces, which are actually composed of multiple surfaces but can be treated as a normal surface through the -/+ unary operators, have been added. These include:
openmc.model.RightCircularCylinder
openmc.model.RectangularParallelepiped
openmc.model.XConeOneSided
(and equivalent versions for y- and z-axes)
-
Various improvements related to depletion:
- The matrix exponential solver can now be configured through the
solver
argument on depletion integrator classes. - The
openmc.deplete.Chain.reduce
method can automatically reduce the number of nuclides in a depletion chain. - Depletion integrator classes now allow a user to specify timesteps in several units (s, min, h, d, MWd/kg).
openmc.deplete.ResultsList.get_atoms
now allows a user to obtain depleted material compositions in atom/b-cm.
- The matrix exponential solver can now be configured through the
-
Several new methods on
openmc.Material
:- The
add_elements_from_formula
method allows a user to create a material based on a chemical formula. add_element
now supports theenrichment
argument for non-uranium elements when only two isotopes are naturally occurring.add_element
now supports adding elements by name rather than by symbol.- The
get_elements
method returns a list of elements within a material. - The
mix_materials
method allows multiple materials to be mixed together based on atom, weight, or volume fractions.
- The
-
The acceptable number of lost particles can now be configured through
openmc.Settings.max_lost_particles
andopenmc.Settings.rel_max_lost_particles
. -
Delayed photons produced from fission are now accounted for by default by scaling the yield of prompt fission photons. This behavior can be modified through the
openmc.Settings.delayed_photon_scaling
attribute. -
A trigger can now be specified for a volume calculation via the
openmc.VolumeCalculation.set_trigger
method. -
The
openmc.stats.SphericalIndependent
andopenmc.stats.CylindricalIndependent
classes allow a user to specify source distributions based on spherical or cylindrical coordinates. -
Custom external source distributions can be used via the
openmc.Source.library
attribute. -
Unstructured mesh class,
openmc.UnstructuredMesh
, that can be used in tallies. -
The
openmc.CellInstanceFilter
class allows one or more instances of a repeated cell to be tallied. This is effectively a more flexible version of the existingopenmc.DistribcellFilter
class. -
The
openmc.data.dose_coefficients
function provides effective dose coefficients from ICRP-116 and can be used in conjunction withopenmc.EnergyFunctionFilter
in a tally.
Bug fixes
- Keep user-supplied prev_results on operator
- Fix bug when S(a,b) tables appear in depletable material
- DAGMC fix for implicit complement material assignment
- Bug fix for tallying reaction rates in coupled n-p runs
- Corrected issue with multiplicity matrix
- Fix depletion with photon transport
- Fix secondary photon creation
- Bug fix for total xs plotting
- Account for light nuclide production in depletion
- Reset timer in depletion calculations
- Fix for Model.run
- Ensure NJOY output goes to specified directory
- Fix bug preventing creating photon data
- Fix bug when surface ID > 999999
- Fix bug for reading output settings in Settings.from_xml
- Fix improve energy deposition for coupled neutron-photon
- Use number of particles for tally normalization
- Fix a number of problems related to photoatomic data
- Fix cosine smearing for S(a,b)
- Use relative distances for coincidence test in hex lattice
- Fix RPATH for non-Debian linux systems
- Fix mesh plotter energy filter bins
- Fix memory leak
- Fix volume allocation related to burnable materials
- Fix tally mesh bug for short tracks
- DAGMC void material assignment fix
- Fix for Mesh
__repr__
methods
Contributors
This release contains new contributions from the following people:
- @ChasingNeutrons
- @stevendargaville
- @makeclean
- @dryuri92
- @GiudGiud
- @awgolas
- @NuclearEngideer
- @smharper
- @YuanHu-PKU-KIT
- @kingyue737
- @drewejohnson
- @Mikolaj-A-Kowalski
- @shikhar413
- @liangjg
- @davidjohnlong
- @amandalund
- @alex-lyons
- @nelsonag
- @eepeterson
- @SamPUG
- @AI-Pranto
- @simondrichards
- @gridley
- @paulromano
- @shimwell
- @pshriwise
- @jtramm
- @gonuke
- @rockfool
OpenMC 0.11.0
This release of OpenMC adds several major new features: depletion, photon transport, and support for CAD geometries through DAGMC. In addition, the core codebase has been rewritten in C++14 (it was previously written in Fortran 2008). This makes compiling the code considerably simpler as no Fortran compiler is needed.
Functional expansion tallies are now supported through several new tally filters that can be arbitrarily combined:
openmc.LegendreFilter
openmc.SpatialLegendreFilter
openmc.SphericalHarmonicsFilter
openmc.ZernikeFilter
openmc.ZernikeRadialFilter
Note that these filters replace the use expansion scores like scatter-P1
. Instead, a normal scatter
score should be used along with a openmc.LegendreFilter
.
The interface for random sphere packing has been significantly improved. A new openmc.model.pack_spheres
function takes a region and generates a random, non-overlapping configuration of spheres within the region.
New Features
-
White boundary conditions can be applied to surfaces
-
Support for rectilinear meshes through
openmc.RectilinearMesh
. -
The
Geometry
,Materials
, andSettings
classes now have afrom_xml
method that will build an instance from an existing XML file. -
Predefined energy group structures can be found in
openmc.mgxs.GROUP_STRUCTURES
. -
New tally scores:
H1-production
,H2-production
,H3-production
,He3-production
,He4-production
,heating
,heating-local
, anddamage-energy
. -
Switched to cell-based neighor lists (PR 1140)
-
Two new probability distributions that can be used for source distributions:
openmc.stats.Normal
andopenmc.stats.Muir
-
The
openmc.data
module now supports reading and sampling from ENDF File 32 resonance covariance data (PR 1024). -
Several new convenience functions/methods have been added:
- The
openmc.model.cylinder_from_points
function creates a cylinder given two points passing through its center and a radius. - The
openmc.Plane.from_points
function creates a plane given three points that pass through it. - The
openmc.model.pin
function creates a pin cell universe given a sequence of concentric cylinders and materials.
- The
Python API Changes
- All surface classes now have coefficient arguments given as lowercase names.
- The order of arguments in surface classes has been changed so that coefficients are the first arguments (rather than the optional surface ID). This means you can now write::
x = openmc.XPlane(5.0, 'reflective') zc = openmc.ZCylinder(0., 0., 10.)
- The
Mesh
class has been renamedopenmc.RegularMesh
. - The
get_rectangular_prism
function has been renamedopenmc.model.rectangular_prism
. - The
get_hexagonal_prism
function has been renamedopenmc.model.hexagonal_prism
. - Python bindings to the C/C++ API have been move from
openmc.capi
toopenmc.lib
.
Bug fixes
- Rotate azimuthal distributions correctly for source sampling
- Fix reading ASCII ACE tables in Python 3
- Fix bug for distributed temperatures
- Fix bug for distance to boundary in complex cells
- Bug fixes for precursor decay rate tallies
- Check for invalid surface IDs in region expression
- Support for 32-bit operating systems
- Avoid segfault from unused nuclides
- Avoid overflow when broadcasting tally results
Contributors
This release contains new contributions from the following people:
- @brbass
- @wbinventor
- @makeclean
- @dryuri92
- @GiudGiud
- @graybri3
- @hanzhuoran
- @smharper
- @drewejohnson
- @cjosey
- @shikhar413
- @tjlaboss
- @matiaslavista
- @liangjg
- @lindsayad
- @johnnyliu27
- @amandalund
- @janmalec
- @icmeyer
- @aprilnovak
- @nelsonag
- @gridley
- @salcedop
- @paulromano
- @samuelshaner
- @shimwell
- @pshriwise
- @jtramm
- @rockfool
- @zxkjack123