Simulation of capillary-dominated displacements in microtomographic images of reservoir rocks