friction_loss
Calculate head loss and pressure drop in water pipes using Hazen-Williams or Darcy-Weisbach methods. Use to validate pipe sizing or compare friction losses across materials and diameters.
Instructions
Calculate friction loss (head loss and pressure drop) in a full-bore water pipe. Supports two methods: Hazen-Williams (empirical, uses C-factor, water-only) and Darcy-Weisbach (physics-based, uses absolute roughness ε, universally applicable). Returns head loss per metre, total head loss over the pipe length, pressure drop, flow velocity, Reynolds number, and the Darcy friction factor. Roughness presets are available for common pipe materials (hdpe, pvc, di-cement, steel-new, steel-aged, etc.) or supply custom values. Use this to validate pipe sizing from recommend_diameter or to compare friction losses across materials/ diameters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | Yes | Friction-loss method: 'hazen-williams' (empirical, water-only, uses C-factor) or 'darcy-weisbach' (physics-based, uses pipe roughness height ε). | |
| preset | No | Roughness preset: sets roughnessC or roughnessEpsilonMm automatically. 'custom' (default) requires explicit roughness values. | |
| lengthM | Yes | Pipe length in metres for the total head-loss calculation. | |
| flowRate | Yes | Design flow rate in the given flow units. | |
| flowUnits | Yes | Flow units matching EPANET's [OPTIONS] Units. | |
| diameterMm | Yes | Pipe inner diameter in mm (the value from lookup_pipe_diameters or set_pipe_diameter). | |
| roughnessC | No | Hazen-Williams C-factor (required for hazen-williams method). Typical: 150 (PVC/HDPE), 140 (new DI/steel), 100 (aged steel). | |
| roughnessEpsilonMm | No | Darcy-Weisbach absolute roughness height ε in mm (required for darcy-weisbach method). Typical: 0.007 (PVC/HDPE), 0.045 (new steel), 0.26 (new cast iron), 1.0 (concrete). |