Let us consider the net energy in a unit time passing the sphere of a radius $r$, $L(r)$, or $L(m)$.
In the shell $[r,r+\text dr]$, or $[m,m+\text dm]$
If no energy generation/absorption
Eulerian picture: fixed fluid position
∂r∂L=0
Lagrange's picture: the coordinates move with mass
∂m∂L=0
In astrophysics, Lagrange's picture is usually adopted. One example is the perturbation theory.
In the perturbation theory, people usually consider a mass element with certain thermaldynamical quantities, such as $\rho$, $T$, $P$, etc. As the mass element moves, the change in each quantity can be easily characterized with its partial derivative with respect to $m$. Important applications include
Stellar pulsation
Tidal perturbation of NS/WD and the gravitational radiation (GW)
If the energy is generated by nuclear burning
dL=4πr2ρdr⋅εnuc
where $\varepsilon_\text{nuc}$ is the energy generation rate per unit mass. Then
∂m∂L=εnuc
and
ΔE=Δmc2∼Δt∫0Mεnucdm
If the energy is used to increase the internal energy and/or expand/contract a mass shell
The first law in thermodynamics requires
de+Pd(ρ1)=Tds⇒∂t∂e+P∂t∂(ρ1)=T∂t∂s
we $s$ is the specific entropy. Thus
∂m∂L=εnuc−T∂t∂s≡εnuc+εgas
For contraction, $\varepsilon\text{gas}>0$, or expansion, $\varepsilon\text{gas}<0$. Therefore, if there is no nuclear burning, $\partial L/\partial m=\varepsilon_\text{gas}$, and the total luminosity is given by
This is true for the radiation-dominated case, where
P∝ρ4/3
Finally, we have derived
L=−dtd(Eint+Eg)
simply assuming spherical symmetry, hydrostatic equilibrium in radiation-dominated fluid.
If neutrinos carry energy away, we have to somehow modify our equation
∂m∂L=εnuc+εgas−εν
Neutrinos hardly interact with matter. The typical cross section for neutrino scattering is $\sigma\nu\sim10^{-44}$ cm$^{2}$, about 20 orders of magnitude smaller than the cross section of Thomson scattering. Take the Sun as an example, the mean free path $l\text{mfp}$ of neutrinos in the Sun is
lmfp,ν=nσν1∼1019−20 cm>1 AU≫R⊙
As a result, neutrinos produced in the Sun escape without any scattering. They can be treated as an energy sink in stars.
Total Energy Conservation of a Star
The energy conservation law of the whole star is
L+Lν=−dtd(Eint+Eg+Enuc)
where the nuclear energy $E_\text{nuc}$ is given by