PO.FL.QC.YFunction(p, vrel, pb, output)

Checks and smooths the relative volumes of a constant-composition expansion (CCE) below the bubble point. Standing's Y-function, Y = (pb − p)/(p·(Vrel − 1)), is close to a straight line in pressure for a black oil, while the relative volumes themselves curve steeply and carry the lab's reading errors near the bubble point, where Vrel − 1 is small. A point well off the line is a misread volume or a wrong bubble point; a line that bends near pb says the bubble point itself is off. The function returns Y at each point below pb, the least-squares line Y = a + b·p and its R², and the relative volumes smoothed back from the line, for the report's table or a simulator deck. Points at or above pb are left out of the fit and passed through unchanged in the smoothed column.

PO.FL.QC.Hoffman(k, p, t, tb, tc, pc, output)

Checks the equilibrium ratios (K = y/x, gas over liquid mole fraction) of a separator test, a flash or a recombined sample. Hoffman, Crump and Hocott (1953) showed that log(K·p) of the components of a fluid at one pressure and temperature falls on a straight line against a characterization factor F built from each component's boiling point, critical temperature and critical pressure. A component well off the line has a wrong analysis (often the gas or liquid sample of one of the heavy fractions); a whole set that scatters says the separator was not at equilibrium or the samples are not a pair. The function returns F, log(K·p), the least-squares line and its R², and each component's deviation from the line, so a sheet can draw the plot and flag the outliers.

PO.FL.QC.Buckley(k, tc, output)

A second check of a set of equilibrium ratios (K = y/x) at one pressure and temperature: Buckley observed that log K of the components falls close to a straight line against the square of their critical temperature. It needs only the critical temperatures, so it suits a quick look at a separator or flash analysis, beside the Hoffman plot (`PO.FL.QC.Hoffman`). The function returns Tc², log K, the least-squares line and its R², and each component's deviation from the line, so a sheet can draw the plot and flag the component whose analysis is out of line.

PO.FL.QC.MaterialBalance(rs, bod, gg, rho_r, rho, output)

Checks a differential liberation (DL) report by mass. The residual oil at the end of the test, plus all the gas released on the way down, is the oil that was at each pressure stage; so the oil's density at each stage can be recomputed from the residual oil's density, the solution gas-oil ratios, the released gases' gravities and the oil formation volume factors, and compared with the density the laboratory reports. Stages where the two disagree point at a wrong gas volume, gas gravity or oil volume in the report, before the data go into a black-oil table. The function returns the recomputed density at each stage, its difference from the reported one, and the oil's mass per barrel of residual oil.

Need a custom LAMBDA? Request a Lambda