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

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