CalcPlant calculation theory

Equations and assumptions for pipe losses, pump head, NPSHa, and liquid, vapour and two-phase calculations. Vapour uses an isothermal pressure-loss model; two-phase flow combines selected friction with Beggs & Brill holdup, gravity and acceleration corrections. Sources, applicability and implementation approximations are stated in each section.

Only public literature is cited as theoretical evidence. Compatibility coefficients and combined models remain unverified; a published model is not proof of this implementation.

Basics before reading the calculations

Absolute and gauge pressure

Gauge pressure takes the atmosphere as zero; absolute pressure takes vacuum as zero. Anything that depends on properties or phase change — gas density, vapour pressure, NPSH — uses absolute pressure, while vessel operating pressures and equipment datasheets usually state gauge pressure.

Pabs = Pg + Patm     1 kgf/cm² = 98,066.5 Pa = 0.980665 bar ≈ 14.22 psi

Head and static pressure

Head expresses a pressure as the height of a column of the fluid itself. The same pressure difference is a larger head in a lighter fluid. Pump performance is given in metres because a centrifugal pump develops nearly the same head whatever the density; converted to pressure, it scales with density.

ΔP = ρ·g·Δz     h = ΔP / (ρ·g) water (1,000 kg/m³): 10 m ≈ 1.0 kgf/cm²

Flow and the energy balance

Fluid flows from where the sum of pressure, elevation and velocity energy is higher to where it is lower. On the way, wall friction, fittings and equipment turn part of that energy into heat that is not recovered — this is the head loss hL. With no flow there is no friction loss, only the static difference.

P1/(ρg) + z1 + v1²/2g + Hpump = P2/(ρg) + z2 + v2²/2g + hL

A plant hydraulic check usually fixes the pressures and levels of the vessels at both ends and the flow rate, and asks whether the energy needed to move that flow (pump head, control-valve drop) is available. If the losses exceed the available pressure difference, that flow cannot exist: the line is upsized or the pump and operating pressures are revisited.

Sizing criteria and the overall pressure balance

  • Velocity and ΔP/100 m depend only on flow, size and properties, not on line length. Upper limits per service (erosion, noise, vibration, surge, margin on pump suction) and lower limits (settling of solids, stagnant lines) narrow down the candidate sizes. Enter the criteria in Data → Sizing Basis and read the check in the line table.
  • Built-up pressure loss adds the real straight length, fittings, equipment ΔP and elevation. Numbers that go into equipment specifications — pump suction and discharge pressure, control-valve inlet and outlet pressure — come from this (§3, §4).
  • Every line can meet its criteria while the path as a whole is short of pressure, and the reverse also happens. Sizes are settled with both views together.

Flow regimes

The Reynolds number Re = ρvD/μ compares inertial and viscous forces. At low Re the flow is laminar and the friction factor depends on Re alone (64/Re); at high Re it is turbulent and wall roughness ε/D matters. The transition band in between is unstable and no correlation predicts it well, so design checks often take the larger, turbulent value. How the app treats the transition band is in §2, and a warning appears when a line on the pump path falls in it.

Gas compressibility

As a gas loses pressure its density falls and, with the mass flow unchanged, it speeds up downstream. A single density therefore loses accuracy as the pressure drop grows. When the drop is a small fraction of the inlet absolute pressure (ΔP/P1), the inlet density is enough; as it grows, a compressible equation that follows the density change with pressure is needed.

  • CalcPlant solves the outlet pressure with the isothermal compressible equation (acceleration term included) whatever the ratio (§5). ΔP/P1 in the line table shows how strongly a line is affected by compressibility.
  • Isothermal flow is close to long, uninsulated lines where heat exchange through the wall keeps the temperature nearly constant; adiabatic flow is closer to short, insulated lines. Under the same conditions the isothermal assumption tends to give a slightly larger pressure drop, which is the conservative side for design checks.
  • Gas cannot flow faster than the speed of sound. Once lowering the downstream pressure no longer raises the flow, the line is choked (critical flow); the app then leaves the outlet pressure as "—" and warns. With a very large ratio or a high Mach number, check in detail by splitting the line and recalculating properties along it.

0. Symbols and units

PPressure. Displayed in kgf/cm²g; calculated in absolute Pa (Pabs = (Pg + Patm) × 98,066.5). Default atmospheric pressure 1.033 kgf/cm²a, common to the whole drawing ρ, μDensity kg/m³, viscosity cP (Pa·s = cP/1000 in the equations) D, L, εInside diameter m, straight length m, absolute roughness mm W, QMass flow kg/h, volumetric flow m³/h v, GVelocity m/s, flow area A = πD²/4 (m²), mass flux G = W/(3600A) (kg/m²·s) fDarcy friction factor (= 4 × Fanning) KSum of fitting and other resistance coefficients ΣK g9.80665 m/s² xVapour mass fraction (Vapor Fraction, wt% / 100) z, ELElevation m. Inline items with a blank EL are taken as 0 in the calculation

