1 Introduction

A great deal of hydrogeological situations requires an accurate three-dimensional calculation of the Darcy velocity (specific discharge, flux density). River–aquifer interaction is an example where accurate assessment of all three components of the groundwater velocity beneath and in the vicinity of a river bed is essential for calculating flow paths, discriminating bottom and bank water exchange, etc. Also, approximations of the groundwater velocity components calculated with some numerical models may be inaccurate when the river is considered to be a part of a larger regional groundwater flow system. In such cases, where the horizontal components of the groundwater velocity may be two or three orders of magnitude larger than the vertical component in most parts of the system, application of Darcy’s law to calculate the vertical velocity from the numerically calculated hydraulic head may result in an unacceptably inaccurate estimation of the vertical velocity component. This may lead to an erroneous calculation of essential ingredients of regional hydrogeology such as flow paths, in- and exfiltration zones and rates, stagnation zones, and capture zones for wells.

Even worse, in some parts of the modeling domain not the vertical velocity is small with respect to the horizontal velocity, but the horizontal velocity may be small with respect to the vertical velocity. For instance, the flow parallel to a vertical aquifer–river interface may be much larger than the horizontal flow into or out of that interface.

In order to show how “the small velocity component issue” can be resolved, it is proposed here to use the MODFLOW software for a river–aquifer interaction case in a non-conventional manner. Regular MODFLOW software is based on the head-oriented approach (HOA), i.e., it solves numerically the groundwater flow equation with the block-centered finite difference method and calculates the hydraulic heads in the grid block centers. The head-oriented approach has been and is commonly used by the hydrogeological community for thousands of cases. Despite its good results in many hydrogeological situations, it does not approximate with sufficient accuracy the velocity component that is small with respect to the other components.

To remediate this problem, an alternative approach to modeling groundwater flow, the velocity-oriented approach (VOA) is proposed. This approach operates simultaneously on the three components of the groundwater velocity and can produce their numerical approximations with high accuracy. The VOA has for the first time been developed in the 1980s by Nawalany (1986a, b), who based his pioneering work on the finite element method. He showed that the VOA approximates all three components of the groundwater velocity with high accuracy. Based on these results, Waardenburg et al. (1988) applied Nawalany’s pioneering work to the block-centered finite difference method. Finally, Zijl and Nawalany (1993) combined the VOA with the perturbation method, an analytical approach resulting in a “velocity-oriented correction” to the Dupuit approximation. Not only the block-centered finite difference method, upon which MODFLOW is based, but also the mixed-hybrid finite element method is a flux-continuous method (Chavent and Jaffré 1986; Kaasschieter 1990; Kaasschieter and Huijben 1992; Trykozko et al. 2001). From an algorithmic point of view, the block-centered finite difference method—in which the heads are calculated in the grid block centers—differs essentially from the mixed-hybrid finite element method—in which the heads are calculated in the grid faces centers (Zijl 2005a, b). However, for a sufficiently fine discretization the two methods are almost equivalent from a mathematical point of view (Weiser and Wheeler 1988). That is, these methods result in essentially the same solution. From this point of view, we may consider the mixed-hybrid finite element method—or face-centered finite element method—as an extension of the block-centered finite difference method to account for general anisotropy (including cross terms like \(k_{xy} \), etc.) and generally shaped grid volumes. From the above-mentioned (approximate) mathematical equivalence, it can be concluded that the numerical accuracy of the mixed-hybrid finite element method is comparable with the accuracy of the block-centered finite difference method. However, when the VOA is based on the block-centered finite difference method (MODFLOW) for calculating the three flow components \(e_x \), \(e_y \) and \(q_x \) in the grid block centers (like head h is calculated in the conventional HOA), the calculated flow components differ essentially from the flow components calculated by the mixed-hybrid method. More specifically, the VOA results will be more accurate, as is also exemplified by the numerical experiments presented in this paper. In the VOA, the flow components are the primary variables and their determination does not require any numerical differentiation (of head), as is the case in the above-discussed mixed-hybrid and block-centered methods and in the stream function method discussed in Sect. 4. As a result, no reduction in the accuracy of the calculated fluxes compared to the accuracy of the head occurs, which explains the improved accuracy of the VOA.

The main purpose of this article is to give the theoretical justification why, and the numerical recipe how the two approaches, the head-oriented approach (HOA) and the velocity-oriented approach (VOA) can be combined with the well-known Visual MODFLOW software to obtain accurate numerical approximations of the three velocity components. Although the theoretical VOA formulation is known since the 1990s, a practical application based on a relatively simple implementation using publicly available numerical groundwater modeling software like MODFLOW is new. Since the numerical aspects of solving the (head-oriented) groundwater flow equation by MODFLOW are well known in the hydrogeological community, this article focuses on setting up the boundary conditions for an integrated HOA-VOA approach. This approach is illustrated with numerical examples of groundwater flow beneath and in the vicinity of a river bed.

In this paper, a MODFLOW model based on the VOA and a MODFLOW model based on the conventional HOA are compared. As it has been pointed out above, the MODFLOW model is based on the block-centered finite difference method, which is a flux-continuous approximation: the fluxes through the grid faces are continuous, while the heads are continuous only at the grid face centers. This is in contrast to conventional node-based finite element approximations, in which the heads are continuous at the grid faces while the fluxes through the faces are discontinuous. In addition, in two- and three-dimensional problems the block-centered finite difference approximation underestimates the hydraulic conductivities, while node-based finite element approximations overestimate the hydraulic conductivities. These phenomena have been explained and demonstrated by Trykozko et al. (2001) and Zijl and Trykozko (2001). As a consequence, the MODFLOW examples presented in this paper will also hold for other models based on the block-centered finite difference method; all such models are mathematically equivalent. Based on earlier work by Zijl and Nawalany (1993), it can be expected that models based on the conventional node-based finite element method will also yield very accurate results, although the details of the solution may differ (a bit) from the results obtained by the block-centered approximation.

