From 7eae7a629d5599f5f157ebf28aa6f9faf89583ba Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 4 May 2016 11:32:23 -0600 Subject: [PATCH] Add nuclides and elements properties on openmc.Material --- openmc/material.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/openmc/material.py b/openmc/material.py index c617015a3..ff690aa9a 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -50,6 +50,14 @@ class Material(object): Units used for `density`. Can be one of 'g/cm3', 'g/cc', 'kg/cm3', 'atom/b-cm', 'atom/cm3', 'sum', or 'macro'. The 'macro' unit only applies in the case of a multi-group calculation. + elements : collections.OrderedDict + Dictionary whose keys are element names and values are 3-tuples + consisting of an :class:`openmc.Element` instance, the percent density, + and the percent type (atom or weight fraction). + nuclides : collections.OrderedDict + Dictionary whose keys are nuclide names and values are 3-tuples + consisting of an :class:`openmc.Nuclide` instance, the percent density, + and the percent type (atom or weight fraction). """ @@ -187,6 +195,14 @@ class Material(object): def density_units(self): return self._density_units + @property + def elements(self): + return self._elements + + @property + def nuclides(self): + return self._nuclides + @property def convert_to_distrib_comps(self): return self._convert_to_distrib_comps