openmc.IndependentSource

class openmc.IndependentSource(space: Optional[Spatial] = None, angle: Optional[UnitSphere] = None, energy: Optional[Univariate] = None, time: Optional[Univariate] = None, strength: float = 1.0, particle: str = 'neutron', domains: Optional[Sequence[Union[Cell, Material, Universe]]] = None)[source]

Distribution of phase space coordinates for source sites.

New in version 0.14.0.

Parameters
Variables
  • space (openmc.stats.Spatial or None) – Spatial distribution of source sites

  • angle (openmc.stats.UnitSphere or None) – Angular distribution of source sites

  • energy (openmc.stats.Univariate or None) – Energy distribution of source sites

  • time (openmc.stats.Univariate or None) – time distribution of source sites

  • strength (float) – Strength of the source

  • type (str) – Indicator of source type: ‘independent’

  • versionadded: (..) – 0.14.0:

  • particle ({'neutron', 'photon'}) – Source particle type

  • ids (Iterable of int) – IDs of domains to use for rejection

  • domain_type ({'cell', 'material', 'universe'}) – Type of domain to use for rejection

classmethod from_xml_element(elem: Element, meshes=None) SourceBase[source]

Generate source from an XML element

Parameters
  • elem (lxml.etree._Element) – XML element

  • meshes (dict) – Dictionary with mesh IDs as keys and openmc.MeshBase instaces as values

Returns

Source generated from XML element

Return type

openmc.Source

populate_xml_element(element)[source]

Add necessary source information to an XML element :returns: element – XML element containing source data :rtype: lxml.etree._Element