PO.VFP.Ansari.Pin
Description
Calculates inlet pipe pressure using Ansari et al. (1994), [psi]. Vertical wells. Gas properties (ρg, μg, Bg) use DAK (Z-factor) and LGE (viscosity).
Syntax
=PO.VFP.Ansari.Pin(Ql, Qg, P_out, T_degF, Rho_l, Ul, SG_gas, IFT_gl, pipe_ID, pipe_length, pipe_roughness)Parameters
| Parameter | Description |
|---|---|
| Ql | Liquid rate, [bbl/D]. |
| Qg | Gas rate, [mmscf/D]. |
| P_out | Outlet pipe pressure, [psi]. |
| T_degF | Temperature at middle point of the pipe, [degF]. |
| Rho_l | Liquid density, [lb/ft3]. |
| Ul | Liquid viscosity, [cP]. |
| SG_gas | Gas specific gravity, [dimensionless]. |
| IFT_gl | Liquid-gas interfacial (surface) tension, [dynes/cm]. |
| pipe_ID | Pipe inner diameter, [in]. |
| pipe_length | Pipe length, [ft]. |
| pipe_roughness | Pipe relative roughness, [dimensionless]. |
SI Unit Version
Lambda Name
PO.VFP.Ansari.Pin.SIFormula
=LAMBDA(Ql, Qg, P_out, T, Rho_l, Ul, SG_gas, IFT_gl, pipe_ID, pipe_length, pipe_roughness, LET(
Ql_bbld, PO.UnitConverter(Ql, "m3/d", "bbl/d"),
Qg_mmscfd, PO.UnitConverter(Qg, "sm3/d", "mmscf/d"),
P_out_psi, PO.UnitConverter(P_out, "kPa", "psi"),
T_degF, PO.UnitConverter(T, "degC", "degF"),
Rho_l_lbft3, PO.UnitConverter(Rho_l, "kg/m3", "lb/ft3"),
IFT_gl_dynecm, PO.UnitConverter(IFT_gl, "mN/m", "dyne/cm"),
pipe_ID_in, PO.UnitConverter(pipe_ID, "cm", "in"),
pipe_length_ft, PO.UnitConverter(pipe_length, "m", "ft"),
result_psi, PO.VFP.Ansari.Pin(Ql_bbld, Qg_mmscfd, P_out_psi, T_degF, Rho_l_lbft3, Ul, SG_gas, IFT_gl_dynecm, pipe_ID_in, pipe_length_ft, pipe_roughness),
PO.UnitConverter(result_psi, "psi", "kPa")))SI Parameters
| Parameter | Unit | Description |
|---|---|---|
Ql |
m3/d | Liquid rate, [m3/d] |
Qg |
sm3/d | Gas rate, [sm3/d] |
P_out |
kPa | Outlet pipe pressure, [kPa] |
T |
degC | Temperature, [degC] |
Rho_l |
kg/m3 | Liquid density, [kg/m3] |
Ul |
- | Liquid viscosity, [cP] |
SG_gas |
- | Gas specific gravity, [dimensionless] |
IFT_gl |
mN/m | Liquid-gas interfacial tension, [mN/m] |
pipe_ID |
cm | Pipe inner diameter, [cm] |
pipe_length |
m | Pipe length, [m] |
pipe_roughness |
- | Pipe relative roughness, [dimensionless] |
How to save as a reusable Excel function
LAMBDA is a built-in Excel feature (Microsoft 365) that lets you create custom functions without VBA. The formula above works as-is when pasted into a cell.
To save a LAMBDA as a reusable named function:
- Go to Formulas → Name Manager → New
- Enter a name, e.g.
PO.VFP.Ansari.Pin.SI - In Refers to, paste the LAMBDA formula without the trailing invocation
(...) - Click OK
Now use =PO.VFP.Ansari.Pin.SI(...) anywhere in your workbook.