Repository navigation
Miscellaneous updates and improvements from NEA course - #2466
Conversation
|
Great to see this user driven feedback into the code. I noticed the tests were failing and I was keen to see why. I think this is due to the file This file is now being looked for because the One option to get the tests running again would be to replace results = openmc.deplete.Results()with results = openmc.deplete.Results(filename=None)in a few of the deplete tests, but I'm not sure this is the nicest solution. @paulromano do you think it is worth removing that |
|
Thanks for pointing out the failures @shimwell. After looking at the |
Co-authored-by: Gavin Ridley <gavin.keith.ridley@gmail.com>
Miscellaneous updates and improvements from NEA course
Last week we held our first in-person OpenMC course in conjunction with OECD/NEA. As usual, when we run these workshops/courses, there is always a long list of little improvements that are identified. I've gone through our list and made a bunch of small fixes/improvements that are contained in this PR:
openmc.libare missing from our documentation. These have now been added.DataLibraryclass essentially holds a list of libraries, but before required that you access the list through a special.librariesattribute. I've updated that class so that it now acts like a list directly. Along with that, I've added aremove_by_materialmethod that makes it easier to manipulate an existing library (e.g., replacing data for a specific nuclide).openmc.deplete.Resultsclass requires that you pass the name of the depletion results file. Since this is normally "depletion_results.h5" that is now the default.openmc.mgxs.EnergyGroupsobject now accepts a string representing the name of an energy groups structure, e.g.openmc.mgxs.EnergyGroups('CCFE-709'). I also added a__repr__method for convenienceopenmc.model.pack_spheresalways returns the same values because the seed is fixed, which is different than most other functions in our API that sample things randomly. This function has been updated to not use the same seed for every single invocation.Plane.from_pointsfor three points that lie along a line.