PO.IPR.GW.LIT.Fit


Description

Fits Houpeurt's laminar-inertial-turbulent (LIT) deliverability equation Pr² − Pwf² = a·q + b·q² to a gas well's multi-rate test by least squares on (Pr² − Pwf²)/q against q. It returns one number of the fit: the laminar coefficient a, the turbulent coefficient b, the fit's R², or the rate at a drawdown from the quadratic's positive root, such as the absolute open flow at Pwf = 14.7 psia. The drawdown column can be Pr² − Pwf² (psi²), or a pseudo-pressure difference m(Pr) − m(Pwf) (psi²/cp) for the m(p) form, the one that holds at any pressure. a is the Darcy part of the drawdown per unit rate, from k·h, the drainage area and the skin; b is the non-Darcy part, from the turbulence round the wellbore.

Formula

=LAMBDA(d, q, d_at, output, IF((MIN(d)<=0)+(MIN(q)<=0)+(COUNT(q)<2)+(COUNT(d)<>COUNT(q)), NA(), LET( ratio, d/q, lam, INTERCEPT(ratio, q), turb, SLOPE(ratio, q), IF(output="a", lam, IF(output="b", turb, IF(output="R2", RSQ(ratio, q), IF(output="q", IF((d_at<0)+(turb<0)+(lam<=0), NA(), IF(turb=0, d_at/lam, (SQRT((lam/2)^2+turb*d_at)-lam/2)/turb)), NA())))))))

Parameters

Parameter Unit Description
d psi² Each test's drawdown, Pr² − Pwf² (or m(Pr) − m(Pwf) in psi²/cp), a column; every value above 0
q Mscf/d Each test's stabilized gas rate, a column of the same length; every value above 0
d_at psi² The drawdown to read the rate at (for "q"): Pr² − 14.7² for the AOF; at least 0
output — "a" the laminar coefficient (psi²/(Mscf/d)), "b" the turbulent coefficient (psi²/(Mscf/d)²), "R2" the fit's R², or "q" the rate at d_at (Mscf/d)

Examples

Invocation Expected
=PO.IPR.GW.LIT.Fit({1710000;3240000;5000000;6750000}, {3090;5400;8210;10350}, 8999783.91, "a") 520.7878
=PO.IPR.GW.LIT.Fit({1710000;3240000;5000000;6750000}, {3090;5400;8210;10350}, 8999783.91, "b") 0.01225265
=PO.IPR.GW.LIT.Fit({1710000;3240000;5000000;6750000}, {3090;5400;8210;10350}, 8999783.91, "R2") 0.924482
=PO.IPR.GW.LIT.Fit({1710000;3240000;5000000;6750000}, {3090;5400;8210;10350}, 8999783.91, "q") 13188.726
=PO.IPR.GW.LIT.Fit({1020000;2080000;3180000;4320000}, {2000;4000;6000;8000}, 9000000, "a") 500
=PO.IPR.GW.LIT.Fit({1020000;2080000;3180000;4320000}, {2000;4000;6000;8000}, 9000000, "b") 0.005
=PO.IPR.GW.LIT.Fit({1020000;2080000;3180000;4320000}, {2000;4000;6000;8000}, 9000000, "q") 15574.385
=PO.IPR.GW.LIT.Fit({97770200;191765000;308629400;435220200}, {3090;5400;8210;10350}, 613556320, "q") 13437.82

Need a custom LAMBDA? Suggest a New Lambda