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

reactivity swing #2035

Draft
wants to merge 3 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
1 change: 1 addition & 0 deletions doc/release/0.5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Release Date: TBD
New Features
------------
#. Move instead of copy files from TemporaryDirectoryChanger. (`PR#2022 <https://github.com/terrapower/armi/pull/2022>`_)
#. `rXSwing`` is now calculated for all time nodes making snapshots less failure prone due to non-relevant inputs. (`PR#2035 <https://github.com/terrapower/armi/pull/2035>`_)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ARMI 0.5.0 was released.

Can we move this up in this file to the 0.5.1 release notes?

Thanks!


API Changes
-----------
Expand Down