terrapower / armi

An open-source nuclear reactor analysis automation framework that helps design teams increase efficiency and quality
https://terrapower.github.io/armi/
Apache License 2.0
224 stars 87 forks source link

Improvements to `setBlockMesh` #1678

Open albeanth opened 6 months ago

albeanth commented 6 months ago

1665 brought up an interesting discussion between @mgjarrett and I.

setBlockMesh is intended to be used to force/snap the axial mesh of an assembly to some prescribed axial mesh.

The behavior of setBlockMesh is controlled through the parameter conserveMassFlag which either

  1. "auto" -- conserves all of the components below the fuel block(s) as well only the fuel components within fuel blocks.
    • the intent was to support irradiation-based axial expansion of fuel
    • but is also odd because why care about what's below the fuel since irradiation-based axial expansion is only relevant for fuel
    • it feels like this was written for a former modeling paradigm that we've progressed beyond (which isn't a bad thing and won't be the last!)
  2. "True" -- conserves all components
    • is not used within ARMI or any major downstream applications that I can see
  3. "False" -- conserves nothing
    • is used in ARMI in a couple spots via default. it probably shouldn't be...

The two use cases that @mgjarrett and I discussed providing coverage for were for axial thermal expansion and irradiation-based expansion.

Axial Thermal Expansion

All solid components should have their masses conserved.

Irradiation-Based Axial Expansion

Focus be given to the conservation of mass for the fuel components only.

Proposal

Given the above, I would propose that we refactor setBlockMesh for the above two use cases and control the behavior of which through a new parameter. E.g., something like

def setBlockMesh(self, newMesh: List[float], scenarioDriver: str):
...
Parameters
-------------
newMesh
    The new mesh to snap the assembly to. 
scenarioDriver
    Determine if newMesh is driven by thermal expansion or irradiation based expansion
```


@mgjarrett @keckler @onufer @jakehader thoughts?