.
Controlling numerical diffusion in solving advection-dominated transport problems
Abstract.
Numerical schemes for advection-dominated transport problems are evaluated in a comparative study. Explicit finite difference methods are analyzed together with a global random walk algorithm in the frame of a splitting procedure. A robust implementation of the method of lines is also proposed as an alterative approach. The efficiency of the methods with respect to the control of the numerical diffusion is investigated numerically in one-dimensional problems with constant coefficients and two-dimensional problems with variable coefficients consisting of realizations of space-random functions.
Key words and phrases:
advection-dominated transport, numerical diffusion, finite differences, method of lines, global random walk2005 Mathematics Subject Classification:
76R50, 76R99, 65M06, 65M20, 65M75,1. Introduction
The numerical diffusion in transport problems is produced when the advection velocity is nonzero, increases with the decrease of the diffusion coefficient, and is often associated with spurious oscillations of the solution [5]. Remedies to these issues are provided by flux corrected transport and other diffusion-antidiffusion methods [2, 6], upwind schemes [7, 3], or adaptive finite volume approximations [8].
Numerical diffusion in advection-diffusion problems may be produced by the finite order of the approximations and/or by numerically induced smoothing. In such circumstances, a small amount of numerical diffusion may occur even when the velocity vanishes [2, 9]. But above all, the numerical diffusion cannot be avoided when stabilizing upwind schemes are used to prevent oscillations of the numerical solution [9]. To illustrate this situation let us consider the advection equation,
and the finite difference (FD) scheme with upwind space discretization,
which provides solutions at and according to the recurrent relation
where is the Courant number.
Performing Taylor expansions of and (in and , respectively) one obtains [4].
The above relation shows that the FD scheme is unstable for Courant number [11, Sect. 2.2], the scheme is stable but diffusive for , and there is no numerical diffusion for . A small ensures that the scheme produces only a small amount of numerical diffusion.
Although, in general, discrete error norms used to measure differences from reference solutions do not discriminate between different sources of errors (e.g., discretization, truncation, numerical diffusion) a quantification of the numerical diffusion is sometimes obtained, for nonsteady transport problems, by using the spatial moments of the solution [6, 9]. For constant velocity and diffusion coefficients, it was found that the diffusion coefficient estimated from the second central spatial moment of the concentration computed with different numerical schemes (linear and quadratic finite element methods with and without upwind, different mixed-finite element implementations, and finite volume methods) is affected by errors of the order of the nominal diffusion coefficient, which can hardly be reduced by refining the discretization for mesh Péclet numbers [9, Tables 1-8]. In case of diffusion in random velocity fields simulations of transport in groundwater, the differences between the effective dispersion coefficients estimated by these methods and those obtained by global random walk (GRW) simulations, free of numerical diffusion, can be even larger [9, Figs. 5-10].
2. One-dimensional advection-diffusion process with constant coefficients
The advection-diffusion process used in the following to test one-dimensional (1D) numerical schemes is governed by the parabolic equation with constant coefficients
(1) |
with analytical solution given by the normalized Gaussian function
(2) |
The constant coefficients in Eq. (1) are chosen as m/d and m2/d. These coefficients are representative for a typical numerical setup for transport in groundwater [9, 12]. (Hereafter, all spatial and temporal dimensions are given in meters and days, respectively.) In this section, we compare solutions obtained by several numerical schemes of the Cauchy problem for Eq. (1) in the domain , , , for the initial condition given by the analytical solution (2) evaluated at for and normalized by its spatial integral over the interval . The length of the spatial interval was large enough to contain the support of the numerical solution at the final time . The left/right boundary conditions are thus .
Accuracy estimates are done by comparisons of the numerical solution with the analytical solution , as well as by comparisons with the nominal parameters and of the velocity and the diffusion coefficient computed from the first two spatial moments of the numerical solution, and , respectively. The spatial moments are averages weighted by the numerical solution normalized to unity, , , , where and are discretization steps, computed by relations of the form
(3) |
2.1. Global random walk and equivalent finite difference schemes
The 1D GRW algorithm approximates the solution of (1) by , where are numbers of particles at the sites of a regular lattices moving according to the random walk rule [15]. Groups of particles lying at the sites of the 1D lattice are scattered at the time step , and the particle distribution is updated at , according to
(4) | |||
(5) |
where the amplitude of the diffusion jumps , the space step , and the time step are related by , which ensures that the numerical solution is free of numerical diffusion [12, 13], and is the dimensionless velocity. Note that is an integer Courant number (). The ensemble averages of the quantities in relations (4)-(5) are given by the random walk rules
(6) |
Giving up particles indivisibility one obtains a deterministic FD scheme. Summing up the contributions (5) to coming from diffusive jumps (d) and displacements due to velocity field (v), according to (4) (for ), respectively (1)d, (2)v, and (3)d shown in Fig. 1, one obtains the explicit FD scheme
(7) |
Fig. 2 shows that the velocity and the diffusion coefficient computed, according to (3), from the spatial moments of the GRW-FD solution (7) provide highly accurate estimations of the constant coefficients and of the advection-diffusion equation (1).
The FD scheme (7) is equivalent to a splitting FD scheme with the following advection (a) and diffusion (d) steps:
(8) | |||||
(9) |
The advection scheme (8) is the discrete version of the exact solution of the advection equation, . The diffusion scheme (9) is the stable explicit forward-time central-space FD scheme for the heat equation,
Since the dimensionless velocity has to be an integer greater than unity, the GRW splitting-scheme (8)-(9) is defined for integer Courant numbers .
One remarks that the GRW-advection scheme (8) is a particular case, for Courant number , of the upwind (UPW) scheme
(10) |
and of the BOX scheme
(11) |
While the UPW scheme is stable only if , the BOX scheme is unconditionally stable [11]. However, since (11) is an implicit scheme, for an easier implementation and to achieve faster computations, we use in the following a linearized version consisting of replacing by . As we will see in Section 2.3, this linearized BOX scheme is no longer unconditionally stable.
2.2. Method of Lines
The Method of Lines (MOL) is an effective numerical technique for solving partial differential equations (PDEs), particularly useful in advection-dominated transport problems. This method discretizes the spatial domain while preserving the time domain as continuous, thereby transforming the PDE into a system of ordinary differential equations (ODEs). These ODEs are subsequently solved using established ODE solvers, providing a robust framework for addressing the challenges inherent in advection-dominated scenarios. For more details on the MOL, consult [10].
If we consider a discretization with grid points with spacing : then the spatial derivatives and can be approximated at each grid point with a FD scheme.
For improved accuracy, higher-order FD approximations can be derived using Taylor series expansions. The derivation is achieved by combining multiple Taylor series expansions at different points such that the lower-order terms cancel out, leaving higher-order terms as the dominant source of error.
In the following, we use the central-space FD approximation
(12) |
where denotes the value of at the -th grid point. Similarly, we consider the central-space approximation of the second derivative,
(13) |
(14) |
Since Eq. (14) constitutes first-order initial-value ODEs, initial conditions are required, which are generated from the reference solution (2) at the initial time .
In the system of ODE (14) we have equations with unknown functions. The solution at satisfies the Dirichlet boundary condition. Consequently, is already known and can be substituted into the system of equations accordingly. At the function appears in the equation, which is outside the considered grid. In order to be able to reduce the number of unknowns to we must assign a value to . Because this occurs at the boundary point , we can obtain an approximation by using (12) and the right-boundary condition of the current numerical setup,
which reduces to
In this study, we employed the explicit fourth-order Runge-Kutta method to solve the resulting system of ODEs. We experimented with various Courant numbers to determine the threshold for significant numerical errors. With a spatial step size of , satisfactory results were obtained up to . However, when the spatial step size was decreased to , the results remained accurate up to a Courant number of .
2.3. Accuracy estimates
The accuracy of the numerical solutions presented in Fig. 3 is evaluated by the quadratic norm,
(15) |
Similarly to (15), the accuracy of the estimated coefficients and is evaluated by quadratic norms on the time interval divided by the nominal coefficients and . For instance, the relative error of the estimated diffusion coefficient with respect to the coefficient ,
(16) |
is an estimation, global in time, of the numerical diffusion (see also [6, 9]). The accuracy estimates for the GRW-FD, UPW, BOX, and MOL schemes are presented in Figs. 3 and 4. In Figs. 5, 6 and 7 the numerical solutions of the four schemes are compared to the exact Gaussian solution (2) at successive times .
Estimations (16) of numerical diffusion corresponding to the splitting GRW-FD scheme (8)-(9), UPW scheme (10), and BOX scheme (11) are presented in Fig. 4, right panel. The computations were carried out for a fixed space step . This corresponds to a local Péclet number , that is, to an advection-dominated transport problem. The solution norms (15) were evaluated at .
One remarks that in case , when the three schemes coincide, the relative errors of the estimated coefficients from Fig. 4 are of the order or smaller (see also Fig. 2), while the solution error-norm (15) from Fig. 3 is of order . Thus, very small relative errors of the estimated coefficients are not an appropriate indicator for the accuracy of the numerical solution. Moreover, neither of these global norms is sufficient to capture deformations of the shape of the reference solution. For instance, the significant numerical diffusion produced by the UPW scheme for , quantified by relative errors much greater than one in Fig. 4, is also observable in flattening of the numerical solution shown in Fig. 5. But, for the BOX scheme, even if acceptable errors of the solutions of at most and relative errors of the coefficients smaller than are obtained in all cases, the numerical solutions shown in Fig. 6 deviate from the shape of the reference solution and are affected by oscillations which grow with the departure from and are mainly significant for , leading to the instability of the scheme.
As seen in Fig. 4, the GRW-FD scheme is practically free of numerical diffusion. Moreover, since the advection step (8) in the splitting procedure is the FD approximation of exact solution of the advection equation, the GRW-FD scheme reproduces almost perfectly the shape of the analytical solution, within the range of the errors shown in Fig. 3.
A special attention deserves the performance of the MOL scheme. The errors of the solution shown in Fig. 3 are of the order up to , then they grow suddenly for while the relative errors of the coefficients from Fig. 4 remain extremely small for the whole range . At the same time, unlike the UPW and BOX FD schemes, MOL accurately reproduces the shape of the solution for all Courant numbers less then , when the solution starts to oscillate (see Fig. 7). Therefore, MOL is much more robust than the UPW and BOX FD schemes and well suited to provide accurate solutions to advection dominated problems for moderately large Courant numbers.
3. Two-dimensional diffusion with variable drift coefficients
In the following, we consider a 2D transport problem consisting of a diffusion process in a spatially variable velocity field, governed by the equation
(17) |
where the solution represents the associated concentration field, and are drift coefficients, and is a constant diffusion coefficient.
We choose and drift coefficients given by the components of a two-dimensional velocity field modeled by a fixed realization of a random space function. The latter is a linear approximation of the Darcy velocity in heterogeneous aquifers, generated by a randomization method with the Matlab function given in [13, Appendix C.3.2.2]. The hydraulic conductivity is described by a log-normal random field with Gaussian correlation, small variance , and correlation length . The mean velocity components are set to and . The Péclet number associated to the characteristic length takes a large value , which indicates that the transport is dominated by advection. The effective velocity components and diffusion coefficients are computed, similarly to the 1D case, from the first two spatial moments (3) by performing a supplementary average over an ensemble of realizations of the velocity field according to
(18) |
and similarly for and . For the parameters specified above, the effective velocity components are constant and coincide with their ensemble averages and the effective diffusion coefficients evolve asymptotically in time towards and [14, Sect. 4.1].
Fig. 9 shows a numerical solution of Eq. (17) with the above parameters, obtained by repeating the 1D GRW procedure (4)-(6) in both spatial directions. Estimations of the effective coefficients (18) for the same problem are presented in Fig. 9.
The numerical schemes evaluated in the following solve Eq. (17) in a spatial domain and a time interval . For fixed , the longitudinal and transverse lengths of the spatial domain, and , are large enough to ensure that the support of the concentration field does not reach the boundaries until the end of simulations. The initial condition is an instantaneous Dirac pulse at and and the numerical solutions are normalized to unity. For instance, in GRW simulations, the initial condition consists of a pulse of particles released at and the normalized concentration is given by .
3.1. Biased GRW algorithm
The biased-GRW algorithm (BGRW) accounts for the advective terms in Eq. (17) by increasing the probability that a random walker takes a jump in the flow direction and decreasing the jump probability in the opposite direction.
The two-dimensional BGRW is defined by the relation
(19) | |||||
where is the number of particles at the site at the time and the are binomial random variables describing the number of particles waiting at the initial lattice site or jumping to the first-neighbor sites. To the drift (velocity) and diffusion coefficients of the transport problem, , , and , one associates the dimensionless parameters,
(20) |
Instead of the unbiased GRW rule (6), the average numbers of jumps in the BGRW algorithm (19) are now given by
(21) |
As follows from (21), the BGRW algorithm is subject to the following restrictions
(22) |
By the last two inequalities in (22), the Courant numbers and are smaller than one, which ensures that the BGRW algorithm is free of overshooting errors. If, in addition, one imposes the conditions and , the von Neumann’s criterion for stability is also satisfied, which implies the lack of numerical diffusion and the convergence of order of the BGRW algorithm (19), interpreted as a FD scheme, is implied by the Lax-Richtmyer Equivalence Theorem [11]. The BGRW solutions will be used in the following as reference to evaluate the unbiased GRW algorithm.
3.2. Unbiased GRW scheme
Since the diffusion coefficient is constant, the unbiased GRW solutions to the transport problem formulated in the beginning of this section are obtained in two steps, first by performing the 1D GRW procedure (4)-(6) in the -direction, then by applying the same procedure to the output of the first step in the -direction [15, 12, 13].
Errors of GRW estimates of the effective coefficients for a single realization of the random velocity field are presented in Fig. 10 and errors of the ensemble averaged coefficients (18) are presented in Fig. 11. For a fixed realization of the velocity field (Fig. 10) the relative errors of the unbiased GRW scheme range from a few percents to more than . This is due to the overshooting produced when there are significant variations of the velocity over the advective displacements and which encompass several grid points in the unbiased GRW algorithm. However, the overshooting errors are smoothed out by the ensemble averaging and the results provided by the unbiased GRW scheme become closer and closer to those of the BGRW scheme as the transport process progresses in time (Fig. 11). This validates the unbiased GRW scheme, which is faster, since not constraint by , as an efficient tool for large scale simulations of transport in random velocity fields.
4. Conclusions
The numerical diffusion in advection-dominated problems can be directly estimated by comparing the diffusion coefficient derived from the spatial moments of the numerical solution to the nominal coefficient. However, since this is a global estimate, it does not guarantee that the numerical scheme accurately reproduces the shape of the exact solution of the transport problem.
In this study, we compared the performance in solving the one-dimensional advection-diffusion equation with constant coefficients of two classical FD schemes, UPW and BOX, an unbiased GRW scheme, and a MOL scheme. For Courant number , the FD and the GRW schemes coincide. In this case, they produce a negligible amount of numerical diffusion and do not deform the shape of the exact solution. Instead, for the shape of the solutions of the FD schemes may deviate significantly from that of the exact solution even if the numerical diffusion is negligible.
The GRW scheme is by construction free of numerical diffusion. Additionally, since it performs advective displacements according to the exact solution of the advection equation, the unbiased GRW scheme preserves the shape of the exact solution for any integer . The MOL scheme is free of numerical diffusion as well and reproduces the shape of the exact solution for all Courant numbers .
For the purpose of practical applications for two-dimensional simulations of transport in groundwater, the unbiased GRW has been evaluated through comparisons with the BGRW scheme, which simulates advection by using biased jump probabilities. The BGRW scheme is highly accurate but much slower than the unbiased scheme. The unbiased GRW is faster because it is not not constraint by small Courant numbers, but, for the same reason, it is less accurate due to the overshooting errors. However, the average over an ensemble of realizations of the random velocity field, which model the heterogeneity of the aquifer system, reduces the effect of the overshooting and the unbiased GRW scheme is an efficient tool for assessing statistical inferences on the transport process.
References
- [1]
- [2] D.L. Book, C. Li, G. Patnaik and F.F. Grinstein, Quantifying residual numerical diffusion in flux-corrected transport algorithms, J. Sci. Comp. 6(3) (1991), 323–243. https://dx.doi.org/10.1007/BF01062816
- [3] F. Brunner, F.A. Radu, M. Bause M and P. Knabner, Optimal order convergence of a modified BDM1 mixed finite element scheme for reactive transport in porous media, Adv. Water Resour. 35 (2012), 163–171. https://dx.doi.org/10.1016/j.advwatres.2011.10.001
- [4] C.J.M. Hewett, Consistency and numerical diffusion (2021). https://www.youtube.com/watch?v=Cjb4YtgeIn0&t=263s
- [5] P. Knabner and L. Angermann, Numerical methods for elliptic and parabolic partial differential equations, Springer, New York, 2003. https://doi.org/10.1007/b97419
- [6] Kuzmin, Explicit and implicit FEM-FCT algorithms with flux linearization, J. Comput. Phys. 228(7) (2009), 2517–2534. https://dx.doi.org/doi:10.1016/j.jcp.2008.12.011
- [7] D. Kuzmin, A. Hannukainen and S. Korotov, A new a posteriori error estimate for convection-reaction-diffusion problems, J. Comput. Appl. Math. 218(1) (2008), 70–78. https://dx.doi.org/10.1016/j.cam.2007.04.033
- [8] M. Ohlberger and C. Rohde, Adaptive finite volume approximations of weakly coupled convection dominated parabolic systems, IMA J. Numer. Anal. 22(2) (2002), 253–280. https://dx.doi.org/10.1093/imanum/22.2.253
- [9] F.A. Radu, N. Suciu, J. Hoffmann, A. Vogel, O. Kolditz, C-H. Park and S. Attinger, Accuracy of numerical simulations of contaminant transport in heterogeneous aquifers: a comparative study, Adv. Water Resour. 34 (2011), 47–61. https://dx.doi.org/10.1016/j.advwatres.2010.09.012
- [10] W.E. Schiesser and G.W. Griffiths, A compendium of partial differential equation models: method of lines analysis with Matlab, Cambridge University Press, 2009. https://doi.org/10.1017/CBO9780511576270
- [11] J.C. Strikwerda, Finite Difference Schemes and Partial Differential Equations, SIAM, 2004. https://doi.org/10.1137/1.9780898717938
- [12] N. Suciu, Diffusion in random velocity fields with applications to contaminant transport in groundwater, Adv. Water Resour. 69 (2014) 114-133. http://dx.doi.org/10.1016/j.advwatres.2014.04.002
- [13] N. Suciu, Diffusion in Random Fields. Applications to Transport in Groundwater, Birkhäuser, Cham, 2019. https://doi.org/10.1007/978-3-030-15081-5
- [14] N. Suciu, L. Schüler, S. Attinger and P. Knabner, Towards a filtered density function approach for reactive transport in groundwater, Adv. Water Resour. 90 (2016), 83–98. https://dx.doi.org/10.1016/j.advwatres.2016.02.016
- [15] C. Vamoş, N. Suciu and H. Vereecken, Generalized random walk algorithm for the numerical modeling of complex diffusion processes, J. Comput. Phys., 186 (2003), 527–544. https://doi.org/10.1016/S0021-9991(03)00073-1