The paper is organized as follows: Section 2 presents an introduction to the equations governing three-dimensional groundwater flow, with emphasis on the water table conditions. Section 3 briefly introduces the velocity-oriented correction for the Dupuit approximation, while Sect. 4 presents a derivation of the Laplace-type equations describing the velocity-oriented approach (VOA). Section 5 presents the derivation of a number of boundary conditions, while Sect. 6 illustrates the implementation of the VOA model using MODFLOW for river–aquifer interaction. Section 7 discusses the results, while Sect. 8 presents some theoretical and practical remarks relevant to future developments and applications. Finally, Sect. 9 gives the references.

2 Equations Governing 3-Dimensional Groundwater Flow

2.1 Darcy’s Law

The flow of groundwater is governed by the mass and momentum balance equations. For flow with sufficiently low velocity (i.e., for Reynolds numbers \(<<\) 1), the momentum balance simplifies to Darcy’s law. If the groundwater has uniform density (negligible density differences in the flow field), Darcy’s law is given as

$$\begin{aligned} q_i =-\sum \nolimits _{j=1}^3 K_{ij} \frac{\partial h}{\partial x_j }, \quad i = 1,2,3, \end{aligned}$$
(1)

where \(x_1 =x\) and \(x_2 =y\) [L] are the two horizontal Cartesian coordinates, while \(x_3 =z\) [L] is the vertical Cartesian coordinate (positive in upward direction); \(q_1 =q_x \) and \(q_2 =q_y \) [L/T] are the two horizontal Cartesian components of the flux density vector, while \(q_3 =q_z \) [L/T] is the vertical Cartesian component of the flux density vector (again positive in upward direction); h [L] is the hydraulic head and \(K_{ij} \) [L/T], i,\(j = 1\),2,3, are the nine components of the hydraulic conductivity matrix. On the scale of a representative elementary volume (REV), this matrix is symmetric, i.e., \(K_{ij} =K_{ji} \), and on coarser scales the upscaling volumes can often be chosen in such a way that this matrix is symmetric too. Positive definite symmetric conductivity matrices have three orthogonal principal directions with positive principal conductivities on the diagonal and zero off-diagonal conductivities; for more theoretical details, see Bear (1972).

Numerical methods based on the block-centered finite difference method cannot handle off-diagonal terms in the conductivity matrix. When using such models, it is generally assumed that the principal conductivities are in the two horizontal directions x and y and in the vertical z direction, i.e., \(K_i =K_{ii} \), \(i = 1\),2,3, and \(K_{ij} =0\) for \(i\ne j\). Under this assumption, models like MODFLOW are based on Darcy’s law in the following form:

$$\begin{aligned} q_i =-K_i \frac{\partial h}{\partial x_i }, \quad i = 1,2,3. \end{aligned}$$
(2)

2.2 The Continuity Equation and Storage

Under the assumption that the effect on the groundwater flow of specific storage (storage caused by water and pore space compressibility) is negligibly small, the mass balance equation may be simplified to the continuity equation

$$\begin{aligned} \frac{\partial q_x }{\partial x}+\frac{\partial q_y }{\partial y}+\frac{\partial q_z }{\partial z}=0. \end{aligned}$$
(3)

In relatively shallow aquifer–aquitard systems, with depths of, say, 10–100 m, the neglect of specific storage is generally sufficiently accurate. Of course, in such shallow parts of the subsurface the groundwater flow is time-dependent, with relatively high flow rates in periods with much rainfall and relatively low flow rates in dry periods. This time dependency is described by two conditions on the top boundary (Zijl and Nawalany 1993). The kinematic condition on the water table, or phreatic surface, is

$$\begin{aligned} S_y \frac{\partial H}{\partial t}+q_x \frac{\partial H}{\partial x}+q_y \frac{\partial H}{\partial z}-q_z =R, \end{aligned}$$
(4)

where H(xyt) [L] is the height of the water table above a preordained horizontal reference plane (i.e., \(z=H(x,y,t)\) is the vertical position of the water table), \(S_y \) [–] is the specific yield, and R [L/T] is the recharge rate or “effective precipitation”. (In many practical cases, the term \(q_x \partial H/\partial x+q_y \partial H/\partial y\) in Eq. (4) is negligibly small).

The head on the phreatic surface is given by the dynamic boundary condition

$$\begin{aligned} h(x,y,H(x,y,t),t) = H(x,y,t). \end{aligned}$$
(5)

Condition (5) states that the head on the phreatic surface is equal to the water table height, which is equivalent to stating that the water pressure on the phreatic surface is equal to the atmospheric pressure.

As a consequence, when combined with water table conditions (4) and (5), continuity Eq. (3) is valid for time-dependent shallow groundwater flow. On the other hand, for deep groundwater flow (depths of, say, 100–1000 m) Eq. (4) holds only for steady flow. Although deep groundwater flow is changing much more slowly than shallow flow (time scales of years to centuries), it is not evident that for such flow the specific storage is negligible (El-Rawy et al. 2016).

3 Equations Governing -Dimensional Groundwater Flow

For flow in relatively thin aquifers, the vertical component of Darcy’s law (2) may often be replaced with

$$\begin{aligned} \frac{\partial h}{\partial z}=0, \end{aligned}$$
(6)

