PO.ESP.Head.FromPressure.SI(P, SG)

Converts pressure to head using fluid specific gravity (SI units), [m].

PO.ESP.Head.ToPressure.SI(H, SG)

Converts head to pressure using fluid specific gravity (SI units), [kPa].

PO.ESP.Head.Static.SI(TVD, SG)

Calculates static head from vertical depth (SI units), [m].

PO.ESP.Head.PressureAtDepth.SI(P_surface, TVD, SG)

Calculates pressure at depth given surface pressure (SI units), [kPa].

PO.ESP.TDH.SI(TVD_pump, WHP, PIP, friction_head, SG)

Calculates Total Dynamic Head for ESP sizing (SI units), [m].

PO.ESP.TDH.Full.SI(TVD_pump, WHP, P_res, PI, Q, submergence, friction_head, SG)

Extended TDH calculation with IPR-based PIP (SI units), [m].

PO.ESP.TDH.NetLift.SI(TVD_pump, DFL)

Calculates net vertical lift (pump depth minus fluid level) (SI units), [m].

PO.ESP.HydraulicHP.SI(Q, TDH, SG)

Calculates theoretical hydraulic horsepower (bbl/d basis) (SI units), [kW].

PO.ESP.HydraulicHP.GPM.SI(Q, TDH, SG)

Calculates theoretical hydraulic horsepower (gpm basis) (SI units), [kW].

PO.ESP.BrakeHP.SI(HP_hyd, efficiency)

Calculates brake horsepower accounting for pump efficiency (SI units), [kW].

PO.ESP.BrakeHP.FromRate.SI(Q, TDH, SG, efficiency)

Calculates brake horsepower directly from rate and head (SI units), [kW].

PO.ESP.Stages.SI(TDH, head_per_stage)

Calculates required number of pump stages (rounded up) (SI units), [stages].

PO.ESP.Stages.Actual.SI(TDH, head_per_stage)

Returns exact (non-rounded) stage count for sensitivity analysis (SI units), [stages].

PO.ESP.Pump.TotalHead.SI(stages, head_per_stage)

Calculates total head from number of stages (SI units), [m].

PO.ESP.Pump.TotalPower.SI(stages, power_per_stage)

Calculates total power from number of stages (SI units), [kW].

PO.ESP.Pump.Efficiency.SI(HP_hyd, BHP)

Calculates pump efficiency from hydraulic and brake HP (SI units), [fraction].

PO.ESP.Pump.Pdis.SI(PIP, stages, head_per_stage, SG)

Calculates pump discharge pressure (SI units), [kPa].

PO.ESP.Gas.Qg.Free.SI(Qo, GOR, Rs, Bg)

Calculates free gas rate at pump intake conditions (SI units), [m3/d].

PO.ESP.Gas.Ql.Total.SI(Qo, Qw, Bo, Bw)

Calculates total liquid rate at pump intake (SI units), [m3/d].

PO.ESP.Gas.Void.SI(Qg_intake, Ql_intake)

Calculates gas void fraction at pump intake (SI units), [fraction].

PO.ESP.Gas.Void.Full.SI(Qo, Qw, GOR, Rs, Bo, Bw, Bg)

Complete gas void fraction calculation from field data (SI units), [fraction].

PO.ESP.Gas.RhoMix.SI(Rho_l, Rho_g, lambda_g)

Calculates gas-liquid mixture density (SI units), [kg/m3].

PO.ESP.Gas.Turpin.Factor.SI(P_intake, Pb)

Calculates Turpin gas handling factor (SI units), [dimensionless].

PO.ESP.Gas.Sep.Eff.SI(Ql, lambda_g, separator_type)

Estimates rotary gas separator efficiency (SI units), [fraction].

PO.ESP.Curve.Head.SI(Q, curve_Q, curve_Head)

Interpolates head from pump performance curve (SI units), [m/stage].

PO.ESP.Curve.Efficiency.SI(Q, curve_Q, curve_Eff)

Interpolates efficiency from pump performance curve (SI units), [fraction].

PO.ESP.Curve.Power.SI(Q, curve_Q, curve_HP)

Interpolates power per stage from pump curve (SI units), [kW].

PO.ESP.Curve.BEP.SI(curve_Q, curve_Eff)

Returns Best Efficiency Point flow rate from pump curve (SI units), [m3/d].

