In the numerical solution of the shallow water equations using the Finite Difference Method, the time step size and the number of cells within the computational domain are among the most influential factors in determining the total time required to complete the simulation and delineate the flood extent. The number of cells in the computational domain depends on the spatial resolution and the size of the modeling domain. For the most accurate flood modeling, it is necessary for the grid cell size to match the resolution of the raster cells in the topographic map of the area. In this case, due to the high number of computational cells, the processing and computational load on the CPU increases significantly. Furthermore, according to the stability conditions of the numerical solution of the shallow water equation system, modeling with small computational cells requires smaller time steps to maintain numerical stability, which in turn leads to a much longer simulation time. In this software, two different approaches based on the finite difference numerical solution method have been developed and examined to accelerate the modeling process.
By increasing the size of the grid cells, the number of computational cells can be reduced, allowing for a larger computational time step, which in turn decreases the computational load and shortens the total simulation time. However, increasing the grid cell size leads to a reduction in accuracy and introduces errors in flood extent modeling. Therefore, it is necessary to employ classic methods or subgrid variability methods to maintain modeling accuracy despite the increased grid cell size.
Classic Methods #
In classic methods, each computational cell has a completely flat bottom and can only accept a single value as the bed elevation. Consequently, the four outflows of the cell also have cross-sections that are flat and aligned with the same elevation as the cell’s bed. Therefore The most important geometric parameter for increasing the size of computational cells is the ground elevation value assigned to each grid cell. The Manning’s roughness coefficient is averaged for each cell.

Minimum Method (Min) #
In this method, the lowest ground elevation value within the computational cell is selected and used as the cell’s ground elevation in the calculations. As shown in Figure 1, when the size of the computational cells increases, this method loses more topographic detail and results in increased error.
First Quartile Method (Q1) #
In this method, the ground elevation value assigned to the computational cell is chosen such that 25% of the elevation values within the cell area are lower than it, and 75% are higher. As shown in Figure 1, when the computational cell size increases, this method can represent the ground surface closer to the topographic map. However, it disregards the lower elevation values, which are often associated with important hydrological features like watercourses and channels that play a critical role in surface water flow modeling. As a result, the error increases significantly.
Hybrid Method #
The Hybrid Method combines two methods to determine the ground elevation value for each computational cell. To improve its adaptability in different study areas, two coefficients are introduced to control the contribution of each method. These coefficients define the percentage contribution of each method in producing the final ground elevation value assigned to each cell. As shown in Figure 1, the elevation value selected by the Hybrid Method (0.5 * Min Method + 0.5 * First Quartile Method (Q1)) can better preserve the presence of low-lying channels while remaining closer to the overall topographic surface.
You can create your desired Hybrid method in the STE software by combining the Minimum and Maximum methods with the following approaches:
Nearest Neighbor, Bilinear, Cubic, Cubic Spline, Lanczos, Average, Mode, Max, Min, Med, Q1, and Q3 — assigning a different weight to each method as needed.
Subgrid Variability Methods #
Selecting a single ground elevation value for a computational cell presents multiple challenges, especially when the cell covers an area with significant elevation variations or when the cell size is large. Typically, water channels lie at lower elevations compared to floodplains and surrounding areas. Since accounting for water channels is crucial in flood modeling, the lowest elevation values beneath a computational cell must be selected for that cell. One of the main challenges arising from this approach is that channels or parts of rivers narrower than the cell dimensions tend to be artificially widened in the model.
When a certain volume of flow enters the computational domain, the water surface elevation within the cell is underestimated because the modeled channel width is larger than reality, which results in an underestimation of the flood extent. Additionally, errors occur in the momentum calculations, leading to flow velocities lower than the actual values.
To address this issue and incorporate all elevation variations within a computational cell, subgrid variability methods can be applied to flood modeling using the shallow water equation system. Instead of assigning a single bed elevation value to the computational cell, all elevation values within the cell are considered. Before starting the simulation, each computational cell is fully analyzed, and—according to Figure 2—the relationship between water surface elevation and water volume within the cell is calculated and recorded. Using this relationship, it is possible to determine the water volume from the water surface elevation during simulation and analysis, and vice versa.
One of the most challenging aspects of subgrid variability methods is performing the momentum calculations. To compute the flow discharge components qx and qy under subgrid variability conditions, two methods have been developed and evaluated in this software.