In the friction and momentum equations below, μ is in Pa·s and ε and D are both in m; the entered ε (mm) is divided by 1000. log is log10 (Math.log10), ln is the natural log (Math.log). [R1]

1. Flow

  • Where flow is entered: flow is given per line in the line table, as m³/h or kg/h. There is no drawing-wide flow; a line leaving a vessel must carry its own flow, otherwise the path reports "flow undefined".
  • Mass vs. volume: a typed kg/h wins over a typed m³/h. For liquid lines it is converted with that line's own density, Q = W/ρline.
  • Continuity: a blank line takes the flow arriving at its upstream item. At a split, exactly one blank outlet takes the remainder (inflow − specified outlets); more than one blank outlet is an error, and a mismatch beyond 0.5 % is flagged.
  • Design margin scales only that line's own flow and is never passed on downstream.
  • Line fluid: density and viscosity are per line and required on every calculated liquid line; there is no fallback to a drawing-wide fluid.
Qdesign = Qnormal × (1 + margin/100)     Wdesign = Wnormal × (1 + margin/100) Wnormal = typed kg/h, otherwise Qinherited × ρline

Vapour and two-phase lines are calculated on mass flow. A vapour line has no liquid density, so it needs its own kg/h; the cell is marked "Required" in the line table until a mass flow is available.

2. Liquid friction loss Darcy–Weisbach

hL = ( f·L/D + ΣK ) · v² / 2g     ΔP = ρ·g·hL

Friction factor

Re = ρ·v·D / μ     1/√f = −2·log10( ε/(3.7D) + 2.51/(Re·√f) ) Colebrook, iterated (start 0.02, |Δf| < 10⁻¹⁰, max 50)
  • Laminar (Re < 2300): f = 64/Re. For 2300–4000, linear blend between 64/Re at 2300 and Colebrook at 4000 (pump path and liquid lines). Any line in this band raises a "transitional" warning.
  • The Beggs & Brill no-slip friction factor fNS of two-phase lines uses this same liquid function, including the 2300–4000 blend (§6).
  • Only vapour lines use 64/Re for Re ≤ 4000 and an explicit start value + one Colebrook pass above (lineSizingFrictionFactor, §5).
Colebrook is a turbulent correlation. The 2300–4000 linear blend is the program's bridging policy, and using 64/Re up to Re 4000 for vapour does not make the transition region accurate either. The vapour function (lineSizingFrictionFactor) is discontinuous at Re 4000: with D = 0.1 m and ε = 0.046 mm, f(4000) = 0.016 and f(4000.001) ≈ 0.04037. [R2]
Drawn with the app's own friction functions. The liquid / two-phase curve (blue) bridges 2300–4000 linearly; lineSizingFrictionFactor for vapour (orange, dashed) steps up at Re 4000. The green dotted line is the fully turbulent fT used for Crane fitting K. Change ε/D above; hover for values.

Fitting and valve losses

Fitting and valve losses are added to friction through resistance coefficients K, evaluated per line with that line's Reynolds number and size.

ΣK = Kother + Σ ( counti × Ki )     hfittings = ΣK · v²/2g Kother = the line's Other K

K method one choice for the whole drawing (line properties → valves · fittings → Fitting K method)

3-K (Darby, default): K = Km/Re + Ki·(1 + Kd/Dn0.3) Dn nominal size, inch (ID in inch without an NPS)
2-K (Hooper): K = K1/Re + K∞·(1 + 1/ID) ID inside diameter, inch
Crane (TP-410): K = n·fT,   fT = 0.25 / [ log10( ε / 3.7D ) ]² n = L/D, fully turbulent friction factor
Entrance K = 160/Re + 0.5 (projecting + 1.0), exit K = 1.0 Crane: fixed 0.5 / 1.0
  • Re term (Km/Re, K1/Re): raises K at low Re. Liquid lines use the line Re, vapour lines Re = G·D/μG. Two-phase lines drop the Re term (fully turbulent values).
  • Size term: 2-K scales with (1 + 1/ID), 3-K with (1 + Kd/Dn0.3), so the same fitting has a larger K in a smaller pipe. Crane reflects size only through fT.
  • Difference from Crane: Crane K is a fully turbulent value independent of Re, so it understates losses at low Re and in laminar flow; 2-K and 3-K carry on into laminar flow through the Re term. Darby reports 3-K fitting data better than 2-K over a wide range of Re and sizes. [R8]
  • Missing values: a fitting missing from the chosen table uses the other table (butterfly, tilting-disc check and reduced-trim ball use 2-K under 3-K; r/D 2·4·6 bends and plug valves use 3-K under 2-K). Under Crane, a fitting without an L/D uses 3-K (else 2-K). Crane L/D values are the existing defaults (90° elbow 30, gate 8, …) and the (L/D)eq column of Darby's table.
  • Equipment: heat exchangers, filters, control valves and flow elements add their entered ΔP, not a K.
