Gravitational energy generation in a homologously contracting ideal-gas star (source code)

= Gravitational energy generation in a homologously contracting ideal-gas star
{title2=$\epsilon=-\frac3{2\rho}\partial_tP+\frac{5P}{2\rho^2}\partial_t\rho$}

For a <monatomic gas> obeying the <ideal gas> law, the <specific internal energy> is $e=3P/(2\rho)$. With no <stellar nuclear fusion> heating, the <first law of thermodynamics> makes the effective <stellar energy-generation rate> $\epsilon=-\partial_te-P\partial_t(1/\rho)$, with the <derivatives> taken at fixed enclosed <mass>. Differentiating gives $\epsilon=-3\partial_tP/(2\rho)+5P\partial_t\rho/(2\rho^2)$. In a fixed-mass <stellar homology> <Kelvin-Helmholtz contraction>, $\rho\propto R^{-3}$ and $P\propto R^{-4}$ at each <mass> label. Hence $\epsilon=-3P\dot R/(2\rho R)>0$ when $\dot R<0$. This includes <internal energy> storage as well as <pressure> work; using the gravitational potential-energy decrease alone would overestimate the outgoing <luminosity>.