PO.ESP.Curve.BEP.Eff.SI(curve_Q, curve_Eff)

Returns maximum efficiency value from pump curve (SI units), [fraction].

PO.ESP.Affinity.Rate(q, f, f_base)

Pump rate at a new speed from the rate at the base frequency, by the affinity laws. q(f) = q × f / f_base. Any rate unit works; the result is in the same unit.

PO.ESP.Affinity.Head(h, f, f_base)

Pump head at a new speed from the head at the base frequency, by the affinity laws. h(f) = h × (f / f_base)². Any head unit works; the result is in the same unit.

PO.ESP.Affinity.Power(p, f, f_base)

Pump brake power at a new speed from the power at the base frequency, by the affinity laws. p(f) = p × (f / f_base)³. Any power unit works; the result is in the same unit.

PO.ESP.Curve.HeadAtSpeed(q, f, f_base, curve_q, curve_head)

Head per stage at a rate and a frequency, from a pump curve published at the base frequency. The rate is moved back to the base frequency, q × f_base / f, the curve is read there with PO.ESP.Curve.Head, and the head is moved forward with the affinity law (f / f_base)². Past the curve's run-out the result is 0, which keeps a tabulated operating-point solve monotone.

PO.ESP.Curve.PowerAtSpeed(q, f, f_base, curve_q, curve_hp)

Brake power per stage on water at a rate and a frequency, from a pump curve published at the base frequency. The rate is moved back to the base frequency, the curve is read with PO.ESP.Curve.Power, and the power is moved forward with (f / f_base)³. Multiply by the fluid specific gravity for another fluid. Past run-out the result is #N/A.

PO.ESP.Viscosity.Head.Corr.SI(H_water, C_H)

Applies viscosity correction to head (SI units), [m].

PO.ESP.Viscosity.Rate.Corr.SI(Q_water, C_Q)

Applies viscosity correction to flow rate (SI units), [m3/h].

PO.ESP.Motor.RequiredHP.SI(BHP, safety_factor)

Calculates minimum motor horsepower with safety factor (SI units), [kW].

PO.ESP.Motor.Amps.SI(HP, voltage, efficiency, power_factor)

Calculates motor current draw (3-phase) (SI units), [A].

PO.ESP.Motor.Amps.FromNameplate.SI(HP, V_nameplate, I_nameplate, V_actual, load_fraction)

Calculates current from motor nameplate data (SI units), [A].

PO.ESP.Motor.LoadFactor.SI(BHP_required, motor_rating)

Calculates motor load as fraction of rating (SI units), [dimensionless].

PO.ESP.Motor.Temp.Rise.SI(T_fluid, HP, Q, motor_OD)

Estimates motor temperature at operating conditions (SI units), [degC].

PO.ESP.Motor.Qcool.SI(motor_OD, casing_ID)

Calculates minimum flow rate for motor cooling (1 ft/s past the motor housing) (SI units), [m3/d].

PO.ESP.Cable.Resistance.SI(AWG, T, material)

Returns cable resistance at temperature (SI units), [ohm/km].

PO.ESP.Cable.Vdrop.SI(I, length, R)

Calculates voltage drop in ESP cable (3-phase) (SI units), [V].

PO.ESP.Cable.Vdrop.Full.SI(HP, V_motor, efficiency, PF, AWG, length, T)

Complete voltage drop calculation (SI units), [V].

PO.ESP.Cable.MinSize.SI(I, length, V_drop_max, T)

Determines minimum cable size for voltage drop limit (SI units), [AWG].

PO.ESP.Cable.PowerLoss.SI(I, length, R)

Calculates power loss in cable (SI units), [kW].

PO.ESP.Cable.PowerLoss.Pct.SI(P_loss, HP)

Calculates power loss as percentage of motor power (SI units), [%].

PO.ESP.Cable.Temperature.SI(T_ambient, I, AWG)

Estimates cable temperature with current (SI units), [degC].

PO.ESP.System.Hfric.SI(Q, tubing_ID, tubing_length, SG)

Simplified friction head calculation (SI units), [m].

PO.ESP.Nodal.AOF.SI(P_res, PI, Pb)

Calculates Absolute Open Flow potential (SI units), [m3/d].

PO.ESP.Nodal.Drawdown.SI(Q, PI)

Calculates drawdown at given production rate (SI units), [kPa].

PO.ESP.Nodal.Submergence.SI(PIP, SG)