K versus Re with the app's constants. 3-K and 2-K rise at low Re through the Km/Re and K1/Re terms and level off at high Re where only the size term remains; Crane is a flat line independent of Re. Change the fitting and size above.

Worked example example suction line: 3" Sch 40, Re 115,774, entrance 1 + gate 1 + 90° elbow 3

Item3-K2-KCrane
Entrance160/Re + 0.5 = 0.50140.50140.5
Gate valve300/Re + 0.037(1 + 3.9/30.3) = 0.1434300/Re + 0.10(1 + 1/3.067) = 0.13528 × 0.01734 = 0.1387
90° elbow × 33 × [800/Re + 0.091(1 + 4.0/30.3)] = 1.07913 × [800/Re + 0.25(1 + 1/3.067)] = 1.01533 × 30 × 0.01734 = 1.5606
ΣK1.72391.65192.1994
Example pump head36.29 m36.34 m36.67 m

The app's values match this hand calculation (ID 77.93 mm = 3.067 in, ε 0.046 mm, fT = 0.01734).

Fitting constants main eleven + more fittings · valves

Fitting2-K: K₁ / K∞3-K: Km / Ki / KdCrane L/D
Gate valve300 / 0.10300 / 0.037 / 3.98
Globe valve1500 / 4.01500 / 1.70 / 3.6340
Ball valve300 / 0.10300 / 0.017 / 4.03
Butterfly800 / 0.25(uses 2-K)45
Swing check1500 / 1.501500 / 0.46 / 4.0100
90° elbow std (flanged/welded)800 / 0.25800 / 0.091 / 4.030
45° elbow std500 / 0.20500 / 0.071 / 4.216
Tee run (flanged)250 / 0.05150 / 0.017 / 4.020
Tee branch (flanged)800 / 0.80800 / 0.28 / 4.060
Entrance160/Re + 0.5160/Re + 0.5K 0.5
ExitK = 1.0K = 1.0K 1.0
90° elbow, long radius (r/D 1.5)800 / 0.20800 / 0.071 / 4.216
90° elbow, threaded std800 / 0.40800 / 0.14 / 4.030
90° bend r/D 2(uses 3-K)800 / 0.056 / 3.912
90° bend r/D 4(uses 3-K)800 / 0.066 / 3.914
90° bend r/D 6(uses 3-K)800 / 0.075 / 4.217
90° mitre, 1 weld1000 / 1.151000 / 0.27 / 4.060
90° mitre, 2 welds (45°)800 / 0.35800 / 0.068 / 4.115
90° mitre, 3 welds (30°)800 / 0.30800 / 0.035 / 4.28
90° mitre, 4 welds (22.5°)800 / 0.27(uses 2-K)(3-K/2-K value)
90° mitre, 5 welds (18°)800 / 0.25(uses 2-K)(3-K/2-K value)
45° elbow, long radius500 / 0.15500 / 0.052 / 4.0(3-K/2-K value)
45° mitre, 1 weld500 / 0.25500 / 0.086 / 4.015
45° mitre, 2 welds (22.5°)500 / 0.15500 / 0.052 / 4.06
180° return, flanged1000 / 0.351000 / 0.12 / 4.050
180° return, threaded1000 / 0.701000 / 0.23 / 4.050
180° return, long radius1000 / 0.301000 / 0.10 / 4.0(3-K/2-K value)
Tee run, threaded200 / 0.10200 / 0.091 / 4.020
Tee run, stub-in100 / 0.0100 / 0 / 0(3-K/2-K value)
Tee branch, threaded500 / 0.70500 / 0.274 / 4.060
Tee branch, long radius thr.800 / 0.40800 / 0.14 / 4.0(3-K/2-K value)
Tee branch, stub-in1000 / 1.001000 / 0.34 / 4.0(3-K/2-K value)
Ball, reduced trim β0.9500 / 0.15(uses 2-K)(3-K/2-K value)
Ball/plug, reduced trim β0.81000 / 0.25(uses 2-K)(3-K/2-K value)
Plug, straight through300 / 0.10300 / 0.084 / 3.918
Plug, 3-way through(uses 3-K)300 / 0.14 / 4.030
Plug, branch flow(uses 3-K)500 / 0.41 / 4.090
Globe Y-type / angle 45°1000 / 2.0950 / 0.25 / 4.055
Angle valve 90°1000 / 2.01000 / 0.69 / 4.0150
Diaphragm (dam)1000 / 2.01000 / 0.69 / 4.9(3-K/2-K value)
Lift check2000 / 10.02000 / 2.85 / 3.8600
Tilting-disc check1000 / 0.50(uses 2-K)(3-K/2-K value)
Entrance, projecting160/Re + 1.0160/Re + 1.0K 1.0

