openmc.stats.SphericalIndependent¶
-
class
openmc.stats.
SphericalIndependent
(r, theta, phi, origin=(0.0, 0.0, 0.0))[source]¶ Spatial distribution represented in spherical coordinates.
This distribution allows one to specify coordinates whose \(r\), \(\theta\), and \(\phi\) components are sampled independently from one another and centered on the coordinates (x0, y0, z0).
Parameters: - r (openmc.stats.Univariate) – Distribution of r-coordinates in a reference frame specified by the origin parameter
- theta (openmc.stats.Univariate) – Distribution of theta-coordinates (angle relative to the z-axis) in a reference frame specified by the origin parameter
- phi (openmc.stats.Univariate) – Distribution of phi-coordinates (azimuthal angle) in a reference frame specified by the origin parameter
- origin (Iterable of float, optional) – coordinates (x0, y0, z0) of the center of the spherical reference frame for the source. Defaults to (0.0, 0.0, 0.0)
Variables: - r (openmc.stats.Univariate) – Distribution of r-coordinates in the local reference frame
- theta (openmc.stats.Univariate) – Distribution of theta-coordinates (angle relative to the z-axis) in the local reference frame
- phi (openmc.stats.Univariate) – Distribution of phi-coordinates (azimuthal angle) in the local reference frame
- origin (Iterable of float, optional) – coordinates (x0, y0, z0) of the center of the spherical reference frame. Defaults to (0.0, 0.0, 0.0)
-
classmethod
from_xml_element
(elem)[source]¶ Generate spatial distribution from an XML element
Parameters: elem (xml.etree.ElementTree.Element) – XML element Returns: Spatial distribution generated from XML element Return type: openmc.stats.SphericalIndependent
-
to_xml_element
()[source]¶ Return XML representation of the spatial distribution
Returns: element – XML element containing spatial distribution data Return type: xml.etree.ElementTree.Element