i.e., \(h=h(x,y,t)\) is assumed to be a function of only the two horizontal coordinates (and of the time). Since the horizontal components of Darcy’s law (2) remain unchanged

$$\begin{aligned} q_x =-K_x \frac{\partial h}{\partial x}, \quad q_y =-K_y \frac{\partial h}{\partial x}, \end{aligned}$$
(7)

it can be observed from Darcy’s law (2) in the vertical direction that the so-called Dupuit approximation Eq. (6) holds exactly if the vertical flux density is exactly equal to zero. This leads to the so-called two-dimensional flow concept, or piston flow concept, in which groundwater flow through the aquifers is horizontal, while the flow through aquitards is vertical. As long as only hydraulic heads are important, this piston flow concept works well. However, if determination of flow paths is important too, knowledge of the vertical velocity is necessary. Therefore, Strack (1984) applied Darcy’s law under the condition that the vertical hydraulic resistivity \(1{/}K_v \) is equal to zero. Also under this condition, the Dupuit approximation Eq. (6) holds exactly and substitution of Eqs. (6) and (7) into continuity Eq. (3) yields an expression for the nonzero vertical flow component

$$\begin{aligned} q_z =-\frac{\partial }{\partial x}\left( {\int (K_x \mathrm{d}z)\frac{\partial h}{\partial x}} \right) -\frac{\partial }{\partial y}\left( {\int (K_y \mathrm{d}z)\frac{\partial h}{\partial y}} \right) . \end{aligned}$$
(8)

This extension to nonzero vertical flow is called the “-dimensional flow approach.”

When the groundwater is flowing through a sequence of aquifers separated by aquitards, the calculations can be based on the -dimensional flow concept. The well-known nonlinear Dupuit–Forchheimer equation for flow in the phreatic aquifer can then be obtained by combining the two water table conditions (4) and (5) with flow Eqs. (6), (7) and (8) (Zijl and Nawalany 1993).

The conditions under which the Dupuit approximation can be justified have been investigated by many authors, see, for instance, Bresciani et al. (2014). Using the perturbation method (Nayfeh 1973; Van Dyke 1975), Dupuit approximation (6) can be derived as the approximation of order zero; see Zijl and Nawalany (1993). In contrast to the piston flow concept and Strack’s extension, the perturbation approach allows for determination of the first-order correction to the above-presented approximation of order zero. The first-order correct head gradient is then equal to \(\partial h/\partial z=-q_z /K_z \). At water divides, where the horizontal head gradient vanishes, the vertical head gradient plays an important role. Especially for inverse modeling based on the double constraint method, where hydraulic grid block conductivities are directly determined by Darcy’s law (2) in the form \(K_i =|q_i |/|\partial h/\partial x_i |\), the first-order correct head gradient plays an important role (El-Rawy et al. 2014, 2016).

4 The Velocity-Oriented Approach (VOA) for 3-Dimensional Groundwater Flow

In Sect. 3, Eq. (8) is introduced to determine vertical velocities in so-called -dimensional models, i.e., models based on the Dupuit approximation \(\partial h/\partial z=0\). However, Eq. (8) can also be used to determine vertical velocity components from numerical solutions in which the horizontal velocities are determined with sufficient accuracy, for instance, when using a MODFLOW model with only a few layers. MODFLOW calculates the heads in the grid block centers, while the velocities through the grid faces are derived from the heads by numerical differentiation using a finite difference approximation of Darcy’s law (Eq. 1). However, if the vertical head gradient is small (\(\partial h/\partial z\approx 0\)), the resulting vertical velocity \(q_z =-K_z \partial h/\partial z\) may become unreliable if there are water balance errors in the numerical approximation (caused by too early termination of the iterations). A more reliable determination of the vertical velocity can then be based on the “velocity-oriented correction” given by Eq. (8) (Zijl and Nawalany 1993).

However, in general three-dimensional flow problems not only the vertical head gradient, but also the horizontal head gradient may become small. This is, for instance, the case at water divides and near stagnation points. In such cases, one needs an approach like Eq. (8) not only for \(q_z \), but, depending on the situation, also for \(q_x \) and \(q_y \). This generalization can be accomplished by the “velocity-oriented approach” (VOA). To be precise, a more reliable determination of relatively small vertical velocity components could also be obtained by a stream function method, because such a method solves the water balance equation (Eq. 3) exactly, even if the iterations to solve the system of linear equations are terminated too early [for details of the three-dimensional stream function method, see Mohammed et al. (2009)]. However, since the stream function method is mathematically equivalent with the earlier-discussed block-centered method (like MODFLOW) and mixed-hybrid method, we propose here the more accurate method—the VOA.

This improved accuracy can be explained by observing that in all numerical methods the continuum equations are approximated by a system of algebraic equations. If these algebraic equations were solved exactly, the three above-mentioned mathematically equivalent methods (mixed-hybrid, block-centered, stream function) will yield exactly the same results. However, since these three methods are different from an algorithmic point of view, they have quite different systems of algebraic equations that have to be solved. In most applications, these systems are solved approximately, generally by an iterative method (e.g., preconditioned conjugate gradients). For mathematically equivalent methods that are not algorithmically equivalent, the errors caused by the approximations errors (generally caused by termination of the iterations too early) have very different consequences. In the block-centered and the mixed-hybrid methods, this error results in a water balance error and, as a consequence, inaccuracies in \(\partial h/\partial z\) as explained above. In the stream function method, the water balance is solved exactly; the numerical error does not appear in the water balance, but appears in the compatibility equations \(\partial e_z /\partial y-\partial e_y /\partial z=0\), \(\partial e_x /\partial z-\partial e_z /\partial x=0\) and \(\partial e_y /\partial x-\partial e_x /\partial y=0\). The VOA, which avoids numerical differentiation by calculating the velocities directly in the grid block centers, is therefore more accurate.