Constants: Hooper (1981) 2-K and Darby (1999) 3-K, transcribed from the textbook reprints (Tables 4-8 and 4-9). [R7] [R8] The 90° elbow in the main list is the standard flanged/welded r/D = 1 elbow and the tees are flanged; other geometries are under "More fittings · valves" in the line properties.

2-K and 3-K values assume fittings far enough apart not to interact. Close-coupled fittings, partly open valves, β corrections for reduced trim and fitting losses in two-phase flow need separate review. Equivalent-length f·Le/D and ΣK approaches must be compared with consistent friction factors and fitting conditions.

3. Pump head · NPSHa · pressure profile

H = (Pd − Ps)/ρpg + Σ ρi(z2 − z1)i/ρp + Σ ΔPf,i/ρpg + ΣΔPequip/ρpg with one density the static term is zd − zs
NPSHacalc = (Ps,abs − Pv)/ρpg + (zs − zp) − hL,suction    NPSHashown = NPSHacalc − margin first term 0 for a saturated liquid; margin default 0.6 m
  • Pump fluid: ρ in the head ↔ pressure conversion, static head and NPSHa is the density of the pump suction line (the line just before the pump).
  • zs, zd: calculation level of the suction and discharge vessels (default suction LLL, discharge HLL; selectable per vessel). The pump uses its EL (centreline). A nozzle EL entered on a line becomes that end's elevation; a discharge nozzle above the liquid level uses the nozzle EL (columns always use the nozzle EL).
  • Where line densities differ, both the friction ΔP and the elevation ΔP (ρline·g·Δz) of each line are converted to head of the pump fluid before summing. Two-phase and vapour elevation/acceleration ΔP are treated the same way.
  • Suction strainer: its ΔP is a suction-side loss and counts in both hL,suction (NPSHa) and the head.
  • Vapour pressure: "saturated" sets Pv = Ps,abs (suction vessel); "enter value" uses the typed Pv (kgf/cm²a).
  • Pressures and power: Ps = Pvessel + ρg(zs − zp − hL,suction), ΔPpump = ρgH, Pd = Ps + ΔPpump. Hydraulic power = ρ·g·Q·max(H, 0), shaft power = hydraulic / η, with Q the design flow of the suction line.
  • Pressure profile: starting at the source vessel pressure, each line subtracts its friction and elevation ΔP, each item its ΔP, and the pump adds ΔPpump. With one density this is the same as following the hydraulic grade line HGL = P/ρg + z.
Psuction,max = Pdesign,suction vessel + ρpg(zHLL − zp)    Pshutoff = Psuction,max + ΔPshutoff ΔPshutoff blank → centrifugal ΔPpump × 1.25 (turbine drive 1.45)

Maximum suction and shutoff pressures are preliminary values from the suction vessel design pressure and HLL (z for vessels without levels). Enter the actual shutoff differential from the pump curve.

Concept sketch with example values. The HGL is drawn on an absolute-pressure basis. It starts at the suction surface (z_s + P_s,abs/ρg), falls by the suction loss, rises by H at the pump, then falls by the discharge loss and equipment ΔP to the discharge vessel. The gap between the HGL at the pump inlet and the Pv/ρg + z_p line is the calculated NPSHa. The panel on the right is the app's check: calculated NPSHa minus the margin is the NPSHa shown, which must be at least NPSHr.
The required-head equation neglects velocity at the vessel free surfaces. The general energy line is EGL = P/(ρg) + z + αv²/(2g); the current static-pressure profile ignores changes in velocity head, so static pressure at size changes, branches and nozzle boundaries needs further review. The NPSHa on screen is the calculated value minus the pump's margin (default 0.6 m, editable in the pump properties), and a warning shows when it is below NPSHr (i.e. NPSHacalc − NPSHr < margin); it is a preliminary screen and does not replace manufacturer or project margin requirements. [R4]

4. Line pressure chaining line table

  1. Lines on each pump's governing path: values from the §3 profile. A pump runs at one head, so the line table follows the governing path even when another path is shown on screen.
  2. Other lines: a line leaving a vessel starts at the vessel operating pressure; a line leaving an inline item starts at the end pressure of the line coming in minus the item ΔP. A line leaving a pump that is not on a calculated path has no start pressure (—).
  3. End pressure: liquid P2 = P1 − ΔPfriction − ρ·g·(z2 − z1); vapour and two-phase per §5 and §6.
  4. Branches off the governing path chain on from the junction pressure. Where such a branch arrives above its vessel pressure, the line table shows the excess.
  5. When the network is not fully solved (missing flow or fluid, path error), pressures carry on as initial values: a pump with no head passes its suction pressure, a line with no calculable loss uses zero friction. These are marked as initial values in the line table.
  6. Elevations come from the connected items: vessel = calculation level, pump = EL, other items = EL (blank = 0). Inline item ELs can be edited in the line table.
