In general relativity, a fluid solution is an exact solution of the Einstein field equation in which the gravitational field is produced entirely by the mass, momentum, and stress density of a fluid.
In astrophysics, fluid solutions are often employed as stellar models. (It might help to think of a perfect gas as a special case of a perfect fluid.) In cosmology, fluid solutions are often used as cosmological models.
The stress–energy tensor of a relativistic fluid can be written in the form
Here
The heat flux vector and viscous shear tensor are transverse to the world lines, in the sense that
This means that they are effectively three-dimensional quantities, and since the viscous stress tensor is symmetric and traceless, they have respectively 3 and 5 linearly independent components. Together with the density and pressure, this makes a total of 10 linearly independent components, which is the number of linearly independent components in a four-dimensional symmetric rank two tensor.
Several special cases of fluid solutions are noteworthy (here speed of light c=1):
The last two are often used as cosmological models for (respectively) matter-dominated and radiation-dominated epochs. Notice that while in general it requires ten functions to specify a fluid, a perfect fluid requires only two, and dusts and radiation fluids each require only one function. It is much easier to find such solutions than it is to find a general fluid solution.
Among the perfect fluids other than dusts or radiation fluids, by far the most important special case is that of the static spherically symmetric perfect fluid solutions. These can always be matched to a Schwarzschild vacuum across a spherical surface, so they can be used as interior solutions in a stellar model. In such models, the sphere where the fluid interior is matched to the vacuum exterior is the surface of the star, and the pressure must vanish in the limit as the radius approaches . However, the density can be nonzero in the limit from below, while of course it is zero in the limit from above. In recent years, several surprisingly simple schemes have been given for obtaining all these solutions.