Fittings
Overview
In piping systems, fittings (elbows, tees, reducers) and valves allow for the change of direction, branching, and regulation of fluid flow. Identifying the pressure loss across these components is a critical step in pump sizing and system analysis. Unlike straight pipe friction, which is distributed along the length, fitting losses are often treated as “minor losses” (though they can be major in complex networks).
The K-Factor Method
The most common engineering approach is the Resistance Coefficient (K) method, where the head loss h_L is proportional to the velocity head:
h_L = K \frac{v^2}{2g} \quad \text{or} \quad \Delta P = K \frac{1}{2} \rho v^2
Equivalent Length Method
Another common method expresses the fitting’s resistance as an equivalent length (L_e) of straight pipe of the same diameter. A fitting with L_e/D = 50 produces the same pressure drop as a straight pipe section 50 diameters long.
Python Libraries
These functions utilize the fluids library, which implements resistance models for hundreds of fittings and valves. The library provides validated implementations of industry standards like Crane TP-410 and Miller, ensuring high fidelity in pipe network analysis and pump sizing.
Conversion and Specific Fittings
Different industries and standards use different metrics for capacity and loss.
CV_TO_K: Converts the imperial valve flow coefficient (C_v) to a dimensionless K-factor.K_TO_KV: Converts K-factor to the metric flow coefficient (K_v).K_GATE_VALVE,BEND_ROUNDED: Calculate K-factors for specific geometries based on standards like Crane TP-410 or Miller.
Native Excel Capabilities
Excel provides no built-in support for fitting losses. Users must manually: - Research resistance coefficients (K) or equivalent lengths (L/D) from handbooks. - Implement formulas for K that depend on Reynolds number (like Miller’s method). - Hand-code conversion between C_v, K_v, K, and L/D.
The Python functions provided here centralize these industrial standards, providing a unified and validated interface for piping system designers directly within their spreadsheets.
Tools
| Tool | Description |
|---|---|
| BEND_MITER | Calculate the loss coefficient (K) for a single-joint miter bend in a pipe. |
| BEND_ROUNDED | Calculate the loss coefficient (K) for a rounded pipe bend (elbow) using various methods. |
| CONTRACTION_ROUND | Calculate the loss coefficient (K) for a rounded pipe contraction (reducer). |
| CONTRACTION_SHARP | Calculate the loss coefficient (K) for a sharp edged pipe contraction (reducer). |
| CV_TO_K | Convert imperial valve flow coefficient (Cv) to loss coefficient (K). |
| DIFFUSER_CONICAL | Calculate the loss coefficient (K) for a conical pipe expansion (diffuser). |
| DIFFUSER_SHARP | Calculate the loss coefficient (K) for a sudden pipe expansion (diffuser). |
| ENTRANCE_ANGLED | Calculate the loss coefficient (K) for an angled sharp entrance to a pipe flush with a reservoir wall. |
| ENTRANCE_BEVELED | Calculate the loss coefficient (K) for a beveled or chamfered entrance to a pipe flush with a reservoir wall. |
| ENTRANCE_ROUNDED | Calculate the loss coefficient (K) for a rounded entrance to a pipe flush with a reservoir wall. |
| ENTRANCE_SHARP | Calculate the loss coefficient (K) for a sharp entrance to a pipe flush with a reservoir wall. |
| EXIT_NORMAL | Calculate the loss coefficient (K) for a normal pipe exit discharging into a reservoir. |
| HELIX | Calculate the loss coefficient (K) for a helical coil pipe section. |
| K_BALL_VALVE | Calculate the loss coefficient (K) for a ball valve using the Crane method. |
| K_BUTTERFLY_VALVE | Calculate the loss coefficient (K) for a butterfly valve using the Crane method. |
| K_GATE_VALVE | Calculate the loss coefficient (K) for a gate valve using the Crane method. |
| K_GLOBE_VALVE | Calculate the loss coefficient (K) for a globe valve using the Crane method. |
| K_SWING_CHECK_VALVE | Calculate the loss coefficient (K) for a swing check valve using the Crane method. |
| K_TO_CV | Convert loss coefficient (K) to imperial valve flow coefficient (Cv). |
| K_TO_KV | Convert loss coefficient (K) to metric valve flow coefficient (Kv). |
| KV_TO_K | Convert metric valve flow coefficient (Kv) to loss coefficient (K). |
| SPIRAL | Calculate the loss coefficient (K) for a spiral coil pipe section. |