Skip to content

Commit 6fcc481

Browse files
authored
Fixing wetted perimeter for hex inner ducts (#1985)
1 parent 6b356b3 commit 6fcc481

File tree

3 files changed

+95
-20
lines changed

3 files changed

+95
-20
lines changed

armi/reactor/blocks.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2509,13 +2509,10 @@ def getWettedPerimeter(self):
25092509
)
25102510

25112511
# flags pertaining to circular pin components where the exterior of the circle is wetted
2512-
wettedPinComponentFlags = (
2513-
Flags.CLAD,
2514-
Flags.WIRE,
2515-
)
2512+
wettedPinComponentFlags = (Flags.CLAD, Flags.WIRE)
25162513

2517-
# flags pertaining to circular components where both the interior and exterior of the circle are wetted
2518-
wettedHollowCircleComponentFlags = (Flags.DUCT | Flags.INNER,)
2514+
# flags pertaining to components where both the interior and exterior are wetted
2515+
wettedHollowComponentFlags = (Flags.DUCT | Flags.INNER,)
25192516

25202517
# obtain all wetted components based on type
25212518
wettedHollowHexagonComponents = []
@@ -2529,9 +2526,13 @@ def getWettedPerimeter(self):
25292526
wettedPinComponents.append(c) if c else None
25302527

25312528
wettedHollowCircleComponents = []
2532-
for flag in wettedHollowCircleComponentFlags:
2529+
wettedHollowHexComponents = []
2530+
for flag in wettedHollowComponentFlags:
25332531
c = self.getComponent(flag, exact=True)
2534-
wettedHollowCircleComponents.append(c) if c else None
2532+
if isinstance(c, Hexagon):
2533+
wettedHollowHexComponents.append(c) if c else None
2534+
else:
2535+
wettedHollowCircleComponents.append(c) if c else None
25352536

25362537
# calculate wetted perimeters according to their geometries
25372538

@@ -2565,10 +2566,19 @@ def getWettedPerimeter(self):
25652566
)
25662567
wettedHollowCirclePerimeter *= math.pi
25672568

2569+
# hollow hexagon = 6 * (ip + op) / sqrt(3)
2570+
wettedHollowHexPerimeter = 0.0
2571+
for c in wettedHollowHexComponents:
2572+
wettedHollowHexPerimeter += (
2573+
c.getDimension("ip") + c.getDimension("op") if c else 0.0
2574+
)
2575+
wettedHollowHexPerimeter *= 6 / math.sqrt(3)
2576+
25682577
return (
25692578
wettedHollowHexagonPerimeter
25702579
+ wettedPinPerimeter
25712580
+ wettedHollowCirclePerimeter
2581+
+ wettedHollowHexPerimeter
25722582
)
25732583

25742584
def getFlowArea(self):

armi/reactor/tests/test_blocks.py

Lines changed: 76 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949

5050
def buildSimpleFuelBlock():
51-
"""Return a simple block containing fuel, clad, duct, and coolant."""
51+
"""Return a simple hex block containing fuel, clad, duct, and coolant."""
5252
b = blocks.HexBlock("fuel", height=10.0)
5353

5454
fuelDims = {"Tinput": 25.0, "Thot": 600, "od": 0.76, "id": 0.00, "mult": 127.0}
@@ -816,25 +816,89 @@ def test_replaceBlockWithBlock(self):
816816
self.assertEqual(block.p.height, refHeight)
817817

