Contract for the perfect fluid in general relativity with . Using and gives the relativistic perfect-fluid energy equation
the local first law of thermodynamics. Project instead with to obtain the relativistic Euler equation
In the orthonormal frame, the comoving perfect fluid in general relativity has and . The Einstein field equations with cosmological constant therefore give
Thus
Choosing
gives and . The metric is then the Einstein static universe supported by pressureless matter and positive vacuum energy.
The Tolman–Oppenheimer–Volkoff equation governs a static, spherically symmetric perfect fluid in general relativity. In geometrized units, if is the mass inside areal radius , then