calculate_minor_loss
Calculate minor head loss through pipe fittings using K-factor method, taking diameter, flow, and fitting list to return velocity, total loss, and pressure drop for system sizing.
Instructions
Calculate total minor (dynamic) head loss through a set of pipe fittings using the K-factor method: h = K × v² / (2g). Provide a pipe diameter, flow rate, and a list of fitting types with quantities. Each fitting's K-factor is looked up from the built-in database (use list_fitting_kfactors to see available types), or supply a customK for non-standard fittings. Returns: flow velocity, individual fitting losses, total minor loss, total equivalent length of pipe, and pressure drop. Use this to account for valves, elbows, tees, and other fittings when sizing pipes or pumps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fittings | Yes | List of fittings. Each entry has a type (key from list_fitting_kfactors), optional quantity, and optional customK override. | |
| flowRate | Yes | Flow rate in the given units. | |
| flowUnits | Yes | Flow units matching EPANET's [OPTIONS] Units. | |
| diameterMm | Yes | Pipe inner diameter in mm (at the fitting location). |