In the VOA’s simplest form, it is assumed that the two horizontal conductivities are equal to each other (\(K_x =K_y =K_h \)). In addition, it is assumed that the horizontal conductivities \(K_h \) and the vertical conductivity \(K_z =K_v \) are independent from the horizontal coordinates x and y; the conductivities depend only on the vertical coordinate z, i.e., \(K_h =K_h (z)\), \(K_v =K_v (z)\). Under these conditions, four MODFLOW models can be set up to: one conventional MODFLOW model based on the head-oriented approach (HOA) to calculate the heads in the grid block centers, and three additional MODFLOW models based on the velocity-oriented approach (VOA) to calculate the two horizontal components \(e_{x}\), \(e_{y}\) of the head gradient and the vertical component of the specific discharge \(q_{z}\) in the grid block centers

$$\begin{aligned} e_x= & {} \frac{q_x }{K_h }=-\frac{\partial h}{\partial x}, \end{aligned}$$
(9a)
$$\begin{aligned} e_y= & {} \frac{q_y }{K_h }=-\frac{\partial h}{\partial y}, \end{aligned}$$
(9b)
$$\begin{aligned} q_z= & {} -K_v \frac{\partial h}{\partial z}. \end{aligned}$$
(9c)

From the well-known identity for second-order partial derivatives \(\partial ^{2}h/\partial x_i \partial x_j =\partial ^{2}h/\partial x_j \partial x_i \), the following three compatibility conditions can be derived

$$\begin{aligned} \frac{\partial e_y }{\partial x}= & {} \frac{\partial e_x }{\partial y}, \end{aligned}$$
(10a)
$$\begin{aligned} \frac{\partial e_x }{\partial z}= & {} \frac{1}{K_v }\frac{\partial q_z }{\partial x}, \end{aligned}$$
(10b)
$$\begin{aligned} \frac{\partial e_y }{\partial z}= & {} \frac{1}{K_v}\frac{\partial q_z }{\partial y}. \end{aligned}$$
(10c)

Substitution of Darcy’s law into continuity, Eq. (3) results in the equation for the well-known head-oriented approach (HOA); that is, the equation for the first MODFLOW model

$$\begin{aligned} \frac{\partial }{\partial x}\left( {K_h \frac{\partial h}{\partial x}} \right) +\frac{\partial }{\partial y}\left( {K_h \frac{\partial h}{\partial y}} \right) +\frac{\partial }{\partial z}\left( {K_v \frac{\partial h}{\partial z}} \right) =0. \end{aligned}$$
(11a)

Differentiation of this equation with respect to x and y under the assumption that \(K_h =K_h (z)\) and \(K_v =K_v (z)\) and using Eqs. (10a) and (10b) for the definitions of \(e_x \) and \(e_y \) results in the following two VOA equations upon which the second and third MODFLOW models are based

$$\begin{aligned}&\frac{\partial }{\partial x}\left( {K_h \frac{\partial e_x }{\partial x}} \right) +\frac{\partial }{\partial y}\left( {K_h \frac{\partial e_x }{\partial y}} \right) +\frac{\partial }{\partial z}\left( {K_v \frac{\partial e_x }{\partial z}} \right) =0, \end{aligned}$$
(11b)
$$\begin{aligned}&\frac{\partial }{\partial x}\left( {K_h \frac{\partial e_y }{\partial x}} \right) +\frac{\partial }{\partial y}\left( {K_h \frac{\partial e_y }{\partial y}} \right) +\frac{\partial }{\partial z}\left( {K_v \frac{\partial e_y }{\partial z}} \right) =0. \end{aligned}$$
(11c)

