openmc.Plane

class openmc.Plane(a=1.0, b=0.0, c=0.0, d=0.0, boundary_type='transmission', name='', surface_id=None, **kwargs)[source]

An arbitrary plane of the form \(Ax + By + Cz = D\).

Parameters:
  • a (float, optional) – The ‘A’ parameter for the plane. Defaults to 1.
  • b (float, optional) – The ‘B’ parameter for the plane. Defaults to 0.
  • c (float, optional) – The ‘C’ parameter for the plane. Defaults to 0.
  • d (float, optional) – The ‘D’ parameter for the plane. Defaults to 0.
  • boundary_type ({'transmission, 'vacuum', 'reflective', '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.
  • name (str, optional) – Name of the plane. If not specified, the name will be the empty string.
  • surface_id (int, optional) – Unique identifier for the surface. If not specified, an identifier will automatically be assigned.
Variables:
  • a (float) – The ‘A’ parameter for the plane
  • b (float) – The ‘B’ parameter for the plane
  • c (float) – The ‘C’ parameter for the plane
  • d (float) – The ‘D’ parameter for the plane
  • boundary_type ({'transmission, 'vacuum', 'reflective', 'white'}) – Boundary condition that defines the behavior for particles hitting the surface.
  • periodic_surface (openmc.Surface) – If a periodic boundary condition is used, the surface with which this one is periodic with
  • 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
evaluate(point)[source]

Evaluate the surface equation at a given point.

Parameters:point (3-tuple of float) – The Cartesian coordinates, \((x',y',z')\), at which the surface equation should be evaluated.
Returns:\(Ax' + By' + Cz' - D\)
Return type:float
classmethod from_points(p1, p2, p3, **kwargs)[source]

Return a plane given three points that pass through it.

Parameters:
  • p2, p3 (p1,) – Points that pass through the plane
  • kwargs (dict) – Keyword arguments passed to the Plane constructor
Returns:

Plane that passes through the three points

Return type:

Plane

to_xml_element()[source]

Return XML representation of the surface

Returns:element – XML element containing source data
Return type:xml.etree.ElementTree.Element
translate(vector)[source]

Translate surface in given direction

Parameters:vector (iterable of float) – Direction in which surface should be translated
Returns:Translated surface
Return type:openmc.Plane