openmc.lib.Material¶
- class openmc.lib.Material(uid=None, new=True, index=None)[source]¶
Material stored internally.
This class exposes a material that is stored internally in the OpenMC library. To obtain a view of a material with a given ID, use the
openmc.lib.materials
mapping.- Parameters
- Variables
id (int) – ID of the material
nuclides (list of str) – List of nuclides in the material
densities (numpy.ndarray) – Array of densities in atom/b-cm
name (str) – Name of the material
temperature (float) – Temperature of the material in [K]
volume (float) – Volume of the material in [cm^3]
- get_density(units='atom/b-cm')[source]¶
Get density of a material.
- Parameters
units ({'atom/b-cm', 'g/cm3'}) – Units for density
- Returns
Density in requested units
- Return type