Skip to content

Commit

Permalink
Addressing first round of PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlafleur committed Nov 21, 2023
1 parent f696fbe commit 729a5d2
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 140 deletions.
3 changes: 1 addition & 2 deletions armi/cases/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ class CaseSuite:
A CaseSuite is a collection that is keyed off Case titles.
.. impl:: Dependence allows for one case to start after the completion of another
.. impl:: CaseSuite allows for one case to start after another completes.
:id: I_ARMI_CASE_SUITE
:implements: R_ARMI_CASE_SUITE
"""

def __init__(self, cs):
Expand Down
4 changes: 0 additions & 4 deletions armi/physics/executers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ def run(self):
"""
Run the executer steps.
.. impl:: Reactor model is appropriate for neutronics solver execution
:id: I_ARMI_FLUX_GEOM_TRANSFORM
:implements: R_ARMI_FLUX_GEOM_TRANSFORM
.. warning::
If a calculation requires anything different from what this method does,
do not update this method with new complexity! Instead, simply make your own
Expand Down
6 changes: 3 additions & 3 deletions armi/physics/neutronics/globalFlux/globalFluxInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def interactCoupled(self, iteration):
def getTightCouplingValue(self):
"""Return the parameter value.
.. impl:: Get k-eff or assembly-wise power for coupling interactions
.. impl:: Return k-eff or assembly-wise power distribution for coupled interactions.
:id: I_ARMI_FLUX_COUPLING_VALUE
:implements: R_ARMI_FLUX_COUPLING_VALUE
"""
Expand Down Expand Up @@ -1203,14 +1203,14 @@ def computeDpaRate(mgFlux, dpaXs):
DPA rate = displacement density rate / (number of atoms/cc)
= dr [#/cm^3/s] / (nHT9) [1/cm^3]
= flux * barn * 1e-24
= flux * barn * 1e-24
.. math::
\frac{\text{dpa}}{s} = \frac{\phi N \sigma}{N} = \phi * \sigma
the Number density of the structural material cancels out. It's in the macroscopic
the Number density of the structural material cancels out. It's in the macroscopic
XS and in the original number of atoms.
Raises
Expand Down
35 changes: 9 additions & 26 deletions armi/reactor/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ def getArea(self, cold=False):
"""
Get the area of a component in cm^2.
.. impl:: Set a dimension of a component
:id: I_ARMI_COMP_VOL0
:implements: R_ARMI_COMP_VOL
See Also
--------
block.getVolumeFractions: component coolant is typically the "leftover" and is calculated and set here
Expand All @@ -448,6 +452,10 @@ def getVolume(self):
"""
Return the volume [cm^3] of the component.
.. impl:: Set a dimension of a component
:id: I_ARMI_COMP_VOL1
:implements: R_ARMI_COMP_VOL
Notes
-----
``self.p.volume`` is not set until this method is called,
Expand All @@ -470,10 +478,6 @@ def clearCache(self):
If there is a parent container and that container contains a DerivedShape, then that must be
updated as well since its volume may be changing.
.. impl:: Clear cache after a dimenions updated
:id: I_ARMI_COMP_VOL1
:implements: R_ARMI_COMP_VOL
See Also
--------
clearLinkedCache: Clears cache of components that depend on this component's dimensions.
Expand Down Expand Up @@ -654,10 +658,6 @@ def setNumberDensity(self, nucName, val):
"""
Set heterogeneous number density.
.. impl:: Set number density of nuclide
:id: I_ARMI_COMP_NUCLIDE_FRACS0
:implements R_ARMI_COMP_NUCLIDE_FRACS
Parameters
----------
nucName : str
Expand All @@ -676,10 +676,6 @@ def setNumberDensities(self, numberDensities):
"""
Set one or more multiple number densities. Clears out any number density not listed.
.. impl:: Set number densities of nuclides
:id: I_ARMI_COMP_NUCLIDE_FRACS1
:implements R_ARMI_COMP_NUCLIDE_FRACS
Parameters
----------
numberDensities : dict
Expand Down Expand Up @@ -759,10 +755,6 @@ def getMass(self, nuclideNames=None):
:math:`A_i` is the atomic weight of of nuclide i in grams/mole
.. impl:: Get mass of composite
:id: I_ARMI_CMP_GET_MASS1
:implements: R_ARMI_CMP_GET_MASS
Parameters
----------
nuclideNames : str, optional
Expand All @@ -787,10 +779,6 @@ def setDimension(self, key, val, retainLink=False, cold=True):
"""
Set a single dimension on the component.
.. impl:: Set a dimension of a component
:id: I_ARMI_COMP_VOL0
:implements: R_ARMI_COMP_VOL
Parameters
----------
key : str
Expand Down Expand Up @@ -1175,12 +1163,7 @@ def getIntegratedMgFlux(self, adjoint=False, gamma=False):
return pinFluxes[self.p.pinNum - 1] * self.getVolume()

def density(self):
"""Returns the mass density of the object in g/cc.
.. impl:: Material density is retrievable
:id: I_ARMI_COMP_MAT1
:implements: R_ARMI_COMP_MAT
"""
"""Returns the mass density of the object in g/cc."""
density = composites.Composite.density(self)

if not density:
Expand Down
8 changes: 0 additions & 8 deletions armi/reactor/components/volumetricShapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,6 @@ class RadialSegment(ShapedComponent):
|-----------------------> radius, X
|
|
.. impl:: Compute properties of radial segment
:id: I_ARMI_COMP_FLUID0
:implements: R_ARMI_COMP_FLUID
"""

is3D = True
Expand Down Expand Up @@ -267,10 +263,6 @@ class DifferentialRadialSegment(RadialSegment):
This component class is super useful for defining ThRZ reactors and
perturbing its dimensions using the optimization modules
.. impl:: Compute properties of radial segment that can be updated
:id: I_ARMI_COMP_FLUID1
:implements: R_ARMI_COMP_FLUID
See Also
--------
geometry purturbation:
Expand Down
2 changes: 1 addition & 1 deletion armi/reactor/composites.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def getMass(self, nuclideNames=None):
Determine the mass in grams of nuclide(s) and/or elements in this object.
.. impl:: Get mass of composite
:id: I_ARMI_CMP_GET_MASS0
:id: I_ARMI_CMP_GET_MASS
:implements: R_ARMI_CMP_GET_MASS
Parameters
Expand Down
15 changes: 7 additions & 8 deletions armi/reactor/converters/blockConverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class ComponentMerger(BlockConverter):
"""For a provided block, merged the solute component into the solvent component.
.. impl:: Homogenize one component into another
:id: I_ARMI_BLOCKCONV
:id: I_ARMI_BLOCKCONV0
:implements: R_ARMI_BLOCKCONV
"""

Expand Down Expand Up @@ -253,6 +253,10 @@ class MultipleComponentMerger(BlockConverter):
This could be implemented on the regular ComponentMerger, as the Flags system has enough power
in the type specification arguments to things like ``getComponents()``, ``hasFlags()``, etc., to
do single and multiple components with the same code.
.. impl:: Homogenize one component into another
:id: I_ARMI_BLOCKCONV1
:implements: R_ARMI_BLOCKCONV
"""

def __init__(self, sourceBlock, soluteNames, solventName, specifiedMinID=0.0):
Expand Down Expand Up @@ -335,12 +339,7 @@ def __init__(
self._numInternalRings = numInternalRings

def convert(self):
"""Return a block converted into cylindrical geometry, possibly with other block types surrounding it.
.. impl:: Convert hex blocks to cylindrical blocks
:id: I_ARMI_BLOCKCONV_HEX_TO_CYL1
:implements: R_ARMI_BLOCKCONV_HEX_TO_CYL
"""
"""Return a block converted into cylindrical geometry, possibly with other block types surrounding it."""
self._addBlockRings(
self._sourceBlock, self._sourceBlock.getType(), self._numInternalRings, 1
)
Expand Down Expand Up @@ -539,7 +538,7 @@ def convert(self):
"""Perform the conversion.
.. impl:: Convert hex blocks to cylindrical blocks
:id: I_ARMI_BLOCKCONV_HEX_TO_CYL0
:id: I_ARMI_BLOCKCONV_HEX_TO_CYL
:implements: R_ARMI_BLOCKCONV_HEX_TO_CYL
"""
runLog.info(
Expand Down
8 changes: 1 addition & 7 deletions armi/reactor/grids/tests/test_grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def test_getSymmetricIdenticalsThird(self):
"""Retrieve equivalent contents based on 3rd symmetry.
.. test:: Equivalent contents in 3rd geometry are retrievable
:id: T_ARMI_GRID_EQUIVALENTS0
:id: T_ARMI_GRID_EQUIVALENTS
:tests: R_ARMI_GRID_EQUIVALENTS
"""
grid = grids.HexGrid.fromPitch(1.0)
Expand Down Expand Up @@ -580,12 +580,6 @@ def test_ringPosSplit(self):
self.assertEqual(pos, expectedPos[j + 3][i + 3])

def test_symmetry(self):
"""Retrieve equivalent contents based on symmetry.
.. test:: Equivalent contents in geometry are retrievable
:id: T_ARMI_GRID_EQUIVALENTS1
:tests: R_ARMI_GRID_EQUIVALENTS
"""
# PERIODIC, no split
grid = grids.CartesianGrid.fromRectangle(
1.0,
Expand Down
Loading

0 comments on commit 729a5d2

Please sign in to comment.