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 (openmc.BoundingBox) –
Lower-left and upper-right coordinates of an axis-aligned bounding box of the universe.
New in version 0.13.1.
material_names (list of str) –
Return a sorted list of materials names that are contained within the DAGMC h5m file. This is useful when naming openmc.Material() objects as each material name present in the DAGMC h5m file must have a matching openmc.Material() with the same name.
New in version 0.13.2.
n_cells (int) –
The number of cells in the DAGMC model. This is the number of cells at runtime and accounts for the implicit complement whether or not is it present in the DAGMC file.
New in version 0.13.2.
n_surfaces (int) –
The number of surfaces in the model.
New in version 0.13.2.
- 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: str = 'box', boundary_type: str = 'vacuum', starting_id: int = 10000, padding_distance: float = 0.0)[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.
padding_distance (float) – Distance between the bounding region surfaces and the minimal bounding box. Allows for the region to be larger than 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 (lxml.etree._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