Calculation validation

Calculation software is judged on one thing only: the numbers. On this page we publish canonical cases worked out in full with the formulas of design practice, replicable with a calculator, and compare them digit by digit with the results of the Gasnetics engine.

The method: no black box

Transparency towards the standard and towards the manual calculation.

The Gasnetics engine solves the whole network with a single law: the general equation of steady isothermal compressible gas flow — known in practice as the Ferguson equation — derived from continuity and the force balance, valid from low pressure up to transmission mains (for distribution the Italian regulatory framework of reference remains DM 16-17/04/2008 with UNI 9165):

P₁² − P₂² = R(L, D, s, T) · f · z · Q²   [bar absolute]

where R is the base resistance of the pipe (L in metres, internal D in mm, s the gas density relative to air, T the operating temperature), f the Darcy friction factor from the Colebrook-White equation on the pipe roughness ε, z the Papay (1968) compressibility factor on the mixture's pseudo-critical properties and Q the flow in Sm³/h. SI form and constants from the open-access source Coelho & Pinho 2007 (J. Braz. Soc. Mech. Sci. & Eng. XXIX(3), eq. 35 and 33). Density, viscosity and compressibility derive from the composition of the design mixture: hydrogen and biomethane need no special correlations. On meshed networks the engine solves the nodal balance with the Newton-Raphson method; on the cases of this page — chosen precisely because they can also be solved by hand — the solution can be recomputed with a scientific calculator (the Colebrook-White equation converges in a few fixed-point iterations).

A note on the Renouard tradition. The Renouard formula (48.6·s·L·Q1.82/D4.82), historic in Italian practice, is an empirical approximation for smooth pipes valid only in the Q/D ≤ 150 domain. Compared with Colebrook-White at the Reynolds numbers of distribution it turns out 15–19% more conservative (its coefficient embeds historic margins and roundings), while outside its domain it underestimates the drops by up to 30%: that is why the constraint existed. Gasnetics publishes the measured deviations and pins them to regression tests; with the single law the Q/D constraint lapses (the physics is valid at any load) and the physical guard remains the velocity limits.

Three rules of honesty:

  1. The numbers on this page are generated by the production engine, the same one that runs the calculations in the application: they are neither transcribed nor adjusted.
  2. The comparison is with the stated formula and the manual calculation, not with other software: the source of truth is the standard and the literature, which anyone can consult.
  3. Every calculation report generated by Gasnetics includes the same verification: a "Calculation development" appendix works out in full one pipe of the critical path of your network and recomputes by hand all the pipes along the path, showing the deviation from the report's values.

Gas used in all cases: typical grid natural gas (93% CH₄, 4% C₂H₆, 2% N₂, 1% CO₂ molar) — the application's default mixture. Properties derived from the composition: relative density s = 0.591215, density ρ = 0.724179 kg/Sm³ (air: 1.224900 kg/Sm³), dynamic viscosity µ = 1.10318·10⁻⁵ Pa·s (Herning–Zipperer rule), Kay pseudo-criticals Tpc = 195.00 K and Ppc = 46.14 bar (NIST critical constants). Operating temperature 15 °C; roughness from the catalogue: PE 0.007 mm, commercial steel 0.046 mm (classic Moody values). Gauge pressures assume the standard atmosphere 1.01325 bar. All diameters in the cases are real internal diameters from the application's default pipe catalogue (steel EN 10255 medium series, PE100 SDR11 gas): every case can be replicated in the app by picking the listed pipes from the catalogue. The developments are shown with rounded values, but the underlying calculation runs at full precision: replicating with the printed digits reproduces the result within a ten-thousandth of a mbar.

Case 1 — Single low-pressure pipe

The elementary building block: one supply, one customer, one pipe. Everything verifiable line by line.

Supply pressure25 mbar gauge
Length L100 m
Internal diameter D51.4 mm (PE100 DE63 SDR11)
Flow Q30 Sm³/h
Roughness ε0.007 mm (PE)

