Studies on foam in porous media and the effect of oil