Piston rings are vital components of any internal combustion engine, and their performance affect important properties such as frictional losses, oil consumption, and wear of parts. This thesis deals with the lubrication of piston rings from a theoretical point of view. Predictions are made using numerical models implemented as computer programs. The classical Reynolds equation can be used to calculate the pressure distribution in thin films of fluid. In relation to piston ring lubrication it is, however, less straight forward to apply the Reynolds equation since the inlet (and outlet) point of the lubricated conjunction is not known before hand. In order to overcome this problem, which is the main topic of this work, two different paths are followed. First an equation for the inlet point location is derived under the assumption of steady-state running conditions. Assuming that this limitation is fulfilled in a quasi-static sense a concrete example is analyzed using the Reynolds equation. Next a free surface 2D code based on the compressible Navier–Stokes equations is developed. The main idea is to model also the oil film outside the piston ring. Through time integration the movement of the inlet point on the piston ring can be calculated. While the model based on the Reynolds equation has a shortcoming with respect to the assumption of steady-state conditions, the model based on the Navier–Stokes equations turns out to be computationally expensive. Different remedies such as implicit time stepping or combination of the Navier–Stokes equations and the Reynolds equation are examined. The text includes detailed derivations of the models that have been used, and the numerical properties are assessed by convergence studies and comparison with benchmark problems.