Cosmological continuity equation (source code)

= Cosmological continuity equation
{title2=$\dot\rho+3H(\rho+P)=0$}

= Cosmological energy conservation
{synonym}

In <natural units>, conservation of the <stress-energy tensor> for a homogeneous <perfect fluid> in an <FLRW metric> gives the displayed equation for its <energy density> and <pressure>. It is equivalent to $d(\rho a^3)=-P\,d(a^3)$. For a constant <equation-of-state parameter> $w=P/\rho$, separation gives $\rho\propto a^{-3(1+w)}$. If $\rho$ instead denotes <mass density>, the pressure term is $P/c^2$.

This is local <stress-energy conservation>; it does not in general define a globally conserved total <energy> for an expanding universe. The <adiabatic work in a comoving volume> makes this distinction explicit.