diff --git a/docs/source/io_formats/geometry.rst b/docs/source/io_formats/geometry.rst index 94511842d..a89bfb1e3 100644 --- a/docs/source/io_formats/geometry.rst +++ b/docs/source/io_formats/geometry.rst @@ -318,6 +318,13 @@ the following attributes or sub-elements: *Default*: None + :orientation: + The orientation of the hexagonal lattice. The string "x" indicates that two + sides of the lattice are perpendicular to the x-axis, whereas the string "y" + indicates that two sides are perpendicular to the y-axis. + + *Default*: "y" + :center: The coordinates of the center of the lattice. If the lattice does not have axial sections then only the x- and y-coordinates are specified. diff --git a/openmc/lattice.py b/openmc/lattice.py index 4f7caa20a..b2bdc8a56 100644 --- a/openmc/lattice.py +++ b/openmc/lattice.py @@ -884,6 +884,10 @@ class HexLattice(Lattice): :attr:`HexLattice.universes` property, the array indices do not correspond to natural indices. + .. versionchanged:: 0.11 + The orientation of the lattice can now be changed with the + :attr:`orientation` attribute. + Parameters ---------- lattice_id : int, optional @@ -1295,7 +1299,7 @@ class HexLattice(Lattice): self._outer.create_xml_subelement(xml_element) lattice_subelement.set("n_rings", str(self._num_rings)) - # If orientation is "OX" export it to XML + # If orientation is "x" export it to XML if self._orientation == 'x': lattice_subelement.set("orientation", "x")