Junction losses represent energy loss at structures — manholes, inlets, bends, wyes — where pipes connect. Accurately modeling these losses is critical for a reliable HGL analysis. HydraStorm computes junction losses using a data-driven loss library system that supports multiple computation methods.
At each structure in your network, HydraStorm computes a head loss (hj) as part of the downstream-to-upstream HGL analysis. The loss is typically expressed as:
Where:
The computed head loss is added to the HGL at the downstream end of the structure, propagating the energy grade line upstream through the network.
Each loss type in a library specifies one of three computation methods (Equation Kinds). The method determines how Kj and hj are calculated.
A user-authored mathematical expression evaluated at calculation time. This is the most flexible method, allowing you to encode any formula using the available variables and functions.
| Variable | Description |
|---|---|
V_o | Outlet pipe velocity (ft/s) |
V_i | Dominant inlet pipe velocity (ft/s) |
V_l | Lateral inlet aggregate velocity (ft/s) — average across all inlet pipes except the dominant |
Q_o | Outlet pipe flow (cfs) |
Q_i | Dominant inlet pipe flow (cfs) |
Q_l | Lateral inlet aggregate flow (cfs) |
D_o | Outlet pipe diameter (ft) |
D_i | Dominant inlet pipe diameter (ft) |
D_l | Lateral inlet aggregate diameter (ft) |
A_o | Outlet pipe full-barrel cross-sectional area (sq ft) — shape-aware (circular or box) |
A_i | Dominant inlet full-barrel area (sq ft) |
A_l | Lateral full-barrel area, flow-weighted (sq ft) |
vh_o | Outlet velocity head: V_o² / (2g) |
vh_i | Inlet velocity head: V_i² / (2g) |
vh_l | Lateral velocity head: V_l² / (2g) |
theta | Deflection angle (degrees) — from Node.DeflectionAngleDegrees |
theta_rad | Deflection angle (radians) |
theta_l | Lateral deflection angle (degrees) |
theta_l_rad | Lateral deflection angle (radians) |
r_over_d | Bend radius ratio: Node.BendRadius / D_o (used by 1D r/D bend tables, e.g. Austin Case 6) |
d_ratio | Diameter ratio: D_o / D_i (used by Brater & King enlargement/contraction tables) |
a_ratio | Area ratio: A_o / A_i (shape-aware, used by 2D area-ratio × velocity tables) |
b | Bench height (ft) |
d_ah | Access hole depth (ft) |
K | Loss coefficient from the loss type definition |
g | Gravity constant (32.174 ft/s²) |
pi | Pi constant (3.14159…) |
e | Euler's number (2.71828…) |
| Function | Description |
|---|---|
sin(x), cos(x), tan(x) | Trigonometric functions (input in radians) |
asin(x), acos(x), atan(x) | Inverse trigonometric functions (output in radians) |
atan2(y, x) | Two-argument arctangent (output in radians) |
sqrt(x) | Square root |
abs(x) | Absolute value |
pow(x, y) | Raise x to the power y |
min(x, y), max(x, y) | Minimum / maximum of two values |
ln(x) | Natural logarithm |
log10(x) | Base-10 logarithm |
deg2rad(x) | Convert degrees to radians |
rad2deg(x) | Convert radians to degrees |
vh(v) | Velocity head: v² / (2g) |
Example expression for a simple K-based loss:
Example expression for an angle-dependent bend loss:
The FHWA HEC-22 2nd Edition (2001, FHWA-NHI-01-021) compound K method. The head loss is computed as:
Where the correction factors account for:
These correction factors are computed automatically from the node geometry and connecting pipe properties. This method was retained verbatim in HEC-22 3rd Edition (2009) and removed in 4th Edition. It is still required by NCTCOG iSWM 2014 §1.2.10 (which reproduces the compound equations as Eq 1.36–1.42), so it backs the built-in iSWM / NCTCOG library and any user-created library that explicitly selects Hec22EnergyLoss2ndEd.
The FHWA HEC-22 4th Edition (2024, HIF-24-006) §9.1.6.7 Inlet and Access Hole Energy Loss Method. This replaces the 2nd Edition compound method for jurisdictions adopting the updated standard (e.g., TxDOT, recent FHWA federal projects).
The method computes the access hole energy level in three steps:
The total junction loss returned is (Ea − Ei) + Ho. All five benching types (Flat, Depressed, Half Bench, Full Bench, Improved) are supported. This method is used by the built-in HEC-22 Standard library and any library specifying the Hec22EnergyLoss4thEd equation kind.
Bend, wye, and manhole deflection angles are stored per-structure, not per-library. This means one library entry (e.g., "Bend") handles all angles via the theta and theta_rad variables in the expression.
HydraStorm determines the deflection angle in two ways:
A loss type using ExpressionString can carry up to two optional expression overrides that take priority over the primary expression in specific flow regimes:
The Partial Flow expression is used when the outlet pipe is in partial (free-surface) flow — i.e., the downstream HGL sits below the pipe crown. Use this when a published standard gives different K values or formulas for partial vs. full-flow conditions. Takes priority over the inflow override below when both are eligible.
The With Inflow expression is used when the structure captures surface runoff (i.e., it is an inlet with local inflow). HydraStorm detects inflow when any of the following conditions are met:
This distinction is important because inlet structures with captured runoff behave differently from through-flow manholes, and many loss equations account for this with different coefficients.
The resolver picks an expression in this order: Partial Flow override (if eligible) → With Inflow override (if eligible) → primary expression.
There are several ways to assign loss types to structures in your network:
0 to force zero loss at a structure.
HydraStorm's LossTypeMatcher uses priority-ranked keyword matching to automatically suggest loss types based on Civil 3D part descriptions. When you load a network, each structure's part description is matched against the loss types in the active library to find the best fit.
The matching process considers keywords in the loss type name and group against words in the Civil 3D part description, ranked by relevance. For example, a structure with the description "48 in Dia Concentric Manhole" would match a loss type named "Manhole" or "Straight Run Manhole."
When you manually assign a loss type to a structure, HydraStorm remembers that association between the part description and the loss type. This learning system is scoped per library, so assignments made while using a Frisco library do not affect matching when using a Dallas library.
After you make 2 or more consistent assignments of the same loss type to a given part description, HydraStorm auto-applies that match in future projects. The memory dominance rule requires the learned choice to have at least twice the count of any alternative before it auto-applies, preventing premature lock-in from a single assignment.
For example: assign structures with the description "45 Deg Bend" to the "Bend" loss type in two different projects. In the third project, all "45 Deg Bend" structures will automatically receive the "Bend" loss type.
The learning memory is stored at %LocalAppData%\HydraStorm\LossTypeHistory.json. Stale entries (referencing deleted loss types) are automatically ignored and fall through to keyword matching.