pipe_sizing_wizard
Choose standard pipe sizes meeting velocity and friction-loss limits, then rank top candidates by composite suitability—one call for validated pipe selection.
Instructions
End-to-end pipe sizing wizard: given a flow rate, pipe length, and material, finds every standard pipe size that satisfies velocity AND friction-loss constraints, then ranks them by suitability. Chains velocity-based diameter recommendation with Hazen-Williams or Darcy-Weisbach friction-loss validation in a single call. Supports velocity presets (distribution/transmission/service/suction), roughness presets (hdpe/pvc/di-cement/steel-new etc.), and optional max head-loss or max pressure-drop filters. Returns the top N candidates ranked by a composite score (60% velocity closeness + 40% head-loss efficiency). Each candidate includes: nominal size, inner diameter, velocity, head loss per metre, total head loss, pressure drop, Reynolds number, flow regime, and the friction factor. Use this to make a single validated pipe selection without calling recommend_diameter and friction_loss separately.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topN | No | Number of top-ranked candidates to return (default 5, max 20). | |
| method | No | Friction-loss method (default: hazen-williams). | |
| lengthM | Yes | Pipe length in metres for head-loss calculation. | |
| flowRate | Yes | Design flow rate in the given flow units. | |
| material | No | Restrict to a single material. Omit to search all. | |
| flowUnits | Yes | Flow units matching EPANET's [OPTIONS] Units. | |
| roughnessC | No | Hazen-Williams C-factor. Required when method is hazen-williams and no preset. | |
| maxVelocity | No | Maximum velocity in m/s (default 2.0). | |
| minVelocity | No | Minimum velocity in m/s (default 0.5). | |
| maxHeadLossM | No | Maximum allowed total head loss in metres. Candidates exceeding this are excluded. | |
| velocityPreset | No | Velocity-range preset. 'custom' (default) uses min/maxVelocity. | |
| roughnessPreset | No | Roughness preset (sets roughnessC or roughnessEpsilonMm automatically). | |
| maxPressureDropBar | No | Maximum allowed pressure drop in bar. Candidates exceeding this are excluded. | |
| roughnessEpsilonMm | No | Darcy-Weisbach roughness ε in mm. Required when method is darcy-weisbach and no preset. |