Assigning an appropriate mesh cell size (or sizes) and computational time step (ΔT) is very important to getting accurate answers with 2D flow areas. The first step is to develop a computational mesh that has cell sizes that are appropriate for modeling both the terrain as well as the water flowing over the terrain. Many 2D flow models use a single elevation for each cell and cell face (grid-based models). Finite Element models commonly (not always) use triangles (three elevations and a planar surface to represent each triangle) to represent the land surface, while each face has two elevations and a straight line between them. It is very important to understand the way the computational mesh is representing the underlying terrain in order to make a good decision on how many cells, and of what size, will be necessary to model the terrain and the event accurately.

HEC-RAS takes a very different approach than the two previously mentioned modeling techniques. Cells in HEC-RAS can have three, four, five… up to eight sides. Each cell is not a single elevation, but a detailed elevation volume/area relationship that represents the details of the underlying terrain. The HEC-RAS cell faces are detailed cross sections, which get processed into detailed elevation versus area, wetted perimeter, and roughness relationships. This approach allows the modeler to use larger cell sizes with HEC-RAS, and still accurately represent the underlying terrain. The key to making a good computational mesh in HEC-RAS is ensuring that the faces of the cells capture the high point of barriers to the flow. Additionally, one must consider changes in the water surface slope and changes in velocity. A single water surface elevation is computed in the center of each cell. So, the larger the cell size, the further apart are the computed values of the water surface, and thus the slope of the water surface is averaged over longer distances (in two dimensions). This is acceptable for some areas, but not appropriate for others. If the water surface slope and velocity vary rapidly, smaller cell sizes must be used in that area to capture the changing water surface and velocity. HEC-RAS allows the user to vary the cell size and shape at all locations in the model. So computational meshes can be developed with smaller cells where they need to be and larger cells where the terrain and water surface and velocity are not changing rapidly.

Some key factors for developing a good computational mesh with HEC-RAS are:

1.Make sure the cell sizes, shapes, and orientations adequately describe the terrain. Specifically, since the cell faces control the movement of water, there must be enough of them, oriented correctly to describe the key features of the terrain that will control water movement. This includes barriers to flow, such as roads, levees, floodwalls, and natural high ground areas, that will prevent flow from going from one area to another, until the water surface elevation is higher than the barrier. Additionally, the user may want to use a refinement region along the banks of the main channel. By using a refinement region along the bank of the main channel, the computational faces will be aligned along the high ground that separates the main channel flow from the overbank flow. This will ensure that no water leaves the main channel until it has reached an elevation higher than the cell faces that are aligned with the channel banks. Additionally, the use of a refinement region allows the modeler to easily control the cell size within the main channel. Adding a breakline down the middle of the channel, on top of the refinement region, and using the near repeats option, will allow the user to align the cells with the direction of the flow.

2.The cell size must be adequate to describe changes in the water surface slope and changes in velocity. If the water surface slope and velocity does not change rapidly, larger cell sizes can be used to accurately compute the water surface elevation and slope. If the water surface slope and/or velocity changes rapidly, then smaller cell sizes need to be used to have enough computation points to describe the changing water surface and velocity, as well as compute the force/energy losses that are occurring in that area. While cell sizes (and shapes) can vary, transitioning from larger to smaller cell sizes should be done gradually to improve computational accuracy.

Once a good computational mesh is developed, then the user must pick an appropriate computational time step that works well with the mesh and the event being modeled. Picking an adequate time step is a function of the cell size and the velocity of the flow moving though those cells. HEC-RAS has three equation sets that can be used to solve for the flow moving over the computational mesh, the Diffusion Wave equations; the original Shallow Water equations (SWE-ELM, which stands for Shallow Water Equations, Eulerian-Lagrangian Method); and a new Shallow Water equations solution that is more momentum conservative (SWE-EM, which stands for Shallow Water Equations, Eulerian Method). The new Shallow Water equation solution methodology (SWE-EM) uses an explicit solution scheme for solving the equations. While this method is more momentum conservative, it requires smaller computational time steps (i.e. in general, the time step must be selected to ensure the Courant number is less than 1.0).

In general, the Diffusion Wave equations are more forgiving numerically than the SWE. This means that larger time steps can be used with the Diffusion Wave equations (than can be with the SWE), and still get numerically stable and accurate solutions. The following are guidelines for picking a computation interval for the Shallow Water equations and the Diffusion Wave equations:

Shallow Water (SWE-ELM):

C = \frac {V \Delta T} {\Delta X} \leq 1.0 \ (with \ a \ max \ ⁡ C=3.0)

Or

\Delta T \leq \frac {\Delta X} {V} \ (with \ C=1.0)


Where:

C=Courant Number 
V= Flood wave velocity (wave celerity) (ft/s)
ΔT=Computational time step (s)
ΔX= Average cell size (ft)


Shallow Water (SWE-EM):

C = \frac {V \Delta T} {\Delta X} \leq 1.0 \ (with \ a \ max \ ⁡ C=1.0)

Or

\Delta T \leq \frac {\Delta X} {V} \ (with \ C=1.0)



Diffusion Wave Equations:

C = \frac {V \Delta T} {\Delta X} \leq 2.0 \ (with \ a \ max \ ⁡ C=5.0)

Or

\Delta T \leq \frac {2\Delta X} {V} \ (with \ C=1.0)


Note: There are times when the diffusion wave method will need to be run with a time step that would produce a Courant number of 1.0 or less. Some examples are: very rapidly rising hydrographs and routing rapidly changing hydrographs over a completely dry channel.



Practical Time Step Selection: The way to use these equations is to find the area(s) with high velocities and rapid changes in water surface and velocity (with respect to space and time). Take the average cell size in that area for ΔX. Put in the maximum velocity in that area for V. User's will need to estimate a max velocity as a first guess for this calculation before running the model, then plot the max velocities from the run to make a better estimate. Users can also plot Courant Number directly from within HEC-RAS Mapper. Select a ΔT, such that the Courant Number (C) is equal to the suggested value (i.e. 1.0 for SWE). However, you may be able to get away with a Courant number as high as 3.0 for the SWE's and 5.0 for the Diffusion Wave equations, and still get stable and accurate results. If the event being modeled changes gradually with time and space, larger time steps can be used (i.e. Courant numbers approaching the maximum listed values). If the flood wave being modeled changes rapidly with respect to time and space, then you will need to use a time step closer to a Courant number of 1.0 (i.e. C = 1.0) for the high velocity zones. Also, if you have started the 2D area completely dry, then you will need to use a time step based on a Courant number of 1.0, in order to get a more accurate and stable wetting front.

Note: Users should always test the consistency of their computational mesh and selected time step. The consistency principle requires a reduction of both the space (grid) and time steps in order to guarantee convergence of a solution. If the grid is refined and the time-step is reduced simultaneously, the method will achieve convergence. The user should always test different cell sizes (ΔX) for the computational mesh, and also different computational time steps (ΔT) for each computational mesh. This will allow the user to see and understand how the cell size and computational time step will affect the results of your model. The selection of ΔX and ΔT is a balance between achieving good numerical accuracy while minimizing computational time.