PIPE

Hydraulic Pipe

Hydraulics
Run the live example Free · no sign-up · runs in your browser

The Hydraulic Pipe is a straight round pipe or hose between ports A and B. Its pressure drop follows the flow through it: proportional at low Reynolds numbers (laminar) and close to quadratic at high ones (turbulent).

Flow runs either way; a positive flow goes from A to B.

Real-World Analog: Represents a steel hydraulic line or high-pressure reinforced hose connecting pump, valves, and actuators with friction loss and pressure drop.

Mathematical Model

Δp={128 μLπD4 qRe≤2000f(Re) LD ρ v∣v∣2Re≥4000\Delta p = \begin{cases} \dfrac{128\,\mu L}{\pi D^4}\,q & Re \le 2000 \\[6pt] f(Re)\,\dfrac{L}{D}\,\dfrac{\rho\,v|v|}{2} & Re \ge 4000 \end{cases}

Where:

  • Re = ρ|v|D/μ, v = q/A, A = πD²/4
  • f is the Haaland friction factor: 1/√f = −1.8·log10((ε/D/3.7)^1.11 + 6.9/Re)
  • Between Re 2000 and 4000 the two are blended smoothly (value and slope continuous)

Inputs & Outputs

Direction ID Label Type Status
→ In p A number Required
→ In n B number Required
→ In H H number Optional
← Out q_diss Q_diss number Output

Parameters

Parameters Label Type Default Description
length Length number 1 Pipe length
diameter Inner diameter number 0.01 Hydraulic (inner) diameter
roughness Roughness number 0.0000015 Absolute wall roughness; 1.5 µm is drawn tube
fluid_inertia Fluid inertia boolean true Mass of the fluid column (ρ·L/A): pressure surges such as water hammer
segments Wave sections number 1 Pieces of a travelling-wave (Bergeron) line, so pressure waves arrive after L/a (needs Fluid inertia)
wall_thickness Wall thickness number 0.002 With the wall modulus, sets the wave speed (Korteweg); used with wave sections
wall_modulus Wall elastic modulus number 210000000000 Young's modulus of the wall: steel 2.1e11 Pa, PVC about 3e9 Pa

Usage Examples

Valve closing against a relief valve

The example examples/basic-hydraulicpipe.json feeds a valve from a 20 bar oil supply through a pipe. The line settles near 15.8 bar; at t = 0.5 s the valve closes to 10 % and the 18 bar relief valve takes over the flow. Run it on TR-BDF2.

Water hammer when a valve shuts

The example examples/water-hammer.json runs water from 5 bar through a 100 m rigid pipe with fluid inertia, already flowing at t = 0 (steady_start on the supply). At t = 1 s the valve shuts at once and the pressure at the valve jumps from 4.7 to about 33 bar — Joukowsky's ρ·a·v₀ to within 0.5 % — and then swings around the supply pressure.

A pressure wave in a steel pipe

The example examples/water-hammer-wave.json runs water from 20 bar through 500 m of steel pipe (D = 0.1 m, wall 5 mm, a ≈ 1350 m/s) in 8 Bergeron pieces, already flowing at t = 0. When the valve shuts at t = 1 s the pressure at the valve jumps by about 13 bar, holds for exactly 2L/a ≈ 0.74 s while the wave travels to the supply and back, and then drops below the supply pressure.

Remarks & Best Practices

  • Water hammer is on by default (fluid_inertia, segments = 1) and the network starts in its steady state (steady_start on the FluidReservoir).
  • Gauge pressure: every hydraulic pressure is relative to ambient; an open tank is 0 Pa.
  • Units: pressure in Pa (1 bar = 100 000 Pa), flow in m³/s (1 L/min ≈ 1.667e-5 m³/s).
  • No cavitation: a pressure wave can drive the gauge pressure below −1 bar here; a real liquid would boil (column separation) instead.

Related Components