Forecast the associated gas from the GOR trend

Two years of oil rates and a rising GOR: fit the oil decline and a power-law GOR, and forecast the gas as the oil times the ratio for ten years, with and without a cap at the facilities' GOR.

Open in the workbench

Engineering use case UC-DCA-011 (Forecast Associated Gas or Water from a Ratio Trend).

Associated gas does not follow a decline of its own; it follows the oil through the producing GOR. Below the bubble point the GOR climbs, and on log-log axes it is close to a straight line, R(t) = c (t / t0)^m. PowerLawRatioFitter.Fit fits c and m at a pivot time t0, and SecondaryPhaseForecast multiplies the ratio into the oil decline for the gas rate and integrates it for the cumulative. The same works for a water-oil ratio, or a condensate-gas ratio against a gas decline.

What an engineer learns from it: the fit returns c = 750 scf/STB and m = 0.350, the trend the history was built with. The GOR reaches 1,798 scf/STB at year 1 and 4,026 at year 10. Over ten years the well makes 272 MSTB of oil and 467 MMscf of gas. A power law has no ceiling, so hold it at a physical one: capped at 3,000 scf/STB (reached at about day 1,575), the ten-year gas is 457 MMscf. The cap matters less than it looks, because by the time the GOR reaches it the oil rate is small; it matters more for sizing the compressor in the middle years.

Time and rates share one base, days here: oil in STB/d, gas in scf/d, cumulative in STB and scf. A ratio slope of −1 or less has no finite cumulative from t = 0. The cap is not fitted: a history that already sits at a facilities limit biases the fitted slope.

Source

using System;
using System.Linq;
using Team76.Engineering.DCA.DeclineModels;
using Team76.Engineering.DCA.Fitting.Fitters;
using Team76.Engineering.DCA.SecondaryPhase;

public class S : ICalcScript
{
    public ScriptResult Run(ICalcContext ctx)
    {
        // Two years of monthly tests against days: the oil rate (STB/d) on a hyperbolic decline, and a GOR (scf/STB) that
        // climbs once the reservoir is below its bubble point, 750 (t / 30)^0.35.
        var truth = new ArpsHyperbolicDecline(Qi: 1000, Di: 0.0068, b: 0.5);
        var days = Enumerable.Range(1, 24).Select(i => 30.0 * i).ToArray();
        var oil = days.Select(truth.Rate).ToArray();
        var gor = days.Select(t => 750 * Math.Pow(t / 30, 0.35)).ToArray();

        // Fit the oil decline, then the GOR trend as a power law at a 30-day pivot.
        var oilModel = ArpsHyperbolicFitter.Fit(days, oil);
        var gorModel = PowerLawRatioFitter.Fit(days, gor, t0: 30);

        // The gas forecast is the oil forecast times the GOR: rate in scf/d, cumulative in scf.
        var forecast = Enumerable.Range(1, 120).Select(i => 30.0 * i).ToArray();
        var gasRates = SecondaryPhaseForecast.Rates(oilModel, gorModel, forecast);
        var gasTenYears = SecondaryPhaseForecast.Cumulative(oilModel, gorModel, 3650);

        // A power law climbs without end; hold the GOR at the 3,000 scf/STB the facilities can take.
        var capped = new PowerLawRatio(gorModel.C, gorModel.M, t0: 30, maxRatio: 3_000);
        var cappedTenYears = SecondaryPhaseForecast.Cumulative(oilModel, capped, 3650);

        var years = forecast.Select(t => t / 365).ToArray();
        var chart = new ScriptChart(
            [
                new ScriptSeries("Oil (STB/d)", years, forecast.Select(oilModel.Rate).ToArray()),
                new ScriptSeries("Gas (Mscf/d)", years, gasRates.Select(g => g / 1000).ToArray()),
            ],
            title: "Oil and associated gas forecast", xLabel: "Years", yLabel: "Rate");

        return ctx.Result()
            .Set("Forecast", chart)
            .Set("GOR at the pivot, c (scf/STB)", Math.Round(gorModel.C, 1))
            .Set("GOR slope, m", Math.Round(gorModel.M, 3))
            .Set("GOR at year 1 (scf/STB)", Math.Round(gorModel.Ratio(365)))
            .Set("GOR at year 10 (scf/STB)", Math.Round(gorModel.Ratio(3650)))
            .Set("Oil to year 10 (MSTB)", Math.Round(oilModel.Cumulative(3650) / 1000))
            .Set("Gas to year 10 (MMscf)", Math.Round(gasTenYears / 1e6))
            .Set("Gas to year 10, GOR capped (MMscf)", Math.Round(cappedTenYears / 1e6));
    }
}