Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
onufer committed Apr 23, 2020
1 parent 06b4612 commit 5d5c274
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 41 deletions.
33 changes: 4 additions & 29 deletions armi/reactor/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,10 @@ def test_getPitchHomogenousBlock(self):
# The rectangle outer dimensions is defined by the pitch of the block/assembly.
# the inner dimensions is defined by whatever thickness is necessary to have
# the desired area fraction.
# The second way is shown in the second half of this test.
# The second way is to define all physical material components as unshaped, and
# add an additional infinitely thin Void component (no area) that defines pitch.
# See second part of HexBlock_TestCase.test_getPitchHomogenousBlock for
# demonstration.
cartBlock = blocks.CartesianBlock("TestCartBlock")

hexComponentArea = areaFractions[0] * rectTotalArea
Expand Down Expand Up @@ -1672,34 +1675,6 @@ def test_getPitchHomogenousBlock(self):
self.assertAlmostEqual(rectTotalArea, cartBlock.getMaxArea())
self.assertAlmostEqual(sum(c.getArea() for c in cartBlock), rectTotalArea)

# For this second way, we will simply define the 3 components as unshaped, with
# the desired area fractions, and make a 4th component that is an infinitely
# thin rectangle with desired pitch. the downside of this method is that now
# the block has a fourth component with no volume.
cartBlock = blocks.CartesianBlock("TestCartBlock")
for aFrac, material in zip(areaFractions, materials):
unshapedArgs = {"area": rectTotalArea * aFrac}
unshapedArgs.update(compArgs)
name = f"unshaped {material}"
comp = components.UnshapedComponent(name, material, **unshapedArgs)
cartBlock.addComponent(comp)

# We haven't set a pitch defining component this time so set it now with 0 area.
pitchDefiningComponent = components.Rectangle(
"pitchComp",
"Void",
lengthOuter=desiredPitch[0],
lengthInner=desiredPitch[0],
widthOuter=desiredPitch[1],
widthInner=desiredPitch[1],
mult=1,
**compArgs,
)
cartBlock.addComponent(pitchDefiningComponent)
self.assertEqual(desiredPitch, cartBlock.getPitch())
self.assertAlmostEqual(rectTotalArea, cartBlock.getMaxArea())
self.assertAlmostEqual(sum(c.getArea() for c in cartBlock), rectTotalArea)


class MassConservationTests(unittest.TestCase):
r"""
Expand Down
8 changes: 0 additions & 8 deletions armi/tests/refSmallReactor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,6 @@ blocks:
coolant: *component_fuel_coolant
duct: *component_fuel_duct
intercoolant: *component_fuel_intercoolant
homog fuel:
fuel:
shape: UnshapedComponent
material: UZr
Tinput: 25.0
Thot: 25.0
area: 100.0
op: 1.5
assemblies:
heights: &standard_heights [25.0, 25.0, 25.0, 25.0, 75.0]
axial mesh points: &standard_axial_mesh_points [1, 1, 1, 1, 4]
Expand Down
82 changes: 78 additions & 4 deletions doc/user/inputs/blueprints.rst
Original file line number Diff line number Diff line change
Expand Up @@ -597,11 +597,85 @@ Here is a complete fuel block definition::
od: 0.1


.. note::
Making blocks with unshaped components
--------------------------------------

Purely homogeneous blocks can most easily be modeled as a series of generic ``Components`` for
each material type (*e.g.*, SS316, Sodium) in the block. In such a case, the homogeneous block
should contain at least one ``Component`` with the hexagonal outer pitch (``op)`` specified.
Sometimes you will want to make a homogenous block, which is a mixture of multiple
materials, and will not want to define an exact shape for each of the components in
the block. In this case unshaped components can be used, but ARMI still requires there
to be at least one component with shape to define the pitch of the block.

In the example below, the block is a rectangular pitch so one of the
components is defined as a rectangle to indicate this. Its outer dimensions determine
the pitch of the block. The inner dimensions can be whatever is necessary to
preserve the area fraction. Note that rectangular blocks have pitch defined by two
numbers, since they may not be a square. In this case the rectangle component is half
the area fraction and the other two components are one quarter::

blocks:
fuel:
clad:
shape: Rectangle
material: HT9
Tinput: 25.0
Thot: 25.0
lengthOuter: 3.0
lengthInner: 2.4
widthOuter: 2.0
widthInner: 1.25
mult:1.0
fuel:
shape: UnshapedComponent
material: UZr
Tinput: 25.0
Thot: 25.0
area = 1.5
coolant:
shape: UnshapedComponent
material: Sodium
Tinput: 25.0
Thot: 25.0
area = 1.5

.. warning:: When using this method avoid thermal expansion by setting TInput=THot, or
your pitch component dimensions might change, thus changing your pitch.


Alternatively, a void (empty) component with zero area can be added for defining the
pitch, and then all three components can be defined as unshaped. The downside, is there
are now four components, but only three that have actual area and composition::

blocks:
fuel:
clad:
shape: UnshapedComponent
material: HT9
Tinput: 25.0
Thot: 25.0
area: 3.0
fuel:
shape: UnshapedComponent
material: UZr
Tinput: 25.0
Thot: 25.0
area = 1.5
coolant:
shape: UnshapedComponent
material: Sodium
Tinput: 25.0
Thot: 25.0
area = 1.5
PitchDefiningComponent:
shape: Rectangle
material: Void
lengthOuter: 3.0
lengthInner: 3.0
widthOuter: 2.0
widthInner: 2.0
mult:1.0


This can similarly be done for hex geometry and and a hexagon with Outer Pitch (`op`).

---------

Expand Down

0 comments on commit 5d5c274

Please sign in to comment.