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'}, 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'}) – 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