Skip to content

Conversation

@paulromano
Copy link
Contributor

@paulromano paulromano commented Apr 21, 2022

I recently noticed that a few of the equations listed in the docstrings for the CF4Integrator, CELIIntegrator, and EPCRK4Integrator classes were not exactly right. This PR fixes the equations.

Edit: I've added a bunch more fixes/enhancements related to depletion:

  • Integrator.integrate now has some minimal output that gives the user some feedback about the depletion timesteps and powers being used
  • The AtomNumber class now has a get_atom_densities method that gives you a dictionary mapping nuclides to densities for a given material -- this is the easiest way to see what the state of the class is for a given material. Also, I've made it so that you can pass a Material object directly rather than (awkwardly) just a string of the ID.
  • Added a __repr__ method for the deplete.Nuclide class that gives some basic info
  • Fixed a bug with diff_burnable_mats whereby materials were not getting correctly assigned when this flag was on
  • I was noticing some weird output buffering issues when running depletion which are now fixed by the change in output.cpp

@paulromano paulromano changed the title Fix equations in docstrings for a few depletion integrations Collection of depletion-related fixes and enhancements Apr 21, 2022
@shimwell
Copy link
Member

Thanks for these timely improvements, I'm taking a look now and will run things tomorrow morning

Copy link
Member

@shimwell shimwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to merge to me, there is one optional change which is mainly due to my own bias towards f strings in all cases 😄 but either option is fine.

The addition of get_atom_densities adds a nice amount of convenience for the user 👍

The tiding up of the material id number using the private method _get_mat_index is also nice.

Tests pass and if we merge soon then this could be ready for the upcoming workshop which would be useful

@paulromano paulromano merged commit b5b928e into openmc-dev:develop Apr 24, 2022
@paulromano paulromano deleted the depletion-docstring-fixes branch April 26, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants