Skip to content

Commit

Permalink
Adding important neutronics settings (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Feb 10, 2022
1 parent 1c7b3ea commit 7d1eb8d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
16 changes: 15 additions & 1 deletion armi/physics/neutronics/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
CONF_EXISTING_FIXED_SOURCE = "existingFixedSource"
CONF_NUMBER_MESH_PER_EDGE = "numberMeshPerEdge"
CONF_RESTART_NEUTRONICS = "restartNeutronics"
CONF_OUTERS_ = "outers"

This comment has been minimized.

Copy link
@ntouran

ntouran Jun 16, 2022

Member

why do these have trailing underscores?

This comment has been minimized.

Copy link
@john-science

john-science Jun 16, 2022

Author Member

That was a few months ago.

But I think there were already some "CONF_OUTERS" in the code base.

CONF_INNERS_ = "inners"

CONF_EPS_EIG = "epsEig"
CONF_EPS_FSAVG = "epsFSAvg"
Expand Down Expand Up @@ -127,7 +129,7 @@ def defineSettings():
CONF_BC_COEFFICIENT,
default=0.0,
label="Parameter A for generalized BC",
description="Value for the parameter A of the DIF3D generalized boundary "
description="Value for the parameter A of the generalized boundary "
"condition.",
),
setting.Setting(
Expand Down Expand Up @@ -227,6 +229,18 @@ def defineSettings():
label="Restart neutronics",
description="Restart global flux case using outputs from last time as a guess",
),
setting.Setting(
CONF_OUTERS_,
default=100,
label="Max Outer Iterations",
description="XY and Axial partial current sweep max outer iterations.",
),
setting.Setting(
CONF_INNERS_,
default=0,
label="Inner Iterations",
description="XY and Axial partial current sweep inner iterations. 0 lets the neutronics code pick a default.",
),
setting.Setting(
CONF_GRID_PLATE_DPA_XS_SET,
default="dpa_EBRII_HT9",
Expand Down
13 changes: 13 additions & 0 deletions armi/physics/neutronics/tests/test_neutronicsPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@

from armi.physics import neutronics
from armi.physics.neutronics.const import CONF_CROSS_SECTION
from armi.physics.neutronics.settings import (
CONF_OUTERS_,
CONF_INNERS_,
CONF_NEUTRONICS_KERNEL,
)
from armi.settings import caseSettings
from armi.tests import TEST_ROOT
from armi.tests.test_plugins import TestPlugin
Expand Down Expand Up @@ -62,6 +67,14 @@ def test_customSettingRoundTrip(self):
cs.writeToYamlFile(fname)
os.remove(fname)

def test_neutronicsSettingsLoaded(self):
"""Check that various special neutronics-specifics settings are loaded"""
cs = caseSettings.Settings()

self.assertIn(CONF_INNERS_, cs)
self.assertIn(CONF_OUTERS_, cs)
self.assertIn(CONF_NEUTRONICS_KERNEL, cs)


class NeutronicsReactorTests(unittest.TestCase):
@classmethod
Expand Down

0 comments on commit 7d1eb8d

Please sign in to comment.