openmc.lib.Cell

class openmc.lib.Cell(uid=None, new=True, index=None)[source]

Cell stored internally.

This class exposes a cell that is stored internally in the OpenMC library. To obtain a view of a cell with a given ID, use the openmc.lib.cells mapping.

Parameters
  • uid (int or None) – Unique ID of the cell

  • new (bool) – When index is None, this argument controls whether a new object is created or a view to an existing object is returned.

  • index (int) – Index in the cells array.

Variables
  • id (int) – ID of the cell

  • fill (openmc.lib.Material or list of openmc.lib.Material) – Indicates what the region of space is filled with

  • name (str) – Name of the cell

  • num_instances (int) – Number of unique cell instances

  • bounding_box (openmc.BoundingBox) – Axis-aligned bounding box of the cell

  • translation (Iterable of float) – 3-D coordinates of the translation vector

  • rotation (Iterable of float) – The rotation matrix or angles of the universe filling the cell. This can either be a fully specified 3 x 3 rotation matrix or an Iterable of length 3 with the angles in degrees about the x, y, and z axes, respectively.

get_temperature(instance=None)[source]

Get the temperature of a cell

Parameters

instance (int or None) – Which instance of the cell

set_temperature(T, instance=None, set_contained=False)[source]

Set the temperature of a cell

Parameters
  • T (float) – Temperature in K

  • instance (int or None) – Which instance of the cell

  • set_contained (bool) – If cell is not filled by a material, whether to set the temperature of all filled cells