q_O = q_{Oo} + q_{Og}



q_G = q_{Gg} + q_{Go}



q_W = q_{Ww}



\begin{cases}
q_O = q_{Oo} + q_{Og}
\\
q_G = q_{Gg} + q_{Go}
\\
q_W = q_{Ww}
\end{cases}

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

\begin{cases}
R_s = q_{Go}/q_{Oo}
\\
R_v = q_{Og}/q_{Gg}
\end{cases}

so that:

\begin{cases}
q_O = q_{Oo} + R_v \, q_{Gg}
\\
q_G = q_{Gg} + R_s \, q_{Oo}
\\
q_W = q_{Ww}
\end{cases}


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

\begin{cases}
q_{Oo}= \frac{q_o}{B_o}
\\
q_{Gg} = \frac{q_g}{B_g}
\\
q_{Ww} = \frac{q_w}{B_w}
\end{cases}

so that:

\begin{cases}
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}
\end{cases}

and solving the above system of equations leads to:

\begin{cases}
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
\end{cases}