Download PDF
Download page Numerical Methods (1D FV).
Numerical Methods (1D FV)
Discrete Scheme for SWE. The SWE express volume and momentum conservation. The continuity equation is discretized using finite volume approximations. For the momentum equation, the type of discretization will vary depending on the term. The Crank-Nicolson method is also used to weight the contribution of variables at time steps n and n+1. However, the different nature of the equations will call for the use of a more elaborate solver scheme.
Mass Conservation
The continuity equation representing water mass (and volume) conservation is discretized as
1) | \displaystyle \frac{\Omega_i^{n+1} - \Omega_i^{n} }{\Delta t} - V_k^{n+\theta} A_k^{n+\theta} + V_{k+1}^{n+\theta} A_{k+1}^{n+\theta} = Q_i |
where \Delta t is the time step, \Omega_i is the volume at cell i, V_k is the cross-section velocity, A_k is the cross-sectional area, and Q_i represents the cell sources and sinks. The cross-sectional velocity and area are computed here with \theta-averaging. Here k and k+1 represents the upstream and downstream cross-sections of cell i, respectively.
Momentum Conservation
Since velocities are computed on cross-sections, the momentum equations are not located on a computational cell. The discrete equations are built based on a semi-implicit scheme in which only the acceleration, barotropic pressure gradient and bottom friction terms contain variables for which the equation is solved. Other terms of the momentum equation are still computed based on the -method, but their contribution is smaller and so they are considered explicit forcing function terms and moved to the right-hand side of the linearized system.
Acceleration. Acceleration terms are discretized using a Lagrangian approach as:
2) | \displaystyle \left ( \frac{\partial V_j}{\partial t} + V_j \frac{\partial V_j}{\partial x} \right )_k = \left ( \frac{D V_j}{D t} \right )_k = \frac{V_{k,j}^{n+1} - V_{X(j)}^n }{\Delta t}, \: \: j \in \{ch,lob,rob\} |
where V_{i,j}^{n+1} is the current velocity and V_{X(j)}^{n} is evaluated at a location X(j). This location is found by integrating the velocity field back in time starting from the location of the computational face. Location X(i) does not in general correspond to a cross-section, so an interpolation technique is applied.
Integration of the velocity is done in steps using the interpolated velocity field in each cell. In practice, this is equivalent to subdividing the integration time step into smaller sub-steps with a Courant number of one or less and increasing the robustness of the computation. In contrast to the explicit Eulerian framework, the semi-Lagrangian scheme allows for the use of large time steps without limiting the stability and with a much-reduced artificial diffusion (regarded as the interpolation error).
Barotropic Pressure Gradient. Recall that the momentum equation is computed at faces, but the water surface elevation term is computed at cells. This staggered grid makes the barotropic pressure gradient ideal for utilizing the simple two-point stencil described previously. In addition, the treated semi-implicitly as
3) | \displaystyle \left ( g \frac{\partial z_s}{\partial x_i} \right )_k \approx g \frac{ z_{s,i}^{n+\theta} -z_{s,i-1}^{n+\theta}}{\Delta x_{k,j}}, \: \: j \in \{ch,lob,rob\} |
where g is the gravitational acceleration, z_{s}^{n+\theta} = (1 - \theta) z_{s}^{n} + \theta z_{s}^{n+1} , and \Delta x_{k,i} is the distance between the neighboring cells along i. As a consequence of the implicit weighting, the barotropic pressure gradient consists of two parts, an implicit term with weight \theta and an explicit term with weight (1-\theta).
Momentum Diffusion. Momentum diffusion represents the sum of molecular and turbulence mixing, and momentum dispersion. The momentum diffusion formulation based on the Laplacian of the current velocity is discretized as
4) | \displaystyle \left ( \nu_{t,j} \frac{\partial^2 V_j } {\partial x^2 } \right )_k \approx \nu_{t,k,j} \left ( \frac{\partial^2 V_j } {\partial x^2 } \right )_X^n, \: \: j \in \{ch,lob,rob\} |
where is the explicit face eddy viscosity, and is the Laplacian at location X. The Laplacian is computed at nodes and spatially interpolated at the location X obtained from the acceleration advection. The Laplacian field is explicit in the numerical solution so it will depend only on values computed for the previous time step. The Laplacian terms are calculated using a standard finite-volume approach. Since the velocity is known at the faces, the gradients can be computed for the cells by a simple application of the Gauss’ Divergence Theorem on the grid cells. Once the gradients are known for the cells, the Gauss’ Divergence theorem is applied again on the dual-grid to obtain a velocity Laplacian at the faces. The face velocity Laplacian at the nodes is computed with a simple inverse distance weighting of the neighboring faces value. Once the Laplacian of the velocity field is known at faces and nodes, the Laplacian term is spatially interpolated using generalized barycentric coordinates to obtain . The location X is the same as in the acceleration term.
Bottom Friction. Bottom friction term is computed semi-implicitly in terms of the bottom friction coefficient, as
5) | \displaystyle \left ( g S_{f,j} \right )_k = c_{f,k,j}^{n+\theta} V_{k,j}^n+1, \: \: j \in \{ch,lob,rob\} |
Bottom friction is computed semi-implicitly where a bottom friction coefficient, , is computed based on -averaged hydraulic radius and velocities. The bottom friction coefficient is therefore updated during the iteration process. At each of those iterations, a new bottom friction term –cfVn+1 is computed similarly to other implicit terms. The velocity V used in the bottom friction formula is completely implicit for stability purposes.
Solution Procedure. Multiplying the momentum equations for the channel and floodplains by the local area and then summing leads to:
6) | \displaystyle \sum_{j \in \{ch,lob,rob\} } \frac{ A_{k,j} } { A_k } \left [ \frac{V_{k,j}^{n+1} - V_{X(j)}^n }{\Delta t} +g \left ( \frac{ z_{s,i}^{n+\theta} - z_{s,i-1}^{n+\theta} } { \Delta x_{k,j} } +S_{h,j} \right ) + c_{f,k,j}^{n+\theta} V_{k,j}^{n+1} - \nu_{t,k,j}^n \left ( \frac{\partial^2 V_j } {\partial x^2 } \right )_X^n - \frac{\tau_{s,j}}{\rho h_j} - M_j \right ] |
Each term in the above equation is expanded and approximated as
\sum_{j \in \{ch,lob,rob\} } \frac{A_{k,j}}{A_k} V_{k,j} = V_k
\sum_{j \in \{ch,lob,rob\} } \frac{A_{k,j}}{A_k} \left ( \frac {V_{k,j} - V_{X(j)} } {\Delta t } \right ) = \frac{V_k - \bar{ V}_X} { \Delta t}
\bar{ V}_X \approx V_X
X = backtracking location corresponding to the velocity V
\sum_{j \in \{ch,lob,rob\} } \frac{ z_{s,i}^{n+\theta} - z_{s,i-1}^{n+\theta} } { \Delta x_{k,j} } = \frac{ z_{s,i}^{n+\theta} - z_{s,i-1}^{n+\theta} } { \Delta x_{k,e} }
X(j) = backtracking location corresponding to the velocity V_j
\sum_{j \in \{ch,lob,rob\} } c_{f,k,j} \approx c_{f,k} = g \frac{A_k^2 } {K_k^2 } |V_k|
\sum_{j \in \{ch,lob,rob\} } \nu_{t,k,j}^n \left ( \frac{\partial^2 V_j } {\partial x^2 } \right )_X^n \approx \nu_{t,k}^n \left ( \frac{\partial^2 V } {\partial x^2 } \right )_X^n
\sum_{j \in \{ch,lob,rob\} } \frac{ \tau_{s,j} } {\rho h_j} \approx \frac{\tau_s }{\rho h}
The final semi-discrete 1D momentum equation is given by
7) | \displaystyle \frac{V_{k}^{n+1} - V_{X}^n }{\Delta t} +g \left ( \frac{ z_{s,i}^{n+\theta} - z_{s,i-1}^{n+\theta} } { \Delta x_{k,e} } +S_{h_k} \right ) + c_{f,k}^{n+\theta} V_{k}^{n+1} - \nu_{t,k}^n \left ( \frac{\partial^2 V } {\partial x^2 } \right )_X^n - \frac{\tau_{s,k}}{\rho h_k} |
The approximations made in the backtracking velocity and turbulent mixing term are done for efficiency. The approach avoids computing separate backtracking and interpolations of the velocities and velocity Laplacians for the channel and left and right floodplains.
The momentum equation above can be rearranged to obtain an expression for the velocity at as
8) | \displaystyle V_{k}^{n+1} = \frac{\Delta t \theta g }{1+\Delta t c_{f,k}^{n+\theta}} \frac{ z_{s,i}^{n+1} - z_{s,i-1}^{n+1} } { \Delta x_{e} } + F_{k} |
where
F_{k} = \frac {B_k^n} { 1 + \Delta t c_{f,k}^{n+\theta} }
B_k^n = V_X^n - (1-\theta) \Delta t g \frac{z_{s,i}^n - z_{s,i-1}^n}{\Delta x_e} - \Delta t g S_{h,k} + \Delta t \nu_{t,k}^n \left ( \frac{\partial^2 V } {\partial x^2 } \right )_X^n + \Delta t\frac{\tau_{s,k}}{\rho h_k^n}
To obtain a discrete implicit equation for the water volume, the above equation is inserted into the discrete continuity equation to obtain
9) | \displaystyle \Omega_i^{n+1} + a_{i,i-1} z_{s,i-1}^{n+1} + a_{i,i} z_{s,i}^{n+1} + a_{i,i+1} z_{s,i+1}^{n+1}= b_i |
where
a_{i,i-1} = - \frac{ \Delta t^2 \theta^2 g A_k^{n+\theta} } {(1 + \Delta t c_{f,k}^{n+\theta} ) \Delta x_{e,k}}
a_{i,i+1} = - \frac{ \Delta t^2 \theta^2 g A_{k+1}^{n+\theta} } {(1 + \Delta t c_{f,k+1}^{n+\theta} ) \Delta x_{e,k+1}}
a_{i,i} = -a_{i,i-1} - a_{i,i+1}
b_{i} = \Omega_i^n+\Delta t Q_i + \Delta t \theta \left ( F_k A_k^{n+\theta} - F_{k+1} A_{k+1}^{n+\theta} \right ) + \Delta t (1 - \theta) \left ( V_k^n A_k^{n+\theta} - V_{k+1}^n A_{k+1}^{n+\theta} \right )
There is an equation of this form for every cell in the domain. Before proceeding, the system of equation for all cells is written in a more compact vector notation.
10) | \displaystyle \boldsymbol{ \Omega ( \boldsymbol{Z} ) } + \boldsymbol{\Psi} \boldsymbol{Z} = \boldsymbol{b} |
Where \boldsymbol{ \Omega } is the vector of all cell volumes, \boldsymbol{ Z } is the vector of all cell water surface elevations, \boldsymbol{ \Psi } is the coefficient matrix of the system and \boldsymbol{ b } is the right-hand-side vector.
If the coefficients are lagged, the system of equations is mildly non-linear due to the bathymetric relationship for \boldsymbol{ \Omega } as a function of \boldsymbol{ Z }. The Jacobian (derivative) of Ω with respect to H is given by another bathymetric relationship : the diagonal matrix of cell wet surface areas. If this information is known, a Newton-like technique can be applied to solve the system of equations, producing the iterative formula,
11) | \displaystyle \boldsymbol{Z}^{m+1} = \boldsymbol{Z}^{m} - \left [ \boldsymbol{\Psi} + \boldsymbol{A}^m \right ]^{-1} \left ( \boldsymbol{ \Omega }^m + \boldsymbol{Z}^m - \boldsymbol{b} \right ) |
where m denotes the iteration index (not to be confused with the time-step).
Robustness and Stability. When there are no fluxes into a cell the water depth is zero, so the water surface elevation is identical to the previous step. In particular, dry cells remain dry until water flows into them.
In the momentum equation, as water depth decreases to zero, all forces tend to zero. However, the bottom friction is the dominant force, so velocities also go to zero in the limit. As a consequence, it is consistent to assume that dry cells have a flow velocity of zero. The momentum equation for dry faces becomes ∂V/∂t=0 and dry faces continue to have zero velocity until water flows into them.
As seen in previous sections, both mass and momentum equations are non-linear. Similarly to the DSW solver, an iterative process must be applied. This idea is presented in steps 6 through 9 below.
The Lagrangian treatment of the of acceleration and mixing terms has the advantage of avoiding stability criteria based on the Courant number and mixing.
Discrete Boundary Conditions. Flow boundary conditions are also discretized:
- Water surface elevation: The water surface elevation boundary condition is directly implemented as z_s^{n+1} = z_{s,b}. The internal cell is then discretized as described above and the terms containing the boundary water surfaces are placed on the right-hand-side of the system of equations.
- Normal Depth: The energy grade slope is specified and utilized to compute a flow at each computation face asQ^{n+1} = K^n S_{f,b}^{1/2} . Boundary face flows are included in the internal cells as a source term on the right-hand-side of the system of equations.
- Flow: The flow boundary condition is specified at each computational face based on the local conveyance. Boundary face flows are included in the internal cells as a source term on the right-hand-side of the system of equations.
Solution Algorithm. The complete solution algorithm is given here:
- The geometry, local orthogonality and subgrid bathymetry data is obtained or pre-computed.
- Solution starts withz_s^0 and V_k^0 as the provided initial condition at time step n=0.
- Boundary conditions are provided for the next time step n+1.
- Initial guess z_s^{n+1} = z_s^{n} and V_k^{n+1} = V_k^{n} .
- Compute explicit terms that remain constant through the time step compute, such as the mixing term and wind forcing.
- Compute θ–averaged water surface elevation and subgrid bathymetry quantities that depend on the computed elevation (face areas, fluid surface areas, hydraulic radii, Manning’s n, etc.).
- A system of equations is assembled for the continuity at the cells as described in the previous sections.
- The system of equations is solved iteratively using the Newton-like algorithm with the given boundary conditions to obtain a candidate solution z_s^{n+1}.
- Velocities V_k^{n+1} are computed based on the discrete momentum equation.
- If the residual (or alternatively, the correction) is larger than a given tolerance (and the maximum number of iterations has not been reached), go back to step 6; otherwise, continue with the next step.
- The computed solution is accepted.
- Increment n. If there are more time steps go back to step 3, otherwise end.
The loop provided by steps 6 through 10 has the purpose of updating the coefficients of the system of equations, so that the solution of the nonlinear system (rather than its linearization) is obtained at every time step. As expected, a fully nonlinear solution has very desirable properties such as wetting several cells and propagating waves though several cells in a single time step.