Build a black-oil PVT table from a separator sample
From oil gravity, gas gravity, temperature and the solution GOR, work out the bubble point, then Rs, Bo and viscosity from 500 to 5,000 psia.
- UC-PVT-003
- UC-PVT-001
Engineering use cases UC-PVT-003 (Build Black Oil PVT Table) and UC-PVT-001 (Estimate Initial Fluid Properties).
BlackOilFluid keeps the correlations consistent with each other: the bubble point, Rs, Bo and viscosity all come from one correlation set (OilCorrelationOptions.Default unless you pass another). WithCorrelations or an OilPresets entry swaps the set as a whole.
Above the bubble point Rs stays at its bubble-point value and Bo falls with pressure through the oil's compressibility; below it gas comes out of solution, so Rs and Bo fall together and the viscosity rises. A table that shows Rs still rising above Pb has the bubble point wrong.
Units are field: °API, gas gravity against air, °F, psia, scf/STB, rb/STB and cP. The temperature is the reservoir's, not the separator's.
Source
using System;
using System.Linq;
using Team76.Engineering.PVT.Facades;
public class S : ICalcScript
{
public ScriptResult Run(ICalcContext ctx)
{
// 35 °API oil, 0.75 gas gravity, 200 °F; 750 scf/STB in solution at the bubble point.
var oil = new BlackOilFluid(apiGravity: 35, gasGravity: 0.75, temperature: 200);
var pb = oil.CalculateBubblePoint(750);
// Rs, Bo and viscosity from 500 to 5,000 psia, the bubble point among the rows.
var table = oil.GenerateTable(500, 5000, points: 10)
.Select(p => new object[]
{
Math.Round(p.Pressure.Psi), Math.Round(p.Rs.ScfPerStb), Math.Round(p.Bo.BblPerStb, 4),
Math.Round(p.Viscosity.CP, 3), p.IsSaturated ? "saturated" : "undersaturated",
})
.ToList();
return ctx.Result()
.Set("Bubble point (psia)", Math.Round(pb.Psi))
.Set("PVT", new ScriptTable(["P (psia)", "Rs (scf/STB)", "Bo (rb/STB)", "μo (cP)", "state"], table));
}
}