All lines leaving a junction start at the same pressure. A non-governing branch arrives above its vessel pressure; that excess has to be taken by a control valve or orifice for the entered split to hold. (Example values.)

5. Vapour lines calculation model: lineSizingFrictionFactor · solveIsothermalOutletPressure

Properties

Vapour lines use only the vapour fields (Vapor Density, Vapor Viscosity, MW, Z, Cp/Cv). The liquid Density / Viscosity cells are not used, so values left there from before a line was switched to VAPOR do not leak into the calculation.

ρ = Pabs · MW / ( Z · R · T ) R = 8314.46 J/kmol·K, T = °C + 273.15, Z default 1

MW + T take precedence. Without them, a Vapor Density @PT (inlet conditions) is scaled with pressure, ρ(P) = ρinlet · P/P1 (isothermal). The line table marks Temperature, Vapor Density and MW as "Required" until one of these two routes is complete, and Vapor Viscosity until it is entered.

Friction factor (lineSizingFrictionFactor)

Re = G·D/μG    Re ≤ 4000 → f = 64/Re    Re > 4000 → explicit start value, then one Colebrook pass

Start value: a = ε/(3.7D), b = 5.02/Re, f0 = [ −2·log(a − b·log(a − b·log(a − b·log(a − b·log(a + 14/Re))))) ]−2. This nested explicit approximation belongs to the Shacham (1980) / Zigrang–Sylvester (1982) family and matches the nested a − (5.02/Re)·log(...) structure documented in the Aspen Flare System Analyzer manual (Ch. 9 Theoretical Basis, Eq. 9.5; Eq. 9.5 writes 3 nested levels with −13.0/Re for Fanning ff, whereas the code uses 4 nested levels with +14/Re for Darcy f = 4ff followed by one Colebrook substitution). [R2]

Outlet pressure (solveIsothermalOutletPressure): isothermal compressible flow including acceleration

P1² − P2² = P1·ρ1·v1² · [ f·L/D + ΣK + 2·ln(P1/P2) ]

This integrates the momentum equation dP + G²·d(1/ρ) + f·G²/(2ρD)·ds = 0 over a horizontal straight pipe for a steady, constant-area, isothermal gas with constant Z, so ρ/P and G = ρv are constant. It is 100% identical to Eq. 9.1 of the Aspen Flare System Analyzer manual (Ch. 9, p. 157), (G/a)²·ln(P1/P2) + M(P2² − P1²)/(2RT) + 2ff(L/D)(G/a)² = 0, with f = 4ff (Eq. 9.7) and ρ1 = P1M/(RT). The 2·ln(P1/P2) term is the pressure change from expansion acceleration and is distinct from irreversible friction. f is evaluated once and fittings are treated as an equivalent resistance. The acceleration term is already part of the current implementation. P2 is solved by Newton iteration (converged when residual and step are both below 10⁻⁸ + 10⁻¹⁰·P kgf/cm²; 100 iterations, extended in steps of 50 up to 300 while still improving). Isothermal and adiabatic models must be kept apart. [R3]

F(P2) = P2² − P1² + P1ρ1v1²·(R + 2·ln(P1/P2))    F′ = 2P2 − 2P1ρ1v1²/P2    P2 ← P2 − F/F′
  • Choke: F′ = 0 at P2 = √(P1ρ1v1²), the isothermal critical pressure. If F > 0 even there, no subsonic solution exists; the line is flagged choked and the value shows "—". In the calculation model this is the case where the outlet pressure turns negative and the cell goes blank. A Newton step below the critical pressure is bisected back.
  • Fittings: f·L/D + ΣK (§2) accounts for pipe and fitting resistance. Equivalent length must not be counted again.
  • Elevation: not in solveIsothermalOutletPressure; added as a separate row ΔPg = ρavg·g·Δz, ρavg = (ρ1 + ρ2)/2.
  • Mach: c = √(k·P/ρ) (k = Cp/Cv, default 1.3), Ma = v/c shown at inlet and outlet.
  • ΔP/100 m: f·(100/D)·ρ1v1²/2 at inlet conditions.
  • ΔP/P1: (P1 − P2)/P1, the friction pressure drop over the inlet absolute pressure. It does not switch the equation; it shows how strongly compressibility acts (see Basics).
