Hydraulic Grade Line (HGL) Calculator from Slope


Hydraulic Grade Line (HGL) Calculator

Determine the impact of hydraulic slope on the Hydraulic Grade Line (HGL) for pressurized pipe flow.



Elevation at the start of the pipe segment (m).


Total length of the pipe segment (m).


Volume of fluid passing per unit time (m³/s).


Internal diameter of the circular pipe (mm).


Material roughness height (mm). (e.g., Concrete: 0.3-3, Steel: 0.045)

Downstream Hydraulic Grade Line (HGL) Elevation

Hydraulic Slope (S)

Total Head Loss (h_f)

Flow Velocity (V)

Friction Factor (f)

Grade Line Visualization

Visual representation of Energy Grade Line (EGL) and Hydraulic Grade Line (HGL).

What is the Relationship Between Hydraulic Slope and HGL?

The central topic of this page is answering the question: can you use hydraulic slope to calculate hydraulic grade line? The answer is unequivocally yes. The hydraulic slope is the very definition of the rate of energy loss due to friction along a pipe. The Hydraulic Grade Line (HGL) represents the sum of elevation head and pressure head at any point in a fluid system. In a pipe with flowing fluid, the HGL will always slope downwards in the direction of flow, and the steepness of this slope is the hydraulic slope (often denoted as ‘S’ or ‘S_f’).

Essentially, the hydraulic slope is the “rise over run” for the Hydraulic Grade Line, but since it’s a loss, it’s a drop. It is calculated as the total head loss (h_f) divided by the length of the pipe (L). Therefore, if you know the HGL at an upstream point, the length of the pipe, and the hydraulic slope, you can directly calculate the HGL at the downstream point. This calculator performs this exact function, first calculating the hydraulic slope from pipe and flow characteristics and then determining the resulting HGL.

Hydraulic Grade Line Formula and Explanation

The core calculation is straightforward once the hydraulic slope is known. The downstream HGL is found by subtracting the total head loss from the upstream HGL.

Downstream HGL = Upstream HGL – Head Loss (h_f)

The challenge lies in finding the head loss, which is derived using the Darcy-Weisbach equation. The hydraulic slope is then determined from this head loss.

Hydraulic Slope (S) = h_f / L

The Darcy-Weisbach equation is:

h_f = f * (L/D) * (V² / 2g)

This calculator uses the Swamee-Jain equation to find the friction factor (f) directly, which is an accurate approximation of the iterative Colebrook equation.

Variables Table

Variable Meaning Unit (Metric/Imperial) Typical Range
HGL Hydraulic Grade Line Elevation m / ft System-dependent
S Hydraulic Slope m/m or ft/ft (unitless) 0.0001 – 0.1
h_f Head Loss due to friction m / ft 0.1 – 50
f Darcy Friction Factor Unitless 0.01 – 0.05
L Pipe Length m / ft 10 – 10,000
D Pipe Diameter m / ft 0.1 – 2.0
V Flow Velocity m/s / ft/s 0.5 – 3.0
g Acceleration due to gravity 9.81 m/s² / 32.2 ft/s² Constant

Practical Examples

Example 1: Municipal Water Main

A new 1500-meter long ductile iron pipe (roughness ε = 0.25 mm) with a 600 mm diameter is being installed. The upstream HGL is at an elevation of 85m. If it needs to carry 0.75 m³/s, what will the HGL be at the downstream end?

  • Inputs: Upstream HGL = 85m, Length = 1500m, Flow = 0.75 m³/s, Diameter = 600mm, Roughness = 0.25mm
  • Results:
    • Velocity: ~2.65 m/s
    • Friction Factor: ~0.016
    • Head Loss: ~9.98 m
    • Hydraulic Slope: ~0.00665
    • Downstream HGL: ~75.02 m

Example 2: Industrial Cooling System (Imperial Units)

An industrial plant uses a 2000-foot long, 18-inch diameter steel pipe (roughness ε = 0.00015 ft) to move 5000 GPM of water. The HGL at the pump outlet is 250 ft. What is the HGL at the point of use?

  • Inputs: Upstream HGL = 250 ft, Length = 2000 ft, Flow = 5000 GPM, Diameter = 18 in, Roughness = 0.0018 in (0.00015 ft)
  • Results:
    • Velocity: ~6.3 ft/s
    • Friction Factor: ~0.013
    • Head Loss: ~10.7 ft
    • Hydraulic Slope: ~0.00535
    • Downstream HGL: ~239.3 ft

