Exercise 8.1
Standing vs. Vasquez-Beggs Rs
For an OML 58 crude oil with API = 28°, γg = 0.80, T = 220°F, calculate the solution gas-oil ratio (Rs) at pressures of 1000, 2000, 3000, and 4000 psia using both Standing's Pb correlation (solved inversely for Rs) and the Vasquez-Beggs Rs correlation. Present the results in a table. At which pressures do the two correlations agree most closely? Where do they diverge, and what might explain the difference given the different datasets each was derived from?
Two correlations, two datasets, one question: at a given pressure, how much dissolved gas (Rs) is in the oil? You're working an OML 58 crude: API = 28, γg = 0.80, T = 220 °F. Because we have no separator-gas correction here, the Vasquez-Beggs corrected gravity is just gamma_gs = 0.80.
You'll predict Rs at four reservoir pressures (1000, 2000, 3000, 4000 psia) two different ways and lay them side by side.
The Vasquez-Beggs correlation is already given to you as vasquez_beggs_Rs(P, T_F, API, gamma_gs): it returns Rs directly.
Standing's correlation runs the other way: it gives bubble-point pressure from Rs. To get Rs from a pressure you invert it. Treat the target pressure P as a bubble point and solve Standing's Pb equation for Rs:
Pb = 18.2 * ((Rs/gamma_g)**0.83 * 10**(0.00091*T_F - 0.0125*API) - 1.4)Solved for Rs:
Rs = gamma_g * ((P/18.2 + 1.4) / 10**(0.00091*T_F - 0.0125*API)) ** (1/0.83)Write two functions:
rs_from_standing_pb(P, gamma_g, T_F, API): the closed-form inverse above.
It must round-trip: feeding its output back into standing_bubble_point must return P.
rs_table(pressures): for each pressure inpressures, return a dict
keyed by pressure whose value is {"rs_vb": ..., "rs_standing": ...}, using the fixed fluid properties API, gamma_g, T_F, gamma_gs defined for you. Use vasquez_beggs_Rs for rs_vb and rs_from_standing_pb for rs_standing.
Build the table over PRESSURES = [1000, 2000, 3000, 4000] and store it in table. Both Rs predictions must come out positive and must rise as pressure rises; more pressure forces more gas into solution.
Stuck? Reveal hints one at a time — they progress from nudge to near-solution.
visibilityReveal reference solutionexpand_more
Try solving it yourself first — the hints walk you through it. The solution below is one valid approach; yours may differ and still be correct.
import numpy as np
# ── Fluid properties for the OML 58 crude (fixed) ─────────────────────────
API = 28.0
gamma_g = 0.80
T_F = 220.0
gamma_gs = 0.80 # no separator correction here, so gamma_gs == gamma_g
PRESSURES = [1000.0, 2000.0, 3000.0, 4000.0]
# ── Correlations (given - do not edit) ────────────────────────────────────
def standing_bubble_point(Rs, gamma_g, T_F, API):
exponent = 0.00091 * T_F - 0.0125 * API
return 18.2 * ((Rs / gamma_g) ** 0.83 * 10 ** exponent - 1.4)
def vasquez_beggs_Rs(P, T_F, API, gamma_gs):
if API <= 30:
C1, C2, C3 = 0.0362, 1.0937, 25.724
else:
C1, C2, C3 = 0.0178, 1.187, 23.931
return C1 * gamma_gs * P ** C2 * np.exp(C3 * API / (T_F + 460))
# ── Your work ─────────────────────────────────────────────────────────────
def rs_from_standing_pb(P, gamma_g, T_F, API):
"""Closed-form inverse of Standing's Pb correlation, solved for Rs."""
exponent = 0.00091 * T_F - 0.0125 * API
return gamma_g * ((P / 18.2 + 1.4) / 10 ** exponent) ** (1.0 / 0.83)
def rs_table(pressures):
"""Return {P: {"rs_vb": ..., "rs_standing": ...}} for each pressure."""
out = {}
for P in pressures:
out[P] = {
"rs_vb": float(vasquez_beggs_Rs(P, T_F, API, gamma_gs)),
"rs_standing": float(rs_from_standing_pb(P, gamma_g, T_F, API)),
}
return out
table = rs_table(PRESSURES)
print("Rs table:", table)
lockCopying code is a Full Access feature.