openmc.Lattice

class openmc.Lattice(lattice_id=None, name='')[source]

A repeating structure wherein each element is a universe.

Parameters:
  • lattice_id (int, optional) – Unique identifier for the lattice. If not specified, an identifier will automatically be assigned.
  • name (str, optional) – Name of the lattice. If not specified, the name is the empty string.
Variables:
  • id (int) – Unique identifier for the lattice
  • name (str) – Name of the lattice
  • pitch (Iterable of float) – Pitch of the lattice in each direction in cm
  • outer (openmc.Universe) – A universe to fill all space outside the lattice
  • universes (Iterable of Iterable of openmc.Universe) – A two- or three-dimensional list/array of universes filling each element of the lattice
get_all_cells()[source]

Return all cells that are contained within the lattice

Returns:cells – Dictionary whose keys are cell IDs and values are Cell instances
Return type:collections.OrderedDict
get_all_materials()[source]

Return all materials that are contained within the lattice

Returns:materials – Dictionary whose keys are material IDs and values are Material instances
Return type:collections.OrderedDict
get_all_nuclides()[source]

Return all nuclides contained in the lattice

Returns:nuclides – Dictionary whose keys are nuclide names and values are 2-tuples of (nuclide, density)
Return type:collections.OrderedDict
get_all_universes()[source]

Return all universes that are contained within the lattice

Returns:universes – Dictionary whose keys are universe IDs and values are Universe instances
Return type:collections.OrderedDict
get_unique_universes()[source]

Determine all unique universes in the lattice

Returns:universes – Dictionary whose keys are universe IDs and values are openmc.Universe instances
Return type:collections.OrderedDict