Effect of residual oil saturation on the flow through a porous medium in the neighborhood of an injection well