openmc.VolumeCalculation

class openmc.VolumeCalculation(domains, samples, lower_left=None, upper_right=None)[source]

Stochastic volume calculation specifications and results.

Parameters:
  • domains (Iterable of openmc.Cell, openmc.Material, or openmc.Universe) – Domains to find volumes of
  • samples (int) – Number of samples used to generate volume estimates
  • lower_left (Iterable of float) – Lower-left coordinates of bounding box used to sample points. If this argument is not supplied, an attempt is made to automatically determine a bounding box.
  • upper_right (Iterable of float) – Upper-right coordinates of bounding box used to sample points. If this argument is not supplied, an attempt is made to automatically determine a bounding box.
Variables:
  • ids (Iterable of int) – IDs of domains to find volumes of
  • domain_type ({'cell', 'material', 'universe'}) – Type of each domain
  • samples (int) – Number of samples used to generate volume estimates
  • lower_left (Iterable of float) – Lower-left coordinates of bounding box used to sample points
  • upper_right (Iterable of float) – Upper-right coordinates of bounding box used to sample points
  • atoms (dict) – Dictionary mapping unique IDs of domains to a mapping of nuclides to total number of atoms for each nuclide present in the domain. For example, {10: {‘U235’: 1.0e22, ‘U238’: 5.0e22, …}}.
  • atoms_dataframe (pandas.DataFrame) – DataFrame showing the estimated number of atoms for each nuclide present in each domain specified.
  • volumes (dict) – Dictionary mapping unique IDs of domains to estimated volumes in cm^3.
classmethod from_hdf5(filename)[source]

Load stochastic volume calculation results from HDF5 file.

Parameters:filename (str) – Path to volume.h5 file
Returns:Results of the stochastic volume calculation
Return type:openmc.VolumeCalculation
load_results(filename)[source]

Load stochastic volume calculation results from an HDF5 file.

Parameters:filename (str) – Path to volume.h5 file
to_xml_element()[source]

Return XML representation of the volume calculation

Returns:element – XML element containing volume calculation data
Return type:xml.etree.ElementTree.Element