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 the structure's Deflection column in the Minor Losses table
theta_radDeflection angle (radians)
theta_lLateral deflection angle (degrees)
theta_l_radLateral deflection angle (radians)
r_over_dBend radius ratio: the structure's bend radius ÷ 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)

The θ convention: HydraStorm follows HEC-22 convention for theta: 180° means straight-through (no bend at all), and 90° means a right-angle bend — the angle decreases as the bend gets sharper. Write expressions with this in mind: a bend-loss formula should go to zero as theta approaches 180°, not to its maximum. K * sin(theta_rad / 2), for example, is backwards under this convention — it peaks at θ = 180° and would charge the largest loss to a straight run of pipe.

Example expression for an angle-dependent bend loss, from the built-in HEC-22 and iSWM/NCTCOG libraries (HEC-22 4th Ed Eq 9.6 / iSWM Eq 1.29, both AASHTO-derived: hb = 0.0033·Δ·V²/2g, where Δ is the bend's actual deflection in degrees):

0.0033 * (180 - theta) * V_o^2 / (2 * g)

Because 180° is straight, (180 - theta) recovers Δ, the actual angle of curvature, from HydraStorm's θ. At θ = 180° the expression correctly evaluates to zero.

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.

Exit Loss at Outfalls

At an outfall node, HydraStorm can add an exit loss (Ke·V²/2g) on top of friction loss when the outfall carries a loss type or a manual Kj override. It's computed per-pipe and folded into Upstream HGL at that boundary, the same way junction losses are added moving upstream through the rest of the network — so an outfall with a headwall or a submerged discharge doesn't need a separate calculation outside HydraStorm to account for exit loss.

Deflection Angles

Bend, wye, and manhole deflection angles are stored per-structure, not per-library, in two channels: a trunk-through angle (theta/theta_rad — the dominant inlet pipe against the outlet pipe) and, separately, a lateral approach angle (theta_l/theta_l_rad — a wye's branch against the trunk). One library entry (e.g., "Bend") handles every possible angle via those variables in the expression; you never need a separate entry per angle.

The convention is HEC's: 180° = straight-through, 90° = a right-angle bend (see the note above). HydraStorm resolves each angle in priority order:

  1. Manual override — set directly on the structure (Minor Losses Table or property panel).
  2. Auto-detection from the Civil 3D part description — HydraStorm recognizes a fitting class (22.5, 30, 45, 60, or 90) in the description text and converts it to HydraStorm's θ: θ = 180° − class. A description naming a wye or lateral routes the value to the lateral angle field instead of the trunk field, since the named angle describes the branch, not the trunk running through — a "45° Wye" yields θl = 135°, and leaves the trunk angle untouched.
  3. Geometric computation (fallback) — if the description carries no recognized fitting class, HydraStorm computes the deflection angle from the pipe endpoint geometry at that structure.
  4. 180° default — used when nothing else resolves an angle.

Separately, the Minor Losses Table can suggest a manufactured angle from CAD geometry — the nearest of the standard bend, wye, or manhole classes, offered whenever the geometry lands within 5° of one. This is suggest-and-confirm: HydraStorm never stamps a suggested angle onto the structure on its own. Accept it to apply the value, same as accepting a suggested loss-type match.

Kj Lookup Tables

Some published manuals tabulate a discrete K value per angle (McKinney Table 4-14, Garland, Plano, MHFD's Figure 7-11, and others) rather than publishing a continuous formula. Rather than one library entry per angle, a loss type can carry a Kj lookup table: rows of (angle, K) that HydraStorm resolves against the structure's own deflection angle at calculation time, with either Nearest (returns the literal published K for the closest table row — the faithful choice for a discrete table) or Linear interpolation between rows. Tables can key off more than deflection angle alone — bend-radius ratio (r/D), diameter ratio, and area ratio are also supported axes, matching the way some manuals tabulate enlargement/contraction or curved-bend losses. Twelve of HydraStorm's eighteen built-in libraries use a Kj table for at least one entry.

Author a Kj table from the Equation Editor: check "Use a Kj lookup table," add rows, and use the built-in Test θ field to preview which K a given angle resolves to before you save.

Curved-Pipe (In-Barrel) Loss

A curved Civil 3D pipe — a barrel drafted along an arc rather than a straight tangent — can carry its own loss, separate from the junction losses at its structures. If your design standard defines a curved-pipe loss (the same AASHTO-derived hb = 0.0033·Δ·V²/2g form used in the bend example above, or a Kj-table equivalent keyed on the arc's central angle Δ and radius), HydraStorm applies it automatically to every curved barrel, using the arc geometry captured when the network is imported — there's nothing to assign per pipe. Adjacent curved pipes sharing the same arc are grouped and charged their share of one loss computed on the arc's total central angle, so splitting a curve into more drafted segments never changes the total loss reported.

This is a genuinely separate loss channel from the bend losses described above, which apply at a structure where pipes meet at a deflection. The curved-pipe loss applies along the barrel, added to Upstream HGL alongside friction loss, and appears as its own hb column in the results grid (visible only when your design standard defines a curved-pipe loss channel): US HGL = DS HGL + Friction Loss + Curve Loss + Exit Loss. Don't author a structure-level bend loss type to represent a conduit curve — if your library defines the curved-pipe channel, that would double-count the same physical bend once as a structure loss and once as a curve loss. A tangent curve (θ = 180° at both ends, no actual deflection) contributes nothing on either channel.

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 judged at the structure — the pipe's upstream-end HGL sits at or below its upstream crown. This is a deliberate choice of end: on a pipe that transitions from pressure flow to open-channel flow along its length, the downstream end can be surcharged while the junction itself is still free-surface, and published pressure-flow junction equations assume full flow right at the structure. (Exit-loss contexts at outfalls are the one exception: there, the discharge/downstream end is what's judged, since that's the end at the boundary condition.) Use this override 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.

HydraStorm 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.
  • Minor Losses Table — Open the Minor Losses 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 suggests a loss type for each structure automatically, by matching keywords in the Civil 3D part description. 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.

Each loss type carries its own explicit, editable list of keywords (each with a priority), authored in the Equation Editor's Keywords panel — not the type's display name or group. HydraStorm scans the part description for every keyword across the library's loss types; the highest-priority match wins, and a tie between equal-priority keywords is broken by the longer keyword. For example, a built-in Manhole entry carries keywords like "manhole," "junction," and "inlet" at different priorities, so a structure described "48 in Dia Concentric Manhole" matches on "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.

What HydraStorm has learned is stored per user under %LocalAppData%\HydraStorm\. If a remembered choice points at a loss type you have since deleted, it is ignored and keyword matching takes over again.

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.