Address comments by @paulromano

This commit is contained in:
Mikolaj Adam Kowalski 2020-03-19 15:40:27 +00:00
parent ec10221219
commit 2debfc0d8a
2 changed files with 5 additions and 20 deletions

View file

@ -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
<usersguide_universes>` or :ref:`lattice <usersguide_lattices>`. 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

View file

@ -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 '