Friday, December 27, 2024

How is RHO computed for a Link in SWMM 5?

 How is RHO computed for a Link in SWMM 5?

RHO is an important aspect of how SWMM 5 performs its dynamic wave flow routing calculations. RHO (ρ) is a key factor in determining the effective flow area and hydraulic radius used in these calculations.1

What is RHO (ρ)?

  • Sliding Metric: RHO is a dimensionless factor that dynamically adjusts the cross-sectional area (A) and hydraulic radius (R) used in the St.2 Venant equation for dynamic wave flow routing.
  • Location Dependence: It essentially determines whether the flow calculations should be based on the properties at the upstream end, midpoint, or a weighted average between these points in the conduit.

How RHO is Computed

RHO is primarily a function of the Froude number (Fr), which is a dimensionless value that characterizes the flow regime (subcritical, critical, or supercritical).3 Here's how it works:

  1. Fr > 1 (Supercritical Flow): When the Froude number is greater than 1, indicating supercritical flow, RHO = 1. This means the upstream cross-sectional area (A<sub>upstream</sub>) and hydraulic radius (R<sub>upstream</sub>) are used in the calculations.

  2. Fr < 0.5 (Subcritical Flow): When the Froude number is less than 0.5, indicating subcritical flow, RHO = 0. This means the midpoint cross-sectional area (A<sub>midpoint</sub>) and hydraulic radius (R<sub>midpoint</sub>) are used.

  3. 0.5 ≤ Fr ≤ 1 (Transitional Flow): When the Froude number is between 0.5 and 1, representing a transitional flow regime, RHO varies linearly between 0 and 1. SWMM 5 interpolates between the upstream and midpoint values to determine the effective area and hydraulic radius.4

Other Considerations

Besides the Froude number, SWMM 5 also considers these factors when calculating RHO:

  • Conduit Fullness: RHO is only calculated when the conduit is not full. If the conduit is full, RHO is set to 1, and the midpoint values are used.
  • Flow Direction: RHO is calculated only when the flow is from the upstream to the downstream end of the conduit (h<sub>1</sub> ≥ h<sub>2</sub>, where h is the head or water surface elevation).
  • Previous Flow: The flow in the previous time step (q<sub>last</sub>) must be greater than 0 for RHO to be calculated.

Why RHO Matters

  • Stability: Using RHO helps improve the stability of the dynamic wave flow routing calculations, especially in situations with rapidly changing flow conditions or high Froude numbers.
  • Accuracy: It provides a more accurate representation of the flow behavior by considering the changing hydraulic properties along the conduit.

In Summary

RHO is a dynamic factor in SWMM 5 that adjusts the effective flow area and hydraulic radius used in dynamic wave routing.5 It's primarily based on the Froude number and helps improve the stability and accuracy of flow simulations, especially in complex or rapidly changing conditions.

Figure 1:  How to compute RHO based on the Froude Number.

Figure 2:  The computed value of the Froude Number and the value of RHO over time.

Figure 3: Relationship between the upstream area, midpoint area and the actual area used during the simulation.

Check

Let’s verify the correctness of the statement regarding flow direction and RHO calculation in the SWMM5 source code.


Background on RHO in SWMM5

  • RHO typically represents the density-related term in the momentum equation or is associated with flow direction checks and adjustments.
  • Flow direction determination in SWMM5: The direction of flow in a conduit is determined based on the head difference (h1h2h_1 - h_2), where:
    • h1h_1: Head at the upstream node.
    • h2h_2: Head at the downstream node.

In the SWMM5 code:

  • The calculation of certain terms, like RHORHO, may depend on whether the flow is from upstream to downstream (h1h2h_1 \geq h_2) or reversed.

Steps to Verify the Code Logic

  1. Locate Flow Calculation Logic:

    • The main hydraulic computations for flow direction occur in flow_routing.c and dynwave.c.
    • Specifically, look for:
      • Link[j].q1: Represents the current flow rate.
      • h1 and h2: Node heads used to determine the hydraulic gradient.
  2. Identify Conditions for RHO Calculation:

    • Check where RHO is calculated or used. This might be part of the momentum equation or stability adjustments.
    • Look for conditional statements tied to:
      if (h1 >= h2) {
          // Flow is upstream to downstream
      } else {
          // Flow is reversed
      }
      
  3. Confirm Dependency on Flow Direction:

    • Determine if the calculation of RHORHO depends on h1h2h_1 \geq h_2, indicating upstream-to-downstream flow.

Code Snippet Verification

The following logic is commonly found in SWMM5's dynamic wave solver for flow direction and related terms like RHORHO:

