Size a flowline below its erosional velocity
A two-phase flowline carrying 8.0 ft³/s of vapour and 2.5 ft³/s of liquid at flowing conditions: the no-slip mixture density, the API RP 14E erosional velocity, the velocity and erosion ratio in a 4-inch line, the minimum internal diameter, and the ratio in schedule 40 pipe from 4 to 12 inches.
- UC-FA-004
- UC-FA-007
Engineering use cases UC-FA-004 (Check Erosional Velocity) and UC-FA-007 (Evaluate Pipe Size for Erosion).
API RP 14E caps the mixture velocity at V_e = C / √ρ_m, with ρ_m in lb/ft³ and C = 100 for sand-free continuous service (150 when intermittent, below 100 with sand), as Brill and Mukherjee quote it. The mixture density weights the phases by the void fraction, the velocity is the total actual rate over the pipe area, and the minimum diameter is √(4 Q / (π V_e)).
What an engineer learns from it: the 14 lb/ft³ mixture may move at 26.7 ft/s. In the 4-inch line it moves at 119 ft/s, 4.4 times the limit, so the use case's line is far too small. The minimum ID is 8.5 in, so 8-inch pipe (7.98 in) still runs 13 % over and 10-inch is the smallest that passes, at 0.72 of the limit; 12-inch would sit at 0.51 and invite liquid holdup and slugging at turndown. The rule is a screening limit, not an erosion rate: many operators accept higher C for clean, corrosion-inhibited service, and a sand-laden line needs a sand erosion model such as DNV RP O501 instead.
Units: ft³/s at flowing conditions, lb/ft³, in, ft/s. The library's RecommendedCFactor subtracts 25 for a corrosive service (it returns 75 for sand-free, continuous, corrosive), which its own remarks note the RP 14E quotation does not do; this entry passes C = 100 directly, and shows the library's value beside it.
Source
using System;
using System.Linq;
using Team76.Engineering.FA;
public class S : ICalcScript
{
public ScriptResult Run(ICalcContext ctx)
{
// The use case's flowline: 8.0 ft3/s of gas and 2.5 ft3/s of liquid at flowing conditions, 80 % gas void fraction,
// 5 lb/ft3 gas and 50 lb/ft3 liquid, in a 4-inch schedule 40 line (4.026 in ID). Sand-free, continuous service.
const double gasRate = 8.0, liquidRate = 2.5; // ft3/s
const double gasDensity = 5, liquidDensity = 50; // lb/ft3
const double voidFraction = 0.8;
const double cFactor = 100; // API RP 14E, sand-free continuous service
double density = Erosion.MixtureDensity(liquidDensity, gasDensity, voidFraction);
double limit = Erosion.ErosionalVelocityApi14E(density, cFactor); // Ve = C / sqrt(rho_m)
double velocity = Erosion.MixtureVelocity(gasRate, liquidRate, 4.026);
double ratio = Erosion.ErosionRatio(velocity, limit);
double minimum = Erosion.MinimumPipeDiameter(gasRate + liquidRate, limit); // in
// Schedule 40 line pipe from 4 to 12 inches: the velocity in each and its ratio to the limit.
(string Size, double Id)[] pipes = [("4\"", 4.026), ("6\"", 6.065), ("8\"", 7.981), ("10\"", 10.020), ("12\"", 11.938)];
var rows = pipes.Select(p =>
{
double v = Erosion.MixtureVelocity(gasRate, liquidRate, p.Id);
double r = Erosion.ErosionRatio(v, limit);
return new object[] { p.Size, p.Id, Math.Round(v, 1), Math.Round(r, 2), Erosion.RiskClassification(r) };
}).ToList();
var smallest = pipes.First(p => p.Id >= minimum);
return ctx.Result()
.Set("Line sizes", new ScriptTable(["Size", "ID (in)", "Velocity (ft/s)", "V / Ve", "Risk"], rows))
.Set("Mixture density (lb/ft3)", Math.Round(density, 2))
.Set("Erosional velocity (ft/s)", Math.Round(limit, 2))
.Set("Velocity in the 4-inch line (ft/s)", Math.Round(velocity, 1))
.Set("Erosion ratio in the 4-inch line", Math.Round(ratio, 2))
.Set("Risk in the 4-inch line", Erosion.RiskClassification(ratio))
.Set("Minimum ID (in)", Math.Round(minimum, 2))
.Set("Smallest line that passes", smallest.Size)
.Set("Erosional velocity, sand-free intermittent, C 150 (ft/s)", Math.Round(Erosion.ErosionalVelocityApi14E(density, 150), 2))
.Set("Library C factor, sand-free continuous corrosive", Erosion.RecommendedCFactor(false, true, true));
}
}