openmc.XTorus¶

class openmc.XTorus(x0=0.0, y0=0.0, z0=0.0, a=0.0, b=0.0, c=0.0, **kwargs)[source]

A torus of the form $$(x - x_0)^2/B^2 + (\sqrt{(y - y_0)^2 + (z - z_0)^2} - A)^2/C^2 - 1 = 0$$.

New in version 0.13.0.

Parameters
• x0 (float) – x-coordinate of the center of the axis of revolution in [cm]

• y0 (float) – y-coordinate of the center of the axis of revolution in [cm]

• z0 (float) – z-coordinate of the center of the axis of revolution in [cm]

• a (float) – Major radius of the torus in [cm]

• b (float) – Minor radius of the torus in [cm] (parallel to axis of revolution)

• c (float) – Minor radius of the torus in [cm] (perpendicular to axis of revolution)

• kwargs (dict) – Keyword arguments passed to the Surface constructor

Variables
• x0 (float) – x-coordinate of the center of the axis of revolution in [cm]

• y0 (float) – y-coordinate of the center of the axis of revolution in [cm]

• z0 (float) – z-coordinate of the center of the axis of revolution in [cm]

• a (float) – Major radius of the torus in [cm]

• b (float) – Minor radius of the torus in [cm] (parallel to axis of revolution)

• c (float) – Minor radius of the torus in [cm] (perpendicular to axis of revolution)

• 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')$$, at which the surface equation should be evaluated.

Returns

Evaluation of the surface polynomial at point $$(x',y',z')$$

Return type

float