Predict the pressure drop along a two-phase flowline
A 5,000 ft, 4-in horizontal flowline carrying 1,500 bbl/d of liquid and 2.5 MMscf/d from 400 psia: the in-situ density, the no-slip liquid fraction and the holdup, the Eaton and Dukler gradients, the pressure along the line and at its end, the superficial velocities and the Mandhane and Baker flow regimes, the outlet pressure in 4 to 8-in pipe, and both correlations against Economides' worked examples.
- UC-SF-005
- UC-SF-006
Engineering use cases UC-SF-005 (Predict Surface Pipeline Pressure Drop) and UC-SF-006 (Identify Horizontal Flow Regime).
Eaton et al. (1967) and Dukler (1969) are the horizontal two-phase correlations of Economides, Hill and Ehlig-Economides (1994), Chapter 10. Both take the rate at standard conditions and the in-situ density, here from the real-gas law at Z = 0.93, so the entry marches the line in ten increments and evaluates each at its mean pressure: the vapour expands as the pressure falls, and the gradient grows towards the outlet. Dukler's holdup comes from his Fig. 10-8 chart and its friction from the no-slip factor times his f/f_n ratio; Mandhane (1974) maps the superficial velocities, Baker (1953) the mass fluxes.
What an engineer learns from it: the liquid fills 8.4 % of the flow by volume but holds up 18 to 21 % of the pipe, because the vapour slips past it. The superficial velocities, 12.2 ft/s vapour and 1.1 ft/s liquid, put the line in slug flow on Mandhane's map and plug flow on Baker's: expect slugs at the separator. The two correlations disagree by a factor of three: Dukler loses 51 psi and arrives at 349 psia, Eaton loses 157 psi and arrives at 243. On Economides' own examples they agree with the book to within 13 % (Eaton 0.028 against 0.025 psi/ft, Dukler 0.0346 against 0.035), but at this lighter, more viscous and gassier state they part, and Eaton's gradient falls only five-fold from 4 to 8-in pipe where Dukler's, like single-phase friction, falls about thirty-fold. Size on Dukler and treat Eaton here as a pessimistic bound; a field with arrival-pressure data settles it.
Units: ft, in, bbl/d, MMscf/d, psia, °F, lb/ft³, cP, dyne/cm, psi/ft. Horizontal, with the acceleration term left out, as in the book's examples.
Source
using System;
using System.Collections.Generic;
using System.Linq;
using Team76.Engineering.SF.Pipeline.FlowRegime;
using Team76.Engineering.SF.Pipeline.SinglePhase;
using Team76.Engineering.SF.Pipeline.TwoPhase;
public class S : ICalcScript
{
// The use case's flowline: 5,000 ft of 4-in ID line carrying 1,500 bbl/d of liquid and 2.5 MMscf/d of 0.7-gravity gas,
// 400 psia at the inlet and 100 °F. A 50 lb/ft3, 5 cP oil, 0.015 cP gas, 30 dyne/cm, and Z = 0.93 along the line.
const double Length = 5000, Diameter = 4.0; // ft, in
const double LiquidRate = 1500, GasRate = 2.5, Gravity = 0.7; // bbl/d, MMscf/d
const double Inlet = 400, Temperature = 100, Z = 0.93; // psia, °F
const double LiquidDensity = 50, LiquidViscosity = 5, GasViscosity = 0.015, Tension = 30;
// The gas density at a pressure, from the real-gas law.
static double GasDensity(double p) => GasPipeline.GasDensity(p, Temperature, Gravity, Z);
static double Eaton(double p, double d) => EatonCorrelation.PressureGradient(GasRate, Gravity, LiquidRate, d,
GasDensity(p), LiquidDensity, GasViscosity, LiquidViscosity, Tension, flowingPressure: p);
static double Dukler(double p, double d) => DuklerCorrelation.PressureGradient(GasRate, Gravity, LiquidRate, d,
GasDensity(p), LiquidDensity, GasViscosity, LiquidViscosity);
// March the line in 10 increments, each at the density of its mean pressure (one predictor-corrector pass), so the gas
// expands as the pressure falls.
static List<double> March(Func<double, double, double> gradient, double d)
{
var pressures = new List<double> { Inlet };
double step = Length / 10;
for (int i = 0; i < 10; i++)
{
double p = pressures[^1];
double guess = p - gradient(p, d) * step;
pressures.Add(p - gradient((p + guess) / 2, d) * step);
}
return pressures;
}
public ScriptResult Run(ICalcContext ctx)
{
double rhoG = GasDensity(Inlet); // lb/ft3
double eatonGradient = Eaton(Inlet, Diameter); // psi/ft
double duklerGradient = Dukler(Inlet, Diameter); // psi/ft
double noSlip = DuklerCorrelation.NoSlipLiquidFraction(GasRate, Gravity, LiquidRate, Diameter, rhoG);
double holdup = EatonCorrelation.LiquidHoldup(GasRate, Gravity, LiquidRate, Diameter, rhoG, LiquidDensity, Tension, LiquidViscosity, Inlet);
var (vsl, vsg) = MandhaneMap.CalculateVelocitiesFromFieldUnits(LiquidRate, GasRate, Diameter, Inlet, Temperature, Z); // ft/s
var mandhane = MandhaneMap.PredictFromVelocities(vsg, vsl);
double area = Math.PI / 4 * Math.Pow(Diameter / 12, 2);
var baker = BakerMap.Predict(vsg * area, vsl * area, Diameter / 12, rhoG, LiquidDensity, Tension, LiquidViscosity);
var eaton = March(Eaton, Diameter);
var dukler = March(Dukler, Diameter);
double[] distance = Enumerable.Range(0, 11).Select(i => i * Length / 10).ToArray();
// Line size: the outlet pressure by each correlation in schedule 40 pipe from 4 to 8 inches.
(string Size, double Id)[] pipes = [("4\"", 4.026), ("6\"", 6.065), ("8\"", 7.981)];
var sizes = pipes.Select(p => new object[]
{
p.Size, p.Id, Math.Round(March(Eaton, p.Id)[^1], 1), Math.Round(March(Dukler, p.Id)[^1], 1),
}).ToList();
// The book check: Economides et al. (1994) Examples 10-5 and 10-6, 1 MMscf/d of 0.709-gravity gas at 2.6 lb/ft3 and
// 2,000 bbl/d of a 49.92 lb/ft3, 2 cP oil in a 2.5-in line at 800 psia. The book prints 0.025 psi/ft (Eaton) and
// 0.035 psi/ft (Dukler).
double bookGas = 0.242 * 86400 / 1e6 / (0.0764 * 0.709 / 2.6); // the example's 0.242 ft3/s in situ, as MMscf/d
double bookEaton = EatonCorrelation.PressureGradient(bookGas, 0.709, 2000, 2.5, 2.6, 49.92, 0.0131, 2, 30, flowingPressure: 800);
double bookDukler = DuklerCorrelation.PressureGradient(1.0, 0.709, 2000, 2.5, 2.6, 49.92, 0.0131, 2);
return ctx.Result()
.Set("Gas density at the inlet (lb/ft3)", Math.Round(rhoG, 3))
.Set("No-slip liquid fraction", Math.Round(noSlip, 4))
.Set("Eaton liquid holdup", Math.Round(holdup, 4))
.Set("Dukler liquid holdup", Math.Round(DuklerCorrelation.LiquidHoldup(GasRate, Gravity, LiquidRate, Diameter, rhoG, LiquidDensity, GasViscosity, LiquidViscosity), 4))
.Set("Eaton gradient at the inlet (psi/ft)", Math.Round(eatonGradient, 5))
.Set("Dukler gradient at the inlet (psi/ft)", Math.Round(duklerGradient, 5))
.Set("Outlet pressure, Eaton (psia)", Math.Round(eaton[^1], 1))
.Set("Outlet pressure, Dukler (psia)", Math.Round(dukler[^1], 1))
.Set("Superficial gas velocity (ft/s)", Math.Round(vsg, 2))
.Set("Superficial liquid velocity (ft/s)", Math.Round(vsl, 3))
.Set("Flow regime, Mandhane", mandhane.ToString())
.Set("Flow regime, Baker", baker.ToString())
.Set("Line sizes", new ScriptTable(["Size", "ID (in)", "Outlet, Eaton (psia)", "Outlet, Dukler (psia)"], sizes))
.Set("Book check, Eaton Example 10-5 (psi/ft)", Math.Round(bookEaton, 4))
.Set("Book check, Dukler Example 10-6 (psi/ft)", Math.Round(bookDukler, 4))
.Set("Pressure along the line", new ScriptChart(
[new ScriptSeries("Eaton", distance, eaton.Select(p => Math.Round(p, 1)).ToArray()),
new ScriptSeries("Dukler", distance, dukler.Select(p => Math.Round(p, 1)).ToArray())],
title: "4-in ID flowline, 1,500 bbl/d and 2.5 MMscf/d", xLabel: "Distance (ft)", yLabel: "Pressure (psia)"));
}
}