diff --git a/armi/reactor/blocks.py b/armi/reactor/blocks.py index b3eada9d1..b20122a21 100644 --- a/armi/reactor/blocks.py +++ b/armi/reactor/blocks.py @@ -2593,7 +2593,11 @@ def getFlowArea(self): Retrieving the flow area requires that there be a single coolant Component. If available, the area is calculated (:need:`I_ARMI_COMP_VOL0`). """ - return self.getComponent(Flags.COOLANT, exact=True).getArea() + area = self.getComponent(Flags.COOLANT, exact=True).getArea() + for c in self.getComponents(Flags.INTERDUCTCOOLANT, exact=True): + area += c.getArea() + + return area def getHydraulicDiameter(self): r""" diff --git a/armi/reactor/tests/test_blocks.py b/armi/reactor/tests/test_blocks.py index 7dc23ab3a..232359bb4 100644 --- a/armi/reactor/tests/test_blocks.py +++ b/armi/reactor/tests/test_blocks.py @@ -937,9 +937,33 @@ def test_getFlowAreaPerPin(self): self.assertAlmostEqual(cur, ref) def test_getFlowArea(self): - area = self.block.getComponent(Flags.COOLANT).getArea() + """Test Block.getFlowArea() for a Block with just coolant.""" + ref = self.block.getComponent(Flags.COOLANT).getArea() cur = self.block.getFlowArea() - ref = area + self.assertAlmostEqual(cur, ref) + + def test_getFlowAreaInterDuctCoolant(self): + """Test Block.getFlowArea() for a Block with coolant and interductcoolant.""" + # build a test block with a Hex inter duct collant + fuelDims = {"Tinput": 400, "Thot": 400, "od": 0.76, "id": 0.00, "mult": 127.0} + ductDims = {"Tinput": 400, "Thot": 400, "op": 16, "ip": 15.3, "mult": 1.0} + coolDims = {"Tinput": 400, "Thot": 400} + iCoolantDims = {"Tinput": 400, "Thot": 400, "op": 17.0, "ip": 16, "mult": 1.0} + + fuel = components.Circle("fuel", "UZr", **fuelDims) + duct = components.Hexagon("inner duct", "HT9", **ductDims) + coolant = components.DerivedShape("coolant", "Sodium", **coolDims) + iCoolant = components.Hexagon("interductcoolant", "Sodium", **iCoolantDims) + + b = blocks.HexBlock("fuel", height=10.0) + b.add(fuel) + b.add(coolant) + b.add(duct) + b.add(iCoolant) + + ref = b.getComponent(Flags.COOLANT).getArea() + ref += b.getComponent(Flags.INTERDUCTCOOLANT).getArea() + cur = b.getFlowArea() self.assertAlmostEqual(cur, ref) def test_getHydraulicDiameter(self):