Skip to content

Commit

Permalink
Cleanup umc (#1099)
Browse files Browse the repository at this point in the history
power and pdens parameters are initially set in a neutronics run,
but they may be adjusted by a gamma transport solver. Thus, these
parameters should be mapped out of a uniform mesh gamma solve, even
though they are also mapped in. If a gamma kernel is implemented that
does not update these parameters, this converter would have to be
modified and/or extended to prevent numerical diffusion of these
parameters.

Also, set b.p.nPins in Block._createHomogenizedCopy().
  • Loading branch information
mgjarrett authored Jan 19, 2023
1 parent 381575c commit 9b2e7ad
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
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 @@ -1596,6 +1596,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

0 comments on commit 9b2e7ad

Please sign in to comment.