Improving calculation performance (run time) for a SewerGEMS or SewerCAD model


Product(s):SewerCAD, SewerGEMS
Version(s):08.11.XX.XX and higher
Area:Calculations

Problem

My SewerGEMS or SewerCAD model takes a very long time to compute. Is there anything I can do to improve calculation performance?

Solution

First, check your hydraulic and hydrologic time steps in the calculation option set assigned to your current scenario. Make sure they're set properly and are reasonable for the simulation. If you are able to make these time increments larger, they will improve calculation performance. Also, if you are using an older version of SewerCAD, SewerGEMS Sanitary or SewerGEMS, it is best to upgrade as there may be performance improvements in later versions. See: Downloading OpenFlows Software

GVF-Convex (SewerCAD) Solver

If you're using SewerCAD or the GVF-Convex solver in SewerGEMS and still experience long computation times relative to the model size and simulation duration, the problem could be with convergence. When the calculation completes, check the calculation summary window to see if "NOT converged" is mentioned. Check the Pressure tab to see if any of your pressure sub-networks are unbalanced. Convergence problems could indicate data entry problems or a hydraulically challenging situation. Check your controls, pump curves and "trials" and "accuracy" calculation options. Excessive intermediate timesteps can also cause performance problems. Also, ensure that you have controls set to prevent wetwells from becoming full or empty. See also: Troubleshooting the Network Unbalanced

Implicit or Explicit (SWMM) Solver

If you're using the Implicit dynamic of Explicit (SWMM) dynamic solver in SewerGEMS or CivilStorm and experience long computation times relative to the model size and simulation duration (and you've already checked the timesteps and simulation duration), the problem may also be with hydraulic convergence. If the numerical solver is struggling to achieve convergence during challenging hydraulic conditions (such as extensive flooding, backwater effects, complex pond/control structures, etc), you may notice a slowdown occur in the calculation progress, if each timestep is requiring more iterations. You may also notice a large number for the Continuity Error in the calculation summary, indicating an unstable run. If the calculations appear to be faster before and/or after particular times, this may be a clue as to what is slowing down the calculations. For example it may correspond with peak flow from a storm, or when a backup or overflow is occurring. Review the model for data entry issues and use the guidance in the following article to adjust advanced calculation options if needed to achieve a more stable run:

Troubleshooting unstable SewerGEMS and CivilStorm results using the implicit solver

Troubleshooting unstable SewerGEMS and CivilStorm model results using the Explicit SWMM Solver

For models that struggle to achieve stable results and reasonable performance with the Implicit solver, it is recommended that you switch to using the Explicit (SWMM) solver. Adjust the Routing Step calculation option to find a good balance between performance and accuracy (reduce the Routing step until convergence mass balance error is less than 5% or less for example).

Note also that when using the Explicit (SWMM) solver, catalog inlet and structure losses can be calculation intensive and cause a slowdown in performance, as they are enhancements above and beyond the native EPA-SWMM 5.1 solver. Meaning, the EPA-SWMM solver itself does not support either of these and Bentley has enhanced the solver to support them. In large models and in flooding situations, they can be hydraulically challenging to solver and can cause a slowdown in performance. A patch is available for version 10.03.04.53 to improve performance with the SWMM solver with models that have a large number of catalog inlets. This improvement will also be included in newer versions. See more here.

With the Explicit solver, you can also take advantage of multi-threading available in modern CPUs, most of which have multiple cores available for parallel processing. In the calculation options, set the "Number of Threads" option to 4 if it is not already set, or try "automatic".

Splitting into Manageable sized models

If your model is very large and still takes a long time to compute when using the SWMM solver with stable results and low continuity error, consider dividing the model into smaller segments and compute them separately. This can make it much easier to locate problems and generally provide a faster modeling experience. Later on, models can be combined with the submodel feature.

2D Modeling

Note that for 2D simulations, SewerGEMS will automatically use available CPU cores/threads for maximum performance.