- Research
- Open Access
- Published:

# Unconditional stable numerical techniques for a water-quality model in a non-uniform flow stream

*Advances in Difference Equations*
**volume 2017**, Article number: 286 (2017)

## Abstract

Two mathematical models are used to simulate water quality in a non-uniform flow stream. The first model is the hydrodynamic model that provides the velocity field and the water elevation. The second model is an advection-diffusion-reaction model that provides the pollutant concentration field. Both models are formulated as one-dimensional equations. The traditional Crank-Nicolson method is also used in the hydrodynamic model. At each step, the flow velocity fields calculated from the first model are the inputs into the second model. A new fourth-order scheme and a Saulyev scheme are simultaneously employed in the second model. This paper proposes a remarkably simple alteration to the fourth-order method so as to make it more accurate without any significant loss of computational efficiency. The results obtained indicate that the proposed new fourth-order scheme, coupled to the Saulyev method, does improve the prediction accuracy compared to that of the traditional methods.

## Introduction

The pollution levels in a stream can be measured via data collection. This is rather difficult and complex, and the results obtained deviate in measurement from one point in each time/place to another when the water flow in the stream is not uniform. In water quality modeling for a non-uniform flow stream, the governing equations used are the hydrodynamic model and the dispersion model. The one-dimensional shallow water equation and the advection-dispersion-reaction equation govern the first and the second models, respectively.

Numerous numerical techniques for solving such models are available. In [1], a finite element method for solving a steady water pollution control to achieve a minimum cost is used. Numerical techniques for solving the uniform flow of a stream water quality model, especially the one-dimensional advection-dispersion-reaction equation, are presented in [2–5], and [6].

The non-uniform flow model requires the velocity of the current at any point and any time in the domain. A hydrodynamic model provides the velocity field and tidal elevation of the water. In [7–9], and [10], the hydrodynamic model and the advection-dispersion equation are used to approximate the velocity of the water current in a bay, uniform reservoir and stream, respectively. Among these numerical techniques, finite difference methods, including both explicit and implicit schemes, are mostly used for one-dimensional domains, such as longitudinal stream systems [11, 12].

There are two mathematical models used to simulate water quality in non-uniform water flow systems. The first is the hydrodynamic model. This provides the velocity field and the water elevation. The second is the dispersion model. This gives the pollutant concentration field. The traditional Crank-Nicolson method is used in the hydrodynamic model. At each step, the calculated flow velocity fields of the first model are inputs into the second model [9, 10, 13].

Numerical techniques to solve the non-uniform flow of stream water containing one-dimensional advection-dispersion-reaction equation are presented in [10]. The fully implicit scheme (the Crank-Nicolson method) is used to solve the hydrodynamic model and the backward time-central space (BTCS) for the dispersion model. In [13], the Crank-Nicolson method is also used to solve the hydrodynamic model while the explicit Saulyev scheme is used to solve the dispersion model.

Research on finite difference techniques for the dispersion model have concentrated on computation accuracy and numerical stability. Many complicated numerical techniques, such as the QUICK scheme, the Lax-Wendroff scheme, and the Crandall scheme, have been studied to increase performance. These techniques focus on their advantages in terms of stability and higher-order accuracy [3].

Simple finite difference schemes are becoming more attractive for model use. Simple explicit methods include the forward time-central space (FTCS) scheme, the MacCormack scheme, and the Saulyev scheme. Implicit schemes include the BTCS and the Crank-Nicolson scheme [12]. These schemes are either first-order or second-order accurate and have advantages in programming and computing without losing much accuracy, thus they are used for many model applications [3].

A third-order upwind scheme for the advection-diffusion equation using a simple spreadsheet simulation is proposed in [14]. In [15], a new flux splitting scheme is proposed. The scheme is robust and converges as fast as the Roe splitting scheme. The Godunov mixed method for advection-dispersion equations is introduced in [16]. A time-splitting approach for the advection-dispersion equations is also considered. In addition, [17] proposes time-split methods for multi-dimensional advection-diffusion equations in which advection is approximated by a Godunov-type procedure, and diffusion is approximated by a low-order mixed finite element method. In [18], a flux-limiting solution technique for the simulation of a reaction-diffusion-convection system is proposed. A composite scheme to solve scalar transport equations in a two-dimensional space, that accurately resolves sharp profiles in the flow, is introduced. The total variation diminishing implicit Runge-Kutta method for dissipative advection-diffusion problems in astrophysics is proposed in [19]. They derive dissipative space discretizations and demonstrate that, together with specially adapted total-variation-diminishing or strongly stable Runge-Kutta time discretizations with adaptive step-size control, these yield reliable and efficient integrators for the underlying multi-dimensional non-linear evolution equations.