Calculates submergence above pump intake (SI units), [m].

PO.GL.Valve.Pdome.SI(Pd_s, Ts, Td)

Calculates dome pressure at depth from surface dome pressure (SI units), [kPa].

PO.GL.Valve.TRO.SI(Pd, Td, R)

Calculates test rack opening pressure at 60°F (SI units), [kPa].

PO.GL.Valve.Pvc.SI(Pd, R)

Calculates valve closing pressure (SI units), [kPa].

PO.GL.Valve.Spread.SI(Pvo, Pvc)

Calculates valve spread (opening minus closing pressure) (SI units), [kPa].

PO.GL.Valve.ThornhillCraver.SI(Cd, Ap, P1, P2, SG, T)

Calculates gas throughput using Thornhill-Craver equation (SI units), [m3/d].

PO.GL.Inj.Pd.SI(Ps, D, G)

Calculates injection gas pressure at depth (SI units), [kPa].

PO.GL.Inj.Grad.SI(SG, P, T, Z)

Calculates gas gradient in the annulus (SI units), [kPa/m].

PO.GL.Inj.Qgi.SI(GLRt, GLRf, Ql)

Calculates required gas injection rate for target GLR (SI units), [m3/d].

PO.GL.Inj.Eff.SI(GLRf, Qg, Ql)

Calculates total GLR including formation and injected gas (SI units), [sm3/sm3].

PO.RP.Pump.Displacement.SI(Ap, Sp, N)

Calculates theoretical pump displacement (SI units), [m3/d].

PO.RP.Pump.Displacement.FromDiameter.SI(d, Sp, N)

Calculates theoretical pump displacement from plunger diameter (SI units), [m3/d].

PO.RP.Pump.Disp.Eff.SI(PD, F)

Calculates effective pump displacement accounting for fillage (SI units), [m3/d].

PO.RP.Pump.Fillage.SI(Qa, PD)

Calculates pump fillage from actual and theoretical production (SI units), [fraction].

PO.RP.Pump.VolEff.SI(Qa, PD)

Calculates volumetric efficiency of the pump system (SI units), [fraction].

PO.RP.Pump.Stroke.Eff.SI(S, dLr, dLt)

Calculates effective plunger stroke from surface stroke and stretch (SI units), [cm].

PO.RP.Pump.Psub.SI(h, G)

Calculates submergence pressure from fluid column height (SI units), [kPa].

PO.RP.Pump.PIP.SI(Pwf, Psub)

Calculates pump intake pressure (PIP) (SI units), [kPa].

PO.RP.Fluidlevel.Echo(t_echo, v_acoustic, joints, joint_len, pump_depth, output)

The depth of the liquid level in the casing annulus from an acoustic (echometer) shot, and the submergence of the pump below it. A pressure pulse fired at the casinghead travels down the gas column, reflects off the liquid and returns: the level is half the round trip, v·t/2, at the acoustic velocity of the annulus gas. When the tubing collars' echoes are counted down to the liquid echo, the level is the joints counted times the average joint length instead, and the velocity the level implies (2·level/t) checks the gas. A pump with little fluid over it is pumped off; one with much is under-pumped.

PO.RP.Rod.Wair.SI(Ar, L)

Calculates rod string weight in air (SI units), [N].

PO.RP.Rod.Wbuoy.SI(Wair, SG)

Calculates buoyant rod string weight (weight in fluid) (SI units), [N].

PO.RP.Rod.Area.SI(d)

Calculates rod cross-sectional area from diameter (SI units), [cm2].

PO.RP.Rod.Wft.SI(d)

Calculates rod weight per foot for a given diameter (SI units), [kg/m].

PO.RP.Rod.Stretch.FluidLoad.SI(Fo, L, Ar)

Calculates rod stretch due to fluid load (SI units), [cm].

PO.RP.Rod.Stretch.RodWeight.SI(Wair, L, Ar)

Calculates rod stretch due to rod weight (self-weight stretch) (SI units), [cm].

PO.RP.Rod.Stretch.Total.SI(Fo, Wair, L, Ar)

Calculates total static rod stretch (fluid load + self-weight) (SI units), [cm].

PO.RP.Rod.MaxStress.SI(PPRL, Ar)

Calculates maximum rod stress from peak load (SI units), [kPa].

PO.RP.Rod.MinStress.SI(MPRL, Ar)

