Find how much lift gas a well should take
A gas lift design end to end: the well's inflow at today's and a later reservoir pressure, its tubing at each total GLR, and the lift gas that GLR takes at the rate the well settles at. Out comes the performance curve, oil rate against lift gas, with the natural-flow rate, the economic injection rate, the rate that gives the most oil, and whether the casing can inject at the tubing shoe.
- UC-MULTI-007
- UC-GL-009
- UC-GL-005
Engineering use cases UC-MULTI-007 (Gas Lift System Design), UC-GL-009 (Optimize Injection GLR) and UC-GL-005 (Calculate Required Injection Rate).
The method is nodal analysis at the bottom of the hole, once per total GLR: generalized Vogel inflow against a Hagedorn & Brown outflow whose gas is the formation's plus the lift gas. Sweeping the total GLR rather than the injection rate means each point is one nodal solve: the lift gas is then (GLR total − GLR formation) × q / 1,000 at the rate q the well settles at. The casing side is a static gas column from 1,100 psia at the head.
What an engineer learns from it: the well flows 883 STB/d on its own at 2,200 psia. Lift gas lightens the column and the rate climbs, fast at first (160 Mscf/d buys 184 STB/d) and then ever more slowly, to a maximum of 1,255 STB/d at about 2,700 Mscf/d. Past that, friction from the extra gas outweighs the lighter column and the rate falls: more gas, less oil. The economic point comes well before the maximum: past about 650 Mscf/d (1,187 STB/d) each extra Mscf/d buys less than 0.1 STB/d. When the reservoir falls to 1,800 psia natural flow almost halves to 487 STB/d, and lift gas is worth more: the same curve shape, lower, with the maximum near 2,900 Mscf/d. The casing's 1,291 psia at 7,000 ft beats the flowing tubing pressure by more than the valve's 100 psi at every point, so the well can be lifted from the shoe.
Units are field: psia, STB/d, Mscf/d, scf/STB. Single-point injection at the tubing shoe, so the whole tubing carries the total GLR; a deeper well with injection above the perforations would split the traverse. No water, a 0.1 STB/Mscf economic cut-off, a constant z factor on the casing side. The valve string itself is gl-valve-setting, the operating valve's port gl-operating-valve.
Source
using System;
using System.Collections.Generic;
using System.Linq;
using Team76.Engineering.AL.GL;
using Team76.Engineering.Core.Measures;
using Team76.Engineering.Orchestration.Nodal;
using Team76.Engineering.VFP.Builders;
using Team76.Engineering.VFP.Models;
using Team76.Engineering.VFP.Providers;
public class S : ICalcScript
{
public ScriptResult Run(ICalcContext ctx)
{
// A 7,000 ft oil well on 2 7/8" tubing (2.441" ID) to a 150 psia separator, formation GLR 250 scf/STB, no water.
// Lift gas at 1,100 psia on the casing head, injected at the tubing shoe.
const double depth = 7000, wellhead = 150, formationGlr = 250, casingHead = 1100, bubblePoint = 1800, j = 1.2;
var tubing = FlowModelBuilder.HagedornAndBrown(
new Pipe(Length.FromFeet(depth), Angle.FromDegrees(90), Roughness.From(0.0006), Length.FromInches(2.441)),
new TraverseFluidProvider(GasSpecificGravity.From(0.7), Density.FromLbPerFt3(53), Viscosity.FromCP(1.5),
InterfacialTension.FromDynesPerCm(30), Temperature.FromDegF(170)));
// 1. IPR: generalized Vogel at today's 2,200 psia and at the 1,800 psia the reservoir falls to.
// 2. VFP: the tubing at each total GLR, the formation's gas plus the lift gas.
// 3. AL.GL: the lift gas that total GLR takes at the rate the well settles at, so no iteration is needed.
double[] totalGlrs = [250, 400, 600, 800, 1200, 1600, 2400, 3500, 5000];
(double Injection, double Rate, double Pwf)[] Performance(double reservoirPressure)
{
var inflow = InflowPerformanceCurve.GeneralizedVogel(j, Pressure.FromPsi(reservoirPressure), Pressure.FromPsi(bubblePoint));
return totalGlrs
.Select(glr => OperatingPointSolver.Solve(inflow, new MultiPhaseLiftCurve(tubing, Pressure.FromPsi(wellhead), SolutionRelation.FromScfPerStb(glr))))
.Select((nodal, i) => nodal.HasOperatingPoint
? (Injection.RequiredInjectionRate(targetGlr: totalGlrs[i], formationGlr: formationGlr, liquidRate: nodal.OperatingPoint.Rate.BblPerD),
nodal.OperatingPoint.Rate.BblPerD, nodal.OperatingPoint.FlowingPressure.Psi)
: (double.NaN, 0.0, double.NaN))
.ToArray();
}
var today = Performance(2200);
var later = Performance(1800);
// 4. The casing pressure at the shoe has to beat the flowing tubing pressure there, by 100 psi for the valve.
double gradient = Injection.GasGradient(gasSpecificGravity: 0.65, averagePressure: 1200, averageTemperature: 135 + 460, zFactor: 0.9);
double casingAtShoe = Injection.PressureAtDepth(casingHead, depth, gradient);
// The economic point: past it each extra Mscf/d of lift gas buys less than 0.1 STB/d of oil.
(double Injection, double Rate, double Pwf) Economic((double Injection, double Rate, double Pwf)[] curve)
{
var lifted = curve.Where(p => !double.IsNaN(p.Injection)).ToArray();
for (var i = 1; i < lifted.Length; i++)
{
if ((lifted[i].Rate - lifted[i - 1].Rate) / (lifted[i].Injection - lifted[i - 1].Injection) < 0.1)
{
return lifted[i - 1];
}
}
return lifted[^1];
}
var best = today.MaxBy(p => p.Rate);
var economic = Economic(today);
var rows = totalGlrs.Select((glr, i) => new object[]
{
glr,
Math.Round(today[i].Injection), Math.Round(today[i].Rate), Math.Round(today[i].Pwf),
Math.Round(later[i].Injection), Math.Round(later[i].Rate),
today[i].Pwf + 100 <= casingAtShoe ? "yes" : "no",
}).ToList();
return ctx.Result()
.Set("Natural flow today (STB/d)", Math.Round(today[0].Rate))
.Set("Natural flow at 1,800 psia (STB/d)", Math.Round(later[0].Rate))
.Set("Economic lift gas today (Mscf/d)", Math.Round(economic.Injection))
.Set("Oil at the economic point (STB/d)", Math.Round(economic.Rate))
.Set("Most oil today (STB/d)", Math.Round(best.Rate))
.Set("Lift gas for the most oil (Mscf/d)", Math.Round(best.Injection))
.Set("Casing pressure at the shoe (psia)", Math.Round(casingAtShoe))
.Set("Performance curve", new ScriptChart(
[new ScriptSeries("Reservoir at 2,200 psia", [.. today.Where(p => !double.IsNaN(p.Injection)).Select(p => p.Injection)], [.. today.Where(p => !double.IsNaN(p.Injection)).Select(p => p.Rate)]),
new ScriptSeries("Reservoir at 1,800 psia", [.. later.Where(p => !double.IsNaN(p.Injection)).Select(p => p.Injection)], [.. later.Where(p => !double.IsNaN(p.Injection)).Select(p => p.Rate)])],
title: "Gas lift performance", xLabel: "Lift gas (Mscf/d)", yLabel: "Oil rate (STB/d)"))
.Set("Table", new ScriptTable(
["Total GLR (scf/STB)", "Lift gas today (Mscf/d)", "Oil today (STB/d)", "Pwf today (psia)", "Lift gas at 1,800 (Mscf/d)", "Oil at 1,800 (STB/d)", "Casing can inject"],
rows, title: "Operating point against total GLR"));
}
}