Full Cross-Sectional Face Method #
In this method, a full cross-section is considered for each of the four faces of the computational cell where flow enters or exits. Calculations are performed based on these full cross-sections, and the flow discharge at the next time step for each cell face is computed in cubic meters per second. (See Figure 3)
One of the selectable parameters in momentum calculations is the flow depth, for which four options have been defined and coded in the developed software: hydraulic radius, hydraulic depth, mean flow depth, and maximum flow depth.
Since the inflow and outflow discharges of the cell are calculated on the cross-sections defined at the cell faces, the Manning’s roughness coefficient is averaged for each cross-section.

Discretized Face Method #
In this method, each face of the computational cell (i.e., the cross-section where flow enters or exits) is divided into smaller segments corresponding to the resolution of the topographic map used. Momentum calculations are then repeated for each of these cross-sectional segments along the cell face. For each segment, the flow discharge per unit width, is calculated at the next time step in square meters per second. By multiplying this value by the segment width and summing the results for all segments along the cell face, the total flow discharge at the next time step for the entire cell face is obtained (see Figure 2).
Although this method may slightly increase the total simulation time, it allows for more precise flow discharge calculations and the use of a highly detailed, accurate Manning’s roughness coefficient consistent with the resolution of the topographic map, resulting in more accurate momentum computations. Therefore, more precise results are expected from this method.
Additionally, because this method divides the computational cell faces into cross-sectional segments matching the topographic map resolution, it facilitates subgrid-scale computations and enables high-accuracy modeling within selected cells based on the map cell size.
Since the subgrid variability method distributes the inflow into the computational cell without considering internal flow obstructions, it is particularly useful when local protrusions or obstacles do not exist within a cell that block flow from passing through. This method can significantly reduce modeling errors in such cases while only slightly increasing computational load and simulation time.
SubgridFusion #
This method is a combination of the Full Cross-Sectional Face Method and the Discretized Face Method. In this approach, the software intelligently decides which method to use—with the goal of maximizing simulation speed while preserving the highest possible level of accuracy.
Subgrid Computations #
Subgrid computations enable the use of computational cells with variable sizes across the solution domain in the numerical solution of the shallow water equations using the finite difference method. This approach improves both the accuracy and speed of the simulation and can be implemented in two ways:
- Dependent
All cells, regardless of their size, are included in a single unified simulation. A global time step is set based on the smallest cell in the domain, and the simulation proceeds accordingly. In this case, the required simulation time increases significantly due to the smaller time step. - Independent
In this approach, for each main (coarse) cell that contains finer subcells (i.e., where subgrid computations are enabled), a separate and independent simulation is performed over the duration of the main model’s time step. This internal simulation uses the finer subcells to calculate water surface elevation, depth, and velocity. The global time step of the main simulation remains unchanged. However, the total simulation time increases slightly due to the added number of computational cells and increased computational load.

Create 2D Area Mesh #

The first step in performing 2D Simulations in STE is to create a 2D Area Mesh.
To do this, go to the 2D Simulations menu and click on the 2D Area Mesh option.

In the DEM section, select the topographic map on which you want to model the water flow.
If a specific part of the map is of interest for your modeling, activate the Area of Interest option and use a polygon to define the area.
In the Spacing Dx and Spacing Dy sections, specify the size of each computational cell.
By default, the cell size of the topographic map is shown.
By right-clicking on these two options, you can multiply the current value or reset it to the default.
In the Module section, choose the desired module for the classical meshing method.
(If you intend to use the Subgrid Variability method, these options will not affect your calculations.)
In the Resampling Method section, choose the method for assigning the bed elevation value of each cell.
If the hybrid method is selected, you can configure the two combined methods and their contribution to the final value using the options available under Hybrid Options.
In the Expectations section, you can select certain cells from the modeling domain and choose a different method to assign the bed elevation value.
(This is used to force the algorithm to consider flow obstructions or channels in classical meshes.)
In the Output section, you can specify the save path for the 2D Area Mesh file.
By enabling the Verify Integrity of Output Pixels option, the software will check each computational cell after mesh generation to ensure that the topographic map completely covers it.
If the topographic map does not fully lie under a cell (i.e., part of it is NoData), that cell will be removed to maximize the accuracy of the generated 2D Area Mesh.
Important Note #
If you want to use the Subgrid Variability method, be sure to activate the Verify Integrity of Output Pixels option.

