Skip to content

Commit

Permalink
Moving axialExp from Blueprints to Core (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
albeanth committed Jul 18, 2022
1 parent 4c997bf commit d012383
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 0 additions & 9 deletions armi/reactor/blueprints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@
from armi.scripts import migration
from armi.utils import textProcessors

from armi.reactor.converters.axialExpansionChanger import AxialExpansionChanger
from armi.reactor.flags import Flags

# NOTE: using non-ARMI-standard imports because these are all a part of this package,
# and using the module imports would make the attribute definitions extremely long
# without adding detail
Expand Down Expand Up @@ -300,7 +297,6 @@ def _prepConstruction(self, cs):
This method should not be called directly, but it is used in testing.
"""
axialExpChngr = AxialExpansionChanger(cs["detailedAxialExpansion"])
if not self._prepped:
self._assignTypeNums()
for func in self._resolveFunctions:
Expand All @@ -311,11 +307,6 @@ def _prepConstruction(self, cs):

for aDesign in self.assemDesigns:
a = aDesign.construct(cs, self)
if not cs["inputHeightsConsideredHot"]:
if not a.hasFlags(Flags.CONTROL):
axialExpChngr.setAssembly(a)
axialExpChngr.expansionData.computeThermalExpansionFactors()
axialExpChngr.axiallyExpandAssembly(thermal=True)
self._assembliesBySpecifier[aDesign.specifier] = a
self.assemblies[aDesign.name] = a

Expand Down
12 changes: 12 additions & 0 deletions armi/reactor/reactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
from armi.utils import directoryChangers
from armi.utils.iterables import Sequence
from armi.utils.mathematics import average1DWithinTolerance
from armi.reactor.converters.axialExpansionChanger import AxialExpansionChanger

# init logger
runLog = logging.getLogger(__name__)
Expand Down Expand Up @@ -2235,6 +2236,17 @@ def processLoading(self, cs):
updateAxialMesh : Perturbs the axial mesh originally set up here.
"""
if not cs["inputHeightsConsideredHot"]:
runLog.header(
"=========== Axially expanding all (except control) assemblies from Tinput to Thot ==========="
)
axialExpChngr = AxialExpansionChanger(cs["detailedAxialExpansion"])
for a in self.getAssemblies(includeAll=True):
if not a.hasFlags(Flags.CONTROL):
axialExpChngr.setAssembly(a)
axialExpChngr.expansionData.computeThermalExpansionFactors()
axialExpChngr.axiallyExpandAssembly(thermal=True)

runLog.header(
"=========== Initializing Mesh, Assembly Zones, and Nuclide Categories =========== "
)
Expand Down

0 comments on commit d012383

Please sign in to comment.