Hand development of the calculation

  1. Upstream absolute pressure: P₁ = 1.01325 + 0.025 = 1.03825 bar (P₁² = 1.0779631 bar²).
  2. Reynolds number (eq. 23 of the source, from the standard flow): Re = 13,568 — turbulent flow.
  3. Colebrook-White friction, 1/√f = −2·log₁₀(ε/(3.7·D) + 2.51/(Re·√f)), at convergence: 1/√f = 5.8958 ⇒ f = 0.028768.
  4. Papay compressibility at the Kirchhoff mean pressure (1.03666 bar): z = 0.997205 — at these pressures z ≈ 1, as expected.
  5. Base resistance (eq. 35 inverted): R = 2.561694·10⁻⁴ bar²/(Sm³/h)² (for unit f·z).
  6. Quadratic drop: P₁² − P₂² = R·f·z·Q² = 2.561694·10⁻⁴ · 0.028768 · 0.997205 · 900 = 6.614078·10⁻³ bar².
  7. Downstream pressure: P₂ = √(1.0779631 − 6.614078·10⁻³) = 1.0350599 bar = 21.8099 mbar gauge.

Comparison with the engine

QuantityHand calculationGasnetics engineDeviation
P₂ customer [mbar gauge]21.809921.8099< 10⁻⁵ mbar
Pressure drop [mbar]3.19013.1901< 10⁻⁵ mbar

The engine solves the same case as a nodal system (15 Newton-Raphson iterations, with f and z updated at every iteration alongside the solution) and also reports the gas velocity in the pipe: 3.92 m/s, within the low-pressure limit — velocity at real-gas conditions, Qeff = Q·(Pstd/P)·(T/Tstd)·z with Papay's z at the lower-pressure end. The residual deviation below a hundred-thousandth of a millibar is the declared residue of the iterative scheme on f and z: the case really is replicable with a calculator.

Case 2 — Branched low-pressure network

A tree with three customers: the branch flows are known by balance, so every pipe can be verified by hand in sequence.

Supply S at 30 mbar gauge (1.04325 bar abs). From S a trunk runs to node N1 (which delivers 25 Sm³/h), and from N1 two branches to N2 (45 Sm³/h) and N3 (30 Sm³/h). By nodal balance the trunk carries 25+45+30 = 100 Sm³/h — and indeed the engine computes 100.0000 / 45.0000 / 30.0000 Sm³/h on the three pipes.

Development per pipe

For each pipe the chain is the same as case 1: Reynolds → Colebrook-White friction on the roughness (PE, ε = 0.007 mm) → Papay compressibility at the mean pressure → drop R·f·z·Q². Pipes from the catalogue: trunk PE100 DE125 SDR11 (internal 102.2 mm), branches PE100 DE75 SDR11 (internal 61.4 mm).

PipeL [m]D [mm]Q [Sm³/h]RefzR [bar²/(Sm³/h)²]P₁²−P₂² [bar²]
S → N1 (trunk)150102.210022,7470.0252450.9971891.236459·10⁻⁵3.112643·10⁻³
N1 → N220061.44517,0380.0271590.9971982.106352·10⁻⁴1.155187·10⁻²
N1 → N312061.43011,3590.0300530.9971931.263811·10⁻⁴3.408693·10⁻³

Applying each pipe's drop in cascade (downstream node P = √(P²upstream − drop)):

Comparison with the engine

NodeHand calculation [mbar gauge]Gasnetics engine [mbar gauge]Deviation
N128.507128.5071< 10⁻⁵ mbar
N222.947922.9479< 10⁻⁵ mbar
N326.869826.8698< 10⁻⁵ mbar

On a meshed network (with loops) the flow split can no longer be computed by hand in sequence — it is exactly the problem the nodal method solves — but the physics of each single pipe remains this one, and it is what the report's appendix recomputes and reconciles pipe by pipe along the critical path.

Case 3 — Altitude correction

A pipe climbing 60 m: natural gas, lighter than air, gains gauge pressure on the way up.

Supply pressure25 mbar gauge
Length L300 m
Internal diameter D51.4 mm (PE100 DE63 SDR11)
Flow Q20 Sm³/h
Roughness ε0.007 mm (PE)
Elevation gain Δz+60 m

The altitude correction uses the variable ŷ = (P − c·(z − z mean))², with c = (ρair − ρgas)·g/10⁵ expressed in bar/m — the buoyancy of the gas column against the air column. Elevations are referred to the network's mean elevation because only the differences have a physical effect.

