Hydrate inhibitor explorer

Move the line pressure, its coldest temperature, the gas gravity, the safety margin and the produced water, and watch the hydrate curve, the subcooling, and the methanol or MEG concentration and injection rate that keep the line out of hydrates.

Open in the workbench Open the live page

Live preview

Engineering use cases UC-FA-001 (Design Hydrate Inhibition Program) and UC-FA-002 (Calculate Methanol Injection Rate). The script fa-hydrate-inhibition does the same at one design point, with the inhibitor strength table beside it.

What an engineer learns by moving the sliders: the page opens on a 0.7-gravity gas at 1,000 psia on a 40 °F seabed. It forms hydrates below 64.6 °F, so the line is 24.6 °F inside the hydrate region, and with a 5 °F margin it needs 28.9 wt% methanol or 40.5 wt% MEG in the water, about 2,160 or 2,580 US gal/d for 100 bbl/d. Halve the pressure and the hydrate temperature falls only about 10 °F: the curve is logarithmic in pressure, so depressurising a blocked line has to go a long way down. A heavier gas raises the curve, and the rate scales with the water, which is why a well's inhibitor demand climbs as its water cut does. Warm the coldest point above the curve and the dose drops to nothing.

The hydrate temperature is Towler and Mokhatab's fit to the Katz chart for a sweet gas, with no N₂, CO₂ or H₂S effect. The concentrations are Hammerschmidt's, which reads low above about 25 wt% methanol, and the rates leave out the methanol lost to the gas and condensate.

Source hydrate-inhibitor.dashboard

@using Team76.Engineering.FA

@{ var r = Compute(); }

<Page MaxWidth="Narrow">
    <Section Title="Line">
        <Slider Label="Operating pressure" @bind-Value="Pressure" Min="200" Max="3000" Step="50" Unit="psia" />
        <Slider Label="Coldest temperature" @bind-Value="Coldest" Min="32" Max="80" Step="1" Unit="°F" />
        <Slider Label="Gas gravity" @bind-Value="Gravity" Min="0.6" Max="1.0" Step="0.01" Unit="air = 1" />
    </Section>

    <Section Title="Inhibition">
        <Slider Label="Safety margin" @bind-Value="Margin" Min="0" Max="15" Step="1" Unit="°F" />
        <Slider Label="Produced water" @bind-Value="Water" Min="10" Max="2000" Step="10" Unit="bbl/d" />
    </Section>

    <Section Title="The dose">
        <KpiRow>
            <Value Label="Hydrate temperature" Number="@r.Hydrate" Unit="°F" Format="N1" Note="Towler-Mokhatab, sweet gas" />
            <Value Label="Subcooling" Number="@r.Subcooling" Unit="°F" Format="N1"
                   Status="@(r.Subcooling > 0 ? "warn" : "good")"
                   StatusText="@(r.Subcooling > 0 ? "inside the hydrate region" : "outside the hydrate region")" />
            <Value Label="Methanol" Number="@r.Methanol" Unit="wt%" Format="N1" Note="@r.MethanolRate" />
            <Value Label="MEG" Number="@r.Meg" Unit="wt%" Format="N1" Note="@r.MegRate" />
        </KpiRow>
    </Section>

    <Section Title="Hydrate curve, uninhibited and with the methanol dose">
        <Chart Rows="r.Rows" X="Pressure:psia" Series="Uninhibited:°F + Inhibited:°F" Height="320" LogYBox="false">
            <PointMarker X="@Pressure" Y="@Coldest" Text="coldest point" />
        </Chart>
    </Section>

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

@code {
    // A sweet gas in a subsea flowline: 1,000 psia, a 40 °F seabed, 0.7 gravity, 100 bbl/d of water, 5 °F margin.
    double Pressure = 1000;
    double Coldest = 40;
    double Gravity = 0.7;
    double Margin = 5;
    double Water = 100;

    record Row(double Pressure, double Uninhibited, double Inhibited);

    record Result(IReadOnlyList<Row> Rows, double Hydrate, double Subcooling, double Methanol, double Meg, string MethanolRate, string MegRate);

    static string Inv(FormattableString s) => FormattableString.Invariant(s);

    Result Compute()
    {
        double hydrate = Hydrate.EquilibriumTemperature(Pressure, Gravity);
        double subcooling = Hydrate.Subcooling(hydrate, Coldest);
        double depression = Hydrate.RequiredDepression(subcooling, Margin);
        double methanol = depression > 0 ? Hydrate.RequiredMethanolConcentration(depression) : 0;
        double meg = depression > 0 ? Hydrate.RequiredMegConcentration(depression) : 0;
        double methanolRate = methanol > 0 ? Hydrate.MethanolInjectionRate(Water, methanol) : 0;
        double megRate = meg > 0 ? Hydrate.MegInjectionRate(Water, meg) : 0;
        double shift = methanol > 0 ? Hydrate.TemperatureDepressionMethanol(methanol) : 0;

        // The hydrate temperature at pressures from 100 to 3,000 psia; below a curve the line is inside the hydrate region.
        var rows = new[] { 100.0, 150, 200, 300, 400, 500, 750, 1000, 1500, 2000, 2500, 3000 }
            .Select(p => new Row(p, Math.Round(Hydrate.EquilibriumTemperature(p, Gravity), 2), Math.Round(Hydrate.EquilibriumTemperature(p, Gravity) - shift, 2)))
            .ToList();

        return new Result(rows, hydrate, subcooling, methanol, meg,
            Inv($"{methanolRate:N0} US gal/d"), Inv($"{megRate:N0} US gal/d"));
    }

    const string Method = "The hydrate temperature is Team76.Engineering.FA Hydrate.EquilibriumTemperature, Towler and Mokhatab's fit to the Katz gas-gravity chart for a sweet gas with free water. The subcooling is that temperature minus the coldest line temperature, and the design depression is the subcooling plus the margin, nothing when the line runs outside the curve. Hammerschmidt's equation, dT = K W / (M (100 - W)) with K 2335 and M 32.04 for methanol and K 2700 and M 62.07 for MEG, gives the aqueous-phase concentration, and the rate is the inhibitor that mixes with the produced water at that strength. Methanol lost to the gas and condensate is not in the rate, and Hammerschmidt reads low above about 25 wt% methanol.";
}