This is a microscopic view of what is going on. Here we have all three phases, the liquid, the fluid phase, water, gas and oil, and then the solid phase.
From the volume fraction we can define the degree of saturation and we have in particular the degree of saturation of oil, degree of saturation of water, degree of saturation of gas.
It is always the ratio between the volume of oil and the volume of the representative elementary element, and the ratio of volume of water and the representative elementary element and the volume of gas.
The sum of saturation level is equal to one.
Another relation we need is the pressure, which is the mean value of the pressure and it is given by the oil pressure, multiplied by the degree of saturation of oil, water pressure multiplied by the degree of saturation of water and gas pressure multiplied by the degree of saturation of gas.
Finally we have the effective stress, which is responsible for the deformation of the solid phase.