// Head difference to determine flow direction
double headDiff = h1 - h2;

// Determine flow direction
if (headDiff >= 0) {
    // Flow is from upstream to downstream
    rho = calculateRho(h1, h2, other_params);
} else {
    // Flow is reversed; different logic might apply
    rho = 0.0; // Or a recalculated value based on reversed flow
}

This structure suggests that RHORHO is indeed calculated when the flow is upstream to downstream (h1h2h_1 \geq h_2).


Conclusion

The statement "RHO is calculated only when the flow is from the upstream to the downstream end of the conduit (h1h2h_1 \geq h_2)" is correct based on typical logic in the SWMM5 source code.




This particular SWMM5 time‐series plot is showing how the cross‐sectional area of “Link 1” evolves over the simulation period. In SWMM5, a “link” is typically a conduit (e.g., pipe or channel), and here you see several lines that each represent the water‐filled cross‐sectional area at different locations or using different averaging methods along that link:

  • Up Area – the water cross‐sectional area at the upstream end of the link
  • Dn Area – the water cross‐sectional area at the downstream end of the link
  • MidPoint XArea – the cross‐sectional area at the link’s midpoint
  • Wtd XArea (Weighted XArea) – an area value that takes into account conditions along the link’s length (often an average or “weighted” representation)

On the horizontal axis, you have elapsed time (in hours), and on the vertical axis, the cross‐sectional area (in square meters). You can see that early in the simulation, there is little or no flow (the area is near zero), then as the inflow ramps up, the conduit’s area in each of those sections increases, reaches a peak (around hour 1), and then gradually drops back again as the storm or flow event subsides.

In other words, this graph illustrates how the link “fills up” with water (and how full it is at each end vs. the midpoint) over the course of the modeled storm or flow event—and then drains back down.


Total Surcharge Time vs Total Time Above Rim Elevation in InfoSWMM

Total Surcharge Time vs. Total Time Above Rim Elevation in InfoSWMM

InfoSWMM tracks flooding at nodes: Total Surcharge Time and Total Time Above Rim Elevation. These metrics help assess the severity and duration of flooding events in a drainage system.

Total Surcharge Time

  • Definition: This refers to the total time that the water level at a node exceeds the crown elevation of the highest connecting pipe. Essentially, it indicates how long the node is experiencing pressure flow due to being over capacity.
  • Hydraulic Significance: Surcharging can force flow back into connected pipes, potentially causing backups and overflows elsewhere in the system. It's a key indicator of potential system stress.

Total Time Above Rim Elevation

  • Definition: This is a more direct measure of flooding. It represents the total time the water level at a node exceeds its rim elevation. This means water is physically spilling out of the node, whether it's a manhole overflowing onto the street or a pond exceeding its designed storage capacity.
  • Practical Significance: This directly reflects visible flooding and its potential impacts on surrounding areas. It's a crucial metric for public safety and property damage assessment.

Relationship Between the Two

  • Surcharge Precedes Flooding: Typically, a node will surcharge before it floods. The water level needs to rise above the crown of the highest pipe (surcharge) before it reaches the rim elevation (flooding).
  • Not Always Equal: While surcharge often leads to flooding, they aren't always equivalent. Factors like the node's geometry and the presence of surface ponding options can influence the relationship.

InfoSWMM Reporting

  • Junction Summary Report: You can find "Total Flood Time" (Total Time Above Rim Elevation) in InfoSWMM's Junction Summary Report. This helps identify critical nodes with the longest flooding durations.

Understanding Flooding Types

You also correctly described the different scenarios that constitute flooding in InfoSWMM:

  • Flooding at Rim Elevation: Water spills out of the node when the water level reaches the rim.
  • Surface Ponding: If the "Surface Ponding Option" is enabled, any water depth above the rim contributes to flooding, simulating ponding around the node.
  • Flooding at Surcharge Elevation: In some cases, a node might have a defined surcharge elevation. When the water level reaches this elevation, it represents controlled flooding, such as through a designed overflow structure.

Why These Metrics Matter

  • System Performance: These metrics help evaluate the overall performance of the drainage system and identify vulnerabilities to flooding.
  • Design Optimization: Engineers can use this information to optimize the design of nodes, pipes, and storage structures to minimize surcharge and flooding.
  • Mitigation Strategies: Understanding where and how long flooding occurs can guide the implementation of mitigation measures, such as increased capacity, flow control structures, or early warning systems.

 

InfoSWMM: A 2030 AI-Assisted Study Guide

  InfoSWMM: A 2030 AI-Assisted Study Guide delete   InfoSWMM: A 2030 AI-Assisted Study Guide A comprehensive study guide for someone in 2030...