openmc.Surface¶
-
class
openmc.
Surface
(surface_id=None, boundary_type='transmission', name='')[source]¶ An implicit surface with an associated boundary condition.
An implicit surface is defined as the set of zeros of a function of the three Cartesian coordinates. Surfaces in OpenMC are limited to a set of algebraic surfaces, i.e., surfaces that are polynomial in x, y, and z.
Parameters: - surface_id (int, optional) – Unique identifier for the surface. If not specified, an identifier will automatically be assigned.
- boundary_type ({'transmission, 'vacuum', 'reflective', 'periodic', 'white'}, optional) – Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles freely pass through the surface. Note that periodic boundary conditions can only be applied to x-, y-, and z-planes, and only axis-aligned periodicity is supported.
- name (str, optional) – Name of the surface. If not specified, the name will be the empty string.
Variables: - boundary_type ({'transmission, 'vacuum', 'reflective', 'periodic', 'white'}) – Boundary condition that defines the behavior for particles hitting the surface.
- coefficients (dict) – Dictionary of surface coefficients
- id (int) – Unique identifier for the surface
- name (str) – Name of the surface
- type (str) – Type of the surface
-
bounding_box
(side)[source]¶ Determine an axis-aligned bounding box.
An axis-aligned bounding box for surface half-spaces is represented by its lower-left and upper-right coordinates. If the half-space is unbounded in a particular direction, numpy.inf is used to represent infinity.
Parameters: side ({'+', '-'}) – Indicates the negative or positive half-space Returns: - numpy.ndarray – Lower-left coordinates of the axis-aligned bounding box for the desired half-space
- numpy.ndarray – Upper-right coordinates of the axis-aligned bounding box for the desired half-space
-
clone
(memo=None)[source]¶ Create a copy of this surface with a new unique ID.
Parameters: memo (dict or None) – A nested dictionary of previously cloned objects. This parameter is used internally and should not be specified by the user. Returns: clone – The clone of this surface Return type: openmc.Surface
-
static
from_hdf5
(group)[source]¶ Create surface from HDF5 group
Parameters: group (h5py.Group) – Group in HDF5 file Returns: Instance of surface subclass Return type: openmc.Surface
-
static
from_xml_element
(elem)[source]¶ Generate surface from an XML element
Parameters: elem (xml.etree.ElementTree.Element) – XML element Returns: Instance of a surface subclass Return type: openmc.Surface
-
to_xml_element
()[source]¶ Return XML representation of the surface
Returns: element – XML element containing source data Return type: xml.etree.ElementTree.Element