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.
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.
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.
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.
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
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.
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
Friction factor
- 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).
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]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 method one choice for the whole drawing (line properties → valves · fittings → Fitting K method)
- 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.
Worked example example suction line: 3" Sch 40, Re 115,774, entrance 1 + gate 1 + 90° elbow 3
| Item | 3-K | 2-K | Crane |
|---|---|---|---|
| Entrance | 160/Re + 0.5 = 0.5014 | 0.5014 | 0.5 |
| Gate valve | 300/Re + 0.037(1 + 3.9/30.3) = 0.1434 | 300/Re + 0.10(1 + 1/3.067) = 0.1352 | 8 × 0.01734 = 0.1387 |
| 90° elbow × 3 | 3 × [800/Re + 0.091(1 + 4.0/30.3)] = 1.0791 | 3 × [800/Re + 0.25(1 + 1/3.067)] = 1.0153 | 3 × 30 × 0.01734 = 1.5606 |
| ΣK | 1.7239 | 1.6519 | 2.1994 |
| Example pump head | 36.29 m | 36.34 m | 36.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
| Fitting | 2-K: K₁ / K∞ | 3-K: Km / Ki / Kd | Crane L/D |
|---|---|---|---|
| Gate valve | 300 / 0.10 | 300 / 0.037 / 3.9 | 8 |
| Globe valve | 1500 / 4.0 | 1500 / 1.70 / 3.6 | 340 |
| Ball valve | 300 / 0.10 | 300 / 0.017 / 4.0 | 3 |
| Butterfly | 800 / 0.25 | (uses 2-K) | 45 |
| Swing check | 1500 / 1.50 | 1500 / 0.46 / 4.0 | 100 |
| 90° elbow std (flanged/welded) | 800 / 0.25 | 800 / 0.091 / 4.0 | 30 |
| 45° elbow std | 500 / 0.20 | 500 / 0.071 / 4.2 | 16 |
| Tee run (flanged) | 250 / 0.05 | 150 / 0.017 / 4.0 | 20 |
| Tee branch (flanged) | 800 / 0.80 | 800 / 0.28 / 4.0 | 60 |
| Entrance | 160/Re + 0.5 | 160/Re + 0.5 | K 0.5 |
| Exit | K = 1.0 | K = 1.0 | K 1.0 |
| 90° elbow, long radius (r/D 1.5) | 800 / 0.20 | 800 / 0.071 / 4.2 | 16 |
| 90° elbow, threaded std | 800 / 0.40 | 800 / 0.14 / 4.0 | 30 |
| 90° bend r/D 2 | (uses 3-K) | 800 / 0.056 / 3.9 | 12 |
| 90° bend r/D 4 | (uses 3-K) | 800 / 0.066 / 3.9 | 14 |
| 90° bend r/D 6 | (uses 3-K) | 800 / 0.075 / 4.2 | 17 |
| 90° mitre, 1 weld | 1000 / 1.15 | 1000 / 0.27 / 4.0 | 60 |
| 90° mitre, 2 welds (45°) | 800 / 0.35 | 800 / 0.068 / 4.1 | 15 |
| 90° mitre, 3 welds (30°) | 800 / 0.30 | 800 / 0.035 / 4.2 | 8 |
| 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 radius | 500 / 0.15 | 500 / 0.052 / 4.0 | (3-K/2-K value) |
| 45° mitre, 1 weld | 500 / 0.25 | 500 / 0.086 / 4.0 | 15 |
| 45° mitre, 2 welds (22.5°) | 500 / 0.15 | 500 / 0.052 / 4.0 | 6 |
| 180° return, flanged | 1000 / 0.35 | 1000 / 0.12 / 4.0 | 50 |
| 180° return, threaded | 1000 / 0.70 | 1000 / 0.23 / 4.0 | 50 |
| 180° return, long radius | 1000 / 0.30 | 1000 / 0.10 / 4.0 | (3-K/2-K value) |
| Tee run, threaded | 200 / 0.10 | 200 / 0.091 / 4.0 | 20 |
| Tee run, stub-in | 100 / 0.0 | 100 / 0 / 0 | (3-K/2-K value) |
| Tee branch, threaded | 500 / 0.70 | 500 / 0.274 / 4.0 | 60 |
| Tee branch, long radius thr. | 800 / 0.40 | 800 / 0.14 / 4.0 | (3-K/2-K value) |
| Tee branch, stub-in | 1000 / 1.00 | 1000 / 0.34 / 4.0 | (3-K/2-K value) |
| Ball, reduced trim β0.9 | 500 / 0.15 | (uses 2-K) | (3-K/2-K value) |
| Ball/plug, reduced trim β0.8 | 1000 / 0.25 | (uses 2-K) | (3-K/2-K value) |
| Plug, straight through | 300 / 0.10 | 300 / 0.084 / 3.9 | 18 |
| Plug, 3-way through | (uses 3-K) | 300 / 0.14 / 4.0 | 30 |
| Plug, branch flow | (uses 3-K) | 500 / 0.41 / 4.0 | 90 |
| Globe Y-type / angle 45° | 1000 / 2.0 | 950 / 0.25 / 4.0 | 55 |
| Angle valve 90° | 1000 / 2.0 | 1000 / 0.69 / 4.0 | 150 |
| Diaphragm (dam) | 1000 / 2.0 | 1000 / 0.69 / 4.9 | (3-K/2-K value) |
| Lift check | 2000 / 10.0 | 2000 / 2.85 / 3.8 | 600 |
| Tilting-disc check | 1000 / 0.50 | (uses 2-K) | (3-K/2-K value) |
| Entrance, projecting | 160/Re + 1.0 | 160/Re + 1.0 | K 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.
3. Pump head · NPSHa · pressure profile
- 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.
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.
4. Line pressure chaining line table
- 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.
- 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 (—).
- End pressure: liquid
P2 = P1 − ΔPfriction − ρ·g·(z2 − z1); vapour and two-phase per §5 and §6. - 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.
- 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.
- 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.
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.
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)
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
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]
- 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).
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.
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.
ρ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.
- 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
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
Mixture (homogeneous) velocity vm = G/ρm. V/Ve > 1 is shown red; ρv² is shown as well. The code uses 121.99.
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.
- R1 · Log definitions: JavaScript built-in Math documentation: Math.log10 (base 10), Math.log (natural log). Official definitions confirmed.
- 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 inlineSizingFrictionFactorbelongs 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). - 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 insolveIsothermalOutletPressure. Supporting: NASA NTRS report 19760005229. - R4 · NPSH margin: Hydraulic Institute, Reliability Basics: Understanding NPSH, POR, and AOR (2022). Confirms the need for margin above NPSH3 and an operating region.
- 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.
- 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).
- 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.
- 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.
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.