The app's solveIsothermalOutletPressure equation, P₁² − P₂² = P₁ρ₁v₁²[R + 2 ln(P₁/P₂)], for several inlet values of ρ₁v₁²/P₁ (= the square of the isothermal Mach number Ma₁,T). Dots mark the isothermal choke at P₂ = √(P₁ρ₁v₁²); beyond it there is no subsonic solution. Dashed lines drop the acceleration term (incompressible) and fall away from the compressible result as R grows.
R in the Newton equation is the resistance fL/D + ΣK, not the gas constant. The isothermal critical condition is v/√(P/ρ) = 1; the displayed acoustic Mach v/√(kP/ρ) is then 1/√k, not 1. The elevation correction is a separate approximation, and the outlet density, velocity and Mach are evaluated at the pressure before the gravity correction. Large elevation differences or pressure drops need a segment-wise pressure/property calculation.

6. Two-phase lines Beggs & Brill pressure loss + selected friction

Per-line friction method selection

Select Beggs & Brill, Friedel (1979), Müller–Steinhagen–Heck (1986), or Lockhart–Martinelli / Chisholm (1967) in the line table. Selected straight-pipe friction affects the actual pressure profile and pump head. Holdup, gravity and the acceleration denominator remain Beggs & Brill, with a common no-slip fitting K term. Alternative friction forms an application-specific hybrid, not an original full-pressure-loss model. The selection survives saving and reloading. HTFS is not included. Comparison rows show straight-pipe friction only.

ΔPtotal = [ΔPf,selected + KρNS vm²/2 + ρs gΔz]/(1−Ek)
Friedel: ΔPf = ΔPlo [E + 3.24 F H/(Fr^0.0454 We^0.035)]
MSH: ΔPf = [ΔPlo + 2(ΔPgo−ΔPlo)x](1−x)^(1/3) + ΔPgo x³
LM/Chisholm: ΔPf = ΔPl + C√(ΔPl ΔPg) + ΔPg

lo/go use total flow as each phase alone; l/g use the actual phase flows. LM uses C = 5, 12, 10, or 20 for the liquid/gas laminar–turbulent combinations, with Re = 2000 as the transition and no roughness correction. Friedel requires surface tension, rejects μG > μL, and flags μL/μG > 1000 or downflow. Inclined LM results are flagged as horizontal-model comparisons. MSH and LM remain available without surface tension. Single-phase and zero-flow handling are local extensions.

Equations, coefficients and references: Fluids v1.3.1, MIT. MSH/LM straight-pipe comparisons do not require surface tension, but the full calculation still requires it for Beggs & Brill holdup. An unavailable selected correlation reports an error instead of silently substituting another friction model.

The calculation core is adapted to JavaScript from the MIT-licensed Fluids v1.3.1 implementation, using the revised L1–L4 reference-regime boundaries. Copyright and full MIT notice · Source and local modifications. This is not a direct verification of every equation against the full 1973 paper.

Beggs & Brill (1973) supplies holdup and gravity/acceleration corrections. The per-line friction selection is saved separately; missing or unsupported legacy model IDs default to Beggs & Brill friction. Existing reference results from other methods are historical comparisons, not validation of every hybrid combination.

λ = vSL / (vSL + vSG),   Fr = vm²/(gD)
ρNS = λρL + (1−λ)ρG,   μNS = λμL + (1−λ)μG,   ReNS = ρNSvmD/μNS
ρs = HLρL + (1−HL)ρG
ΔPf = (fNS·eS·L/D + ΣK)·ρNSvm²/2 y = λ/HL², S = ln y / (−0.0523 + 3.182 ln y − 0.8725 (ln y)² + 0.01853 (ln y)⁴); S = ln(2.2y − 1.2) for 1 < y < 1.2
Ek = ρsvmvSG/Pabs
ΔPtotal = (ΔPf + ρsgΔz)/(1−Ek)

The horizontal reference pattern (segregated, transition, intermittent or distributed) determines horizontal liquid holdup. Inclination corrects holdup; it does not predict the actual inclined flow pattern. Transition holdup interpolates the segregated and intermittent branches. Surface tension in dyn/cm is required for two flowing phases. fNS is the §2 liquid friction function with the entered roughness; fittings use a no-slip mixture K approximation outside the original straight-pipe correlation.

Fixed inlet properties and constant mass quality are assumed. A differing outlet quality is rejected. Zero-flow calculations use the supplied phase volume fractions without predicting a flowing regime. Holdup outside 0–1, impossible elevation/length geometry, nonpositive outlet absolute pressure and Ek ≥ 1 are rejected. Large pressure changes require subdivision and separate validation. No Payne correction is applied.

Two-phase discharge lines on a pump path: because the loss depends on the inlet pressure, the path is solved backwards from the destination vessel, iterating each line's inlet pressure until inlet = outlet + ΔPtotal. Non-convergence is reported as an error.

Reference: Beggs, H. D., & Brill, J. P., A Study of Two-Phase Flow in Inclined Pipes, JPT 25 (1973), 607–617. Equations cross-checked against Harmony technical documentation; independent numerical comparison: Fluids Beggs_Brill example.

This implementation is not affiliated with or endorsed by the authors or publisher. Results are for preliminary engineering calculations and require independent verification before detailed design.