Calculates minimum rod stress from minimum load (SI units), [kPa].

PO.RP.Rod.StressRange.SI(smax, smin)

Calculates rod stress range (fatigue indicator) (SI units), [kPa].

PO.RP.Rod.TaperStress(t_min, s_max, s_min, sf, output)

The fatigue check of one section (taper) of a steel sucker-rod string by the API RP 11BR modified Goodman diagram. The allowable peak stress at the top of the taper rises with the minimum stress the rod sees on the downstroke: Sa = (T/4 + 0.5625·Smin)·SF, where T is the grade's minimum tensile strength and SF the service factor for the produced fluid. The function returns that allowable stress, the taper's loading, which is the stress range it carries over the range it may carry, (Smax − Smin)/(Sa − Smin), or the margin Sa − Smax. A loading above 1 (100 %) is outside the diagram: the rods are expected to fail in fatigue.

PO.RP.Load.FluidLoad.SI(Ap, H, G)

Calculates fluid load on plunger (SI units), [N].

PO.RP.Load.PPRL.SI(Wrf, F1_over_Skr, Skr)

Calculates Peak Polished Rod Load using API RP 11L method, PPRL = Wrf + (F1/Skr)*Skr (SI units), [N].

PO.RP.Load.MPRL.SI(Wrf, F2_over_Skr, Skr)

Calculates Minimum Polished Rod Load using API RP 11L method, MPRL = Wrf − (F2/Skr)*Skr (SI units), [N].

PO.RP.Load.PPRL.Simple.SI(Wrf, Fo)

Calculates simplified PPRL (static, no dynamic effects) (SI units), [N].

PO.RP.Load.MPRL.Simple.SI(Wrf)

Calculates simplified MPRL (static, no dynamic effects) (SI units), [N].

PO.RP.Load.Range.SI(PPRL, MPRL)

Calculates polished rod load range (PPRL - MPRL) (SI units), [N].

PO.RP.Torque.IdealCBE.SI(Wrf, Fo)

Calculates ideal counterbalance effect from rod weight and fluid load (SI units), [N].

PO.RP.Torque.IdealCBE.Loads.SI(PPRL, MPRL)

Calculates ideal counterbalance effect from PPRL and MPRL (SI units), [N].

PO.RP.Torque.Adjustment.SI(CBEi, CBEa)

Calculates counterbalance adjustment needed, positive = add weight (SI units), [N].

PO.RP.Torque.Net.SI(PRL, CBE, TF)

Calculates net gearbox torque at a given crank angle (SI units), [N.m].

PO.RP.Torque.Peak.SI(PPRL, MPRL, S)

Calculates estimated peak net torque (simplified) (SI units), [N.m].

PO.RP.Torque.PRHP.SI(W, S, N)

Calculates polished rod horsepower from the dynamometer card work load (SI units), [kW].

PO.PE.Plunger.Feasibility(depth, tubing_id, tubing_od, casing_id, plunger_wt, pt, slug, k, plhf, glr, pc, output)

Can a conventional plunger lift this well? Foss and Gaul (1965) worked out the casing pressure a plunger needs to bring a liquid slug to surface: enough to push the plunger's weight, the slug's head and friction and the tubing pressure, plus the friction of the gas below the plunger, which grows with depth. The function returns that minimum casing pressure at the end of the rise, the maximum the casing must reach before the plunger leaves bottom (the gas then expands from the annulus into the tubing), and the rule-of-thumb gas the well must make, 400 scf per barrel of liquid for every 1,000 ft of lift. "Go" is 1 when the well's gas-liquid ratio and the casing pressure it builds up to meet both, 0 when either falls short.

PO.PE.Plunger.Cycle(depth, liquid_ht, v_gas, v_liq, v_rise, buildup, afterflow, slug, output)

How many trips a plunger can make in a day, and the liquid it lifts. A cycle is the shut-in, the rise and the afterflow. During the shut-in the plunger falls, first through the gas in the tubing and then, more slowly, through the liquid standing above the bottom stop, while the casing builds pressure; the well can only be opened when both are done, so the shut-in is the longer of the fall and the buildup. The plunger then rises at its rise velocity and the well flows on (the afterflow) until it is shut in again. The function returns the fall and rise times, the cycle, the cycles per day and the liquid rate, the slug times the cycles.

Need a custom LAMBDA? Request a Lambda