Fixing HexBlock rotation in plotBlockDiagram
What is the change?
- Fixed a bug in
plotBlockDiagram(). - To help, I added the method
HexBlock.cornersUp(), as I imagine it will be a helpful utility to have. - Oh, and sorry, I changed a variable from
self.HexBlocktoself.hexBlock, to match our variable naming rules.
Why is the change being made?
The method plotBlockDiagram() incorrectly plots HexBlocks if they are rotated to the "corners up" rotation.
close #1421
Checklist
- [x] This PR has only one purpose or idea.
- [x] Tests have been added/updated to verify any new/changed code.
- [x] The code style follows good practices.
- [x] The commit message(s) follow good practices.
- [x] The release notes have been updated if necessary.
- [x] The documentation is still up-to-date in the
docfolder. - [x] The dependencies are still up-to-date in
pyproject.toml.
First question without even looking at the code -- Can we get a picture of the correct plots?
@john-science Thank you for fixing those few comments. Please also note that there are a couple more things that would be good before approving this PR:
- https://github.com/terrapower/armi/pull/1926#pullrequestreview-2348839742
- https://github.com/terrapower/armi/pull/1926#issuecomment-2394104416
This PR is temporarily on hold for another PR: https://github.com/terrapower/armi/pull/1947
I believe my solution in this was over-engineered to work AROUND the problem present in the other PR. Once that other PR merges, I should be able to simplify this PR.
@keckler and @drewj-tp
Here I plot armiRunSmallest.yaml with the default hex_corners_up:
and here I do the same thing, but alter setting the reactor to be "flats up":
So, after the recent bug fix, I think we finally have success!
Whew.