7. Flow pattern Beggs & Brill horizontal reference

The pattern the app reports is the horizontal reference regime used by the holdup correlation (segregated, transition, intermittent, distributed). These are grouped regimes, not a prediction of the actual inclined or vertical flow pattern.

L1 = 316λ0.302,   L2 = 0.0009252λ−2.4684,   L3 = 0.1λ−1.4516,   L4 = 0.5λ−6.738
  • Segregated: λ < 0.01 and Fr < L1, or λ ≥ 0.01 and Fr < L2
  • Transition: λ ≥ 0.01 and L2 ≤ Fr ≤ L3. HL = A·HL,segregated + (1−A)·HL,intermittent, A = (L3 − Fr)/(L3 − L2)
  • Intermittent: 0.01 ≤ λ < 0.4 and L3 < Fr ≤ L1, or λ ≥ 0.4 and L3 < Fr ≤ L4
  • Distributed: everything else
HL(0) = max(λ, a·λb/Frc) segregated 0.98 / 0.4846 / 0.0868 · intermittent 0.845 / 0.5351 / 0.0173 · distributed 1.065 / 0.5824 / 0.0609
HL(θ) = HL(0)·[1 + C(sin 1.8θ − sin³1.8θ/3)],   C = max(0, (1−λ)·ln(d·λe·NLvf·Frg)) NLv = vSL(ρL/gσ)1/4; C = 0 for distributed upflow
Coloured with the app's own L1–L4 boundaries and rules. Vertical dotted lines are λ = 0.01 and 0.4. Hover for the regime and the horizontal holdup HL(0) at that point.

Scope and surface tension

  • Surface tension enters only NLv (the inclination correction), but it is required whenever both phases flow, including horizontal lines.
  • The regime is evaluated once, at the line inlet. If pressure or quality changes a lot along the line, the regime can change too; split the line for review.
  • The actual pattern in vertical or inclined lines (slug, annular, …) needs a mechanistic map such as Taitel–Dukler (1976) or Barnea (1987). [R6]

8. Erosional velocity API RP 14E

Ve = C / √ρm [ft/s, lb/ft³], C = 100 → Ve = 122 / √ρm [m/s, kg/m³]    ρm = 1 / ( x/ρG + (1−x)/ρL )

Mixture (homogeneous) velocity vm = G/ρm. V/Ve > 1 is shown red; ρv² is shown as well. The code uses 121.99.

C = 100 is the program's preliminary screening setting. V/Ve ≤ 1 does not guarantee freedom from erosion or corrosion; solids, corrosion, material and local geometry need separate review. [R5]

9. Verification criteria

Regression agreement is not experimental validation. Check mass conservation, single-phase limits, local pressures, units, original public equations and applicability ranges separately. Private cached examples are not public validation evidence.

10. Assumptions and limits

  • Steady state, isothermal within a line. The two-phase vapour fraction is fixed at the input value. Flashing along a line is not calculated; an outlet quality different from the inlet is rejected.
  • Vapour and two-phase results feed the line-list pressures. Two-phase discharge losses enter the pump head with the selected method (§6); suction-side two-phase, NPSH and gas-only pump paths remain liquid-equation reference values that need separate review.
  • The flow pattern is the Beggs & Brill horizontal reference regime; inclination corrects holdup only. The actual pattern in vertical or inclined lines needs separate review (§7).
  • Items with a blank EL are taken at 0. Items with significant elevation need an EL for the pressures to be right.
  • Drawing layout and drawn pipe length do not affect the calculation; entered lengths and elevations do.
  • Vapour lines ignore the liquid Density/Viscosity cells; enter the vapour properties in their own rows.

11. Variable names and verification

Calculation identifiers name the quantity and units: inletAbsolutePressurePa, outletGaugePressureKgfCm2, liquidDensityKgM3, liquidViscosityCp, liquidViscosityPaS, massFluxKgM2S, gasMassFraction, gasVoidFraction, noSlipLiquidVolumeFraction, frictionPressureLossPa, gravityPressureLossPa, pumpHeadM and availableNpshM. Mass quality, actual void fraction and no-slip fraction are distinct.

Short existing JSON and presentation-field keys remain compatibility contracts; calculation functions unpack them into descriptive identifiers. Regression checks cover flow splits, pressure losses, phase methods, nozzle boundaries, storage and a pump-transfer regression case. Regime checks separately cover orientation, equilibrium residual, transitions and consistency between the map and operating point.

12. Sources and confidence

Detailed pressure-loss constants include reference-reproduction choices. Model scope, coefficient provenance and regime verification are distinguished; flow-pattern equations and scope are in §7.

