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. Mathematical definition The stress–energy tensor of a relativistic fluid can be written in the form Here the world lines of the fluid elements are the integral curves of the velocity vector , the projection tensor projects other tensors onto hyperplane elements orthogonal to , the matter density is given by the scalar function , the pressure is given by the scalar function , the heat flux vector is given by , the viscous shear tensor is given by . 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 three and five 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. Special cases Several special cases of fluid solutions are noteworthy (here speed of light c = 1): A perfect fluid has vanishing viscous shear and vanishing heat flux: A dust is a pressureless perfect fluid: A radiation fluid is a perfect fluid with : 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