q_O = q_{Oo} + q_{Og}



q_G = q_{Gg} + q_{Go}



q_W = q_{Ww}



Following the definition of Solution GOR (Rs) and Vaporized Oil Ratio (Rv) :


R_s = q_{Go}/q_{Oo}



R_v = q_{Og}/q_{Gg}


so that:


q_O = q_{Oo} + R_v \, q_{Gg}



q_G = q_{Gg} + R_s \, q_{Oo}



q_W = q_{Ww}



Following the definition of Oil formation volume factor (Bo) , Gas formation volume factor (Bg) and Water formation volume factor (Bw):


q_{Oo}= \frac{q_o}{B_o}



q_{Gg} = \frac{q_g}{B_g}



q_{Ww} = \frac{q_w}{B_w}


so that:


q_O = \frac{q_o}{B_o} + R_v \,\frac{q_g}{B_g}



q_G = \frac{q_g}{B_g} + R_s \, \frac{q_o}{B_o}



q_W = \frac{q_w}{B_w}


and solving the above system of equations leads to:


q_o = \frac{B_o \cdot (q_O - R_v \, q_G)}{1- R_v \, R_s}



q_o = \frac{B_o \cdot (q_G - R_s \, q_O)}{1- R_v \, R_s}



q_w = B_w \cdot q_w