openmc.stats.Maxwell

class openmc.stats.Maxwell(theta, bias: Univariate | None = None)[source]

Maxwellian distribution in energy.

The Maxwellian distribution in energy is characterized by a single parameter \(\theta\) and has a density function \(p(E) dE = c \sqrt{E} e^{-E/\theta} dE\).

Parameters:
  • theta (float) – Effective temperature for distribution in eV

  • bias (openmc.stats.Univariate, optional) – Distribution for biased sampling.

Variables:
  • theta (float) – Effective temperature for distribution in eV

  • support (tuple of float) – A 2-tuple (lower, upper) defining the interval over which the distribution is nonzero-valued

  • bias (openmc.stats.Univariate or None) – Distribution for biased sampling

evaluate(E)[source]

Evaluate the probability density at the provided value.

Parameters:

x (float or sequence of float) – Location to evaluate p(x)

Returns:

Value of p(x)

Return type:

float or numpy.ndarray

classmethod from_xml_element(elem: Element)[source]

Generate Maxwellian distribution from an XML element

Parameters:

elem (lxml.etree._Element) – XML element

Returns:

Maxwellian distribution generated from XML element

Return type:

openmc.stats.Maxwell

property support

Return the support of the probability distribution.

Returns:

Returns the set of unique points assigned probability mass in a discrete distribution, the sampling interval for a continuous distribution, or a dictionary storing the discrete and continuous parts of the support of a mixed random variable

Return type:

set or tuple of float or dict

to_xml_element(element_name: str)[source]

Return XML representation of the Maxwellian distribution

Parameters:

element_name (str) – XML element name

Returns:

element – XML element containing Maxwellian distribution data

Return type:

lxml.etree._Element