We propose simple revisions to a new fourth-order scheme that improve its accuracy for the problem of water quality measurement in a non-uniform water flow in a stream. In the following sections, the formulation of a new fourth-order scheme is introduced. The proposed revision of a new fourth-order scheme with the Saulyev method is described.

The result from the hydrodynamic model is the water flow velocity used in the advection-dispersion-reaction equation to determine the pollutant concentration field. Friction forces, due to the drag of the sides of the stream, are considered. The theoretical solution to the model at the end point of the domain that guarantees the accuracy of the approximate solution is presented in [9, 10], and [13].

The stream has a simple one space dimension, as shown in Figure 1. By averaging the equation over the depth, discarding the term due to the Coriolis force, it follows that the one-dimensional shallow water and the advection-dispersion-reaction equations are applicable. We use the Crank-Nicolson scheme, the traditional FTCS, and a couple of new fourth-order schemes and the Saulyev method to approximate the velocity, the elevation, and the pollutant concentration from the first and the second models, respectively.

## Model formulation

### The hydrodynamic model

In this section, we derive a simple hydrodynamic model describing the water current and elevation by the one-dimensional shallow water equation. We make the usual assumption in the continuity and momentum balance, *i.e.*, we assume that the Coriolis and shearing stresses are small, and the surface wind is soft [7, 9, 10, 20]. We obtain the one-dimensional shallow water equations

where *x* is the longitudinal distance along the stream (m), *t* is time (s), \(h(x)\) is the depth measured from the mean water level to the stream bed (m), \(\zeta(x,t)\) is the elevation from the mean water level to the temporary water surface or the tidal elevation (m/s), and \(u(x,t)\) is the velocity components (m/s), for all \(x \in [0,l]\).

Assuming that *h* is a constant and that \(\zeta \ll h\), equations (1) and (2) reduce to

We obtain a dimensionless equation by letting \(U = u / \sqrt{gh}\), \(X = x/l\), \(Z = \zeta / h\) and \(T = t \sqrt{gh}/l\). Substituting these expressions into equations (3) and (4) leads to

In [9, 10], and [13], a damping term is introduced into equations (5) and (6) to represent the frictional forces due to the drag of sides of the stream. We have

The initial conditions at \(t=0\) and \(0\leq X\leq 1\) are \(Z= 0\) and \(U=0\). The boundary conditions for \(t>0\) are \(Z = e^{it}\) at \(X=0\) and \(\frac{\partial Z}{\partial X} =0\) at \(X=1\). Equations (7) and (8) are called the damped equations. We solve the damped equations using a finite difference method in \([0,1]\times [0,T]\). Since *Z* may be used to represent the vertical coordinate, *U* may be used to represent the approximated solutions, and *T* may be used to represent the time at which the maximum error of computed solutions is found, it is convenient to use \(u, d, t\) and *x* for \(U, Z, T\) and *X*, respectively. We have

The initial conditions are \(u=0\) and \(d=0\) at \(t=0\). The boundary conditions are \(d(0,t)=f(t)\) and \(\frac{\partial d}{\partial x}=0\) at \(x=1\).

### Dispersion model

In a stream water quality model, the governing equation is the dynamic one-dimensional advection-dispersion equation. A simplified representation, averaging the equation over the depths, as shown in [2–4, 10], and [6], is

Here \(C(x,t)\) is the concentration averaged over the depth at the point *x* at time *t* (mg/L), *D* is the diffusion coefficient (m^{2}/s), and \(u(x,t)\) is the velocity component (m/s), for all \(x \in [0,L]\). The initial conditions and the left boundary conditions are usually determined by observations. The initial pollutant concentration is \(C(x,0) = C_{0}\) at \(t=0\) for all \(x>0\), where \(C_{0}\) is a positive constant. The released pollutant concentration on the left boundary condition is given by \(C(0,t) = r(t)\) at \(x=0\), where \(r(t)\geq0\). The observed rate of change of the pollutant concentration on the right boundary is assumed to be a constant \(\frac{\partial C}{\partial x} = S_{0}\) at \(x=L\), where \(S_{0}\) is an arbitrary constant.

## Crank-Nicolson method for the hydrodynamic model

The hydrodynamic model provides the velocity field and the elevation of the water. The calculated results of this model are the inputs into the dispersion model, which determine the pollutant concentration. We follow the numerical techniques of [9]. To find the water velocity and the water elevation from equations (9) and (10), we make a change of variables, \(v=e^{t} u\). Substituting this into equations (9) and (10), we obtain

Equations (12) and (13) can be written in matrix form as follows:

That is,

where

with initial conditions \(d=v=0\) at \(t=0\). The left boundary condition at \(x=0,\ t> 0\) is specified: \(d(0,t) = f(t)\) and \(\frac{\partial v}{\partial x} = -e^{t} \frac{df}{dt}\). The right boundary condition at \(x=1,\ t> 0\) is specified: \(\frac{\partial d}{\partial x} = 0\) and \(v(0,t) = 0\).

We now discretize equation (15) by dividing the interval \([0,1]\) into *M* subintervals such that \(M\Delta x=1\) and the interval \([0,T]\) into *N* subintervals such that \(N\Delta t = T\). We then approximate \(d(x_{i},t_{n})\) by \(d_{i}^{n}\), the value of the difference approximation of \(d(x,t)\) at the point \(x=i\Delta x\) and \(t = n\Delta t\), where \(0\leq i \leq M\) and \(0 \leq n \leq N\). We similarly define \(v_{i}^{n}\) and \(U_{i}^{n}\). The grid point \((x_{n},t_{n})\) is defined by \(x_{i} = i\Delta x\) for all \(i=0,1,2,\dots,M\) and \(t_{n}=n\Delta t\) for all \(n=0,1,2,\dots,N\) in which *M* and *N* are positive integers. Applying the Crank-Nicolson method [21] to equation (15), the following finite difference equation is obtained:

where

*I* is the unit matrix of order two and \(\lambda = \Delta t/ \Delta x\). Applying the initial and boundary conditions given in equations (12) and (13), we have

where

where \(a_{1}^{n} = e^{t_{n}}, a_{2}^{n} = e^{-t_{n}}\) and \(t_{n} = n\Delta t\) for all \(n = 0,1,2,\ldots, N\). The Crank-Nicolson scheme is unconditionally stable [12, 21].

## A new fourth-order scheme with a Saulyev method for the advection-dispersion equation

Applying a new fourth-order technique [22] to equation (11), the discretization of each term is obtained as follows:

where

Substituting equations (21)-(25) into equation (11), we obtain

for \(2\leq i \leq M-2\) and \(0\leq n \leq N-1\). Equation (26) can be written in an explicit form of finite difference equations as follows:

for \(2\leq i \leq M-2\) and \(0\leq n \leq N-1\). For \(i=1, M-1\) and *M*, the new fourth-order finite difference equation (27) cannot be employed to calculate the value \(C_{i}^{n}\) on the grid point next to left and right boundaries of the domain of the solution. An alternate appropriate finite difference method, such as the Saulyev method, is employed to approximate their values as discussed in the following section.

### The employment of a Saulyev method to the left and the right boundary conditions

The Saulyev scheme is unconditionally stable [5, 22]. Applying the Saulyev technique [5] to equation (11), we obtain the following discretization:

Substituting equations (28)-(32) into equation (11), we obtain

for \(1\leq i \leq M\) and \(0\leq n \leq N-1\).

For \(i=1\), we put the known value of the left boundary \(C_{0}^{n+1}=r_{0}^{n+1}\) into equation (33) on the right hand side, and we obtain

For \(i=M-1\), we obtain an explicit form of equation (33). We have

For \(i=M\), substitution of the approximate unknown value of the right boundary by a traditional central difference approximation [23] with the known derivative the right boundary condition gives

Substituting equation (36) into equation (33), we obtain

From equations (34) and (37), we see that the technique does not generate fictitious points along either side of the solution domain. It follows that the new fourth-order finite difference equation (27), with the employed Saulyev finite difference equations (34)-(35) and (37), can be used to calculate the values \(C_{i}^{n}\) on grid points of the solution domain.

## Numerical experiment

The uniform flow of advection-diffusion is considered in a uniform stream of constant cross-section and bottom slope. The flow velocity and diffusion coefficient are taken to be \(U=0.01\) m/s and \(D=0.001\) m^{2}/s. We assume that the length of the stream is \(L=100\) m. We assume that the pollutant concentration level at the left end is

We assume that there is no rate of change of pollutant on the right end as follows:

The theoretical solution to the problem is [24, 25]

The accuracy of the proposed new fourth-order scheme with employed Saulyev method and the theoretical methods is compared in Table 1 and Figure 2. They are not very sensitive to spatial and time discretization sizes as shown in Figures 3-4, while the time and location are fixed at \(x = 1.0 \) and \(t = 40.00 \) in Table 2.

The proposed technique gives the accurate results that depend on some spatial discretization sizes. It is a remarkably simple alteration to the fourth-order method so as to make it more accurate without any significant loss of computational efficiency.

## Application to a non-uniform flow stream water quality assessment

Consider the measurement of a pollutant concentration *C* in a non-uniform flow stream. The stream is aligned with a longitudinal distance of 1.0 (km) and a depth of 1.0 (m). There is a plant which discharges waste water into the stream and the pollutant concentration at the discharge point is \(C(0,t) = C_{0} = 1\) (mg/L) at \(x=0\) for all \(t>0\), there is no rate of change of pollutant level \(\frac{\partial C}{\partial x}=0\) at \(x=1.0\) for all \(t>0\), and there is no initial pollutant \(C(x,0) = 0 \) (mg/L) at \(t=0\). The elevation of water at the discharge point can be described as a function \(d(0,t) = f(t) = \sin t\) (m) for all \(t>0\), and the elevation does not change at \(x = 1.0\) (km). The physical parameter of the pollutant matter is a diffusion coefficient \(D=0.1\) (m^{2}/s).

In the analysis conducted in this study, we mesh the stream into 40 elements with \(\Delta x = 0.05\) and the time increment is 0.4 s with \(\Delta t = 0.00125\), characterizing a one-dimensional flow. Using the Crank-Nicolson method of [9, 10], and [13], the water flow velocity \(u(x,t)\) is shown in Table 3 and Figure 5.

Next, the approximate water velocity can be added to the new fourth-order scheme, employing the Saulyev method to the left boundary near the discharge point, and the right boundary as in equation (27). The approximation of pollutant concentrations *C* of the proposed scheme is shown in Table 4 and Figure 6.

They are not very sensitive to spatial and time discretization sizes as shown in Figure 7, while all discretization cases are halved and their ratios \(\Delta t /(\Delta x)^{2}\) are increased. The proposed technique gives good agreement results. The technique can be used to solve some water quality measurement problems that are limited by space and time discretizations. The proposed method, a fourth-order accurate finite difference scheme, is more accurate and is more efficient than the conventional second-order accurate finite difference techniques such as the FTCS explicit finite difference scheme and the Saulyev explicit finite difference scheme that are proposed in [13].

## Conclusions

In this paper, the unconditionally stable Crank-Nicolson method is proposed to solve a one-dimensional hydrodynamic model with damped force due to the drag of stream sides. The one-dimensional advection-diffusion equation in a non-uniform flow in the stream is solved by using a new fourth-order scheme employing the unconditionally stable Saulyev method near the left and right boundary conditions. The new fourth-order scheme gives accurate results without any significant loss of computational efficiency. The results obtained indicate that the proposed new fourth-order scheme, coupled with the unconditionally stable Saulyev method, improves the prediction accuracy compared to that of the traditional computation techniques.

## References

- 1.
Pochai, N, Tangmanee, S, Crane, LJ, Miller, JJH: A mathematical model of water pollution control using the finite element method. In: Proceedings in Applied Mathematics and Mechanics: 27-31 March 2006, Berlin (2006)

- 2.
Chen, JY, Ko, CH, Bhattacharjee, S, Elimelech, M: Role of spatial distribution of porous medium surface charge heterogeneity in colloid transport. Colloids Surf. A, Physicochem. Eng. Asp.

**191**, 3-15 (2001) - 3.
Li, G, Jackson, CR: Simple, accurate and efficient revisions to MacCormack and Saulyev schemes: high Peclet numbers. Appl. Math. Comput.

**186**, 610-622 (2007) - 4.
O’Loughlin, EM, Bowmer, KH: Dilution and decay of a quatic herbicides in flowing channels. J. Hydrol.

**26**, 217-235 (1975) - 5.
Dehghan, M: Numerical schemes for one-dimensional parabolic equations with nonstandard initial condition. Appl. Math. Comput.

**147**, 321-331 (2004) - 6.
Stamou, AI: Improving the numerical modeling of river water quality by using high order difference schemes. Water Res.

**26**, 1563-1570 (1992) - 7.
Tabuenca, P, Vila, J, Cardona, J, Samartin, A: Finite element simulation of dispersion in the bay of Santander. Adv. Eng. Softw.

**28**, 313-332 (1997) - 8.
Pochai, N: A numerical computation of non-dimensional form of a nonlinear hydrodynamic model in a uniform reservoir. Nonlinear Anal. Hybrid Syst.

**3**, 463-466 (2009) - 9.
Pochai, N, Tangmanee, S, Crane, LJ, Miller, JJH: A water quality computation in the uniform channel. J. Interdiscip. Math.

**11**, 803-814 (2008) - 10.
Pochai, N: A numerical computation of non-dimensional form of stream water quality model with hydrodynamic advection-dispersion-reaction equations. Nonlinear Anal. Hybrid Syst.

**13**, 666-673 (2009) - 11.
Ames, WF: Numerical Methods for Partial Differential Equations. Academic Press, New York (1977)

- 12.
Chapra, SC: Surface Water-Quality Modeling. McGraw-Hill, New York (1997)

- 13.
Pochai, N: A numerical treatment of nondimensional form of water quality model in a nonuniform flow stream using saulyev scheme. Math. Probl. Eng.

**2011**, 1-16 (2011) - 14.
Karahan, H: A third-order upwind scheme for the advection diffusion equation using spreadsheets. Adv. Eng. Softw.

**38**, 688-697 (2007) - 15.
Liou, MS, Steffen, CJJ: A new flux splitting scheme. Appl. Math. Comput.

**107**, 23-39 (1993) - 16.
Mazzia, A, Bergamaschi, L, Dawson, CN, Putti, M: Godunov mixed methods on triangular grids for advection-dispersion equations. Comput. Geosci.

**6**, 123-139 (2002) - 17.
Dawson, C: Godunov-mixed methods for advection-diffusion equations in multidimensions. SIAM J. Numer. Anal.

**30**, 1315-1332 (1993) - 18.
Alhumaizi, K: Flux-limiting solution techniques for simulation of reaction-diffusion-convection system. Commun. Nonlinear Sci. Numer. Simul.

**12**, 953-965 (2007) - 19.
Happenhofer, N, Koch, O, Kupka, F, Zaussinger, F: Total variation diminishing implicit Runge-Kutta methods for dissipative advection-diffusion problems in astrophysics. Proc. Appl. Math. Mech.

**11**, 777-778 (2011) - 20.
Ninomiya, H, Onishi, K: Flow Analysis Using a PC. CRC Press, New York (1991)

- 21.
Mitchell, AR: Computational Methods in Partial Differential Equations. Wiley, New York (1969)

- 22.
Dehghan, M: Weighted finite difference techniques for the one-dimensional advection-diffusion eqaution. Appl. Math. Comput.

**147**, 307-319 (2004) - 23.
Bradie, B: A Friendly Introduction to Numerical Analysis. Prentice Hall, New York (2005)

- 24.
Gurarslan, G, Karahan, H, Alkaya, D, Sari, M, Yasar, M: Numerical solution of advection-diffusion equation using a sixth-order compact finite differnce method. Math. Probl. Eng.

**672936**, 1-7 (2013) - 25.
Szymkiewicz, R: Solution of the advection-diffusion equation using the spline function and finite elements. Commun. Numer. Methods Eng.

**9**, 197-206 (1993)

## Acknowledgements

This work is supported by the Thailand Research Fund (TRG5780016) and the Centre of Excellence in Mathematics, the Commission on Higher Education, Thailand. The author greatly appreciates valuable comments received from the referees.

## Author information

### Affiliations

### Corresponding author

## Additional information

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

The author read and approved the final manuscript.

### Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

## About this article

### Cite this article

Pochai, N. Unconditional stable numerical techniques for a water-quality model in a non-uniform flow stream.
*Adv Differ Equ* **2017, **286 (2017). https://doi.org/10.1186/s13662-017-1338-4

Received:

Accepted:

Published:

### MSC

- 65N06
- 65M06
- 35L40
- 35K57

### Keywords

- Crank-Nicolson scheme
- new fourth-order scheme
- Saulyev scheme
- hydrodynamic model
- dispersion model