Abstract In this work, a one-dimensional, time-dependent homogeneous mathematical model is presented, which can be used for determining the pressure, temperature, and velocity distributions of two-phase flow with three components (water–oil and gas) in oil wells. The numerical solution of the mathematical model, which consists of mass, momentum, and energy conservation equations, is based on the finite difference technique in the implicit scheme. The thermodynamic and transport properties of the fluids are estimated by black oil PVT correlations. The contribution of the terms of the conservation equations to the prediction of field data is studied. As a result, it was observed that the convective terms do not affect significantly the results of the present model. However, the terms in the energy equation containing the Joule–Thomson coefficient affect sensitively the prediction of temperature, but not the prediction of pressure. Numerical results are in agreement with field data and theoretical results reported in the literature.