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

Cleanup umc #1099

Merged
merged 4 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions armi/physics/neutronics/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ def linPowByPinGamma(self, value):
)

pb.defParam(
"pdens", units="W/cm$^3$", description="Average volumetric power density"
"pdens",
units="W/cm$^3$",
description="Average volumetric power density",
categories=[parameters.Category.neutronics],
)

pb.defParam(
Expand Down Expand Up @@ -620,7 +623,12 @@ def linPowByPinGamma(self, value):
categories=[parameters.Category.gamma],
)

pb.defParam("power", units="W", description="Total power")
pb.defParam(
"power",
units="W",
description="Total power",
categories=[parameters.Category.neutronics],
)

pb.defParam("powerDecay", units="W", description="Total decay power")

Expand Down
1 change: 1 addition & 0 deletions armi/reactor/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,6 +1585,7 @@ def _createHomogenizedCopy(self, pinSpatialLocators=False):
hexComponent.setNumberDensities(self.getNumberDensities())
b.add(hexComponent)

b.p.nPins = self.p.nPins
if pinSpatialLocators:
# create a null component with cladding flags and spatialLocator from source block's
# clad components in case pin locations need to be known for physics solver
Expand Down
3 changes: 2 additions & 1 deletion armi/reactor/converters/tests/test_uniformMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ def test_applyStateToOriginal(self):
for b in self.converter.convReactor.core.getBlocks():
b.p.powerGamma = 0.5
b.p.powerNeutron = 0.5
b.p.power = b.p.powerGamma + b.p.powerNeutron

# check integral and density params
assemblyPowers = [
Expand All @@ -446,11 +447,11 @@ def test_applyStateToOriginal(self):
self.assertEqual(b.p.fastFlux, 2.0)
self.assertEqual(b.p.flux, 5.0)
self.assertEqual(b.p.fastFlux, 2.0)
self.assertEqual(b.p.power, 5.0)

# not equal because blocks are different size
self.assertNotEqual(b.p.powerGamma, 0.5)
self.assertNotEqual(b.p.powerNeutron, 0.5)
self.assertNotEqual(b.p.power, 1.0)

# equal because these are mapped
for expectedPower, expectedGammaPower, a in zip(
Expand Down
1 change: 1 addition & 0 deletions armi/reactor/converters/uniformMesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ class GammaUniformMeshConverter(UniformMeshGeometryConverter):
],
"out": [
parameters.Category.gamma,
parameters.Category.neutronics,
],
}

Expand Down
1 change: 1 addition & 0 deletions armi/reactor/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ def test_homogenizedMixture(self):
if arg:
# check that homogenized block has correct pin coordinates
self.assertEqual(self.block.getNumPins(), homogBlock.getNumPins())
self.assertEqual(self.block.p.nPins, homogBlock.p.nPins)
pinCoords = self.block.getPinCoordinates()
homogPinCoords = homogBlock.getPinCoordinates()
for refXYZ, homogXYZ in zip(list(pinCoords), list(homogPinCoords)):
Expand Down