How to Use This Hydraulic Grade Line Calculator

This tool helps you see how to use hydraulic slope to calculate hydraulic grade line changes in a pipe system. Follow these simple steps:

  1. Select Unit System: Choose between Metric and Imperial units. The labels and helper text will update automatically.
  2. Enter Upstream HGL: Input the known elevation of the Hydraulic Grade Line at the beginning of your pipe segment.
  3. Provide Pipe Details: Enter the total pipe length, the design flow rate, the internal pipe diameter, and the absolute roughness of the pipe material.
  4. Analyze the Results: The calculator instantly updates. The primary result is the Downstream HGL Elevation. You can also see important intermediate values like the total head loss and the calculated hydraulic slope.
  5. Visualize the Drop: The chart provides a clear visual of the HGL dropping over the length of the pipe, reinforcing the concept of the hydraulic slope. For more detail, you could check out a full pipe flow calculator.

Key Factors That Affect Hydraulic Grade Line Calculations

  • Flow Rate (Q): This has a major impact. Since velocity is squared in the head loss equation, doubling the flow rate roughly quadruples the head loss and steepens the hydraulic slope.
  • Pipe Diameter (D): Head loss is inversely proportional to the diameter to the fifth power (approximately). A small increase in diameter dramatically reduces head loss and flattens the hydraulic slope. This is a key consideration in understanding head loss.
  • Pipe Roughness (ε): A rougher pipe (higher ε) increases the friction factor (f), leading to greater head loss and a steeper hydraulic slope.
  • Pipe Length (L): Head loss is directly proportional to length. A longer pipe will have more total head loss for the same hydraulic slope.
  • Fluid Viscosity: While not a direct input here (water is assumed), a more viscous fluid would result in a lower Reynolds number and potentially higher friction losses.
  • Elevation Profile: The calculator assumes a relatively straight pipe, but the actual pipe elevation doesn’t affect the HGL calculation itself, only the pressure within the pipe (Pressure = HGL – Pipe Elevation).

Frequently Asked Questions (FAQ)

1. Can you really use hydraulic slope to calculate hydraulic grade line?
Yes, absolutely. The hydraulic slope (S) is the head loss (h_f) per unit length (L). So, if you know the starting HGL, the slope, and the length, the ending HGL is simply: `HGL_end = HGL_start – (S * L)`. This calculator automates finding ‘S’ first.
2. What is the difference between the Energy Grade Line (EGL) and HGL?
The EGL is always above the HGL. The vertical distance between them is the velocity head (V²/2g). The EGL represents the total energy, while the HGL represents the potential (elevation + pressure) energy. You can learn more about the Energy Grade Line vs Hydraulic Grade Line relationship in our detailed article.
3. Why does the HGL slope down?
The HGL slopes downward in the direction of flow because of energy loss due to friction between the fluid and the pipe walls. This irreversible energy loss manifests as a drop in pressure and/or elevation.
4. What happens if the HGL drops below the pipe elevation?
If the HGL drops below the physical elevation of the pipe, the pressure in the pipe becomes negative (sub-atmospheric), creating a vacuum. This can lead to cavitation and is generally avoided in system design.
5. Does a pump affect the HGL?
Yes. A pump adds energy to the system, causing an abrupt vertical jump in both the HGL and EGL.
6. How do I choose the right pipe roughness?
The absolute roughness (ε) is a property of the pipe material and its condition. New plastic pipes are very smooth (e.g., 0.0015 mm), while old, corroded cast iron pipes are very rough (e.g., 2-5 mm). You should consult engineering handbooks for standard values.
7. What is a “typical” hydraulic slope?
For water distribution systems, designers often aim for a hydraulic slope between 0.001 and 0.01 (1 to 10 meters of head loss per kilometer of pipe). Steeper slopes can lead to high velocities and excessive energy costs.
8. Is the hydraulic slope the same as the pipe slope?
Not necessarily. The pipe can be laid flat, uphill, or downhill. The hydraulic slope only depends on friction loss. In uniform flow (a specific condition), the HGL is parallel to the channel bed, but this is not always the case in pressurized pipe flow. A Reynolds Number calculator can help determine the flow regime.

© 2026 SEO Experts Inc. All Rights Reserved. This tool is for educational purposes only.



Leave a Reply

Your email address will not be published. Required fields are marked *