Simulation of three-phase displacement mechanisms using a 2D lattice-Boltzmann model