Openmc Versions Save

OpenMC Monte Carlo Code

v0.14.0

6 months ago

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 the openmc.model.RectangularPrism class and the hexagonal_prism function has been replaced by the openmc.model.HexagonalPrism class. Note that whereas the rectangular_prism and hexagonal_prism functions returned a region representing the interior of the prism, the new openmc.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, and openmc.CompiledSource. (#2524)
  • The vertices and centroids attributes on mesh classes now always return Cartesian coordinates and the shape of the returned arrays has changed to allow ijk indexing using a tuple (i.e., xyz = vertices[i, j, k]). (#2711)
  • The openmc.Material.decay_photon_energy attribute has been replaced by the openmc.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, and openmc.CompiledSource. (#2524)
  • Support was added for curvilinear elements when exporting cylindrical and spherical meshes to VTK. (#2533)
  • The openmc.Tally class now has a openmc.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 supports wwinp 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 has openmc.deplete.Results.get_mass (#2565), openmc.deplete.Results.get_activity (#2617), and openmc.deplete.Results.get_decay_heat (#2625) methods.
  • The openmc.deplete.StepResult.save method now supports a path argument. (#2567)
  • The openmc.deplete.MicroXS has been completely redesigned and improved. First, it no longer relies on the openmc.mgxs module, no longer subclasses pandas.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 new openmc.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 has merge_surfaces and surface_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 and openmc.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 a cross_sections argument that allows a cross section data source to be specified. (#2633 )
  • The openmc.Cell class now has a plot method. (#2648)
  • The openmc.Geometry class now has a plot 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 a max_write_lost_particles attribute that can limit the number of lost particle files written. (#2688)
  • The openmc.deplete.CoupledOperator class now has a diff_volume_method argument that specifies how the volume of new materials should be determined. (#2691)
  • The openmc.DAGMCUniverse.bounding_region method now has a padding_distance argument. (#2701)
  • A new openmc.Material.get_decay_photon_energy method replaces the decay_photon_energy attribute and includes an ability to eliminate low-importance points. This is facilitated by a new openmc.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
  • @pshriwise
  • @rlbarker
  • @Shimwell
  • @stchaker
  • @tjlaboss
  • @XinyanBradley
  • @yardasol
  • @zoeprieto

v0.13.3

1 year ago

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 and openmc.SphericalMesh classes now have an origin 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 and openmc.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 a path 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 a volume 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

  • @HunterBelanger
  • @RemDelaporteMathurin
  • @cfichtlscherer
  • @valeriogiusti
  • @keckler
  • @kkiesling
  • @tkittel
  • @ebknudsen
  • @colinelarmier
  • @amandalund
  • @marquezj
  • @joshmay1
  • @myerspat
  • @bam241
  • @aprilnovak
  • @NybergWISC
  • @eepeterson
  • @gridley
  • @paulromano
  • @pshriwise
  • @Shimwell
  • @gonuke
  • @yardasol
  • @rockfool

v0.13.2

1 year ago

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 a openmc.stats.muir function that returns an instance of openmc.stats.Normal.

New Features

  • The openmc.Material.get_nuclide_atom_densities method now takes an optional nuclide 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 a from_domain classmethod.
  • The openmc.CylindricalMesh class now has a from_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 has material_names, n_cells, and n_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 new decay_photon_energy attribute that gives the decay photon energy spectrum from the material based on its constituent nuclides.
  • The openmc.deplete.StepResult now has a get_material method.
  • The openmc.Source class now takes a domains 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

Contributors

  • @lewisgross1296
  • @drewejohnson
  • @mkreher13
  • @jlogan03
  • @marquezj
  • @joshmay1
  • @myerspat
  • @nelsonag
  • @aprilnovak
  • @eepeterson
  • @gridley
  • @paulromano
  • @pshriwise
  • @Shimwell
  • @yardasol

v0.13.1

1 year ago

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 renamed openmc.deplete.CoupledOperator.

  • The openmc.deplete.ResultsList class has been renamed to openmc.deplete.Results and no longer requires you to call the from_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 now openmc.StatePoint.keff
    • openmc.deplete.ResultsList.get_eigenvalue is now openmc.deplete.Results.get_keff
  • The openmc.stats.SphericalIndependent class, which used to accept a distribution for theta now accepts a distribution for cos_theta instead in order to more easily handle the common case of specifying a uniform spatial distribution over a sphere (also see the new openmc.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 and optimize options have been removed; instead, use the standard CMAKE_BUILD_TYPE variable.

New Features

  • Two new composite surfaces: openmc.model.IsogonalOctagon and openmc.model.CylinderSector.

  • The DAGMCUniverse class now has a bounding_box attribute and a bounding_region method.

  • When translating a Region using the translate method, there is now an inplace 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
  • All mesh classes now have a volumes property that provides the volume of each mesh element as well as write_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 the SphericalIndependent class.

  • Univariate distributions in the openmc.stats module now have sample() methods.

  • An openmc_sample_external_source function has been added to the C API with a corresponding Python binding openmc.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 a write_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 a wwinp file to a list of WeightWindows 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 a sources 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

Contributors

  • @andrsd
  • @HunterBelanger
  • @helen-brooks
  • @RemDelaporteMathurin
  • @JoffreyDorville
  • @cfichtlscherer
  • @lewisgross1296
  • @drewejohnson
  • @kkiesling
  • @amandalund
  • @richmorrison
  • @myerspat
  • @nelsonag
  • @aprilnovak
  • @eepeterson
  • @gridley
  • @paulromano
  • @Shimwell
  • @pshriwise
  • @ameliajo
  • @jtramm
  • @burberger
  • @yardasol

v0.13.0

2 years ago

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, and ZTorus 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 and openmc_properties_import with corresponding Python API bindings, openmc.lib.export_properties and 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 openmc.stats.PowerLaw univariate distribution
  • The capabilities of the Model class have been substantially expanded (e.g., the Model.deplete, Model.plot_geometry, and Model.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 and SphericalMesh 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

Contributors

This release contains new contributions from the following people:

  • @HunterBelanger
  • @helen-brooks
  • @makeclean
  • @valeriogiusti
  • @jeffhammond
  • @YuanHu-PKU-KIT
  • @drewejohnson
  • @mkreher13
  • @amandalund
  • @nelsonag
  • @aprilnovak
  • @AI-Pranto
  • @gridley
  • @paulromano
  • @ojschumann
  • @Shimwell
  • @pshriwise
  • @jtramm

v0.12.2

2 years ago

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 to MeshFilter 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

Contributors

This release contains new contributions from the following people:

  • @HunterBelanger
  • @isaac-gs
  • @drewejohnson
  • @gridley
  • @paulromano
  • @pshriwise
  • @Shimwell
  • @ameliajo

v0.12.1

3 years ago

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 to openmc.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 and reaction_rate_opts to openmc.deplete.Operator.
    • Depletion results can be used to create a new openmc.Materials object using the openmc.deplete.ResultsList.export_to_materials method.
  • Multigroup current and diffusion cross sections can be generated through the openmc.mgxs.Current and openmc.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

Contributors

This release contains new contributions from the following people:

  • @makeclean
  • @GiudGiud
  • @smharper
  • @bryanherman
  • @kingyue737
  • @drewejohnson
  • @mkreher13
  • @shikhar413
  • @liangjg
  • @amandalund
  • @nelsonag
  • @aprilnovak
  • @ypark234
  • @Pranto
  • @RonRahaman
  • @gridley
  • @paulromano
  • @Shimwell
  • @DanShort12
  • @pshriwise
  • @roystgnr
  • @jtramm
  • @cjwyett
  • @rockfool

v0.12.0

3 years ago

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.
  • 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 the enrichment 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 acceptable number of lost particles can now be configured through openmc.Settings.max_lost_particles and openmc.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 and openmc.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 existing openmc.DistribcellFilter class.

  • The openmc.data.dose_coefficients function provides effective dose coefficients from ICRP-116 and can be used in conjunction with openmc.EnergyFunctionFilter in a tally.

Bug fixes

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

v0.11.0

4 years ago

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, and Settings classes now have a from_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, and damage-energy.

  • Switched to cell-based neighor lists (PR 1140)

  • Two new probability distributions that can be used for source distributions: openmc.stats.Normal and openmc.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.

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 renamed openmc.RegularMesh.

  • The get_rectangular_prism function has been renamed openmc.model.rectangular_prism.

  • The get_hexagonal_prism function has been renamed openmc.model.hexagonal_prism.

  • Python bindings to the C/C++ API have been move from openmc.capi to openmc.lib.

Bug fixes

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

v0.10.0

6 years ago

This release of OpenMC includes several new features, performance improvements, and bug fixes compared to version 0.9.0. Notably, a C API has been added that enables in-memory coupling of neutronics to other physics fields, e.g., burnup calculations and thermal-hydraulics. The C API is also backed by Python bindings in a new openmc.capi package. Users should be forewarned that the C API is still in an experimental state and the interface is likely to undergo changes in future versions.

The Python API continues to improve over time; several backwards incompatible changes were made in the API which users of previous versions should take note of:

  • To indicate that nuclides in a material should be treated such that elastic scattering is isotropic in the laboratory system, there is a new Material.isotropic property:

    mat = openmc.Material()
    mat.add_nuclide('H1', 1.0)
    mat.isotropic = ['H1']
    

    To treat all nuclides in a material this way, the Material.make_isotropic_in_lab method can still be used.

  • The initializers for openmc.Intersection and openmc.Union now expect an iterable.

  • Auto-generated unique IDs for classes now start from 1 rather than 10000.

NOTE: This is the last release of OpenMC that will support Python 2.7. Future releases of OpenMC will require Python 3.4 or later.

New Features

  • Rotationally-periodic boundary conditions
  • C API (with Python bindings) for in-memory coupling
  • Improved correlation for Uranium enrichment
  • Support for partial S(a,b) tables
  • Improved handling of autogenerated IDs
  • Many performance/memory improvements

Bug Fixes

  • 93746953ccd8d422b096dbef3c21d359e7424f0e Fix energy group sampling for multi-group simulations
  • a149ef42a0b895d4014d43c82f680c55f6ae0db6 Ensure mutable objects are not hashable
  • 2c9b210440b9b69b3b3009e2ae9f782b6eb7df26 Preserve backwards compatibility for generated HDF5 libraries
  • 8047f6c1343451d6a466d77555bdff0bb228b422 Handle units of division for tally arithmetic correctly
  • 0beb4cb937b453696db933f69ec9400d5e579515 Compatibility with newer versions of Pandas
  • f124becba69ba60a9e2b70ad855b3b2d16e6902e Fix generating 0K data with openmc.data.njoy module
  • 0c69153628c9aaf6a0370acbe9db4fbbbac2e07b Bugfix for generating thermal scattering data
  • 61ecb4757e3b162ef4aba3e7c12ddc84ace0a9ea Fix bugs in Python multipole objects

Contributors

This release contains new contributions from the following people:

  • @brbass
  • @wbinventor
  • @GiudGiud
  • @graybri3
  • @smharper
  • @cjosey
  • @tjlaboss
  • @liangjg
  • @lindsayad
  • @johnnyliu27
  • @amandalund
  • @aprilnovak
  • @nelsonag
  • @salcedop
  • @paulromano
  • @samuelshaner