openmc.DAGMCUniverse

class openmc.DAGMCUniverse(filename, universe_id=None, name='', auto_geom_ids=False, auto_mat_ids=False)[source]

A reference to a DAGMC file to be used in the model.

New in version 0.13.0.

Parameters
  • filename (str) – Path to the DAGMC file used to represent this universe.

  • universe_id (int, optional) – Unique identifier of the universe. If not specified, an identifier will automatically be assigned.

  • name (str, optional) – Name of the universe. If not specified, the name is the empty string.

  • auto_geom_ids (bool) – Set IDs automatically on initialization (True) or report overlaps in ID space between CSG and DAGMC (False)

  • auto_mat_ids (bool) – Set IDs automatically on initialization (True) or report overlaps in ID space between OpenMC and UWUW materials (False)

Variables
  • id (int) – Unique identifier of the universe

  • name (str) – Name of the universe

  • filename (str) – Path to the DAGMC file used to represent this universe.

  • auto_geom_ids (bool) – Set IDs automatically on initialization (True) or report overlaps in ID space between CSG and DAGMC (False)

  • auto_mat_ids (bool) – Set IDs automatically on initialization (True) or report overlaps in ID space between OpenMC and UWUW materials (False)

create_xml_subelement(xml_element, memo=None)[source]

Add the universe xml representation to an incoming xml element

Parameters
  • xml_element (xml.etree.ElementTree.Element) – XML element to be added to

  • memo (set or None) – A set of object id’s representing geometry entities already written to the xml_element. This parameter is used internally and should not be specified by users.

Returns

Return type

None

classmethod from_hdf5(group)[source]

Create DAGMC universe from HDF5 group

Parameters

group (h5py.Group) – Group in HDF5 file

Returns

DAGMCUniverse instance

Return type

openmc.DAGMCUniverse

classmethod from_xml_element(elem)[source]

Generate DAGMC universe from XML element

Parameters

elem (xml.etree.ElementTree.Element) – <dagmc_universe> element

Returns

DAGMCUniverse instance

Return type

openmc.DAGMCUniverse