Skip to content

Commit

Permalink
Filling in empty Parameter units and descriptions (#1345)
Browse files Browse the repository at this point in the history
We are finally filling in all the missing values in the `units` and `description` fields of our ARMI `Parameter`s.

I have also completely removed 16 `Parameter`s, because they are unused:

* avgFuelTemp
* avgTempRef
* baseBu
* basePBu
* bu
* currentPercentExpanded
* maxdilationTotal
* maxresidence
* Torus geometry:
  * azimuthal_differential
  * height
  * inner_axial
  * inner_minor_radius
  * inner_phi
  * inner_radius
  * inner_theta
  * major_radius
  * outer_axial
  * outer_minor_radius
  * outer_phi
  * outer_radius
  * outer_theta
  * radius_differential
  * reference_volume

**NOTE**: The above "torus" Parameters were removed, and in the end we removed the entire Torus geometry.  It was entirely unused, and in the process of reviewing these Parameters I found a few bugs in our Torus geometry.

**NOTE**: We are also adding a `DeprecationWarning` that at some point `Parameter`s will demand non-empty descriptions.
  • Loading branch information
john-science committed Jul 18, 2023
1 parent 06351ae commit 32c259f
Show file tree
Hide file tree
Showing 24 changed files with 461 additions and 574 deletions.
2 changes: 1 addition & 1 deletion armi/bookkeeping/db/tests/test_comparedb3.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_compareDatabaseSim(self):
dbs[1]._fullPath,
timestepCompare=[(0, 0), (0, 1)],
)
self.assertEqual(len(diffs.diffs), 468)
self.assertEqual(len(diffs.diffs), 465)
# Cycle length is only diff (x3)
self.assertEqual(diffs.nDiffs(), 3)

Expand Down
4 changes: 0 additions & 4 deletions armi/bookkeeping/db/tests/test_databaseInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
from armi.reactor import grids
from armi.reactor.flags import Flags
from armi.reactor.tests.test_reactors import loadTestReactor, reduceTestReactorRings
from armi.settings.fwSettings.databaseSettings import CONF_FORCE_DB_PARAMS
from armi.tests import TEST_ROOT
from armi.utils import directoryChangers

Expand All @@ -52,7 +51,6 @@ def getSimpleDBOperator(cs):
newSettings["runType"] = "Standard"
newSettings["geomFile"] = "geom1Assem.xml"
newSettings["nCycles"] = 1
newSettings[CONF_FORCE_DB_PARAMS] = ["baseBu"]
cs = cs.modified(newSettings=newSettings)
genDBCase = case.Case(cs)
settings.setMasterCs(cs)
Expand All @@ -76,7 +74,6 @@ def __init__(self, r, cs, action=None):
self.action = action

def interactEveryNode(self, cycle, node):
self.r.core.getFirstBlock().p.baseBu = 5.0
self.action(cycle, node)


Expand Down Expand Up @@ -161,7 +158,6 @@ def goodMethod(cycle, node):
self.assertIn("geomFile", h5["inputs"])
self.assertIn("settings", h5["inputs"])
self.assertIn("blueprints", h5["inputs"])
self.assertIn("baseBu", h5["c00n02/HexBlock"])

def test_metaDataEndFail(self):
def failMethod(cycle, node):
Expand Down
2 changes: 0 additions & 2 deletions armi/operators/tests/test_operatorSnapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from armi.operators.runTypes import RunTypes
from armi.operators.snapshots import OperatorSnapshots
from armi.reactor.tests import test_reactors
from armi.settings.fwSettings.databaseSettings import CONF_FORCE_DB_PARAMS


class TestOperatorSnapshots(unittest.TestCase):
Expand All @@ -32,7 +31,6 @@ def setUp(self):
newSettings["verbosity"] = "important"
newSettings["branchVerbosity"] = "important"
newSettings["nCycles"] = 1
newSettings[CONF_FORCE_DB_PARAMS] = ["baseBu"]
newSettings["dumpSnapshot"] = ["000000", "008000", "016005"]
o1, self.r = test_reactors.loadTestReactor(customSettings=newSettings)
self.o = OperatorSnapshots(o1.cs)
Expand Down
18 changes: 9 additions & 9 deletions armi/physics/fuelPerformance/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def _getFuelPerformanceBlockParams():

pb.defParam(
"fuelCladLocked",
units="",
units=units.UNITLESS,
default=False,
description="Boolean to indicate if the fuel is locked with the clad."
" This is used to determine the expansion constraints for the fuel during"
Expand All @@ -47,7 +47,7 @@ def gasReleaseFraction(self, value):
pb.defParam(
"gasReleaseFraction",
setter=gasReleaseFraction,
units="fraction",
units=units.UNITLESS,
description="Fraction of generated fission gas that no longer exists in the block.",
categories=["eq cumulative shift"],
)
Expand All @@ -63,7 +63,7 @@ def bondRemoved(self, value):
pb.defParam(
"bondRemoved",
setter=bondRemoved,
units="fraction",
units=units.UNITLESS,
description="Fraction of thermal bond between fuel and clad that has been pushed out.",
categories=["eq cumulative shift"],
)
Expand All @@ -78,43 +78,43 @@ def bondRemoved(self, value):

pb.defParam(
"totalCladStrain",
units="%",
units=units.PERCENT,
description="Total diametral clad strain.",
categories=["eq cumulative shift"],
)

pb.defParam(
"axialGrowthPct",
units="%",
units=units.PERCENT,
description="Axial growth percentage",
categories=["eq cumulative shift"],
)

pb.defParam(
"fpPeakFuelTemp",
units="C",
units=units.DEGC,
description="Fuel performance calculated peak fuel temperature.",
location=ParamLocation.AVERAGE,
)

pb.defParam(
"fpAveFuelTemp",
units="C",
units=units.DEGC,
description="Fuel performance calculated average fuel temperature.",
location=ParamLocation.AVERAGE,
)

pb.defParam(
"gasPorosity",
units="",
units=units.UNITLESS,
description="Fraction of fuel volume that is occupied by gas pores",
default=0.0,
categories=["eq cumulative shift"],
)

pb.defParam(
"liquidPorosity",
units="",
units=units.UNITLESS,
description="Fraction of fuel volume that is occupied by liquid filled pores",
default=0.0,
)
Expand Down
Loading

0 comments on commit 32c259f

Please sign in to comment.