This article presents a cavitation model based on the Stokes equation for numerical simulation of hydrodynamic lubrication. The authors formulate adaptive finite element methods for solving the model, deriving a posteriori error estimates and adaptive algorithms. Numerical examples illustrate the theory and compare results to the simplified Reynolds model of lubrication.