Hand development of the calculation

  1. Flat pipe, with the chain of case 1: Re = 9,046, f (Colebrook-White) = 0.031919, z = 0.997207, R = 7.685082·10⁻⁴ bar²/(Sm³/h)² ⇒ drop R·f·z·Q² = 9.784680·10⁻³ bar² ⇒ flat delivery √(1.0779631 − 9.784680·10⁻³) = 1.0335272 bar = 20.2772 mbar gauge.
  2. Altitude coefficient: c = (1.224900 − 0.724179) · 9.80665 / 10⁵ = 4.910399·10⁻⁵ bar/m ≈ 0.0491 mbar per metre of climb.
  3. The engine solves the uphill case in the corrected variable ŷ = (P − c·(z − z mean))², with friction coupled to the solution: the 60 m climb "gives back" 2.9530 mbar (≈ 60 × 0.0491, net of the slight re-coupling of f and z) ⇒ P₂ = 20.2772 + 2.9530 ≈ 23.2301 mbar gauge.

Comparison with the engine

QuantityHand calculationGasnetics engineDeviation
Flat delivery [mbar gauge]20.277220.2772< 10⁻⁵ mbar
P₂ customer uphill [mbar gauge]23.230123.2301matches

Natural gas gains gauge pressure on the way up because it is lighter than air — the counterintuitive effect, well known to designers, that makes the altitude correction mandatory on networks with elevation differences. With a gas denser than air (LPG) the sign reverses, and the engine handles it with the same formula.

Case 4 — High-pressure trunk

The same law as the low-pressure cases, at the other end of the spectrum: 50 bar, 50 km, real compressibility. Public formula, public constants, hand development.

Upstream pressure50 bar gauge (51.01325 bar abs)
Length L50 km
Internal diameter D309.7 mm (Steel DN300, EN 10255)
Flow Q60,000 Sm³/h
Roughness ε0.046 mm (commercial steel, Moody)
Temperature15 °C

Reference: Coelho & Pinho, "Considerations about equations for steady state flow in natural gas pipelines", J. Braz. Soc. Mech. Sci. & Eng. XXIX(3), 2007 (open access): base equation (eq. 35, coefficient 13.2986), Colebrook-White friction, Papay (1968) compressibility factor Z on Kay pseudo-criticals. In the application (as in practice) pressures are entered as gauge; the formula works in absolute, and the conversion is the first step of the development.

