  We examine the effects of horizontally layered heterogeneities on the
spreading of two-phase gravity currents in a porous medium, with application to
numerous environmental flows, most notably geological carbon sequestration.
Geological heterogeneities, which are omnipresent within all reservoirs, affect
the large-scale propagation of such flows through the action of small-scale
capillary forces, yet the relationship between these small and large scales is
poorly understood. Here, we derive a simple upscaled model for a gravity
current under an impermeable cap rock, which we use to investigate the effect
of a wide range of heterogeneities on the macroscopic flow. By parameterising
in terms of different types of archetypal layering, we assess the sensitivity
of the gravity current to the distribution and magnitude of these
heterogeneities. Furthermore, since field measurements of heterogeneities are
often sparse or incomplete, we quantify how uncertainty in such measurements is
manifest as uncertainty in the macroscale flow predictions. Finally we apply
our model to the Sleipner case study in the North Sea, positing how
heterogeneities may have played a role in the observed migration of CO2.
