Skip to content

Stop checking for last node in Snapshots #2035

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
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
14 changes: 6 additions & 8 deletions armi/physics/neutronics/globalFlux/globalFluxInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from armi.reactor.converters import uniformMesh
from armi.reactor.flags import Flags
from armi.settings.caseSettings import Settings
from armi.utils import units, codeTiming, getMaxBurnSteps, getBurnSteps
from armi.utils import units, codeTiming, getMaxBurnSteps

ORDER = interfaces.STACK_ORDER.FLUX

Expand Down Expand Up @@ -112,17 +112,15 @@ def _setRxSwingRelatedParams(self):
# track boc uncontrolled keff for rxSwing param.
self._bocKeff = self.r.core.p.keffUnc or self.r.core.p.keff

# A 1 burnstep cycle would have 2 nodes, and the last node would be node index 1 (first is zero)
lastNodeInCycle = getBurnSteps(self.cs)[self.r.p.cycle]
if self.r.p.timeNode == lastNodeInCycle and self._bocKeff is not None:
if self._bocKeff is not None:

eocKeff = self.r.core.p.keffUnc or self.r.core.p.keff
swing = (eocKeff - self._bocKeff) / (eocKeff * self._bocKeff)
currentKeff = self.r.core.p.keffUnc or self.r.core.p.keff
swing = (currentKeff - self._bocKeff) / (currentKeff * self._bocKeff)
self.r.core.p.rxSwing = swing * units.ABS_REACTIVITY_TO_PCM
runLog.info(
f"BOC Uncontrolled keff: {self._bocKeff}, "
f"EOC Uncontrolled keff: {self.r.core.p.keffUnc}, "
f"Cycle Reactivity Swing: {self.r.core.p.rxSwing} pcm"
f"Current Uncontrolled keff: {self.r.core.p.keffUnc}, "
f"Cycle Reactivity Swing (so far): {self.r.core.p.rxSwing} pcm"
)

def checkEnergyBalance(self):
Expand Down
6 changes: 5 additions & 1 deletion armi/reactor/reactorParameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,11 @@ def defineCoreParameters():
description="Max percent burnup on any block in the problem",
)

pb.defParam("rxSwing", units=units.PCM, description="Reactivity swing")
pb.defParam(
"rxSwing",
units=units.PCM,
description="Current Reactivity swing from BOC reactivity",
)

pb.defParam(
"maxBuF",
Expand Down