Capillary End Effects in Reservoirs with Heterogeneous Wettability