openmc.SourceParticle

class openmc.SourceParticle(r: Iterable[float] = (0.0, 0.0, 0.0), u: Iterable[float] = (0.0, 0.0, 1.0), E: float = 1000000.0, time: float = 0.0, wgt: float = 1.0, delayed_group: int = 0, surf_id: int = 0, particle: ParticleType = ParticleType.NEUTRON)[source]

Source particle

This class can be used to create source particles that can be written to a file and used by OpenMC

Parameters
  • r (iterable of float) – Position of particle in Cartesian coordinates

  • u (iterable of float) – Directional cosines

  • E (float) – Energy of particle in [eV]

  • time (float) – Time of particle in [s]

  • wgt (float) – Weight of the particle

  • delayed_group (int) – Delayed group particle was created in (neutrons only)

  • surf_id (int) – Surface ID where particle is at, if any.

  • particle (ParticleType) – Type of the particle

to_tuple() tuple[source]

Return source particle attributes as a tuple

Returns

Source particle attributes

Return type

tuple