Releases: HunterBelanger/papillon-ndl
Version 0.3.1
This is a small patch release which fixes a few bugs in the source and docs. Additionally, I have added more compiler checks to improve the static analysis of the library. This lead to a few minor warnings which were also fixed. These new compiler options should help to avoid bugs in the future and ensure the quality of the library.
Updates
- The library has now moved to version 2.10.3 of Pybind11 (which is the most recent release).
Bug Fixes
- Fix ZAID streaming bug. by @HunterBelanger in #27
- Fix possible negative argument in square root function when interpolating distributions by @HunterBelanger in #29
- Fix the documentation for constructor of
SummedFissionSpectrum
Static Analysis
- Fix conversions warnings by @HunterBelanger in #26
- Fix Variable Shadow Warnings by @HunterBelanger in #28
A summary of all changes can be found here: v0.3.0...v0.3.1
Verrsion 0.3.0
This is a big release, which comes with a lot of new features, capabilities, and bug-fixes. All continuous energy neutron physics is now available and implemented. This includes:
- All free-gas cross sections and scattering distributions
- Elastic scattering (SVT and DBRC)
- Thermal scattering laws
- URR probability tables
One exciting addition is elastic scattering, which was the only "basic" neutron physics component which was previously missing. By default, an STNeutron
instance will use SVT for the nuclide, and apply the target-at-rest approximation for incident energies STNeutron
instance. A user can use DBRC by changing the ElasticDopplerBroadener
, and providing the 0K elastic scattering cross section for the nuclide.
Thermal scattering laws were not present in v0.2.0, but have been in the development branch for quite a while. They have now been re-structured slightly, and should be a little more general. This should make the future implementation of other features, such as direct
The URR probability tables are a recent feature, which completed neutron physics. Evaluating the URR cross sections requires a random double, in addition to the incident energy. The random value used should be kept by the user, so that correlations can be maintained when evaluating the URR cross section for the same nuclide at different temperatures, over the same flight. The URRPTables
returns an std::optional<XSPacket>
. If the incident energy is outside of the URR, or if there are simply no probability tables for the nuclide, std::nullopt
is returned.
There is a new Fission
class, which holds all of the fission yields, prompt neutron spectrum, and delayed neutron info. The class DelayedGroup
has been renamed to DelayedFamily
. When MT 19, 20, 21, and 38 are provided instead of MT 18, the total prompt neutron spectrum is reconstructed from these distributions.
The library has been tested on all ACE files distributed with Lib80x. Currently, the library fails to read the ACE files for Na22 (all temperatures), Cd111 (0.1 Kelvin), and Cd115m1 (all temperatures). The reason for these failures are the following:
- Na22 fails due to CDFs in the URR probability tables which start at 0. The Lib80x report mentions problems with the URR ptables for Na22, and said that this evaluation should have been reprocessed without them, but I still see them in the ACE files.
- Cd111 at 0.1 Kelvin fails due to a negative capture cross section in the URR ptables.
- Cd115m1 fails due to an unsorted outgoing energy grid for the scattering distribution of MT 91.
Many negative heating values were encountered (as stated in the Lib80x report). Heating numbers are currently stored in the CrossSection
class, which checks that all values are positive. To have usable ACE files for neutronics simulations, an option was added to the CrossSection
class, to disable the check for positive values, and is only used when reading the average heating numbers portion of the ESZ block. Users should be aware of this if using the heating numbers in simulations.
Currently, the library is able to read all thermal scattering law (TSL) ACE files distributed with Lib80x. Initially, many problems were encountered with the TSLs. Most of the energy distributions for incoherent inelastic scattering have very small negative values in the PDF. These values were typically around -1.E-20. It was decided these values could be safely be set to zero. Also, the discrete cosines were sometimes unsorted. This can be problematic when performing smearing. Since the discrete cosines are all equiprobable, it was decided to simply sort them.
Sampling programs are now also distributed, so that scattering distributions can be sampled from both PapillonNDL and OpenMC, and then be compared for statistical equivalence. All tests thus far have indicated excellent statistical agreement between the two.
Version 0.2.0
This new release comes with several changes to the interface, as well as many behind-the-scenes changes. Here are some of the major points.
-
Documentation now exists !
-
Nuclide
class is now calledCENeutron
for Continuous Energy Neutron data. -
Between ACE files for the same nuclide at different temperatures, usually it is only the cross sections which change. To prevent the replication of all of the other pieces of data, there is now a new constructor for the
CENeutron
class, which will construct an instance from a new ACE file, and an already existing instance of the nuclide at a different temperature. They will then share all secondary distributions and fission data, but their cross sections will be unique. -
All class methods are now lowercase, with the exception of the block locations in the
ACE
class. This mainly effects theCENeutron
andReaction
classes, where there were a few uppercase class methods. -
PapillonNDL/angle_energy_packet.hpp
has been removed, and theAngleEnergyPacket
struct is now located inPapillonNDL/angle_energy.hpp
. -
The struct member
AngleEnergyPacket::angle
has been renamed toAngleEnergyPacket::cosine_angle
, to provide a better description of what the quantity actually is. -
A lot of changes have been made to allow for verification of the ACE data being read. A
PNDLException
is thrown if there is a problem in PDF or CDF tables. An effort has been made to keep sending exceptions up the constructors, to better indicate where the error occurred in the ACE file as well. This is one of the most important changes. -
Interpolation is now done through dedicated structs, which also verify the x and y grids for the interpolation type.
A lot still needs to happen, in particular with the documentation, and adding to the verification of data and error handling, but this provides a good start.
Version 0.1.0
This is the first release of the PapillonNDL C++ library, with Python API. Most aspects of the library seem operational, though very little functionality has yet to be formally tested. As the library has not yet reached version 1.0.0, it will likely have bugs, and the API could change in the future. Please report any bugs you find in the Issues section, and if you have things you would like added or changed, leave your ideas in the Discussions section.