Skip to content
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

Filling in empty Parameter units and descriptions #1345

Merged
merged 27 commits into from
Jul 18, 2023
Merged

Conversation

john-science
Copy link
Member

@john-science john-science commented Jul 14, 2023

What is the change?

We are finally filling in all the missing values in the units and description fields of our ARMI Parameters.

I have also completely removed 16 Parameters, because they are unused:

  • avgFuelTemp
  • avgTempRef
  • baseBu
  • basePBu
  • bu
  • currentPercentExpanded
  • maxdilationTotal
  • maxresidence
  • Torus geometry:
    • azimuthal_differential
    • height
    • inner_axial
    • inner_minor_radius
    • inner_phi
    • inner_radius
    • inner_theta
    • major_radius
    • outer_axial
    • outer_minor_radius
    • outer_phi
    • outer_radius
    • outer_theta
    • radius_differential
    • reference_volume

NOTE: I should note all the above "torus" parameters were removed, and in the end we removed the entire Torus geometry. It was entirely unused, and in the process of reviewing these Parameters I found a few bugs in our Torus geometry.

NOTE: As part of #1348, we are also adding a DeprecationWarning that at some point Parameters will demand non-empty descriptions.

Why is the change being made?

What is the good of having "units" and "description" fields on important and heavily-used ARMI Parameters if they are left blank?

These should have been filled in years ago.


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@john-science
Copy link
Member Author

Code coverage went down because I mostly deleted code. That's fine.

Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

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

Some various comments/musings.

I also want to highlight that the Torus component shape has been removed entirely by this PR. From my read of the PR description, I was expecting that just some parameters of the Torus were removed. I don't have a complaint about removing Torus, because it appears to be possible to do the same things via RadialSegment.

armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Show resolved Hide resolved
@@ -723,23 +724,23 @@ def _getNeutronicsCoreParams():
with pDefs.createBuilder(categories=[parameters.Category.neutronics]) as pb:
pb.defParam(
"eigenvalues",
units=None,
units=units.UNITLESS,
description="All available lambda-eigenvalues of reactor.",
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to your changes, but this parameter can almost certainly be removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

That will require a ticket though, because the name of this parameter is so generic that it makes it hard to grep through downstream repos to find it.

It might be easier to just remove the Parameter, and see if anything breaks downstream.

armi/reactor/reactorParameters.py Outdated Show resolved Hide resolved
armi/reactor/reactorParameters.py Outdated Show resolved Hide resolved
armi/reactor/reactorParameters.py Show resolved Hide resolved
armi/reactor/reactorParameters.py Show resolved Hide resolved
armi/reactor/reactorParameters.py Show resolved Hide resolved
john-science and others added 3 commits July 17, 2023 13:19
Co-authored-by: Chris Keckler <ckeckler@terrapower.com>
Co-authored-by: Chris Keckler <ckeckler@terrapower.com>
john-science and others added 2 commits July 17, 2023 14:40
Co-authored-by: Michael Jarrett <mjarrett@terrapower.com>
Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

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

A handful of small suggestions, but otherwise looks good.

Thanks for your work on this, it's an obvious improvement to the codebase!

armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
armi/physics/neutronics/parameters.py Outdated Show resolved Hide resolved
Co-authored-by: Chris Keckler <ckeckler@terrapower.com>
@john-science
Copy link
Member Author

A handful of small suggestions, but otherwise looks good.

Thanks for your work on this, it's an obvious improvement to the codebase!

Thanks, Chris!

The original goal of this PR was just to fix missing/wrong units/descriptions.

I see what you're doing with the units there, and I think at some point I will either do that with ALL the units, or we will use pint to do that.

But this PR is already so hefty, I'll leave that for the next one (and #352).

@john-science john-science merged commit 32c259f into main Jul 18, 2023
18 of 19 checks passed
@john-science john-science deleted the param_defaults branch July 18, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants