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: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)[source]

Set the temperature of a cell

Parameters:
  • T (float) – Temperature in K
  • instance (int or None) – Which instance of the cell