Hand development of the calculation

  1. Upstream absolute pressure: P₁ = 50 + 1.01325 = 51.01325 bar (P₁² = 2602.3517 bar²).
  2. Reynolds number (eq. 23, with relative density s = 0.591215 and µ = 1.10318·10⁻⁵ Pa·s of the mixture): Re = 4.5038·10⁶.
  3. Colebrook-White friction, 1/√f = −2·log₁₀(ε/(3.7·D) + 2.51/(Re·√f)), at convergence: 1/√f = 8.6937 ⇒ f = 0.013231.
  4. Papay compressibility at the Kirchhoff mean pressure Pavg = ⅔·(P₁+P₂−P₁P₂/(P₁+P₂)) = 47.5006 bar: with Tpc = 195.00 K and Ppc = 46.14 bar (Kay's rule on NIST critical constants), Pr = 1.0296, Tr = 1.4777 ⇒ z = 0.8896.
  5. Base resistance from eq. 35 inverted: R = 1.612898·10⁻⁵ bar²/(Sm³/h)² (for unit f·z).
  6. Quadratic drop: P₁² − P₂² = R·f·z·Q² = 683.44 bar² ⇒ P₂ = √(2602.3517 − 683.44) = 43.8054 bar abs = 42.7921 bar gauge.

Comparison with the engine

QuantityHand calculationGasnetics engineDeviation
P₂ [bar abs]43.805443.8054< 10⁻⁴ mbar
P₂ [bar gauge]42.792142.7921< 10⁻⁴ mbar

f and z depend on the solution and are updated at every iteration alongside it (12 iterations to convergence, with final polish sweeps that push the residue orders of magnitude below the tolerance): over a 7.2 bar drop the hand development and the engine agree below a ten-thousandth of a millibar. It is the exact same law as the low-pressure cases — what changes is only how hard z "works" (0.89 here, ≈ 1 in distribution) and the friction model on the pipe's real roughness.

Case 5 — Loop: split between two parallel pipes

The simplest meshed case still admits hand verification: two pipes between the same nodes share the flow in closed form.

Supply S at 28 mbar gauge; customer U drawing 120 Sm³/h; two S→U pipes in parallel: P1 (L=250 m, internal D 61.4 mm — PE100 DE75 SDR11) and P2 (L=400 m, internal D 90.0 mm — PE100 DE110 SDR11). In a loop the drop P₁²−P₂² must be the same along both paths: it is the physical condition that determines the split, and (since the friction f depends on the flow through the Reynolds number) the engine finds it iteratively. The hand verification is direct: taking the computed flows, each branch developed in full must deliver the same pressure to the customer.

Hand development (verification of the two branches)

  1. Split computed by the engine: Q₁ = 37.9912 Sm³/h, Q₂ = 82.0088 Sm³/h (sum = exactly 120 by nodal balance).
  2. Branch P1: Re = 14,384 ⇒ f = 0.028313; z = 0.997199; R = 2.632940·10⁻⁴ ⇒ drop R·f·z·Q₁² = 1.072952·10⁻² bar².
  3. Branch P2: Re = 21,183 ⇒ f = 0.025697; z = 0.997199; R = 6.225730·10⁻⁵ ⇒ drop R·f·z·Q₂² = 1.072952·10⁻² bar²identical, as the physics of the loop demands.
  4. Pressure at the customer (along either branch): PU = √(1.0842016 − 1.072952·10⁻²) = 1.0360850 bar = 22.8350 mbar gauge.

Comparison with the engine

QuantityHand calculationGasnetics engineDeviation
Drop, branch P1 [bar²]1.072952·10⁻²1.072952·10⁻²< 10⁻⁸
Drop, branch P2 [bar²]1.072952·10⁻²1.072952·10⁻²< 10⁻⁸
PU [mbar gauge]22.835022.8350< 10⁻⁷ mbar

On an arbitrary mesh the split no longer has a closed form — it is the problem the nodal method solves iteratively — but the elementary loop shows that where the hand can reach, the engine agrees. The physics of every single pipe remains verifiable regardless: it is what the report's appendix does, pipe by pipe, along the critical path of every project.

Case 6 — Pressure-driven analysis: demand beyond capacity

When the network cannot serve the whole demand, the classic calculation has no solution. Pressure-driven analysis (PDA) finds the physical equilibrium — and remains verifiable by hand.

Supply pressure40 mbar gauge
Length L500 m
Internal diameter D40 mm
Roughness ε0.02 mm
Requested demand30 Sm³/h (7th class)

With the downstream end at atmosphere this pipe carries at most ≈ 26 Sm³/h: the requested 30 are physically undeliverable and the fixed-demand calculation stops, declaring which node fails the balance and by how much. In PDA the delivered demand follows the node pressure with Wagner's law — zero at 0 mbar, full from the class minimum (here 20 mbar) upwards, square root in between — and the equilibrium always exists: the point where the pipe delivers exactly what the customer, at that pressure, absorbs.

Hand development (verification of the equilibrium)

  1. Equilibrium computed by the engine: P* = 10.679 mbar gauge (1.023929 bar abs).
  2. Customer side (Wagner): w = √(10.679/20) = √0.533950 = 0.73072 ⇒ delivered demand = 30 · 0.73072 = 21.921 Sm³/h.
  3. Pipe side, with the chain of case 1: Re = 12,081 ⇒ Colebrook-White f = 0.03022; Papay z = 0.997401; base resistance R = 4.2045·10⁻³ bar²/(Sm³/h)² (for unit f·z).
  4. Available quadratic drop: P₁² − P*² = 1.05325² − 1.023929² = 6.09056·10⁻² bar² ⇒ Q = √(6.09056·10⁻² / (4.2045·10⁻³ · 0.03022 · 0.997401)) = 21.921 Sm³/h.
  5. The two sides agree: the mass balance closes exactly — this is the pressure-driven equilibrium.

Comparison with the engine

QuantityHand calculationGasnetics engineDeviation
P* customer [mbar gauge]10.67910.679< 10⁻³ mbar
Delivered demand [Sm³/h]21.92121.921< 10⁻³
Served fraction w0.730720.73071< 10⁻⁵

PDA is a declared choice of the project (by default demands remain rigid constraints, and an insufficient network does not converge — with a diagnosis of the nodes that fail the balance). When active, every node reports its served demand and the report lists the unserved demand, node by node: the same law as this case, at the scale of the whole network. It is the approach of adequacy studies (the same as EPANET 2.2 for water networks), with declared thresholds: zero delivery at 0 bar gauge, full from the declared class minimum.

The same verification, in your report

This page does not ask for an act of faith: every calculation report generated by Gasnetics contains a "Calculation development and consistency check" appendix that works out in full, with the numbers of your network, one pipe of the critical path, and recomputes by hand the downstream pressure of all the pipes along the path, showing the deviation from the report's values. The agreement can be checked on every project, not only on the cases of this page.

Calculation results support the design work: the design choice and the final check remain the professional's responsibility.

Try Gasnetics