From 2debfc0d8a56e969c76af97ac377232a2d69e744 Mon Sep 17 00:00:00 2001 From: Mikolaj Adam Kowalski Date: Thu, 19 Mar 2020 15:40:27 +0000 Subject: [PATCH] Address comments by @paulromano --- docs/source/usersguide/geometry.rst | 10 +++++----- openmc/cell.py | 15 --------------- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/docs/source/usersguide/geometry.rst b/docs/source/usersguide/geometry.rst index f95a1ff1c..22158c821 100644 --- a/docs/source/usersguide/geometry.rst +++ b/docs/source/usersguide/geometry.rst @@ -183,13 +183,13 @@ the :class:`openmc.Cell` class:: fuel.fill = uo2 fuel.region = pellet - # This cell will be filled with void on export to XML - gap = openmc.Cell(region=pellet_gap) - In this example, an instance of :class:`openmc.Material` is assigned to the :attr:`Cell.fill` attribute. One can also fill a cell with a :ref:`universe ` or :ref:`lattice `. If no fill -is provided to a cell, it will be filled with void by default. +is provided to a cell, it will be filled with void by default:: + + # This cell will be filled with void on export to XML + gap = openmc.Cell(region=pellet_gap) The classes :class:`Halfspace`, :class:`Intersection`, :class:`Union`, and :class:`Complement` and all instances of :class:`openmc.Region` and can be @@ -459,7 +459,7 @@ calculation:: Once a volume is set, and a cell is filled with a material or distributed materials, it is possible to use the :func:`~openmc.Cell.atoms` method to obtain a dictionary of nuclides and their total number of atoms in all instances -of a cell (e.g. ``{'H1':1.0e22, 'O16':0.5e22, ...}``):: +of a cell (e.g. ``{'H1': 1.0e22, 'O16': 0.5e22, ...}``):: cell = openmc.Cell(fill = u02) cell.volume = 17.0 diff --git a/openmc/cell.py b/openmc/cell.py index 0b6bd4427..4fe7ae3a4 100644 --- a/openmc/cell.py +++ b/openmc/cell.py @@ -191,21 +191,6 @@ class Cell(IDManagerMixin): @property def atoms(self): - """ Get total number of atoms of each nuclide in the cell - - Returns - ------- - atoms: collections.OrderedDict - Dictionary in which keys are nuclides and values are the number of - atoms. For example, {'H1':1.0e22, 'O16':0.5e22, ...} - - Raises - ------ - ValueError - If total volume of the cell is not set - ValueError - If cell is filled with Universe, Lattice or Void - """ if self._atoms is None: if self._volume is None: msg = ('Cannot calculate atom content becouse no volume '