openmc.stats.Watt

class openmc.stats.Watt(a=988000.0, b=2.249e-06)[source]

Watt fission energy spectrum.

The Watt fission energy spectrum is characterized by two parameters \(a\) and \(b\) and has density function \(p(E) dE = c e^{-E/a} \sinh \sqrt{b \, E} dE\).

Parameters
  • a (float) – First parameter of distribution in units of eV

  • b (float) – Second parameter of distribution in units of 1/eV

Variables
  • a (float) – First parameter of distribution in units of eV

  • b (float) – Second parameter of distribution in units of 1/eV

classmethod from_xml_element(elem: Element)[source]

Generate Watt distribution from an XML element

Parameters

elem (lxml.etree._Element) – XML element

Returns

Watt distribution generated from XML element

Return type

openmc.stats.Watt

sample(n_samples=1, seed=None)[source]

Sample the univariate distribution

Parameters
  • n_samples (int) – Number of sampled values to generate

  • seed (int or None) – Initial random number seed.

Returns

A 1-D array of sampled values

Return type

numpy.ndarray

to_xml_element(element_name: str)[source]

Return XML representation of the Watt distribution

Parameters

element_name (str) – XML element name

Returns

element – XML element containing Watt distribution data

Return type

lxml.etree._Element