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

Correctly calculate wetted perimeter for depletable components #2067

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mgjarrett
Copy link
Contributor

@mgjarrett mgjarrett commented Jan 30, 2025

What is the change?

Update the method Block.getWettedPerimeter() to correctly find components whether or not they have Flags.DEPLETABLE.

This is kind of an ugly implementation, but that's a result of using Flags to mark components as depletable. The Flags system probably shouldn't be used for this purpose; it would be preferable if there was a depletable property of components separate from the flags system (e.g., like name or spatialGrid)

Why is the change being made?

Sometimes the same components that define the wetted perimeter of a block will also be marked as depletable. We want to be able to run TH calculations that need to calculate the wetted perimeter at the same time as the depletion calculations.


Checklist

  • The release notes have been updated if necessary.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@mgjarrett mgjarrett added the bug Something is wrong: Highest Priority label Jan 31, 2025
@john-science john-science changed the title Correctly calculate wetted perimeter when components have depletable flags Correctly calculate wetted perimeter for depletable components Feb 7, 2025
@john-science
Copy link
Member

@mgjarrett Forgive an honest question, but what does being depletable have to do with wetted perimeters? It certainly sounds like a question of geometry.

For instance, I happen to know one reactor project that is using ARMI that has liquid fuel. So, in that case, the thing that is wet is itself depletable.

@mgjarrett
Copy link
Contributor Author

@mgjarrett Forgive an honest question, but what does being depletable have to do with wetted perimeters? It certainly sounds like a question of geometry.

For instance, I happen to know one reactor project that is using ARMI that has liquid fuel. So, in that case, the thing that is wet is itself depletable.

Yes, the depletable-ness of a component has nothing to do with calculating the wetted perimeter. They are two unrelated things.

The problem here is that the code to calculate the wetted perimeter looks for the components that contribute to the wetted perimeter, like the duct, cladding, and wire. These components are sought using block.getComponent() with exact=True, so they must have exactly the specified flags. Since a component can either be depletable or not depletable, we need to search both with and without Flags.DEPLETABLE included for each component type.

@john-science
Copy link
Member

@mgjarrett
The problem here is that the code to calculate the wetted perimeter looks for the components that contribute to the wetted perimeter, like the duct, cladding, and wire. These components are sought using block.getComponent() with exact=True...

Thanks for that.

Last question. Is the problem here we have that exact=True? What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong: Highest Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants