Keywords

1 Introduction

Flood is a natural disaster, which causes the loss of livestock, human beings, destruction to the infrastructure, and the agricultural lands [1]. The main causes of flood occurrences are increasing urbanization without proper design or planning which turn to be more runoff rate, weather parameters like prolonged rainfall, which increase surface runoff and reduce adequate river capacity due to urbanization. It is very necessary to know the nature of floods in rivers or channels for saving human lives and infrastructure using early disaster management. For that in the early day’s methods used for this is only predict the daily discharge at one fixed cross-section of the channel which is inappropriate for early disaster management [2]. To overcome the above-stated problem, nowadays, mainly physical and numerical based models are used very effectively to solve these types of problems. Toombes and Chanson [3] stated that it is economical to use a numerical based model instead of a physical-based model if the current problem can be solved effectively by numerical based model and added that it is very complex and difficult to solve the real-life problem without use of the numerical method.

To govern different flow conditions like surface flow, subsurface flow, and coupled flows, mathematical models are very useful. For such a flow condition, various studies were done on flood modeling. de Saint-Venant [4] was proposed dynamic flood wave propagation equations for the 1D applications and which are known as SVEs and they are widely used to calculate velocity, depth, and the flow rate over the surface. For 2D surface flow conditions, SVEs are obtained from the Navier-Stokes Equations (NSEs), and this equation is known as Shallow Water Equations (SWEs) [5]. SWEs are derived from the principles of mass and momentum conservation. These equations are frequently employed in the case of unsteady free surface flow (hydrodynamic flow). These equations belong to the family of first-order hyperbolic partial differential equations, and cannot be solved using analytical methods. As a result, various numerical approaches must be used for these sorts of equations. SWEs are solved using several numerical methods. Finite difference method (FDM), finite volume method (FVM), and finite element method (FEM) [6,7,8] are well known for the solution of shallow water hydrodynamic equation. From these three methods, FDM is the oldest one. It is used extensively because it is relatively easy to implement, efficiently computing linear algebra, and easy to program. John and Anderson [9] stated that the use of FDM for SWEs is led to dissipation and dispersion errors because of its truncated terms and it required proper treatment for that. To reduce dissipation and dispersion errors, [10] suggested an excellent numerical scheme for solutions of SWEs, which is a Finite Difference Explicit MacCormack Predictor-Corrector Scheme. Due to its shock capturing nature, it is widely used for smoothly capture high discontinuity like bore wave, hydraulic jump, etc., in river flow.

The advantage of this technique is that it leaves a smooth area for a large gradient relatively undisturbed. In this technique, the extra term adds after the traditional MacCormack method for finding depth, velocity, and runoff rate at new time steps. In this technique, to control the dissipation, a regulating coefficient is used which is computed using the hit and trial approach. The extreme value of this regulating-coefficient shows extreme diffusion of results, which lead to spurious oscillations in solution. Overcome this problem, an additional term as “corrector step” added after the old (traditional) MacCormack Predictor-Corrector Scheme, which easily controls the spurious oscillations [12]. After used this model for a different test case, they concluded that this model obtained very smooth results as compare to the traditional one.

Objective of study is to perform numerical experiment for hydraulic jump in straight channel using MacCormack Predictor-Corrector Scheme with Artificial Viscosity term.

2 Materials and Methods

2.1 Governing Equations

The 2D SVEs are used to monitor surface flow. The conservations of mass and momentum approach was used to obtain these equations [11]. The following are the governing equations for surface flow:

$$\frac{\partial h}{{\partial t}} + \frac{{\partial \left( {hu} \right)}}{\partial x} + \frac{{\partial \left( {hv} \right)}}{\partial y} = 0$$
(1)
$$\frac{{\partial \left( {hu} \right)}}{\partial t} + \frac{{\partial \left( {hu^{2} + \frac{{gh^{2} }}{2}} \right)}}{\partial x} + \frac{{\partial \left( {huv} \right)}}{\partial y} = gh(S_{0x} - S_{fx} )$$
(2)
$$\frac{{\partial \left( {hu} \right)}}{\partial t} + \frac{{\partial \left( {huv} \right)}}{\partial x} + \frac{{\partial \left( {hv^{2} + \frac{{gh^{2} }}{2}} \right)}}{\partial y} = gh(S_{0y} - S_{fy} )$$
(3)

The continuity equation is Eq. (1), and the momentum equations for the x and y directions are Eqs. (23). Now writing 2D SWEs in matrix form as shown by [11].

$$U_{t} + E_{x} + F_{y} + S = 0$$
(4)

where

$$\begin{aligned} U_{t} & = \left\{ { \begin{array}{*{20}c} h \\ {hu } \\ {hv} \\ \end{array} } \right\},E_{x} = \left\{ {\begin{array}{*{20}c} {hu} \\ { hu^{2} + \frac{{gh^{2} }}{2}} \\ {huv} \\ \end{array} } \right\},F_{y} = \left\{ {\begin{array}{*{20}c} {hv} \\ {huv} \\ { hv^{2} + \frac{{gh^{2} }}{2}} \\ \end{array} } \right\} \\ & \quad {\text{and}}\;\;S = \left\{ { \begin{array}{*{20}c} 0 \\ { - gh(S_{0x} - S_{fx} )} \\ { - gh(S_{0y} - S_{fy} )} \\ \end{array} } \right\} \\ \end{aligned}$$

The friction slopes \(S_{fx}\) and \(S_{fy}\) are obtained from Manning’s formula as [11]:

$$S_{fx} = \frac{{n^{2} \times u \times \sqrt {\left( {u^{2} + v^{2} } \right)} }}{{h^{\frac{3}{4}} }}\,\,{\text{and}}\,\, S_{fy} = \frac{{n^{2} \times u \times \sqrt {\left( {u^{2} + v^{2} } \right)} }}{{h^{\frac{3}{4}} }}$$
(5)

There are no closed-form solutions to the governing Eq. (4) since it is a set of 1st-order nonlinear hyperbolic PDEs. So, these equations are numerically solved.

2.2 MacCromack Discretization Technique

MacCormack’s discretization approach is a variant of the Lax-Wendroff Method, although it is considerably easier to apply [9]. Both approaches are explicit FDM with second-order spatial and temporal accuracy. The discretization procedure of the Lax-Wendroff approach is simple, but the algebra computation is time-consuming, with the second time derivatives accounting for the majority of the long algebra [9]. Fortunately, all of this algebra is shortcut; this is achieved by MacCormack process. MacCormack [10] applying this method first. It is the simplest to comprehend and program. Furthermore, for many fluid flow applications, the results obtained by using MacCormack approach are perfectly appropriate. The method of MacCormack is illustrated here for these reasons and will be used for the applications. The use of this technique is a two-step hyperbolic equation method: a predictor step that is followed by a corrector step [9].

2.2.1 Discretization of 2-D Saint-Venant Equations

For 2D surface flow, the governing equations are [11]:

$$\frac{\partial h}{{\partial t}} = - \left( {h\frac{\partial u}{{\partial x}} + h\frac{\partial v}{{\partial y}}} \right)$$
(6)
$$\frac{\partial u}{{\partial t}} = - \left( {\frac{{\partial u^{2} }}{\partial x} + g\frac{\partial h}{{\partial x}} + u\frac{\partial v}{{\partial y}} + g(S_{fx} - S_{ox} )} \right)$$
(7)
$$\frac{\partial v}{{\partial t}} = - \left( {v\frac{\partial u}{{\partial x}} + g\frac{\partial h}{{\partial y}} + \frac{{\partial v^{2} }}{\partial y} + g(S_{fy} - S_{oy} )} \right)$$
(8)

Predictor Step:

The spatial derivatives on the right-hand side are replaced by forward differences in Eqs. (6), (7), and (8). Which is show in Eqs. (9), (10) and (11), respectively [9].

$$\left( {\frac{\partial h}{{\partial t}}} \right)_{i, j}^{t} = - \left( {h_{i,j}^{t} \frac{{u_{i + 1,j}^{t} - u_{i,j}^{t} }}{\Delta x} + h_{i,j}^{t} \frac{{u_{i,j + 1}^{t} - u_{i,j}^{t} }}{\Delta y}} \right)$$
(9)
$$\begin{aligned} \left( {\frac{{\partial u}}{{\partial t}}} \right)_{{i,~j}}^{t} & = - \left( {2u_{{i,j}}^{t} \frac{{u_{{i + 1,j}}^{t} - u_{{i,j}}^{t} }}{{\Delta x}} + g\frac{{h_{{i + 1,j}}^{t} - h_{{i,j}}^{t} }}{{\Delta x}}} \right. \\ & \quad \left. { + u_{{i,j}}^{t} \frac{{v_{{i,j + 1}}^{t} - v_{{i,j}}^{t} }}{{\Delta y}} + g(S_{{fx\left( {i,j} \right)}}^{t} - S_{{ox\left( {i,j} \right)}}^{t} } \right) \\ \end{aligned}$$
(10)
$$\begin{aligned} \left( {\frac{{\partial v}}{{\partial t}}} \right)_{{i,~j}}^{t} = & - \left( {2v_{{i,j}}^{t} \frac{{u_{{ij + 1}}^{t} - u_{{i,j}}^{t} }}{{\Delta y}} + g\frac{{h_{{i,j + 1}}^{t} - h_{{i,j}}^{t} }}{{\Delta y}}} \right. \\ & \left. { + v_{{i,j}}^{t} \frac{{u_{{i + 1,j}}^{t} - u_{{i,j}}^{t} }}{{\Delta x}} + g(S_{{fy\left( {i,j} \right)}}^{t} - S_{{oy\left( {i,j} \right)}}^{t} } \right) \\ \end{aligned}$$
(11)

In Eqs. (12), (13) and (14), for initial value problem, variables at time \(t,\) i.e., the right-hand side are known value. So, the predicted value of \(\left( {\overline{h}} \right)^{t + \Delta t}\), \(\left( {\overline{u}} \right)^{t + \Delta t}\) and \(\left( {\overline{v}} \right)^{t + \Delta t}\), can be calculated as below [9]:

$$\overline{h}_{i,j}^{t + \Delta t} = h_{i,j}^{t} + \left( {\frac{\partial h}{{\partial t}}} \right)_{i, j}^{t} \Delta t$$
(12)
$$\overline{u}_{i,j}^{t + \Delta t} = u_{i,j}^{t} + \left( {\frac{\partial u}{{\partial t}}} \right)_{i, j}^{t} \Delta t$$
(13)
$$\overline{v}_{i,j}^{t + \Delta t} = v_{i,j}^{t} + \left( {\frac{\partial v}{{\partial t}}} \right)_{i, j}^{t} \Delta t$$
(14)

\(\left( {\overline{h}} \right)^{t + \Delta t}\), \(\left( {\overline{u}} \right)^{t + \Delta t}\) and \(\left( {\overline{v}} \right)^{t + \Delta t}\) are only predicted value of height and velocity in x and y-direction. It is only first order accurate since Eqs. (12), (13) and (14) contains only the 1st-order term in Taylor Series.

Corrector Step:

In this step, first obtain a predicted value of the time derivative at time \(+ \Delta t\), \(\left( {\overline{{\frac{\partial h}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t}\), \(\left( {\overline{{\frac{\partial u}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t}\) and \(\left( {\overline{{\frac{\partial v}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t}\); here we use the predicted values from the predictor step as known values in the RHS. In Eqs. (12), (13) and (14), the spatial derivatives are replaced with rearward differences. Equations (15), (16) and (17), respectively, represent corrector step [9].

$$\left( {\overline{{\frac{\partial h}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} = - \left( {\overline{h}_{i,j}^{t + \Delta t} \frac{{\overline{u}_{i,j}^{t + \Delta t} - \overline{u}_{i - 1,j}^{t + \Delta t} }}{\Delta x} + \overline{h}_{i,j}^{t + \Delta t} \frac{{\overline{u}_{i,j}^{t + \Delta t} - \overline{u}_{i,j - 1}^{t + \Delta t} }}{\Delta y}} \right)$$
(15)
$$\begin{aligned} \left( {\overline{{\frac{\partial u}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} & = - \left( {2\overline{u}_{i,j}^{t + \Delta t} \frac{{\overline{u}_{i,j}^{t + \Delta t} - \overline{u}_{i - 1,j}^{t + \Delta t} }}{\Delta x} + g\frac{{\overline{h}_{i,j}^{t + \Delta t} - \overline{h}_{i - 1,j}^{t + \Delta t} }}{\Delta x}} \right. \\ & + \left. {u_{i,j}^{t + \Delta t} \frac{{\overline{v}_{i,j}^{t + \Delta t} - \overline{v}_{i,j - 1}^{t + \Delta t} }}{\Delta y} + g(S_{{fx\left( {i,j} \right)}}^{t + \Delta t} - S_{{ox\left( {i,j} \right)}}^{t + \Delta t} } \right) \\ \end{aligned}$$
(16)
$$\begin{aligned} \left( {\overline{{\frac{\partial v}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} & = - \left( {2\overline{v}_{i,j}^{t + \Delta t} \frac{{\overline{u}_{i,j}^{t + \Delta t} - \overline{u}_{i,j - 1}^{t + \Delta t} }}{\Delta y} + g \frac{{\overline{h}_{i,j}^{t + \Delta t} - \overline{h}_{i,j - 1}^{t + \Delta t} }}{\Delta y}} \right. \\ & + \left. {\overline{v}_{i,j}^{t + \Delta t} \frac{{\overline{u}_{i,j}^{t + \Delta t} - \overline{u}_{i - 1,j}^{t + \Delta t} }}{\Delta x} + g(S_{{fy\left( {i,j} \right)}}^{t + \Delta t} - S_{{oy\left( {i,j} \right)}}^{t + \Delta t} } \right) \\ \end{aligned}$$
(17)

Final Step:

The arithmetic mean is used to calculate the average value of the time derivative of height and velocity in the x and y directions, as illustrated in Eqs. (18), (19) and (20), respectively [9].

$$\left( {\frac{\partial h}{{\partial t}}} \right)_{av} = \frac{1}{2}\left( {\left( {\frac{\partial h}{{\partial t}}} \right)_{i, j}^{t} + \left( {\overline{{\frac{\partial h}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} } \right)$$
(18)
$$\left( {\frac{\partial u}{{\partial t}}} \right)_{av} = \frac{1}{2}\left( {\left( {\frac{\partial u}{{\partial t}}} \right)_{i, j}^{t} + \left( {\overline{{\frac{\partial u}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} } \right)$$
(19)
$$\left( {\frac{\partial v}{{\partial t}}} \right)_{av} = \frac{1}{2}\left( {\left( {\frac{\partial v}{{\partial t}}} \right)_{i, j}^{t} + \left( {\overline{{\frac{\partial v}{{\partial t}}}} } \right)_{i, j}^{t + \Delta t} } \right)$$
(20)

The final, “corrected” value of height and velocity in x and y-direction at time \(t + \Delta t\) are shown in Eqs. (21), (22), and (23), respectively [9].

$$h_{i,j}^{t + \Delta t} = h_{i,j}^{t} + \left( {\frac{\partial h}{{\partial t}}} \right)_{av} \Delta t$$
(21)
$$u_{i,j}^{t + \Delta t} = u_{i,j}^{t} + \left( {\frac{\partial u}{{\partial t}}} \right)_{av} \Delta t$$
(22)
$$v_{i,j}^{t + \Delta t} = v_{i,j}^{t} + \left( {\frac{\partial v}{{\partial t}}} \right)_{av} \Delta t$$
(23)

2.3 Artificial Viscosity

Normally, for Courant number less than one, 2nd-order FDM generate numerical oscillations. This is due to truncation error and diffusive properties of scheme. So, it is necessary to remove such numerical oscillation for smooth flow. Such condition addition of Artificial Viscosity term required to overcome such problem. This term was used successfully in different application with MacCormack’s technique by many researchers. The governing flow equations for 2D unsteady flow are as below:

$$\frac{\partial U}{{\partial t}} = - \frac{\partial E}{{\partial x}} - \frac{\partial F}{{\partial y}} + S$$
(24)

In this governing equation, a small amount of artificial viscosity is added in each time step of solution vector U [9]:

$$\begin{aligned} S_{i,j}^{t} & = \frac{{C_{x} \left| {p_{i + 1,j}^{t} - 2p_{i,j}^{t} + p_{i - 1,j}^{t} } \right|}}{{p_{i + 1,j}^{t} + 2p_{i,j}^{t} + p_{i - 1,j}^{t} }}\left( {U_{i + 1,j}^{t} - 2U_{i,j}^{t} + U_{i - 1,j}^{t} } \right) \\ & \quad + \frac{{C_{y} \left| {p_{i,j + 1}^{t} - 2p_{i,j}^{t} + p_{i,j - 1}^{t} } \right|}}{{p_{i,j + 1}^{t} + 2p_{i,j}^{t} + p_{i,j - 1}^{t} }}\left( {U_{i,j + 1}^{t} - 2U_{i,j}^{t} + U_{i,j - 1}^{t} } \right) \\ \end{aligned}$$
(25)

In Eq. (25), \(C_{x}\) and \(C_{y}\) are two freely defined parameters with typical values ranging from 0.01 to 0.3. In the Eq. (25), U indicates the various elements of the solutions vector, each taken in independently. S is assessed in the predictor step using the known quantities at the moment, while in the corrector step, the values on the right-hand side of Eq. (25) are the anticipated values, with \(S_{i,j}^{t}\) and it is represent by \(\overline{S}_{i,j}^{t + \Delta t}\) [9].

$$\begin{aligned} \overline{S}_{i,j}^{t + \Delta t} & = \frac{{C_{x} \left| {\overline{p}_{i + 1,j}^{t + \Delta t} - 2\overline{p}_{i,j}^{t + \Delta t} + \overline{p}_{i - 1,j}^{t + \Delta t} } \right|}}{{\overline{p}_{i + 1,j}^{t + \Delta t} + 2\overline{p}_{i,j}^{t + \Delta t} + \overline{p}_{i - 1,j}^{t + \Delta t} }}\left( {\overline{U}_{i + 1,j}^{t + \Delta t} - 2\overline{U}_{i,j}^{t + \Delta t} + \overline{U}_{i - 1,j}^{t + \Delta t} } \right) \\ & \quad + \frac{{C_{y} \left| {\overline{p}_{i,j + 1}^{t + \Delta t} - 2\overline{p}_{i,j}^{t + \Delta t} + \overline{p}_{i,j - 1}^{t + \Delta t} } \right|}}{{\overline{p}_{i,j + 1}^{t} + 2\overline{p}_{i,j}^{t} + \overline{p}_{i,j - 1}^{t} }}\left( {\overline{U}_{i,j + 1}^{t + \Delta t} - 2\overline{U}_{i,j}^{t + \Delta t} + \overline{U}_{i,j - 1}^{t + \Delta t} } \right) \\ \end{aligned}$$
(26)

The artificial viscosity term calculated from Eqs. (25) and (26) are added as extra term in predictor step (for predictor value of \(h, u\), and) of MacCormack technique at time step \(t + \Delta t\) [9].

$$\overline{h}_{i,j}^{t + \Delta t} = h_{i,j}^{t} + \left( {\frac{\partial h}{{\partial t}}} \right)_{i, j}^{t} \Delta t + S_{i,j}^{t}$$
(27)
$$\overline{u}_{i,j}^{t + \Delta t} = u_{i,j}^{t} + \left( {\frac{\partial u}{{\partial t}}} \right)_{i, j}^{t} \Delta t + S_{i,j}^{t}$$
(28)
$$\overline{v}_{i,j}^{t + \Delta t} = v_{i,j}^{t} + \left( {\frac{\partial v}{{\partial t}}} \right)_{i, j}^{t} \Delta t + S_{i,j}^{t}$$
(29)

At time \(t + \Delta t\), as an extra term of artificial viscosity calculated from Eq. (26) is added in to the corrected values of \(h, u\) and \(v\) in corrector step [9].

$$h_{i,j}^{t + \Delta t} = h_{i,j}^{t} + \left( {\frac{\partial h}{{\partial t}}} \right)_{av} \Delta t + \overline{S}_{i,j}^{t + \Delta t}$$
(30)
$$u_{i,j}^{t + \Delta t} = u_{i,j}^{t} + \left( {\frac{\partial u}{{\partial t}}} \right)_{av} \Delta t + \overline{S}_{i,j}^{t + \Delta t}$$
(31)
$$v_{i,j}^{t + \Delta t} = v_{i,j}^{t} + \left( {\frac{\partial v}{{\partial t}}} \right)_{av} \Delta t + \overline{S}_{i,j}^{t + \Delta t}$$
(32)

2.4 Initial and Boundary Conditions

The number of boundary conditions is determined by the Froude number or whether the flow is described as subcritical or supercritical [13] (Table 1).

Table 1 Number of boundary conditions required in open boundary problem

2.5 Stability Condition

For the time marching problem, stability depends on Courant–Friedrichs–Lewy (CFL) condition [9].

$$\max \left( {\frac{{\left( {u + \sqrt {gh} } \right)\Delta t}}{\Delta x}} \right) \le 1,\max \left( {\frac{{\left( {v + \sqrt {gh} } \right)\Delta t}}{\Delta y}} \right) \le 1$$
(33)

The spatial grid spacing, flow velocity, and celerity are defining computation time interval, and it will change significantly in computation. Thus, it is necessary to control size of this computational time interval for stability of scheme.

2.6 Governing Equation of Hydraulic Jump

$$\frac{{y_{2} }}{{y_{1} }} = \frac{1}{2}\left( { - 1 + \sqrt {1 + 8Fr_{1}^{2} } } \right)$$
(34)

Here \(y_{1}\) and \(y_{2}\) are upstream and downstream flow depth immediately after and before of the jump, respectively, and \(Fr_{1}\) is Froude number at upstream [14].

3 Results and Discussion

The present MacCormack Predictor-Corrector Scheme is used to represent numerical experiment for h hydraulic jump.

3.1 Numerical Experiment for Hydraulic Jump

The present MacCormack model is also applied to study the unsteady flow behavior of hydraulic jump in straight channel(flume). Various parameters considered for numerical experiment are taken from [15]. The details of the experiment, as well as their results, are presented here. The jump was allowed to form in the first 3 m of the glassed flume by controlling the depth at the downstream end. Table 2 lists the various test parameters.

Table 2 Various parameters for hydraulic jump in straight channel

The normal component of velocity is set to zero at the side walls. At the upstream boundary, U-velocity and depth are fixed, while V-velocity is zero. The flow depth is fixed, and the U and V velocities at the downstream boundary are extrapolated from the interior nodes. The results have been presented in Fig. 1. Also, it observed that depth of flow after hydraulic jump (subcritical flow condition) obtained by governing equation of hydraulic jump and from numerical experiment are 0.236 and 0.222 m, respectively, which is differ by 5.93%. From the result, it is cleared that the MacCormack method is capable to capture the hydraulic jump in an open channel.

Fig. 1
a. An S-shaped color shaded water surface elevation is depicted in a 3 D graph of water depth versus transverse versus longitudinal distance. b. A graph of transverse versus longitudinal distances depicts arrows of the velocity vector that are highest between 1 and 4 meters of longitudinal distance.

Hydraulic jump: a water surface elevation b velocity vector profile

4 Conclusions

  1. (i)

    The Saint-Venant Equations for 2D flow is solved for the computation of hydraulic jump in straight channel with addition of Artificial Viscosity term to MacCormack Predictor-Corrector Scheme for reduce numerical oscillations. From results it is clarifying that this scheme easy capture hydraulic jump near upstream (within 3 m of channel span) without numerical oscillation.

  2. (ii)

    Also, it observed that depth of flow after hydraulic jump (subcritical flow condition) obtained by governing equation of hydraulic jump and from numerical experiment are 0.236 m and 0.222 m, respectively which is differ by 5.93%.

  3. (iii)

    The results of the numerical experiments show that, the MacCormack Predictor-Correction Scheme works well with 2D numerical experiment of hydraulic jump.