Junction Losses

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.

How Junction Losses Work

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:

hj = Kj × V² / (2g)

Where:

  • Kj — Junction loss coefficient, determined by the assigned loss type
  • V — Outlet pipe velocity (ft/s)
  • g — Gravitational constant (32.174 ft/s²)

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.

Computation Methods

Each loss type in a library specifies one of three computation methods (Equation Kinds). The method determines how Kj and hj are calculated.

1. Expression String

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.

Available Variables

Variable Description
V_oOutlet pipe velocity (ft/s)
V_iDominant inlet pipe velocity (ft/s)
V_lLateral inlet aggregate velocity (ft/s) — average across all inlet pipes except the dominant
Q_oOutlet pipe flow (cfs)
Q_iDominant inlet pipe flow (cfs)
Q_lLateral inlet aggregate flow (cfs)
D_oOutlet pipe diameter (ft)
D_iDominant inlet pipe diameter (ft)
D_lLateral inlet aggregate diameter (ft)
A_oOutlet pipe full-barrel cross-sectional area (sq ft) — shape-aware (circular or box)
A_iDominant inlet full-barrel area (sq ft)
A_lLateral full-barrel area, flow-weighted (sq ft)
vh_oOutlet velocity head: V_o² / (2g)
vh_iInlet velocity head: V_i² / (2g)
vh_lLateral velocity head: V_l² / (2g)
thetaDeflection angle (degrees) — from Node.DeflectionAngleDegrees
theta_radDeflection angle (radians)
theta_lLateral deflection angle (degrees)
theta_l_radLateral deflection angle (radians)
r_over_dBend radius ratio: Node.BendRadius / D_o (used by 1D r/D bend tables, e.g. Austin Case 6)
d_ratioDiameter ratio: D_o / D_i (used by Brater & King enlargement/contraction tables)
a_ratioArea ratio: A_o / A_i (shape-aware, used by 2D area-ratio × velocity tables)
bBench height (ft)
d_ahAccess hole depth (ft)
KLoss coefficient from the loss type definition
gGravity constant (32.174 ft/s²)
piPi constant (3.14159…)
eEuler's number (2.71828…)

Available Functions

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:

K * V_o^2 / (2 * g)

Example expression for an angle-dependent bend loss:

K * sin(theta_rad / 2) * V_o^2 / (2 * g)

2. HEC-22 Energy Loss Method (2nd Edition)

The FHWA HEC-22 2nd Edition (2001, FHWA-NHI-01-021) compound K method. The head loss is computed as:

K = Ko × CD × Cd × CQ × Cp × CB, then hj = K × Vo² / (2g)

Where the correction factors account for:

  • Ko — Initial loss coefficient based on structure size relative to outlet pipe
  • CD — Correction for pipe diameter changes
  • Cd — Correction for flow depth
  • CQ — Correction for relative flow (lateral vs. through flow)
  • Cp — Correction for plunging flow
  • CB — Correction for benching

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.

3. HEC-22 Energy Loss Method (4th Edition)

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:

  1. Initial energy level: Eai = max(Eaio, Eais, Eaiu) — the maximum of the outlet control, submerged inlet control, and unsubmerged inlet control analogies.
  2. Corrections (Eq 9.27): Ha = (CB + Cθ + CP)(Eai − Ei) — adjustments for benching, angled inflow, and plunging inflow.
  3. Exit loss (Eq 9.31): Ho = 0.4 × Vo² / (2g) — exit loss into the outlet pipe.

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.

Deflection Angles

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:

  1. Auto-detection from Civil 3D part description — HydraStorm recognizes standard angles (22.5, 30, 45, 60, and 90 degrees) in the part description text.
  2. Geometric computation (fallback) — If the part description does not contain a recognized angle, HydraStorm computes the deflection angle from the pipe geometry at that structure.

Expression Overrides

A loss type using ExpressionString can carry up to two optional expression overrides that take priority over the primary expression in specific flow regimes:

Partial Flow Override

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.

With-Inflow Override

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:

  • The node has a design flow greater than zero
  • The node has drainage area assigned
  • The outlet flow exceeds the sum of all inlet pipe flows (indicating captured runoff entering at the node)

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.

Assigning Loss Types

There are several ways to assign loss types to structures in your network:

  • Property panel — Select a pipe, then use the Junction Losses section of the property panel to assign a loss type to the upstream or downstream structure.
  • Structures Table — Open the Structures Table from the Tables menu for bulk assignment across all structures in the network.
  • Kj Override — Enter a manual Kj value in the property panel to override the loss type's computed coefficient. Leave blank to use the default computed value. Enter 0 to force zero loss at a structure.
Property panel showing the loss type dropdown and Kj override field for a selected structure
Property panel showing the loss type dropdown and Kj override field for a selected structure

Auto-Matching

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."

Smart Memory

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.

Need a Library for Your Jurisdiction?

  • HydraStorm ships with built-in libraries for HEC-22, iSWM/NCTCOG, and a general-purpose starter library.
  • You can create custom libraries using the Loss Library Manager.
  • Don't see a loss library for your jurisdiction? Contact support@bezaleldesignlab.com and we'll look into building one for you.