Material balance aquifer match

Move the oil in place and a Fetkovich aquifer's size and productivity index, and watch the material balance close or open: the withdrawal the surveys measured against the one the model makes, the mismatch at the last survey, and the drive indices at each survey.

Open in the workbench Open the live page

Live preview

Engineering use cases UC-MBE-004 (Quantify Drive Mechanisms), UC-MBE-009 (History Match with Fetkovich Aquifer) and UC-MBE-010 (Integrated Reservoir Characterization).

What an engineer learns by moving the sliders: the page opens at the match, 300 MMSTB with a 500 MMbbl aquifer and J = 100 bbl/d/psi. The two withdrawal curves lie on each other, and by year 4 the water drive supplies 79 % against 16 % for depletion. Turn the aquifer off (Wei or J to 0) and the model falls 79 % short at year 4; push N up to make the balance close without it and the early surveys overshoot while the late ones still fall short. That shape, too much early and too little late, is the signature of an aquifer read as oil. J sets how fast the aquifer answers the pressure drop and Wei how much it can give: a small aquifer with a high J helps early and runs out, a large one with a low J lags and keeps coming. The drive indices are of the model's own balance, so they always sum to one; read them only once the mismatch is small.

The script behind it is mbe-fetkovich-aquifer, which fits N, Wei and J together and gets these values back.

Source mbe-aquifer-match.dashboard

@using Team76.Engineering.MBE.Aquifer
@using Team76.Engineering.MBE.DriveIndices

@{ var r = Compute(); }

<Page MaxWidth="Narrow">
    <Section Title="Oil in place">
        <Slider Label="Oil in place, N" @bind-Value="N" Min="100" Max="800" Step="10" Unit="MMSTB" />
    </Section>

    <Section Title="Fetkovich aquifer">
        <Slider Label="Encroachable water, Wei" @bind-Value="Wei" Min="0" Max="1500" Step="25" Unit="MMbbl" />
        <Slider Label="Aquifer productivity, J" @bind-Value="J" Min="0" Max="300" Step="5" Unit="bbl/d/psi" />
    </Section>

    <Section Title="Match at the last survey">
        <KpiRow>
            <Value Label="Mismatch of F" Number="@r.Mismatch" Unit="%" Format="F1"
                   Status="@(Math.Abs(r.Mismatch) <= 2 ? "good" : "warn")"
                   StatusText="@(Math.Abs(r.Mismatch) <= 2 ? "the balance closes" : r.Mismatch > 0 ? "too much oil or water" : "not enough oil or water")" />
            <Value Label="Water drive, WDI" Number="@(100 * r.Last.WDI)" Unit="%" Format="F0" />
            <Value Label="Depletion drive, DDI" Number="@(100 * r.Last.DDI)" Unit="%" Format="F0" />
            <Value Label="Gas cap, GDI" Number="@(100 * r.Last.GDI)" Unit="%" Format="F0" />
            <Value Label="Rock and water, CDI" Number="@(100 * r.Last.CDI)" Unit="%" Format="F0" />
        </KpiRow>
    </Section>

    <Section Title="Withdrawal: measured against the model">
        <Chart Rows="r.Rows" X="Year" Series="Measured:MMrb + Model:MMrb" Height="300" YMin="0" LogYBox="false" />
    </Section>

    <Section Title="Drive indices by survey">
        <Chart Rows="r.Drives" X="Year" Series="Depletion + Water + GasCap + Compressibility" Height="260" YMin="0" LogYBox="false" />
    </Section>

    <Section Title="Surveys">
        <Table Rows="r.Rows" Columns="Year, Pressure:psia, Measured:MMrb, Model:MMrb, Influx:MMrb" />
    </Section>

    <Notes Text="@Method" />
</Page>

@code {
    // Start at the match; move N down to the volumetric answer or the aquifer off, and watch the balance open.
    double N = 300;
    double Wei = 500;
    double J = 100;

    // Discovery and four yearly surveys: time (days), pressure (psia), the oil, gas-cap (m = 0.1) and formation-and-water
    // expansions (rb/STB), and the withdrawal F (rb) measured, which is 300 MMSTB with a 500 MMbbl, J = 100 aquifer.
    const double Pi = 3000, M = 0.1;
    static readonly double[] Days = [0, 365, 730, 1095, 1460];
    static readonly double[] P = [3000, 2800, 2600, 2400, 2250];
    static readonly double[] Eo = [0, 0.008, 0.016, 0.024, 0.030];
    static readonly double[] Eg = [0, 0.010, 0.020, 0.030, 0.038];
    static readonly double[] Efw = [0, 0.001, 0.002, 0.003, 0.0037];
    static readonly double[] F = [0, 6.277971e6, 18.467180e6, 35.405013e6, 54.588027e6];

    record Row(double Year, double Pressure, double Measured, double Model, double Influx);

    record DriveRow(double Year, double Depletion, double Water, double GasCap, double Compressibility);

    record Result(IReadOnlyList<Row> Rows, IReadOnlyList<DriveRow> Drives, DriveIndicesResult Last, double Mismatch);

    Result Compute()
    {
        var n = N * 1e6;
        var we = Wei > 0 && J > 0 ? FetkovichAquifer.CumulativeInflux(Wei * 1e6, J, Pi, Days, P) : new double[Days.Length];
        var rows = new List<Row>();
        var drives = new List<DriveRow>();
        for (var i = 0; i < Days.Length; i++)
        {
            var model = n * (Eo[i] + M * Eg[i] + Efw[i]) + we[i];
            rows.Add(new Row(Days[i] / 365, P[i], Math.Round(F[i] / 1e6, 2), Math.Round(model / 1e6, 2), Math.Round(we[i] / 1e6, 2)));
            if (i == 0) continue;

            // The indices of the model's own balance, so they sum to one whatever the sliders say.
            var d = DriveIndexCalculator.CalculateAll(N: n, Eo: Eo[i], m: M, Eg: Eg[i], Efw: Efw[i], We: we[i], F: model);
            drives.Add(new DriveRow(Days[i] / 365, Math.Round(d.DDI, 3), Math.Round(d.WDI, 3), Math.Round(d.GDI, 3), Math.Round(d.CDI, 3)));
        }

        var lastModel = n * (Eo[^1] + M * Eg[^1] + Efw[^1]) + we[^1];
        var last = DriveIndexCalculator.CalculateAll(N: n, Eo: Eo[^1], m: M, Eg: Eg[^1], Efw: Efw[^1], We: we[^1], F: lastModel);
        return new Result(rows, drives, last, 100 * (lastModel / F[^1] - 1));
    }

    const string Method = "Havlena-Odeh material balance F = N (Eo + m Eg + Efw) + We, in reservoir barrels, with m = 0.1 and the expansions from the PVT at each survey. The influx We is the Fetkovich (1971) pseudo-steady-state aquifer of size Wei and productivity index J, stepped through the pressure history from 3,000 psia. The drive indices split the model's withdrawal into depletion N Eo, gas cap N m Eg, rock and water N Efw and aquifer We, each over F. The surveys were built from 300 MMSTB and a 500 MMbbl aquifer with J = 100 bbl/d/psi.";
}