  We report an approach to fully visualize the flow of two immiscible fluids
through a model three-dimensional (3D) porous medium at pore-scale resolution.
Using confocal microscopy, we directly image the drainage of the medium by the
non-wetting oil and subsequent imbibition by the wetting fluid. During
imbibition, the wetting fluid pinches off threads of oil in the narrow crevices
of the medium, forming disconnected oil ganglia. Some of these ganglia remain
trapped within the medium. By resolving the full 3D structure of the trapped
ganglia, we show that the typical ganglion size, and the total amount of
residual oil, decreases as the capillary number Ca increases; this behavior
reflects the competition between the viscous pressure in the wetting fluid and
the capillary pressure required to force oil through the pores of the medium.
This work thus shows how pore-scale fluid dynamics influence the trapped fluid
configurations in multiphase flow through 3D porous media.
