openmc.XCylinder

class openmc.XCylinder(surface_id=None, boundary_type='transmission', y0=0.0, z0=0.0, r=1.0, name='', *, R=None)[source]

An infinite cylinder whose length is parallel to the x-axis of the form \((y - y_0)^2 + (z - z_0)^2 = r^2\).

Parameters:
  • surface_id (int, optional) – Unique identifier for the surface. If not specified, an identifier will automatically be assigned.
  • boundary_type ({'transmission, 'vacuum', 'reflective'}, optional) – Boundary condition that defines the behavior for particles hitting the surface. Defaults to transmissive boundary condition where particles freely pass through the surface.
  • y0 (float, optional) – y-coordinate of the center of the cylinder. Defaults to 0.
  • z0 (float, optional) – z-coordinate of the center of the cylinder. Defaults to 0.
  • r (float, optional) – Radius of the cylinder. Defaults to 0.
  • name (str, optional) – Name of the cylinder. If not specified, the name will be the empty string.
Variables:
  • y0 (float) – y-coordinate of the center of the cylinder
  • z0 (float) – z-coordinate of the center of the cylinder
  • boundary_type ({'transmission, 'vacuum', 'reflective'}) – 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. For the x-cylinder surface, the negative half-space is unbounded in the x- direction and the positive half-space is unbounded in all directions. To represent infinity, numpy.inf is used.

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
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:\((y' - y_0)^2 + (z' - z_0)^2 - r^2\)
Return type:float
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.XCylinder