Skip to content

Commit 37f5479

Browse files
authored
Fixing b4c material density (#942)
1 parent 5462344 commit 37f5479

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed

armi/materials/b4c.py

+16-11
Original file line numberDiff line numberDiff line change
@@ -159,18 +159,23 @@ def getMassEnrichmentFromNumEnrich(naturalB10NumberFraction: float) -> float:
159159

160160
def density(self, Tk: float = None, Tc: float = None) -> float:
161161
"""
162-
mass density
162+
Return density that preserves mass when thermally expanded in 2D.
163+
164+
Notes
165+
-----
166+
- applies theoretical density of B4C to parent method
163167
"""
164-
density = material.Material.density(self, Tk, Tc)
165-
theoreticalDensityFrac = self.p.theoreticalDensityFrac
166-
if theoreticalDensityFrac is None:
167-
theoreticalDensityFrac = 1.0
168-
runLog.warning(
169-
"Assumption: 100% theoretical density",
170-
label="Assumption: B4C is at 100% theoretical density",
171-
single=True,
172-
)
173-
return density * theoreticalDensityFrac # g/cc
168+
return material.Material.density(self, Tk, Tc) * self.p.theoreticalDensityFrac
169+
170+
def density3(self, Tk: float = None, Tc: float = None) -> float:
171+
"""
172+
Return density that preserves mass when thermally expanded in 3D.
173+
174+
Notes
175+
-----
176+
- applies theoretical density of B4C to parent method
177+
"""
178+
return material.Material.density3(self, Tk, Tc) * self.p.theoreticalDensityFrac
174179

175180
def linearExpansionPercent(self, Tk: float = None, Tc: float = None) -> float:
176181
"""Boron carbide expansion. Very preliminary"""

armi/reactor/tests/test_components.py

+30-17
Original file line numberDiff line numberDiff line change
@@ -494,28 +494,39 @@ def test_changeNumberDensities(self):
494494

495495

496496
class TestComponentExpansion(unittest.TestCase):
497-
# when comparing to 3D density, the comparison is not quite correct.
498-
# We need a bigger delta, this will be investigated/fixed in another PR
497+
tCold = 20
499498
tWarm = 50
500499
tHot = 500
501500
coldOuterDiameter = 1.0
502501

503-
def test_ComponentMassIndependentOfInputTemp(self):
504-
coldT = 20
505-
circle1 = Circle("circle", "HT9", coldT, self.tHot, self.coldOuterDiameter)
506-
coldT += 200
502+
def test_HT9Expansion(self):
503+
self.runExpansionTests(mat="HT9", isotope="FE")
504+
505+
def test_UZrExpansion(self):
506+
self.runExpansionTests(mat="UZr", isotope="U235")
507+
508+
def test_B4CExpansion(self):
509+
self.runExpansionTests(mat="B4C", isotope="B10")
510+
511+
def runExpansionTests(self, mat: str, isotope: str):
512+
self.componentMassIndependentOfInputTemp(mat)
513+
self.expansionConservationHotHeightDefined(mat, isotope)
514+
self.expansionConservationColdHeightDefined(mat)
515+
516+
def componentMassIndependentOfInputTemp(self, mat: str):
517+
circle1 = Circle("circle", mat, self.tCold, self.tHot, self.coldOuterDiameter)
507518
# pick the input dimension to get the same hot component
508519
hotterDim = self.coldOuterDiameter * (
509-
1 + circle1.material.linearExpansionFactor(coldT, 20)
520+
1 + circle1.material.linearExpansionFactor(self.tCold + 200, self.tCold)
510521
)
511-
circle2 = Circle("circle", "HT9", coldT, self.tHot, hotterDim)
522+
circle2 = Circle("circle", mat, self.tCold + 200, self.tHot, hotterDim)
512523
self.assertAlmostEqual(circle1.getDimension("od"), circle2.getDimension("od"))
513524
self.assertAlmostEqual(circle1.getArea(), circle2.getArea())
514525
self.assertAlmostEqual(circle1.getMassDensity(), circle2.getMassDensity())
515526

516-
def test_ExpansionConservationHotHeightDefined(self):
527+
def expansionConservationHotHeightDefined(self, mat: str, isotope: str):
517528
"""
518-
Demonstrate tutorial for how to expand and relation ships conserved at during expansion.
529+
Demonstrate tutorial for how to expand and relationships conserved at during expansion.
519530
520531
Notes
521532
-----
@@ -524,13 +535,13 @@ def test_ExpansionConservationHotHeightDefined(self):
524535
"""
525536
hotHeight = 1.0
526537

527-
circle1 = Circle("circle", "HT9", 20, self.tWarm, self.coldOuterDiameter)
528-
circle2 = Circle("circle", "HT9", 20, self.tHot, self.coldOuterDiameter)
538+
circle1 = Circle("circle", mat, self.tCold, self.tWarm, self.coldOuterDiameter)
539+
circle2 = Circle("circle", mat, self.tCold, self.tHot, self.coldOuterDiameter)
529540

530541
# mass density is proportional to Fe number density and derived from
531542
# all the number densities and atomic masses
532543
self.assertAlmostEqual(
533-
circle1.p.numberDensities["FE"] / circle2.p.numberDensities["FE"],
544+
circle1.p.numberDensities[isotope] / circle2.p.numberDensities[isotope],
534545
circle1.getMassDensity() / circle2.getMassDensity(),
535546
)
536547

@@ -615,7 +626,7 @@ def test_ExpansionConservationHotHeightDefined(self):
615626
mass1, circle1.getMassDensity() * circle1.getArea() * hotHeight
616627
)
617628

618-
def test_ExpansionConservationColdHeightDefined(self):
629+
def expansionConservationColdHeightDefined(self, mat: str):
619630
"""
620631
Demonstrate that material is conserved at during expansion
621632
@@ -625,10 +636,12 @@ def test_ExpansionConservationColdHeightDefined(self):
625636
inputHeightsConsideredHot = False
626637
"""
627638
coldHeight = 1.0
628-
circle1 = Circle("circle", "HT9", 20, self.tWarm, self.coldOuterDiameter)
629-
circle2 = Circle("circle", "HT9", 20, self.tHot, self.coldOuterDiameter)
639+
circle1 = Circle("circle", mat, self.tCold, self.tWarm, self.coldOuterDiameter)
640+
circle2 = Circle("circle", mat, self.tCold, self.tHot, self.coldOuterDiameter)
630641
# same as 1 but we will make like 2
631-
circle1AdjustTo2 = Circle("circle", "HT9", 20, self.tWarm, 1.0)
642+
circle1AdjustTo2 = Circle(
643+
"circle", mat, self.tCold, self.tWarm, self.coldOuterDiameter
644+
)
632645

633646
# make it hot like 2
634647
circle1AdjustTo2.adjustDensityForHeightExpansion(self.tHot)

doc/release/0.2.rst

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ What's new in ARMI
1717

1818
Bug fixes
1919
---------
20+
#. Adjusted density3 in armi/materials/b4C.py to include the theoretical density. (`PR#942 <https://github.com/terrapower/armi/pull/942>`_)
2021
#. Fixed bug in ``fastFlux`` block parameter mapping in the ``UniformMeshConverter`` by applying it to the ``detailedAxialExpansion`` category.
2122

2223

0 commit comments

Comments
 (0)