The dynamics of oil displacement using water and gas mixtures in porous media is studied using digital rock analysis. The technology includes scanning of core samples using X-Ray micro tomography, creating of digital models for the samples, and running hydrodynamic modeling on pore scale using the density functional approach. The results include visual snapshots of phase distributions on pore scale for various time instants of oil displacement by water and water-gas mixtures. Due to WAG the displacement coefficient was increased by 5% to 10.5% for water-wet samples and by 20-21% for oil-wet samples. This effect was explained by analyzing the dynamics of oil displacement on a pore scale. The simulations also allow studying the dependency of the displacement coefficient on WAG regimes for water-wet and oil-wet media.