Size a wellhead choke for a target rate

A well at 600 psia upstream of the choke and a GLR of 1,000 scf/STB, to produce 800 bbl/d of liquid: the Gilbert choke size, the bean in stock for it and the rate that bean passes, the check that the choke runs critical against a 250 psia flowline, and the bean schedule as the wellhead pressure declines.

Open in the workbench

Engineering use cases UC-SF-001 (Size Wellhead Choke for Target Rate) and UC-SF-007 (Optimize Choke Setting for Changing Conditions).

Gilbert (1954) fitted p1 = 10.0 q R0.546 / S1.89 to critical flow through wellhead beans, with p1 the pressure upstream of the choke, q the liquid rate in bbl/d, R the GLR in scf/STB and S the bean in 64ths of an inch (435 R^0.546 with R in Mscf/STB, as Brown and Beggs print it). Solved for S it sizes the choke; the size is rounded up to the next bean in stock, which then passes a little more than the target.

What an engineer learns from it: the target needs 0.453 in, 29/64. The stock beans jump from 28 to 32, so the 32/64 bean goes in and passes 965 bbl/d, 21 % over the target: an adjustable choke, or a 30/64 bean, holds the rate closer. At 250 psia downstream the pressure ratio is 0.42, below the 0.55 an oil-gas mixture goes critical at, so the rate does not feel the flowline and Gilbert applies. The schedule holds 1,000 bbl/d at a GLR of 1,200 scf/STB as the wellhead pressure falls from 800 to 300 psia: the size grows from 30/64 to 50/64. Below 455 psia (250 / 0.55) the choke is no longer critical against the same flowline, so from month 24 the Gilbert sizes are optimistic; size those settings with a subcritical model (the sf-critical-flow entry).

Units: psia, bbl/d, scf/STB, inches and 64ths of an inch. Gilbert's data were sizes up to about 1 in and rates of a few thousand bbl/d; outside them, calibrate the constant against a well test (the sf-choke-correlations entry).

Source

using System;
using System.Linq;
using Team76.Engineering.SF.Choke;
using Team76.Engineering.SF.Choke.MultiPhase;

public class S : ICalcScript
{
    public ScriptResult Run(ICalcContext ctx)
    {
        // The use case's well: 600 psia upstream of the choke, a GLR of 1,000 scf/STB, held to 800 bbl/d of liquid,
        // discharging into a 250 psia flowline. The beans in stock run from 16/64 to 64/64 in.
        const double wellheadPressure = 600;  // psia
        const double glr = 1000;              // scf/STB
        const double targetRate = 800;        // bbl/d
        const double flowlinePressure = 250;  // psia, downstream of the choke
        int[] beans = [16, 20, 24, 28, 32, 36, 40, 48, 56, 64]; // 64ths of an inch

        double size = GilbertChoke.Size(wellheadPressure, targetRate, glr);           // in
        int size64 = GilbertChoke.SizeIn64ths(wellheadPressure, targetRate, glr);    // rounded up
        int bean = beans.First(b => b >= size64);
        double beanRate = GilbertChoke.Rate(wellheadPressure, bean / 64.0, glr);       // bbl/d
        var regime = ChokeFlowRegimeHelper.Determine(wellheadPressure, flowlinePressure); // critical at p2/p1 <= 0.55

        // UC-SF-007: the wellhead pressure falls as the reservoir depletes, and the bean that holds 1,000 bbl/d at a GLR of
        // 1,200 scf/STB opens up. Gilbert holds only while the choke is critical against the same 250 psia flowline.
        const double scheduleRate = 1000, scheduleGlr = 1200;
        (int Month, double Pwh)[] forecast = [(0, 800), (6, 700), (12, 600), (18, 500), (24, 400), (30, 300)];
        var schedule = forecast.Select(f =>
        {
            int needed = GilbertChoke.SizeIn64ths(f.Pwh, scheduleRate, scheduleGlr);
            int pick = beans.First(b => b >= needed);
            return new object[]
            {
                f.Month, f.Pwh, needed, pick,
                Math.Round(GilbertChoke.Rate(f.Pwh, pick / 64.0, scheduleGlr)),
                ChokeFlowRegimeHelper.Determine(f.Pwh, flowlinePressure).ToString(),
            };
        }).ToList();

        var curve = new ScriptSeries("Required size", forecast.Select(f => (double)f.Month).ToArray(),
            forecast.Select(f => Math.Round(64 * GilbertChoke.Size(f.Pwh, scheduleRate, scheduleGlr), 1)).ToArray());

        return ctx.Result()
            .Set("Required choke (in)", Math.Round(size, 3))
            .Set("Required choke (64ths)", size64)
            .Set("Bean selected (64ths)", bean)
            .Set("Rate on the bean (bbl/d)", Math.Round(beanRate))
            .Set("Pressure ratio p2/p1", Math.Round(flowlinePressure / wellheadPressure, 3))
            .Set("Flow regime", regime.ToString())
            .Set("Choke schedule", new ScriptTable(["Month", "Pwh (psia)", "Required (64ths)", "Bean (64ths)", "Rate on the bean (bbl/d)", "Regime at 250 psia"], schedule))
            .Set("Lowest critical Pwh (psia)", Math.Round(flowlinePressure / ChokeFlowRegimeHelper.DefaultCriticalPressureRatio))
            .Set("Choke schedule chart", new ScriptChart([curve], title: "Gilbert size for 1,000 bbl/d as Pwh declines", xLabel: "Month", yLabel: "Choke (64ths in)"));
    }
}