818818
def test_getWettedPerimeter(self):
819-
cur = self.block.getWettedPerimeter()
820-
819+
# calculate the reference value
821820
wire = self.block.getComponent(Flags.WIRE)
822821
correctionFactor = np.hypot(
823822
1.0,
824823
math.pi
825824
* wire.getDimension("helixDiameter")
826825
/ wire.getDimension("axialPitch"),
827826
)
828-
wireDiameter = wire.getDimension("od") * correctionFactor
829-
830-
ref = math.pi * (
831-
self.block.getDim(Flags.CLAD, "od") + wireDiameter
832-
) * self.block.getDim(Flags.CLAD, "mult") + 6 * self.block.getDim(
833-
Flags.DUCT, "ip"
834-
) / math.sqrt(
835-
3
836-
)
827+
wireDiam = wire.getDimension("od") * correctionFactor
828+
829+
ipDim = self.block.getDim(Flags.DUCT, "ip")
830+
odDim = self.block.getDim(Flags.CLAD, "od")
831+
mult = self.block.getDim(Flags.CLAD, "mult")
832+
ref = math.pi * (odDim + wireDiam) * mult + 6 * ipDim / math.sqrt(3)
833+
834+
# test getWettedPerimeter
835+
cur = self.block.getWettedPerimeter()
836+
self.assertAlmostEqual(cur, ref)
837+
838+
def test_getWettedPerimeterCircularInnerDuct(self):
839+
"""Calculate the wetted perimeter for a HexBlock with circular inner duct."""
840+
# build a test block with a Hex inner duct
841+
fuelDims = {"Tinput": 400, "Thot": 400, "od": 0.76, "id": 0.00, "mult": 127.0}
842+
cladDims = {"Tinput": 400, "Thot": 400, "od": 0.80, "id": 0.77, "mult": 127.0}
843+
ductDims = {"Tinput": 400, "Thot": 400, "od": 16, "id": 15.3, "mult": 1.0}
844+
intercoolantDims = {
845+
"Tinput": 400,
846+
"Thot": 400,
847+
"od": 17.0,
848+
"id": ductDims["od"],
849+
"mult": 1.0,
850+
}
851+
852+
fuel = components.Circle("fuel", "UZr", **fuelDims)
853+
clad = components.Circle("clad", "HT9", **cladDims)
854+
duct = components.Circle("inner duct", "HT9", **ductDims)
855+
intercoolant = components.Circle("intercoolant", "Sodium", **intercoolantDims)
856+
857+
b = blocks.HexBlock("fuel", height=10.0)
858+
b.add(fuel)
859+
b.add(clad)
860+
b.add(duct)
861+
b.add(intercoolant)
862+
863+
# calculate the reference value
864+
ref = (ductDims["id"] + ductDims["od"]) * math.pi
865+
ref += b.getNumPins() * cladDims["od"] * math.pi
866+
867+
# test getWettedPerimeter
868+
cur = b.getWettedPerimeter()
869+
self.assertAlmostEqual(cur, ref)
870+
871+
def test_getWettedPerimeterHexInnerDuct(self):
872+
"""Calculate the wetted perimeter for a HexBlock with hexagonal inner duct."""
873+
# build a test block with a Hex inner duct
874+
fuelDims = {"Tinput": 400, "Thot": 400, "od": 0.76, "id": 0.00, "mult": 127.0}
875+
cladDims = {"Tinput": 400, "Thot": 400, "od": 0.80, "id": 0.77, "mult": 127.0}
876+
ductDims = {"Tinput": 400, "Thot": 400, "op": 16, "ip": 15.3, "mult": 1.0}
877+
intercoolantDims = {
878+
"Tinput": 400,
879+
"Thot": 400,
880+
"op": 17.0,
881+
"ip": ductDims["op"],
882+
"mult": 1.0,
883+
}
884+
885+
fuel = components.Circle("fuel", "UZr", **fuelDims)
886+
clad = components.Circle("clad", "HT9", **cladDims)
887+
duct = components.Hexagon("inner duct", "HT9", **ductDims)
888+
intercoolant = components.Hexagon("intercoolant", "Sodium", **intercoolantDims)
889+
890+
b = blocks.HexBlock("fuel", height=10.0)
891+
b.add(fuel)
892+
b.add(clad)
893+
b.add(duct)
894+
b.add(intercoolant)
895+
896+
# calculate the reference value
897+
ref = 6 * (ductDims["ip"] + ductDims["op"]) / math.sqrt(3)
898+
ref += b.getNumPins() * cladDims["od"] * math.pi
837899

900+
# test getWettedPerimeter
901+
cur = b.getWettedPerimeter()
838902
self.assertAlmostEqual(cur, ref)
839903

840904
def test_getFlowAreaPerPin(self):

doc/release/0.4.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Bug Fixes
6262
#. Material theoretical density is serialized to and read from database. (`PR#1852 <https://github.com/terrapower/armi/pull/1852>`_)
6363
#. Removed broken and unused column in ``summarizeMaterialData``. (`PR#1925 <https://github.com/terrapower/armi/pull/1925>`_)
6464
#. Fixed edge case in ``assemblyBlueprint._checkParamConsistency()``. (`PR#1928 <https://github.com/terrapower/armi/pull/1928>`_)
65+
#. Fixed wetted perimeter for hex inner ducts. (`PR#1985 <https://github.com/terrapower/armi/pull/1985>`_)
6566
#. TBD
6667

6768
Quality Work

0 commit comments

Comments
 (0)