Sources checked 2026-10-18 (equation-to-code check 2026-10-21). Linked general theory and manual equations are distinguished from detailed polynomial constants whose proprietary original report has not been inspected.

  1. R1 · Log definitions: JavaScript built-in Math documentation: Math.log10 (base 10), Math.log (natural log). Official definitions confirmed.
  2. R2 · Friction factor and nested explicit start value: Colebrook (1939), Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws; NASA (2014), eq. (4). The nested ε/(3.7D) − (5.02/Re)·log10(...) initial-guess formula in lineSizingFrictionFactor belongs to the Shacham (1980) / Zigrang & Sylvester (1982) explicit Colebrook family and matches the nested log structure in the Aspen Flare System Analyzer manual (Ch. 9: Theoretical Basis, p. 159, Eq. 9.5).
  3. R3 · Isothermal compressible pipe flow: Aspen Flare System Analyzer manual (Ch. 9: Theoretical Basis, p. 157, Eq. 9.1), (G/a)²·ln(P1/P2) + M(P2² − P1²)/(2RT) + 2ff(L/D)(G/a)² = 0, which is 100% identical to the integral solved in solveIsothermalOutletPressure. Supporting: NASA NTRS report 19760005229.
  4. R4 · NPSH margin: Hydraulic Institute, Reliability Basics: Understanding NPSH, POR, and AOR (2022). Confirms the need for margin above NPSH3 and an operating region.
  5. R5 · Erosional velocity limit: Southwest Research Institute / BSEE, Erosional/Corrosional Testing for Multiphase Flow Lines. Multiphase erosion/corrosion testing and a review of API RP 14E applicability. Not checked against a specific edition of the API standard.
  6. R6 · Flow pattern: Taitel & Dukler (1976), A model for predicting flow regime transitions in horizontal and near horizontal gas-liquid flow, AIChE J. 22(1), 47–55. Publisher abstract and scope confirmed. The regime shown in the app is the Beggs & Brill horizontal reference, not this map; this paper is a reference for separate review of vertical and inclined lines (§7).
  7. R7 · 2-K fitting coefficients: W. B. Hooper, “The two-K method predicts head losses in pipe fittings”, Chem. Eng., Aug 24 1981, pp. 96–100. Constants as reprinted in textbook Table 4-8.
  8. R8 · 3-K fitting coefficients: R. Darby, “Correlate pressure drops through fittings”, Chem. Eng., July 1999, pp. 101–104. Constants and (L/D)eq as reprinted in textbook Table 4-9; not checked against the full original article.

13. Control valve Cv · Kv · travel

Enable sizing in the valve inspector. It uses the actual valve inlet pressure calculated on the governing path and the specified device ΔP. Sizing is a selection check and never changes the line or equipment ΔP. No Cv is calculated where the pressure calculation is incomplete.

Cv = W / [27.3·FP·√(ρ·ΔPsizing)] gas: Y in the denominator; two-phase: √(ΔPsizing/veq)
FF = 0.96 − 0.28√(Pv/Pc),   ΔPchoked = (FLP/FP)²(P1 − FFPv)
xchoked = (k/1.4)·xTP,   Y = 1 − xsizing/[3(k/1.4)xTP], Y ≥ 2/3
Kv = 0.865·Cv

W in kg/h, pressures in bar(a), differential in bar, density in kg/m³. For gas ΔPsizing = min(ΔP, xchokedP1). Attached-reducer factors FP, FLP, xTP are iterated with Cv up to 100 times; non-convergence is an error. Default coefficients are examples; manufacturer FL, Fd and xT are needed.

When the valve Reynolds number Rev < 10000 (liquid, or gas with a viscosity entered) and no FR is typed, FR is calculated with the ANSI/ISA-75.01.01-2012 (IEC 60534-2-1) non-turbulent procedure: start at Ci = 1.3C and raise Ci by 30 % until C/FR ≤ Ci. For gas, Y = √(1 − x/2) below Rev 1000, the turbulent form above 10000, and linear in between. The reducer factor FP is not applied in this case. A typed manufacturer FR divides Cv instead. Rev is not evaluated for two-phase flow.

Two-phase flow uses the Flowserve Sizing & Selection 3-15 equal-velocity, equivalent-specific-volume approximation, veq = (1−x)/ρL + x/(ρGY²), with the limiting ΔP of the volumetrically dominant phase. It is meant for liquid / non-condensable gas mixtures; flashing or own-vapour service needs manufacturer review.

Travel is linearly interpolated between the entered manufacturer travel–Cv points, without extrapolation. Ideal linear / equal-percentage characteristics are labelled as ideal and do not replace a manufacturer curve. Min / normal / design comparisons hold P1 and ΔP fixed; they are not pump operating-point predictions. Without a rated Cv only the required Cv is shown.

Public references: Fisher Control Valve Sourcebook, sizing equations and constants; Masoneilan Valve Sizing Handbook, Reynolds effects; Flowserve/Valtek Sizing & Selection, two-phase approximation.