relativistic_energy

plasmapy.formulary.relativity.relativistic_energy(m: Unit("kg"), v: Unit("m / s")) -> Unit("J")

Calculate the relativistic energy (in Joules) of an object of mass m and velocity v.

\[E = \gamma m c^{2}\]

where \(\gamma\) is the Lorentz_factor.

Parameters:
  • m (Quantity) – The mass in units convertible to kilograms.
  • v (Quantity) – The velocity in units convertible to meters per second.
Returns:

The relativistic energy (in Joules) of an object of mass m moving at velocity v.

Return type:

Quantity

Raises:
Warns:

UnitsWarning – If units are not provided, SI units are assumed.

Examples

>>> from astropy import units as u
>>> velocity = 1.4e8 * u.m / u.s
>>> mass = 1 * u.kg
>>> relativistic_energy(mass, velocity)
<Quantity 1.01638929e+17 J>
>>> relativistic_energy(mass, 299792458*u.m / u.s)
<Quantity inf J>
>>> relativistic_energy(1 * u.mg, 1.4e8 * u.m / u.s)
<Quantity 1.01638929e+11 J>
>>> relativistic_energy(-mass, velocity)
Traceback (most recent call last):
    ...
ValueError: The argument 'm' to function relativistic_energy() can not contain negative numbers.