PO.FL.QC.MaterialBalance
Description
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.
Formula
=LAMBDA(rs, bod, gg, rho_r, rho, output, LET(
idx, (output="Calc")*1+(output="Diff")*2+(output="Mass")*3,
nn, ROWS(rs),
IF(OR(idx=0, nn<2, rho_r<=0, MIN(bod)<=0, MIN(gg)<=0, MIN(rs)<0), NA(), LET(
ix, SEQUENCE(nn), shf, (TRANSPOSE(ix)=ix-1)*1, rsp, MMULT(shf, rs)+(ix=1)*rs, rel, (rsp-rs)*gg, cum, MMULT((TRANSPOSE(ix)>ix)*1, rel), mass, rho_r*350.51+0.0764*cum, calc, mass/(bod*350.51), CHOOSE(idx, calc, calc-rho, mass)))))Parameters
| Parameter | Unit | Description |
|---|---|---|
rs |
scf/bbl | Solution gas-oil ratio of each stage per barrel of residual oil (Rsd), a column from the first stage (usually the bubble point) down to the last (atmospheric, Rsd = 0); at least 2 stages |
bod |
bbl/bbl | Relative oil volume of each stage per barrel of residual oil at 60 °F (Bod), the same column size |
gg |
— | Specific gravity (air = 1) of the gas released in reaching each stage from the one above; the first stage's is not used |
rho_r |
g/cm³ | Density of the residual oil at 60 °F (its specific gravity, to 0.1 %) |
rho |
g/cm³ | Reported oil density at each stage, the same column size |
output |
text | "Calc" recomputed density [g/cm³] (column), "Diff" recomputed less reported [g/cm³] (column), or "Mass" oil mass [lb per bbl of residual oil] (column) |
Examples
| Invocation | Expected |
|---|---|
=PO.FL.QC.MaterialBalance({768;0}, {1.474;1}, {0.855;0.855}, 0.8217189315, {0.6546;0.8217}, "Calc") |
[0.6545763277, 0.8217189315] |
=PO.FL.QC.MaterialBalance({768;0}, {1.474;1}, {0.855;0.855}, 0.8217189315, {0.6546;0.8217}, "Mass") |
[338.1879987, 288.0207027] |
=PO.FL.QC.MaterialBalance({768;628;499;374;254;141;40;0}, {1.474;1.4014;1.3341;1.2691;1.2068;1.1482;1.0957;1.06}, {0.8;0.8;0.81;0.83;0.86;0.91;1.02;1.3}, 0.8217189315, {0.66;0.675;0.69;0.71;0.73;0.745;0.76;0.775}, "Calc") |
[0.6582214524, 0.6749008086, 0.6918750514, 0.7094920143, 0.7274792899, 0.745086524, 0.7602932125, 0.7752065392] |
=PO.FL.QC.MaterialBalance({768;628;499;374;254;141;40;0}, {1.474;1.4014;1.3341;1.2691;1.2068;1.1482;1.0957;1.06}, {0.8;0.8;0.81;0.83;0.86;0.91;1.02;1.3}, 0.8217189315, {0.66;0.675;0.69;0.71;0.73;0.745;0.76;0.775}, "Diff") |
[-0.001778547615, -9.919137286E-05, 0.001875051393, -0.0005079857283, -0.002520710127, 8.652405786E-05, 0.0002932124562, 0.0002065391509] |
=PO.FL.QC.MaterialBalance({768;628;499;374;254;141;40;0}, {1.474;1.4014;1.3341;1.2691;1.2068;1.1482;1.0957;1.06}, {0.8;0.8;0.81;0.83;0.86;0.91;1.02;1.3}, 0.8217189315, {0.66;0.675;0.69;0.71;0.73;0.745;0.76;0.775}, "Mass") |
[340.0712587, 331.5144587, 323.5314227, 315.6049227, 307.7204427, 299.8642307, 291.9935027, 288.0207027] |
=IF(ISNA(PO.FL.QC.MaterialBalance({768;0}, {1.474;1}, {0.855;0.855}, 0.8217189315, {0.6546;0.8217}, "Density")), 1, 0) |
1 |