-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Miscellaneous updates and improvements from NEA course #2466
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, will merge tomorrow if there are no objections
Co-authored-by: Gavin Ridley <[email protected]>
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.lib
are missing from our documentation. These have now been added.DataLibrary
class essentially holds a list of libraries, but before required that you access the list through a special.libraries
attribute. I've updated that class so that it now acts like a list directly. Along with that, I've added aremove_by_material
method that makes it easier to manipulate an existing library (e.g., replacing data for a specific nuclide).openmc.deplete.Results
class 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.EnergyGroups
object 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_spheres
always 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_points
for three points that lie along a line.