Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with restart runs #26

Merged
merged 2 commits into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions armi/bookkeeping/db/database3.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ def writeToDB(self, reactor, statePointName=None):
for comps in groupedComps.values():
self._writeParams(h5group, comps)

def load(self, cycle, node, cs=None, bp=None):
def load(self, cycle, node, cs=None, bp=None, statePointName=None):
"""Load a new reactor from (cycle, node).

Case settings, blueprints, and geom can be provided by the client, or read from
Expand Down Expand Up @@ -838,7 +838,7 @@ def load(self, cycle, node, cs=None, bp=None):
settings.setMasterCs(cs)
bp = bp or self.loadBlueprints()

h5group = self.h5db[getH5GroupName(cycle, node)]
h5group = self.h5db[getH5GroupName(cycle, node, statePointName)]

layout = Layout(h5group=h5group)
comps, groupedComps = layout._initComps(cs, bp)
Expand Down
5 changes: 4 additions & 1 deletion armi/physics/neutronics/globalFlux/globalFluxInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ class GlobalFluxInterface(interfaces.Interface):
r"""
A general abstract interface for global flux calculating modules.

Should be subclassed
Should be subclassed by more specific implementations. This class currently serves
as a common ancestor to a handful of DIF3D/REBUS-based neutronics interfaces, and
therefore is not as general as it should be. Future revisions will be generalized to
support other families of codes.
"""

name = None # make sure to set this in subclasses
Expand Down
8 changes: 8 additions & 0 deletions armi/physics/neutronics/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ def _getNeutronicsBlockParams():
pDefs = parameters.ParameterDefinitionCollection()
with pDefs.createBuilder() as pb:

pb.defParam(
"axMesh",
units="",
description="number of neutronics axial mesh points in this block",
default=None,
categories=[parameters.Category.retainOnReplacement],
)

def mgFlux(self, value):
self._p_mgFlux = (
value
Expand Down
2 changes: 1 addition & 1 deletion armi/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def afterConstructionOfAssemblies(assemblies, cs):

- Verify that all assemblies satisfy constraints imposed by active interfaces
and plugins
- Apply modifications to Assemblies based on modeling opetions and active
- Apply modifications to Assemblies based on modeling options and active
interfaces

Implementers may alter the state of the passed Assembly objects.
Expand Down
8 changes: 0 additions & 8 deletions armi/reactor/blockParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1312,14 +1312,6 @@ def buGroupNum(self, buGroupNum): # pylint: disable=method-hidden
categories=[parameters.Category.retainOnReplacement],
)

pb.defParam(
"axMesh",
units="",
description="number of neutronics axial mesh points in this block",
default=None,
categories=[parameters.Category.retainOnReplacement],
)

def xsType(self, value): # pylint: disable=method-hidden
self._p_xsType = value # pylint: disable=attribute-defined-outside-init
self._p_xsTypeNum = crossSectionGroupManager.getXSTypeNumberFromLabel(
Expand Down
2 changes: 1 addition & 1 deletion armi/reactor/blueprints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ def _resolveNuclides(self, cs):

self.elementsToExpand = []
for nucFlag in self.nuclideFlags:
# this returns any nuclides that are flagged specifically for expansion by input
expandedElements = nucFlag.fileAsActiveOrInert(
actives, inerts, undefBurnChainActiveNuclides
)
# this returns any nuclides that are flagged specifically for expansion by input
self.elementsToExpand.extend(expandedElements)

inerts -= actives
Expand Down
3 changes: 2 additions & 1 deletion armi/reactor/reactorParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@ def detailedNucKeys(self, value):
pb.defParam(
"power",
units="W",
description="Rated thermal power of the reactor core. Corresponds to the nuclear power generated in the core.",
description="Rated thermal power of the reactor core. Corresponds to the "
"nuclear power generated in the core.",
)

pb.defParam(
Expand Down
2 changes: 1 addition & 1 deletion armi/reactor/reactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def getAssemblies(
exact=False,
):
"""
Return an list of all the assemblies in the reactor.
Return a list of all the assemblies in the reactor.

Assemblies from the Core itself are sorted based on the Assemblies' comparison
operators (location-based). This is done so that two reactors with physically
Expand Down