How to Decide on a Time Step in InfoSWMM, ICM SWMM, or SWMM5
Understanding the Problem:
- Time Step Importance: The time step (also called the routing time step or computational time step) is a crucial parameter in dynamic hydraulic simulations. It determines how often the model calculates flow and depth in each element (links and nodes) of the network.
- Continuity Error: This error reflects the degree to which mass is conserved in the model. Ideally, the amount of water entering and leaving the system, plus any changes in storage, should balance out perfectly. A large continuity error indicates a problem with the simulation.
- Unstable Links: Unstable links exhibit rapid, unrealistic oscillations in flow or depth, often caused by an inappropriate time step or other model setup issues.
The Iterative Approach to Time Step Selection:
Step 1: Initial Guess and Evaluation
- Initial Guess (300 seconds): A 5-minute time step is a common starting point for some models, but as you found, it can be too large for systems with rapid changes in flow or complex hydraulics.
- Large Continuity Error and Instability: A large time step often leads to these problems because it cannot accurately capture the fast-paced changes in the system. The simulation essentially "skips over" important hydraulic events.
- Average Time Step as a Guide: The "average time step" reported by the simulation (2.6 seconds in your case) is a very useful indicator. It's the average time step that the model's internal variable time-step algorithm determined was needed to maintain numerical stability during the simulation. A large discrepancy between your chosen fixed time step and this average suggests that your fixed time step is too large.
Step 2: Refinement Based on Average Time Step
- New Time Step (10 seconds): You wisely chose a new time step that is closer to the reported average time step but still slightly larger. Using a time step very close to the minimum can significantly increase simulation time. It is better to be closer to the average time step.
- Reduced Continuity Error and Stable Flows: By using a smaller, more appropriate time step, you improved the accuracy of the simulation. The model can now better resolve the hydraulic changes, leading to a smaller continuity error and eliminating the unstable link flows.
Why this approach works:
- Variable Time Step Logic: SWMM and related software often use a variable time-step algorithm internally, even if you specify a fixed time step for reporting results. This algorithm adjusts the time step during the simulation based on the rate of change in flow and depth to maintain stability.
- Average Time Step as a Proxy: The average time step reported by the model reflects the time step that was generally needed to keep the simulation stable using this variable time-step logic. It provides valuable insight into the appropriate time step for your specific model.
- Iterative Improvement: Finding the optimal time step is often an iterative process. You start with an initial guess, evaluate the results, and then adjust the time step based on the model's behavior.
Additional Tips and Considerations:
- Courant Condition: The Courant condition is a theoretical stability criterion that relates the time step to the flow velocity and the length of the links. While SWMM's internal algorithms handle this to some extent, it is important to be aware of it. For explicit solvers, it is expressed as:
- Δt ≤ Δx / c
- where Δt is the time step, Δx is the link length, and c is the wave celerity (approximately the flow velocity in open channels).
- If your links are very short and your velocities are very high a smaller time step will be needed.
- Model Complexity: More complex models (e.g., those with many interconnected ponds, rapid changes in flow, steep slopes, or complex control structures) generally require smaller time steps.
- Simulation Time: Smaller time steps increase simulation time. You need to find a balance between accuracy and computational efficiency.
- Output Interval: The reporting time step (output interval) can be larger than the routing time step. You might route with a 10-second time step but only save results every 5 or 15 minutes.
- Sensitivity Analysis: It's good practice to perform a sensitivity analysis by running your model with a few different time steps (e.g., 5, 10, and 15 seconds) to see how much the results change. If the results are not significantly affected, you can use the larger time step to save time.
- Other Model Issues: Keep in mind that continuity errors and instability can also be caused by other issues, such as incorrect boundary conditions, errors in the network connectivity, or unrealistic parameters.
In summary, the iterative approach you've described, guided by the average time step reported by the simulation, is a sound method for finding a suitable time step in InfoSWMM, ICM SWMM, or SWMM5. This approach helps to improve the accuracy and stability of your simulations while maintaining reasonable computational efficiency.