Effects of heterogeneities on capillary pressure–saturation–relative permeability relationships