Substitution of \(q_x =K_h (z) e_x \), \(q_y =K_h (z) e_y \) (Eqs. 9a9b) into continuity Eq. (3) yields \(\partial e_x /\partial x+\partial e_y /\partial y+K_h^{-`1} \partial q_x /\partial z=0\). Differentiation with respect to z, using the identity for second-order partial derivatives and using compatibility Eqs. (10b) and (10c) results in the VOA equation upon which the fourth MODFLOW model is based

$$\begin{aligned} \frac{\partial }{\partial x}\left( {\frac{1}{K_v }\frac{\partial q_z }{\partial x}} \right) +\frac{\partial }{\partial y}\left( {\frac{1}{K_v }\frac{\partial q_z }{\partial y}} \right) +\frac{\partial }{\partial z}\left( {\frac{1}{K_h }\frac{\partial q_z }{\partial z}} \right) =0. \end{aligned}$$
(11d)

Equations (11a)–(11c) have a very conventional look. In Eqs. (11b) and (11c), h is simply replaced with \(e_x \) and \(e_y \), respectively. That’s all. However, in Eq. (11d) not only h is replaced with \(q_z \), but also \(K_h \) is replaced with \(1/K_v \), while \(K_v \) is replaced with \(1/K_h \).

HOA equation (11a) as well as VOA equations (11b)–(11d) is all Laplace-type equations. They can be solved using any standard software designated for solving the HOA equation numerically, for instance Visual MODFLOW or Processing MODFLOW. MODFLOW can directly handle this type of equations, without additional programming effort in its source code. What remains is specification of the boundary conditions for the VOA equations (11b)–(11d), which will be presented in Sect. 5, also see Grodzka-Łukaszewska (2015).

5 Boundary Conditions for the Velocity-Oriented Approach

In this section, only specified heads and specified fluxes are discussed. Linear combinations of head and flux are not considered, but can easily be derived. Regarding head boundary conditions, it is important to note that heads have to be specified in one connected part of the boundary. For instance, it is not allowed to specify heads on the east boundary and on the west boundary, while on the other boundaries fluxes are specified. However, specification of heads on, say, the east, top and west boundaries is allowed.

5.1 Specified Head as Top (Horizontal) Boundary Condition

When the head \(h_\mathrm{top} (x,y)\) is specified on the top boundary \(z=z_\mathrm{top} \), as is customary in the analysis of regional groundwater flow systems (Tóth 2009), the top boundary conditions \(e_{x;\mathrm{top}} (x,y)\), \(e_{y;\mathrm{top}} (x,y)\) for the MODFLOW models calculating \(e_x \) and \(e_y \) follow from Eqs. (9a), (9b)

$$\begin{aligned} e_{i;\mathrm{top}} (x,y)=-\frac{\partial h_\mathrm{top} (x,y)}{\partial x_i }, \quad i= 1,2. \end{aligned}$$
(12a)

Like boundary condition \(h_\mathrm{top} (x,y)\) for the conventional MODFLOW-HOA, which is specified in the centers of the top boundary’s grid squares, boundary conditions \(e_{i;\mathrm{top}} (x,y)\) have to be specified in the top boundary’s grid square centers.

The boundary condition for the equation for \(q_z \) follows from continuity Eq. (3) resulting in

$$\begin{aligned} \frac{1}{K_h }\left( {\frac{\partial q_z }{\partial z}} \right) _{z=z_\mathrm{top} } =\frac{\partial ^{2}h_\mathrm{top} (x,y)}{\partial x^{2}}+\frac{\partial ^{2}h_\mathrm{top} (x,y)}{\partial y^{2}}. \end{aligned}$$
(12b)

The value of \((\partial q_z /\partial z)_{z=z_\mathrm{top} } \) has to be introduced into MODFLOW-VOA in the same way as \((\partial h/\partial z)_{z=z_\mathrm{top} } \) is introduced in a MODFLOW-HOA model. In MODFLOW-HOA, boundary conditions like \((\partial h/\partial z)_{z=z_\mathrm{top} } \) are introduced by specification of a flux density \(q_{z;\mathrm{top}} (x,y)\) in such a way that, according to Darcy’s law, \((\partial h/\partial z)_{z=z_\mathrm{top} } =-q_{z;\mathrm{top}} /K_v \). And for HOA models in which phreatic storage is neglected, \(q_{z;\mathrm{top}} (x,y)=-R(x,y)\), where R(xy) [L/T] is the recharge rate specified in each grid square center on the top boundary. As a consequence, in the MODFLOW-VOA model for \(q_z \), where the h of the HOA model is replaced with \(q_z \) and the \(K_v \) is replaced with \(1/K_h \), one has to specify \((\partial q_z /\partial z)_{z=z_\mathrm{top} } =K_h R_{(q_z )} \) or, in other words, in MODFLOW’s recharge package we have to specify values of \(R_{(q_z )} \) equal to \(K_h^{-1} (\partial q_z /\partial z)_{z=z_\mathrm{top} } \) as presented in the right-hand side of Eq. (12b). Of course, \(R_{(q_z )} \) [1/L] has no longer the meaning of recharge; \(R_{(q_z )} \) is just a quantity needed to specify the top boundary condition for the equation for \(q_z \).

5.2 Specified Flux as Top or Bottom (Horizontal) Boundary Condition

When the recharge flux density \(q_{z;\mathrm{top}} (x,y)\) is specified on the top boundary \(z=z_\mathrm{top} \), as is customary in most modeling studies, this is the top boundary condition for the MODFLOW-VOA model for \(q_z \). As a consequence, in the MODFLOW-VOA model \(q_{z;\mathrm{top}} (x,y)\) is specified in the grid square centers on the top boundary, in the same way as \(h_\mathrm{top} (x,y)\) is specified for a MODFLOW-HOA model.

The conditions for the MODFLOW models for \(e_x \) and \(e_y \) simply follow from the compatibility Eqs. (10b) and (10c)

$$\begin{aligned} K_v \left( {\frac{\partial e_i }{\partial z}} \right) _{z=z_\mathrm{top} } =\frac{\partial q_{z;\mathrm{top}} (x,y)}{\partial x_i }, \quad i = 1,2. \end{aligned}$$
(13)

The values of \((\partial e_i /\partial z)_{z=z_\mathrm{top} } \) can be introduced into MODFLOW-VOA in the same way as \((\partial h/\partial z)_{z=z_\mathrm{top} } \) is introduced in MODFLOW-HOA models. In HOA models, a boundary condition \((\partial h/\partial z)_{z=z_\mathrm{top} } \) is introduced by specification of a flux density \(q_{z;\mathrm{top}} =-K_v (\partial h/\partial z)_{z=z_\mathrm{top} } \); for models in which phreatic storage is neglected \(q_{z;\mathrm{top}} (x,y)=-R(x,y)\). As a consequence, in the MODFLOW-VOA model for \(e_i \), where the h of the HOA model is replaced with \(e_i \), one finds \(K_v (\partial e_i /\partial z)_{z=z_\mathrm{top} } =R_{(e_i )} \). In other words, in MODFLOW’s recharge package one is expected to specify values of \(R_{(e_i )} \) equal to \(K_v (\partial e_i /\partial z)_{z=z_\mathrm{top} } \) given by the right-hand side of Eq. (13). Of course, \(R_{(e_i )} \) [1/T] has no longer the meaning of recharge; it is just a quantity needed to specify the top boundary condition for the VOA model for \(e_i \).

On the bottom boundary, where \(q_z =0\) is specified, this condition can simply be introduced into the MODFLOW-VOA model for \(q_z \) (like introducing zero head at the bottom of a HOA model). Introduction of an impervious base into the VOA models for \(e_i \), i.e., introducing \((\partial e_i /\partial z)_{z=z_\mathrm{bottom} } =0\), is done in just the same way as introducing the impermeability condition \((\partial h/\partial z)_{z=z_\mathrm{bottom} } =0\) in the HOA model.

5.3 Specified Head and Flux Conditions at Side (Vertical) Boundaries

Setting up boundary conditions for the four vertical boundaries is similar to setting up the boundary conditions for the top and bottom boundary. There are two points to keep in mind.

(i) Boundary conditions for specified fluxes, for instance specified \(q_{y;n/s} (x,z)\) on the north (n) or south (s) boundary, give rise to the boundary condition

$$\begin{aligned} e_{y;n/s} (x,z)=\frac{q_{y;n/s} (x,z)}{K_h (z)}. \end{aligned}$$
(14a)

The other two boundary conditions can be derived by the compatibility Eq. (9) resulting in

$$\begin{aligned} \left( {\frac{\partial e_x }{\partial y}} \right) _{y=y_{n/s} }= & {} \frac{\partial (K_h^{-1} q_{y; n/s} )}{\partial x}, \end{aligned}$$
(14b)
$$\begin{aligned} \left( {\frac{\partial q_z }{\partial y}} \right) _{y=y_{n/s} }= & {} K_v \frac{\partial (K_h^{-1} q_{y;n/s} )}{\partial z}. \end{aligned}$$
(14c)

Taking into account the discontinuities in \(K_h (z)\), one has to take care that this flux boundary condition is specified in such a way that \(e_{y;n/s} \) is a differentiable function (a sufficiently smooth function) of z. Similar expressions can be obtained for specified \(q_{x;e/w} (y,z)\) on the east or west boundary.

(ii) Boundary conditions for specified heads, for instance specified \(h_{n/s} (x,z)\) on the north (\(a=n\)) or south (\(b=s\)) boundary, or \(h_{e/w} (y,z)\) on the east (\(a=e\)) or west (\(b=w\)) boundary, give rise to the following boundary conditions

$$\begin{aligned} e_{x_i ;a/b}= & {} -\frac{\partial h_{a/b} (x_i ,z)}{\partial x_i }, \end{aligned}$$
(14d)
$$\begin{aligned} q_{z;a/b}= & {} -K_v \frac{\partial h_{a/b} (x_i ,z)}{\partial z}. \end{aligned}$$
(14e)

The boundary condition for the MODFLOW model for \(e_{x_j ;a/b} \), \(j\ne i\) can be derived with the aid of continuity Eq. (3) yielding

$$\begin{aligned} K_h \left( {\frac{\partial e_{x_j } }{\partial x_j }} \right) _{x_j =a/b} =K_h \frac{\partial ^{2}h_{a/b} }{\partial x_i^2 }+\frac{\partial }{\partial z}\left( {K_v \frac{\partial h_{a/b} }{\partial z}} \right) , \end{aligned}$$
(14f)

where either \(i = 1\), \(j = 2\) and \(a/b=n/s\), or \(i = 2\), \(j = 1\) and \(a/b=e/w\).

Taking into account the discontinuities in \(K_v (z)\), one has to take care that this head boundary condition is specified in such a way that \(q_{z;a/b} \) is a differentiable function (a sufficiently smooth function) function of z.

6 Implementation of VOA Using MODFLOW: River–Aquifer Interaction

Exchange of water between a river and an adjacent aquifer is an illustrative case of three-dimensional groundwater flow that requires accurate determination of all three flow components and especially the vertical one. In this section, a relatively simple example of river–aquifer interaction (with \(q_{y }= 0\)) is presented, see Fig. 1. This section elaborates on the details of how the water exchange between river and aquifer can be calculated accurately through implementation of the velocity-oriented approach (VOA) using Visual MODFLOW.

Fig. 1
figure 1

River infiltrating to an adjacent aquifer through the bottom and bank sediments

Figure 1 shows a vertical cross section of a river from which water infiltrates to an adjacent aquifer through the river bottom and bank sediments. The sediments are assumed to be made of semi-pervious rock. Hence, in terms of the conventional head-oriented approach (HOA), a Robin boundary conditions have to be imposed on the common boundary between river and aquifer. The upper and lower boundaries of the aquifer are assumed impervious. Mirror symmetry at the plane \(x=x_0 \) allows assuming the no-flow condition on the left boundary of the aquifer. On the right-hand boundary, a constant head is assumed. For a homogeneous and isotropic aquifer, Nawalany (1993) has used a -dimensional model to derive an analytical expression for the horizontal flux \(Q_{H}\) [\(\hbox {L}^{2}/\hbox {T}\)] from the river bed to the aquifer

$$\begin{aligned} Q_H =KD_a \frac{\Psi }{1+\Psi }\frac{H_r -h_0 }{L_a -W_r}, \end{aligned}$$
(15a)

where

$$\begin{aligned} \Psi =\frac{L_a -W_r }{KD_a }\left[ {\frac{K(D_a -D_r )}{\lambda }\tanh \left( {\frac{W_r }{\lambda }} \right) +\frac{D_r }{c}} \right] . \end{aligned}$$
(15b)

Here K [L/T] is the aquifer hydraulic conductivity, \(D_{a}\) [L]—thickness of the aquifer, \(H_r \) [L]—height of the river water table, \(h_0 \) [L]—hydraulic head at the right boundary, \(L_{a}\) [L]—length of the aquifer, \(W_{r}\) [L]—half-width of the river, \(D_{r}\) [L]—thickness of the aquifer above the river bed, \(\lambda =\sqrt{T_r c}\) [L]—corrected leakage coefficient, \(T_{r }[\hbox {L}^{2}/\hbox {T}\)]—transmissivity of the aquifer under the river bed, c [T]—river sediments resistance (\(c = d_{s }/ k_{s}\), where \(d_s\) [L] is the thickness of the river sediments and \(k_s\) [L/T]—hydraulic conductivity of the river sediments).

Nawalany and Grodzka (2014) have compared this approximation of the total flux \(Q_{H}\) with the VOA-calculated flow \(Q_\mathrm{VOA}\). The ratio \(Q_{H}\) / \(Q_\mathrm{VOA}\) turned out to be practically equal to the ratio \(Q_{H}\) / \(Q_\mathrm{exact}\), where \(Q_\mathrm{exact}\) is the three-dimensional analytical exact solution, i.e., not based on the Dupuit approximation, found by Nawalany (1993). This ratio is less than 1 for all possible sets of hydraulic parameters involved, which indicates that the Dupuit approximation over estimates the water exchange between river and aquifer. Since the three-dimensional analytical solution is quite cumbersome from a numerical point of view and, therefore, impractical for numerical solutions on a regional scale, and since the MODFLOW-VOA model is very accurate (the ratio \(Q_\mathrm{VOA}\) / \(Q_\mathrm{exact}\) being practically equal to 1), Nawalany and Grodzka (2014) decided to use MODFLOW-VOA as a reference model. The major conclusion from this research was that in case of river–aquifer interactions one should apply the MODFLOW-VOA model to get physically meaningful results.

Here we follow this conclusion and present the numerical implementation of the MODFLOW-VOA model using Visual MODFLOW. As the numerical aspects of solving the four Eqs. (11a)–(11d) are well known, the focus is on how the VOA-type boundary conditions have to be specified. Following the theory presented in Sect. 5, the VOA boundary conditions are specified for Eqs. (11b) and (11d) for \(e_{x }\) and \(q_{z}\), respectively. It is also assumed that HOA equation (11a) with hydraulic head h as the state variable is solved numerically prior to solving the VOA Eqs. (11b) and (11d), see Table 1 and Fig. 2.

6.1 Calculating h from HOA Equation (11a) Using MODFLOW

In this section, the river–aquifer boundary conditions for Eqs. (11a)–(11d) and (4) are presented for the perfectly layered anisotropic (orthotropic) case, i.e., when \(K_h =K_h (z)\), \(K_v =K_v (z)\). In the tables below, the normal derivative \(\partial h/\partial n\) represents the normal component of the head gradient n \(\cdot \nabla h\), where n is the unit normal vector on the boundary pointing out of the groundwater modeling domain.

Boundary conditions for Eq. (11a) are formulated in the conventional manner and presented in Table 1 and illustrated in Fig. 2.

Table 1 Boundary conditions for Eq. (11a)
Fig. 2
figure 2

Boundary conditions for calculating h

6.2 Calculating \(\hbox {e}_{x}\) from VOA Equation (11b) Using MODFLOW

The VOA boundary conditions for calculating \(e_x =q_x /K_V \) as presented in Sect. 5 follow from Eq. (11b) and are listed in Table 2 with references to functionalities of Visual MODFLOW (Fig. 3).

Table 2 Boundary conditions for Eq. (11b)
Fig. 3
figure 3

Boundary conditions for calculating \(e_{x}\)

6.3 Calculating \(q_{z}\) from VOA Equation (11d) Using MODFLOW

Similarly, the VOA boundary conditions for calculating \(q_{z}\) from Eq. (11d) are listed in Table 3 with references to functionalities of Visual MODFLOW (Fig. 4).

Table 3 Boundary conditions for Eq. (11d)
Fig. 4
figure 4

Boundary conditions for calculating \(q_{z}\)

7 Results

In the case of river–aquifer interaction, the components \(e_{x}\) and \(q_{z}\) of the Darcy velocity (specific discharge, flux density) have been calculated using Visual MODFLOW as a solver for the VOA equations. The software functionalities have been used not only to specify the boundary conditions, but also to visualize the numerical solutions. Differences in \(q_{z}\) values calculated with the HOA and VOA models are shown in Fig. 5a, b. The greatest differences are found just above the aquifer bottom close to the left boundary of the aquifer—see Fig. 5. When analyzing the differences in \(q_{z}\) calculated as |[\(q_{z}\) (HOA) - \(q_{z}\) (VOA)] /\( q_{z}\) (HOA)| \(\cdot \) 100%, the largest discrepancies can be found at the top/bottom and close to the right boundary of the aquifer. Clearly, the large %,- differences in \(q_{z}\) at the right-hand side of the flow field are due to the high accuracy of the VOA model (for which \(q_{z}\) (VOA) \(\cong 0\) as expected) and \(q_{z}\) (HOA) \(\ne \) 0 due to errors in estimating \(q_{z}\) by the HOA model—see also Grodzka-Łukaszewska (2015).

Fig. 5
figure 5

a Difference in \(q_{z}\) values calculated using HOA and VOA models (m/d). b Difference in \(q_{z}\) values calculated using HOA and VOA models (%)

Also river–aquifer interaction in terms of path lines in the aquifer has been calculated using the VOA and HOA models. The velocity components and path lines calculated using discretization with 20, 40 and 80 horizontal layers combined with, respectively, 100, 200 and 400 vertical columns of blocks are shown below—Figs. 6 78 and 9. All the VOA-calculated path lines shown in Fig. 6 are practically identical for the three discretization densities \(20\times 100\), \(40\times 200\) and \(80 \times 400\) (\(\hbox {layers}\times \hbox {columns}\)) grid blocks. Hence, even for the lowest discretization densities of the grid, MODFLOW-VOA results in a very good approximation of the path lines.

Fig. 6
figure 6

Water path lines beneath and in the vicinity of a river bed calculated by VOA models with \(20\times 100\) (red solid line), \(40\times 200\) (dashed line) and \(80 {\times } 400\) (solid line) grid blocks

Fig. 7
figure 7

Water path lines beneath and in the vicinity of a river bed calculated by a VOA model with \(20\times 100\) (solid line) and a HOA model with \(20\times 100\) (dashed line) grid blocks

Fig. 8
figure 8

Water path lines beneath and in the vicinity of a river bed calculated by a VOA model with \(20\times 100\) (solid line) and a HOA model with \(40\times 200\) (dashed line) grid blocks

Fig. 9
figure 9

Water path lines beneath and in the vicinity of a river bed calculated by a VOA model with \(20\times 100\) (solid line) and a HOA model with \(80 \times 400\) (dashed line) grid blocks

In Figs. 78 and 9, the VOA path lines calculated with a discretization density of \(20\times 100\) grid blocks are used as a reference. With increasing discretization density, i.e., with grid refinement to more grid blocks that are smaller, the conformity between the HOA- and the VOA-calculated path lines increases—Figs. 7,  8, 9. But even for the maximum discretization density, \(80\times 400\), the HOA-calculated path lines differ considerably from the reference VOA-calculated path lines.

8 Final Remarks

8.1 Theoretical Remark

In the VOA equations, the state variables h, \(e_x \), \(e_y \) and \(q_z \) are continuous and piecewise differentiable functions in space. In the derivation presented here, the hydraulic conductivities \(K_h \) and \(K_v \) are assumed to be constant in the x and y direction, but may be piecewise discontinuous (“jumping”) in the z direction. More importantly, if the values of \(K_h \) and \(K_v \) “jump” from layer to layer, also the values of the fluxes \(q_x \) and \(q_y \) and of the head gradient \(e_z =q_z /K_v \) will “jump,” i.e., are discontinuous. (The mathematics of this all is based on Stokes’s and Gauss’s integral theorems.) The assumption of hydraulic conductivities that do not vary in the horizontal directions can be relaxed to conductivities that vary “smoothly” in the horizontal directions (Zijl and Nawalany 1993). Also extension to specific storage is possible.

However, it has still to be investigated whether it is worthwhile to implement such extensions of the VOA presented in this paper. In fact, there are two directions for further research:

  1. (i)

    Extension of the above-presented VOA to horizontally varying conductivity and to storage.

  2. (ii)

    Application of the three-dimensional stream function method, a method that honors the water balance exactly, as presented by (Zijl and Nawalany 2004; Mohammed et al. 2009).

The advantage of research direction (i) is that it can relatively easily be based on existing groundwater modeling software (MODFLOW, say), while its disadvantage is the horizontal smoothness requirement. However, numerical experiments by Kuppen (1988) show that, even when allowing for smoothness, good results can be obtained for practical problems.

The advantage of research direction (ii) is its greater flexibility in handling heterogeneity (discontinuities in any direction), while its disadvantage is the relatively great programming effort, because standard software for the three-dimensional stream functions does not exist, and we should also take into account that the stream function method is mathematically equivalent to the block-centered finite difference method (Mohammed et al. 2009). As a consequence, if the system of linear algebraic equations of the block-centered finite difference method is solved exactly (i.e., with sufficient iterations to solve the water balance exactly), the accuracy of the stream function method is the same as the accuracy of the block-centered finite difference method (MODFLOW), while the MODFLOW-based VOA is much more accurate.

8.2 Practical Remarks

Numerical approximation of groundwater flow beneath and in the vicinity of a river bed resulting from the use of the MODFLOW-based VOA model demonstrates that the VOA model offers high accuracy in approximating all three components of the Darcy velocity in terms of water path lines. The results also confirm former findings of Nawalany and Grodzka (2014) on the supremacy of the VOA model over the HOA model for a similar, but simpler, example. The most important general result of this research is that the Visual MODFLOW platform has a potential for combining the HOA and VOA approach applied to three-dimensional flow models. Such a HOA–VOA combination well suited to determine the state variables h, \(e_x \), \(e_y \) and \(q_z \) with high accuracy. This is especially true when exchange of water between rivers and aquifers is part of a regional groundwater flow system. In practical terms, the MODFLOW-based VOA model eliminates the complexity of merging three-dimensional numerical models for regional groundwater flow with local numerical or analytical models in cases where high accuracy of the flow velocity is locally required. Additionally, the use of one of the most common numerical software models (Visual MODFLOW) offers the hydrogeological community considerable lowering of modeling effort. As a consequence, the implementation of the VOA can easily be based on standard software; there is no need for having access to the source code for an additional programming effort. This is in contrast to a velocity-oriented approach based on a three-dimensional stream function. Since the 3-D stream function is a vector potential, of which its velocity components have to be calculated along the grid edges of the numerical model, a relatively large programming effort in the source code is required. In many modeling projects, the source code is not even available while such a programming effort is exceeding the project resources.