openmc.YCylinder

class openmc.YCylinder(x0=0.0, z0=0.0, r=1.0, *args, **kwargs)[source]

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

Parameters
  • x0 (float, optional) – x-coordinate for the origin of the Cylinder in [cm]. Defaults to 0

  • z0 (float, optional) – z-coordinate for the origin of the Cylinder in [cm]. Defaults to 0

  • r (float, optional) – Radius of the cylinder in [cm]. Defaults to 1.

  • 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.

  • albedo (float, optional) – Albedo of the surfaces as a ratio of particle weight after interaction with the surface to the initial weight. Values must be positive. Only applicable if the boundary type is ‘reflective’, ‘periodic’, or ‘white’.

  • name (str, optional) – Name of the cylinder. 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
  • x0 (float) – x-coordinate for the origin of the Cylinder in [cm]

  • z0 (float) – z-coordinate for the origin of the Cylinder in [cm]

  • r (float) – Radius of the cylinder in [cm]

  • boundary_type ({'transmission, 'vacuum', 'reflective', 'white'}) – Boundary condition that defines the behavior for particles hitting the surface.

  • albedo (float) – Boundary albedo as a positive multiplier of particle weight

  • 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

evaluate(point)[source]

Evaluate the surface equation at a given point.

Parameters

point (3-tuple of float) – The Cartesian coordinates, \((x',y',z')\), in [cm] at which the surface equation should be evaluated.

Returns

\(Ax'^2 + By'^2 + Cz'^2 + Dx'y' + Ey'z' + Fx'z' + Gx' + Hy' + Jz' + K = 0\)

Return type

float