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)
bounding_box (2-tuple of numpy.array) –
Lower-left and upper-right coordinates of an axis-aligned bounding box of the universe.
New in version 0.13.1.
- bounded_universe(bounding_cell_id=10000, **kwargs)[source]¶
Returns an openmc.Universe filled with this DAGMCUniverse and bounded with a cell. Defaults to a box cell with a vacuum surface however this can be changed using the kwargs which are passed directly to DAGMCUniverse.bounding_region().
- Parameters
bounding_cell_id (int) – The cell ID number to use for the bounding cell, defaults to 10000 to reduce the chance of overlapping ID numbers with the DAGMC geometry.
- Returns
Universe instance
- Return type
- bounding_region(bounded_type='box', boundary_type='vacuum', starting_id=10000)[source]¶
Creates a either a spherical or box shaped bounding region around the DAGMC geometry.
New in version 0.13.1.
- Parameters
bounded_type (str) – The type of bounding surface(s) to use when constructing the region. Options include a single spherical surface (sphere) or a rectangle made from six planes (box).
boundary_type (str) – Boundary condition that defines the behavior for particles hitting the surface. Defaults to vacuum boundary condition. Passed into the surface construction.
starting_id (int) – Starting ID of the surface(s) used in the region. For bounded_type ‘box’, the next 5 IDs will also be used. Defaults to 10000 to reduce the chance of an overlap of surface IDs with the DAGMC geometry.
- Returns
Region instance
- Return type
- 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.
- 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
- 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