1 Introduction

The extraction of fluid from a rectangular reservoir is a problem that has been well studied in recent decades due to its many engineering applications. For example, Imberger and Hamblin [1] explore the different mechanisms that may contribute to setting the observed state of a body of water; in their example the concern was with predicting the location of the interface between two different density fluids when a river flows into a lake. Dufresne et al. [2] described the flow patterns that may arise in shallow rectangular reservoirs which are often used in the design of storm water management systems. The applications are not limited to water flow examples, as Cohen et al. [3] illustrated how the extraction of a fluid from a finite reservoir may be optimised as a mechanism to coat micro-particles. This process is important for local drug delivery and is used in a plethora of medical settings.

The overwhelming majority of literature discussing selective withdrawal focuses on configurations in which two fluids of different densities are separated by a single, sharp interface. It is widely recognised that this is a simplification of many real-life situations; rarely are physical problems described by two fluids separated by a sharp interface. In many circumstances the two fluids blend more gradually from one to the other and this is the situation that motivates the work described here. As a simple model of this type of problem we consider selective withdrawal in a three-layer fluid where the middle layer serves to play the role of a buffer between the dense lower fluid and the relatively light upper fluid.

A key question pertaining to withdrawal problems was posed by Lister [4]. Suppose that a body consists of fluid whose density varies with height (or depth) and that a sink is introduced that extracts fluid from the system. Lister [4] asked whether the withdrawn material has a density equal to that of the fluid immediately adjacent to the sink, or whether the extraction process is in itself sufficient to deform the density surfaces so that the removed fluid is drawn from a mixture of different densities? Lister proved that the presence of surface tension is necessary to guarantee the stability of the interface when only a single fluid layer is being extracted. Additionally, computations enabled a critical flow rate to be predicted and, at least for super-critical flow, it was possible to determine the proportion of each fluid extracted from the system.

Forbes and Hocking [5] considered a rectangular tank containing two fluid layers of different densities with the more dense fluid extracted from the base of the tank by means of a line sink(s). They showed, at least for ideal fluids drawn through a single line sink, that at early times the position of the interface between the two fluids can be predicted using a linearised theory but as the interface nears the base of the tank a nonlinear model is required. Moreover Farrow and Hocking [6] showed that the drawdown of an interface between two fluids can occur over a range of flow rates and proved that the finite length of the tank is an important factor that can either delay or promote the fluid extraction. They also found that if the line sink sits on the base of the tank and is turned on impulsively, activated waves begin to propagate along the interface. These waves reflect from the side walls of the tank and increasing the depth of the bottom layer of fluid allows the transient wave activity to decay before the drawdown commences.

Cosgrove and Forbes [7] built on the studies of Farrow and Hocking [6], Forbes and Hocking [5], Hocking [8] and others, but extended the analysis to allow for weakly compressible, viscous and miscible fluids that flow rotationally. The motivation for this work was the suggestion that such non-ideal fluids might align more closely with real world situations. The aim of Cosgrove and Forbes was to withdraw as much of the more dense, lower fluid as possible before the interface between the two fluids reached the line sink(s). Both symmetrically and asymmetrically placed sinks were considered and it was proven that two symmetrically placed line sinks on the base of the tank maximised the withdrawal of the lower fluid. Moreover, it was shown that adding drains to this configuration tended to reduce the formation of waves at the interface of the two fluids, thereby increasing the available time to withdrawal the lower fluid before the interface reached the drains.

The selective withdrawal of a viscous fluid into a line sink on the side wall of a rectangular tank was described by Imberger, Thompson and Fandry [9]. They explain that the reflection of shear waves off the rear wall can significantly modify the flow and that the length of the channel and the Froude number are both of critical importance. Furthermore at large Prandtl numbers the layers tend to become unsteady and collapse occurs quickly. It is suggested that in a real world situation the base of the tank or reservoir is unlikely to be flat and probably would be sloped or of irregular shape; this would naturally further complicate the wave structure although they provided no data to quantify this.

Çalışkan and Elçi [10] investigated selective withdrawal from reservoirs in an attempt to assess water quality. They considered a three-dimensional hydrodynamic model, as this best represents a real reservoir. Withdrawal from different depths within the body of water was modelled and it was concluded that placing the line sink at the bottom of the reservoir, as opposed to suspending it somewhere within the fluid, was the preferred choice to optimise the quality of the extracted water.

Information regarding the selective withdrawal of a three-layered fluid from a rectangular tank is rather limited, and what is known tends to concern various solitary wave solutions. These nonlinear solutions can only be realised on large bodies of fluid for which edge effects are either small or are simply ignored. Such solitary waves cannot arise in a tank of finite width as used in this paper. Much of the motivation for examining three layer systems arises in the context of modelling of ocean or atmospheric fluids. For example, Molin et al. [11] investigated the ‘sloshing’ of a rectangular tank containing three fluids which has a focus on the mixing of the boundary layers when the tank is subject to different forced motions such as swaying and rolling. Davey [12] considered a three-layer fluid model and examined its susceptibility to baroclinic instability which typically is seen in stably stratified rotating fluids [13].

The three-layer intrusion flow model considered by Chen and Forbes [14] might be regarded as occurring in an unbounded rectangular tank containing a middle fluid layer sandwiched between two thin interfaces in the vertical direction. All three horizontal fluid layers are in motion with propagating waves fixing the shape of the two interfaces. They used a perturbation expansion strategy to develop a linearised solution associated with small wave amplitudes and implemented spectral methods to compute several nonlinear solutions for steady periodic waves. In this paper we employ similar techniques to generate both linear and nonlinear solutions. We consider the withdrawal of fluid which is initially at rest and set in motion by the impulsive opening of three line sinks. One of these is located on the base of the rectangular tank while the other two are positioned at the bottom of each side wall. Although different drain configurations are considered, the problem closely follows solutions presented in [6, 7] and [5] with the key modification that we have three fluid layers of distinct densities which are separated by two sharp interfaces. The fluids are assumed to be weakly compressible, viscous and flow rotationally. Spectral decomposition is used to identify nonlinear solutions pertaining to various combinations of tank geometries and flow rates. A linearised solution is obtained which serves as a benchmark to confirm the validity of the non-linear approximation at early times.

The remainder of this paper is organised as follows. The mathematical model which describes the problem is formulated in Sect. 2, in which equations for the inviscid model are developed along with a linearised solution of the problem in Sect. 2.1 and the spectral method that is used to perform nonlinear calculations is described in Sect. 2.2. The results of these computations are set out in Sect. 3 in the form of density and vorticity contour plots. Finally, in Sect. 4 we close with a few comments and some concluding remarks.

2 Mathematical model

Consider a two-dimensional tank occupying the region \(|x|<=W\), \(0\le y \le 2H+L\) with the y-axis directed vertically upwards. The tank is filled and continuously replenished via three line sources; one along the entirety of the open top of the tank; the other two are of height A/2 and are located at the top of each side wall. The fluid is withdrawn via three line sinks; one located centrally on the bottom of the tank \(|x|<A\), \(y=0\) with the others of height A/2 at the bottom of each side wall. Prior to the sinks being opened and motion commencing, the tank contains three distinct layers of fluid of densities \(\rho _1<\rho _2<\rho _3\). The heaviest and lightest fluids occupy layers of equal depths H and between them is the intermediate fluid which extends over a depth L. The two interfaces are therefore positioned at \(y=H\) and \(y=H+L\). The three line sources allow the inward flow of light fluid at the top of the tank which replenishes the outward flow through the three line sinks.

The chosen geometry, shown in Fig. 1, was largely motivated by the findings of Cosgrove and Forbes [7]. In their work they concluded that two line sinks placed symmetrically on the base of the tank was the optimal positioning for the withdrawal of the lower, denser fluid layer to be maximised. This prompted us to place line sinks on the lower side walls of our tank together with a centrally located line sink on the base of the tank; our aim was to further enhance the withdrawal of the lower fluid layer by ‘flattening out’ the lower interface. One unfortunate consequence of this choice is that it leads to an ill-posed Neumann problem. Pivato [15] states the circumstances under wihch Laplace’s equation can be solved when Neumann conditions are prescribed on all the boundaries of a region. In simple terms, this requires the line integral of the flux constraint to vanish on each of the boundaries and this can be ensured by the introduction of suitable line sources at the top of each side wall, as described above.

At time \(t=0\) all three drains are opened simultaneously and fluid leaves at a constant rate of \(2V_0\) from the sinks located at the bottom of the side walls and at a rate \(V_0\) from the sink on the base of the tank. To ensure the container remains full at all times, light fluid is admitted to the tank via the uppermost line source at a constant rate of \(AV_0/W\) and through the side-wall sources at a rate \(2V_0\). This choice of flow rates ensures that the inward and outward fluxes balance (each have a value \(4AV_0\)).

Assuming that all three fluids are weakly compressible, fluid on either side of the interfaces undergoes a smooth, but rapid, transition from one density regime to the next. We therefore take the density in the form written \(\rho (x,y,t) = \rho _2 + \bar{\rho }(x,y,t)\) where \(\rho _2\) is taken as the reference density and \(\bar{\rho }(x,y,t)\) is a small perturbation. Furthermore, we assume that all three fluids have a viscosity \(\nu \) and diffuse at a rate \(\sigma \).

We are now in a position to express the problem in a convenient dimensionless form. We write all lengths relative to the depth of the lowermost layer H, which throws up the natural scales \(\sqrt{H/g}\) for the time and \(\sqrt{gH}\) for fluid speeds; here g denotes the acceleration due to gravity. Densities are scaled on that of the middle fluid \(\rho _2\). The problem is therefore reduced to one that depends on the eight parameters

$$\begin{aligned} \begin{aligned} \lambda&= \frac{L}{H},&\alpha&= \frac{A}{H},&\beta&= \frac{W}{H},&F&= \frac{V_0}{\sqrt{gH}},\\ D_1&= \frac{\rho _1}{\rho _2},&D_2&= \frac{\rho _2}{\rho _3},&\mu&= \frac{\nu }{\sqrt{gH^3}}\quad \mathrm{and}&\gamma&= \frac{\sigma }{\sqrt{gH^3}}. \end{aligned} \end{aligned}$$
(2.1)
Fig. 1
figure 1

A sketch of the nondimensionalised tank. The height and width of the tank are \(2+\lambda \) and \(2\beta \) respectively. Sinks are positioned at the bottom of the sidewalls with a third sink located centrally on the bottom of the tank. Light fluid enters the container via the sources at the top of the sidewalls and distributed across the entire width of the open surface of the tank

A sketch of the dimensionless tank is depicted in Fig. 1. The parameter \(\lambda \) measures the depth of the middle fluid relative to the other two layers so that the overall height of the tank is \(2+\lambda \) and initially the two interfaces are located at \(y=1\) and \(y=1+\lambda \). The width of the tank is \(2\beta \) and the sink at the centre of the base is of extent \(2\alpha \) while the sources and sinks on the sidewalls are all of width \(\alpha /2\). A measure of the flow rate is provided by the Froude number F while the two coefficients \(D_1\,(<1)\) and \(D_2\,(<1)\) describe the density ratio between fluids that share an interface. Finally, the parameters \(\mu \) and \(\gamma \) are the dimensionless viscosity and diffusion coefficients respectively.

2.1 The inviscid model

Following the arguments given by Forbes and Hocking [5] and Farrow and Hocking [6], we proceed under the assumption that each of the fluids flow irrotationally. The velocity vector can be written as the gradient of a suitable velocity potential for \(k=1,2,3\); here u and v denote the horizontal and vertical velocity components of the flow in the direction of the and unit vectors, respectively.

At times \(t>0\) we shall suppose the upper and lower interfaces to be positioned at \(y=\eta _1(x,t)\) and \(y=\eta _2(x,t)\) respectively. They move and deform owing to the inward flow from the line sources at the top of the tank and the outward flow from the line sinks beneath. It follows that Laplace’s equation is satisfied in each of the three regions, and therefore

$$\begin{aligned} \begin{aligned} \nabla ^2\phi _1&=0 \quad \text {in} \ \ \eta _1(x,y)<y<=2+\lambda , \\ \nabla ^2\phi _2&=0 \quad \text {in} \ \ \eta _2(x,y)<y<\eta _1(x,y),\\ \nabla ^2\phi _3&=0 \quad \text {in} \ \ 0<=y<\eta _2(x,y). \end{aligned} \end{aligned}$$
(2.2)

The presence of line sources on the top and line sinks on the bottom of the side walls, require that the following boundary conditions are satisfied at \(x=\pm \beta \):

$$\begin{aligned} \begin{aligned} u_1&= {\left\{ \begin{array}{ll} \mp 2F &{} \text {if} 2+\lambda -\alpha /2<y<2+\lambda , \\ 0 &{} \text {if} \eta _1<y<2+\lambda -\alpha /2, \end{array}\right. }&\, \\ u_2&= 0,&\, \\ u_3&= {\left\{ \begin{array}{ll} 0 &{} \text {if} \alpha /2<y<\eta _2, \\ \pm 2F &{} \text {if} 0<y<\alpha /2. \end{array}\right. }&\, \end{aligned} \end{aligned}$$
(2.3)

On the base of the tank \(y=0\) we require that

$$\begin{aligned} \begin{aligned} v_3&= {\left\{ \begin{array}{ll} -F &{} \text {if} -\alpha<x<\alpha , \\ 0 &{} \text {if} \alpha<|x|<\beta \end{array}\right. }&\, \end{aligned} \end{aligned}$$
(2.4)

while at the top \(y=2+\lambda \) the recharge rate is given by

$$\begin{aligned} \begin{aligned} v_1&= -\frac{\alpha F}{\beta }. \end{aligned} \end{aligned}$$
(2.5)

As the fluid within each region is unable to cross an interface into an adjacent zone, it is necessary to impose suitable kinematic conditions

$$\begin{aligned} \begin{aligned} v_k&= \frac{\partial \eta _1}{\partial t}+u_k\frac{\partial \eta _1}{\partial x}&\text {for}k=1,2\text {on} y=\eta _1(x,t), \\ v_l&= \frac{\partial \eta _2}{\partial t}+u_l\frac{\partial \eta _2}{\partial x}&\text {for}l=2,3\text {on} y=\eta _2(x,t) \end{aligned} \end{aligned}$$
(2.6)

at each of the interfaces. Moreover, the fluid pressure must be continuous across each of the interfaces, see [5], which leads to the two dynamic conditions

(2.7)
(2.8)

It is also necessary to allow for time-dependent velocity potentials written in the form

$$\begin{aligned} \phi _j(x,y,t)=\phi _b(x,y)+\Phi _j(x,y,t), \quad j=1,2,3, \end{aligned}$$
(2.9)

where \(\Phi _j\) is the (yet to be determined) time-dependent flow which is superimposed on the time-independent \(\phi _b\) background flow. This base field is determined by examining the flow in the tank should it contain a single constant density, non-viscous, incompressible fluid that moves irrotationally. This sets the steady state behaviour in the region \(-\beta<x<\beta \), \(0<y<2+\lambda \) and is given by

$$\begin{aligned} \phi _b(x,y)&= -\frac{\alpha F y}{\beta }+\sum _{n=1}^{\infty }A_n\cosh \left( \frac{n\pi }{\beta }(2+\lambda -y)\right) \cos \left( \frac{n\pi x}{\beta }\right) \nonumber \\&\quad + \sum _{n=1}^\infty B_n \cosh \left( \frac{(2n-1) \pi x}{2+\lambda }\right) \cos \left( \frac{(2n-1) \pi y}{2+\lambda }\right) , \end{aligned}$$

in which the coefficients are given by

$$\begin{aligned} A_n=\frac{2 \beta F \sin \left( \frac{n \pi \alpha }{\beta }\right) }{n^2\pi ^2\sinh \left( \frac{n \pi }{\beta }(2+\lambda )\right) }, \quad B_n=\frac{16(2+\lambda )F\sin \left( \frac{(2n-1)\pi \alpha }{4+2\lambda }\right) \cosh \left( \frac{(2n-1)\pi \beta }{2+\lambda }\right) }{(2n-1)^2\pi ^2\sinh \left( \frac{(4n-2)\pi \beta }{2+\lambda }\right) }. \end{aligned}$$
(2.10)

It is easily verified that the time-dependent potentials \(\Phi _j(x,y,t)\) satisfy Eqs. (2.2) with \(\phi _j\) is replaced by \(\Phi _j\) for \(j=1,2,3\). Moreover the boundary condition on the top of the tank (2.5) becomes

$$\begin{aligned} \frac{\partial \Phi _1}{\partial y} = 0 \quad \text {on}\; y = 2+\lambda , \end{aligned}$$
(2.11)

the boundary condition on the bottom of the tank, (2.4) is

$$\begin{aligned} \frac{\partial \Phi _3}{\partial y} = 0 \quad \text {on} \; y = 0, \end{aligned}$$
(2.12)

while the boundary conditions on the side walls of the tank (2.3) are simply

$$\begin{aligned} \frac{\partial \Phi _j}{\partial x} = 0 \quad \text {for} \; \ j = 1,2,3 \quad \text {on} \; \ x = \pm \beta . \end{aligned}$$
(2.13)

The given problem reduces to one of determining the two time-dependent interface functions \(\eta _1(x,t)\) and \(\eta _2(x,t)\) together with the three time-dependent velocity potentials \(\Phi _j(x,y,t)\) \((j=1,2,3)\). The highly nonlinear nature of the problem means that full results rely on the implementation of a suitable numerical method but a linearised solution is possible. This serves twin purposes; on the one hand it gives a guide as to the nature of the solution at small flow rates and, on the other, it provides a description of the early stage evolution of fully nonlinear structure. We consider this linearised solution next.

Forbes and Hocking [5] obtained a linearised inviscid solution for a tank that contained two fluids separated by a single interface. We remark that although we shall consider nonlinear simulations in later sections of the paper, these inviscid linearised considerations are helpful markers that assist in verifying the early evolution of the full nonlinear problem. The presence of a third fluid and the second interface introduces some complications which is encapsulated within a coupled system of equations. We begin by expanding the velocity potentials in terms of the (assumed small) Froude number F so that

$$\begin{aligned} \Phi _j(x,y,t) = F \phi _{jL} + \mathcal {O}(F^2) \quad \text {for} \ \ j=1,2,3, \end{aligned}$$
(2.14)

where \(\phi _{jL}\) represents the first order velocity potentials for \(j=1,2,3\). In a similar vein the two interface functions can be expressed to first order as

$$\begin{aligned} \eta _1(x,t)=\left( 1+\lambda -\frac{\alpha F t}{\beta }\right) +F\eta _{1L}(x,t)+\mathcal {O}(F^2), \end{aligned}$$
(2.15)
$$\begin{aligned} \eta _2(x,t)=\left( 1-\frac{\alpha F t}{\beta }\right) +F\eta _{2L}(x,t)+\mathcal {O}(F^2). \end{aligned}$$
(2.16)

The leading order potentials satisfy

$$\begin{aligned} \begin{aligned} \nabla ^2\phi _{1L}&=0 \quad \text {in} \ \ 1+\lambda<y<=2+\lambda , \\ \nabla ^2\phi _{2L}&=0 \quad \text {in} \ \ 1<y<1+\lambda , \\ \nabla ^2\phi _{3L}&=0 \quad \text {in} \ \ 0<=y<1 \end{aligned} \end{aligned}$$
(2.17)

with the associated boundary conditions derived from (2.11), (2.12) and (2.13). This gives

$$\begin{aligned} \begin{aligned} \frac{\partial \phi _{1L}}{\partial y}&= 0&\text {on} \ \ y&= 2+\lambda , \\ \frac{\partial \phi _{3L}}{\partial y}&= 0&\text {on} \ \ y&= 0, \\ \frac{\partial \phi _{jL}}{\partial x}&= 0&\text {on} \ \ x&= \pm \beta&\text {for} \ \ j&= 1,2,3. \end{aligned} \end{aligned}$$
(2.18)

The reduced velocity potentials assume the general forms

$$\begin{aligned} \begin{aligned} \phi _{1L}(x,y,t)&=\sum _{n=1}^\infty Q_n(t)\cosh \left( \frac{n \pi }{\beta }(2+\lambda -y)\right) \cos \left( \frac{n \pi x}{\beta }\right) , \\ \phi _{2L}(x,y,t)&=\sum _{n=1}^\infty \left[ R_n(t)\cosh \left( \frac{n \pi y}{\beta }\right) + S_n(t)\sinh \left( \frac{n \pi y}{\beta }\right) \right] \cos \left( \frac{n \pi x}{\beta }\right) , \\ \phi _{3L}(x,y,t)&=\sum _{n=1}^\infty T_n(t)\cosh \left( \frac{n \pi y}{\beta }\right) \cos \left( \frac{n \pi x}{\beta }\right) , \end{aligned} \end{aligned}$$
(2.19)

where the additional term in the form of \(\phi _{2L}\) is required to account for the finite width of the middle fluid layer. It is easily verified that Eqs. (2.17) and boundary conditions (2.18) are satisfied by expansions (2.19).

By taking the appropriate partial derivatives of (2.14) and making use of the two interface functions (2.15) and (2.16), the linearised dynamic conditions on the upper and lower interface are represented by

$$\begin{aligned} \eta _{1L}(x,t) = \frac{1}{(D_1-1)}\left[ \frac{\partial \phi _{2L}}{\partial t}-D_1\frac{\partial \phi _{1L}}{\partial t}\right] \quad \text {on} \; y=1+\lambda , \end{aligned}$$
(2.20)

and

$$\begin{aligned} \eta _{2L}(x,t) = \frac{1}{(D_2-1)}\left[ \frac{\partial \phi _{3L}}{\partial t}-D_2\frac{\partial \phi _{2L}}{\partial t}\right] \quad \text {on} \; y=1. \end{aligned}$$
(2.21)

The substitution of the appropriate time derivatives of expressions (2.19) into the linearised interface requirements (2.20) and (2.21) leads to

$$\begin{aligned} \eta _{1L}(x,t) = \sum _{n=1}^{\infty }K_n(t)\cos \left( \frac{n \pi x}{\beta }\right) \qquad \mathrm{and}\qquad \eta _{2L}(x,t) = \sum _{n=1}^{\infty }L_n(t)\cos \left( \frac{n \pi x}{\beta }\right) \end{aligned}$$
(2.22)

in which

$$\begin{aligned} \begin{aligned} K_n(t)&= \frac{1}{D_1-1}\sum _{n=1}^{\infty }\left[ R_n'(t)\cosh \left( \frac{n \pi (1+\lambda )}{\beta }\right) +S_n'(t)\sinh \left( \frac{n \pi (1+\lambda )}{\beta }\right) - D_1Q_n'(t)\cosh \left( \frac{n \pi }{\beta } \right) \right] , \\ L_n(t)&= \frac{1}{D_2-1}\sum _{n=1}^{\infty }\left[ T_n'(t)\cosh \left( \frac{n \pi }{\beta }\right) -D_2 \left\{ R_n'(t)\cosh \left( \frac{n \pi }{\beta }\right) + S_n'(t)\sinh \left( \frac{n \pi }{\beta } \right) \right\} \right] . \end{aligned} \end{aligned}$$
(2.23)

We then use (2.15) and (2.16) in conjunction with expansions of the horizontal and vertical velocity components \(u_k\) and \(v_k\) taken either side of the two interfaces. The substitution of the results into the kinematic conditions (2.6) generates two expressions for each of the linearised interface functions \(\eta _{1L}\) and \(\eta _{2L}\). If Eqs. (2.22) are differentiated with respect to time and compared to the appropriate expressions derived from the kinematic equations, four relations are obtained. Two of these relate to the upper interface so that

$$\begin{aligned} \begin{aligned} K_n'(t)&= \left( \frac{n \pi }{\beta }\right) \left[ R_n(t)\sinh \left( \frac{n \pi (1+\lambda )}{\beta }\right) + S_n(t)\cosh \left( \frac{n \pi (1+\lambda )}{\beta }\right) \right] - \Gamma _{n1}(x), \\ K_n'(t)&= -\left( \frac{n \pi }{\beta }\right) Q_n(t) \sinh \left( \frac{n \pi }{\beta }\right) - \Gamma _{n1}(x), \end{aligned} \end{aligned}$$
(2.24)

while the two for the lower interface give

$$\begin{aligned} \begin{aligned} L_n'(t)&= \left( \frac{n \pi }{\beta }\right) \left[ R_n(t)\sinh \left( \frac{n \pi }{\beta }\right) + S_n(t)\cosh \left( \frac{n \pi }{\beta }\right) \right] - \Gamma _{n2}(x), \\ L_n'(t)&= \left( \frac{n \pi }{\beta }\right) T_n(t) \sinh \left( \frac{n \pi }{\beta }\right) - \Gamma _{n2}(x), \end{aligned} \end{aligned}$$
(2.25)

in which

$$\begin{aligned} \begin{aligned} \Gamma _{n1}(x)&= a_n\sinh \left( \frac{n\pi }{\beta }\right) + b_n\sin \left( \frac{(2n-1)\pi (1+\lambda )}{2+\lambda }\right) \frac{\cosh \left( \frac{(2n-1)\pi x}{2+\lambda }\right) }{\cos \left( \frac{n \pi x}{\beta }\right) }, \\ \Gamma _{n2}(x)&= a_n\sinh \left( \frac{n\pi (1+\lambda )}{\beta }\right) + b_n\sin \left( \frac{(2n-1)\pi }{2+\lambda }\right) \frac{\cosh \left( \frac{(2n-1)\pi x}{2+\lambda }\right) }{\cos \left( \frac{n \pi x}{\beta }\right) }, \\ a_n&= \frac{2\sin \left( \frac{n\pi \alpha }{\beta }\right) }{n \pi \sinh \left( \frac{n \pi (2+\lambda )}{\beta }\right) } \ \mathrm{and} \ \ b_n = \frac{16\sin \left( \frac{(2n-1)\pi \alpha }{4+2\lambda }\right) \cosh \left( \frac{(2n-1)\pi \beta }{2+\lambda }\right) }{(2n-1)\pi \sinh \left( \frac{(4n-2) \pi \beta }{2+\lambda }\right) }. \end{aligned} \end{aligned}$$
(2.26)

We can now deduce the key equations for the functions \(K_n(t)\) and \(L_n(t)\). We remark that expressions (2.23) involve the time derivatives of \(Q_n(t), R_n(t), S_n(t)\) and \(T_n(t)\) and these quantities can be found by differentiating equations (2.24) and (2.25) with respect to time and solving for the four unknowns. This yields

$$\begin{aligned} \begin{aligned} Q_n'(t)&= -\left( \frac{\beta }{n \pi } \right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi }{\beta } \right) K_n^{''}(t), \\ R_n'(t)&= \left( \frac{\beta }{n \pi } \right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi \lambda }{\beta } \right) \left[ \cosh \left( \frac{n \pi }{\beta } \right) K_n^{''}(t)- \cosh \left( \frac{n \pi (1+\lambda )}{\beta } \right) L_n^{''}(t) \right] , \\ S_n'(t)&= \left( \frac{\beta }{n \pi } \right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi \lambda }{\beta } \right) \left[ \sinh \left( \frac{n \pi (1+\lambda )}{\beta } \right) L_n^{''}(t)- \sinh \left( \frac{n \pi }{\beta } \right) K_n^{''}(t) \right] , \\ T_n'(t)&= \left( \frac{\beta }{n \pi } \right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi }{\beta } \right) L_n^{''}(t) \end{aligned} \end{aligned}$$
(2.27)

and the substitution of (2.27) into (2.23) leads to the desired coupled system of second order, constant coefficient ordinary differential equations. These may be written as

$$\begin{aligned} \begin{aligned} H_n K_n''(t) = F_n K_n(t) - G_n L_n(t), \quad H_n L_n''(t) = \widehat{F}_n L_n(t) - \widehat{G}_n K_n(t), \end{aligned} \end{aligned}$$
(2.28)

where

$$\begin{aligned}&F_n = \frac{1}{D_2-1}\left( \frac{\beta }{n \pi }\right) \left[ \coth \left( \frac{n \pi }{\beta }\right) + D_2\coth \left( \frac{n \pi \lambda }{\beta }\right) \right] , \\&G_n = \frac{1}{1-D_1}\left( \frac{\beta }{n \pi }\right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi \lambda }{\beta }\right) , \\&\widehat{F}_n = \frac{1}{D_1-1}\left( \frac{\beta }{n \pi }\right) \left[ \coth \left( \frac{n \pi \lambda }{\beta }\right) + D_1 \coth \left( \frac{n \pi }{\beta }\right) \right] , \\&\widehat{G}_n =\frac{D_2}{1-D_2}\left( \frac{\beta }{n \pi }\right) {{\,\mathrm{csch}\,}}\left( \frac{n \pi \lambda }{\beta }\right) , \\&H_n = F_n\widehat{F}_n-G_n\widehat{G}_n. \end{aligned}$$

The system (2.28) can be rewritten as a system of four first order equations

$$\begin{aligned}&K_n'(t) = X_1(t), \quad L_n'(t) = X_2(t), \\&X_1'(t) = \frac{1}{H_n}\Big [F_nK_n(t) - G_nL_n(t)\Big ], \quad X_2'(t) = \frac{1}{H_n}\Big [\widehat{F}_nL_n(t) - \widehat{G}_nK_n(t)\Big ] \end{aligned}$$

subject to the initial conditions

$$\begin{aligned} \begin{aligned} K_n(0)&= 0,&L_n(0)&= 0,&K_n'(x,0)&= -\Gamma _{n1}(x),&L_n'(x,0)&= -\Gamma _{n2}(x) , \end{aligned} \end{aligned}$$

where \(\Gamma _{1n}\) and \(\Gamma _{2n}\) are given by (2.26). If we march the solution of this system forward in time we obtain the forms of \(K_n(t)\) and \(L_n(t)\) which can be used in conjunction with Eqs. (2.22) to find the terms in the expressions for the two interface positions correct to order F as given by (2.15) and (2.16).

2.2 The viscous model

In our formulation of the linearised model solutions were obtained by solving Laplace’s equation in each of the three fluid regions. When extending to the nonlinear model, we adopt the strategy outlined by Cosgrove and Forbes [7] and derive solutions by considering the entire tank to be a single fluid region with an initial prescribed density profile. With the two-dimensional flow , where u and v denote the horizontal and vertical velocity components, Boussinesq theory allows us to express the conservation of mass in terms of an incompressible part

$$\begin{aligned} \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0 \end{aligned}$$
(2.29)

plus an effective transport condition

(2.30)

in which \(\bar{\rho } \equiv \bar{\rho }(x,y,t)\) denotes a small perturbation to the density \(\rho \) and \(\gamma \) is the appropriate dimensionless diffusion parameter. The streamfunction \(\Psi \equiv \Psi (x,y,t)\) can now be introduced. It too can be considered as the sum of two components; one being the steady state background flow \(\Psi _b \equiv \Psi _b(x,y)\) to which we add an unsteady viscous correction \(\Psi _c \equiv \Psi _c(x,y,t)\). We establish the background part by ignoring the effects of viscosity and considering the steady flow of a single fluid in the region \(|x|<=\beta \), \(0<=y<=2+\lambda \) whence

$$\begin{aligned} \begin{aligned} \Psi _b(x,y)=\frac{\alpha F x}{\beta }+\sum _{n=1}^{\infty }A_n\sinh \left( \frac{n\pi }{\beta }(2+\lambda -y)\right) \sin \left( \frac{n\pi x}{\beta }\right) \\+ \sum _{n=1}^\infty B_n \sinh \left( \frac{(2n-1) \pi x}{2+\lambda }\right) \sin \left( \frac{(2n-1) \pi y}{2+\lambda }\right) \end{aligned} \end{aligned}$$

in which the time-independent Fourier coefficients \(A_n\) and \(B_n\) are given by (2.10).

Following Farrow and Hocking [6] and Cosgrove and Forbes [7], slip conditions are imposed along the side walls and on the base of the tank so that the boundary layers on these surfaces can be ignored. As the boundary conditions (2.3), (2.4) and (2.5) are satisfied by the steady component \(\Psi _b\), the unsteady correction term has to account for the viscosity of the fluid and we write

$$\begin{aligned} \Psi _c(x,y,t) = \sum _{m=1}^{\infty }\sum _{n=1}^{\infty }A_{mn}(t)\sin \left( \frac{m \pi y}{2+\lambda }\right) \sin \left( \frac{n \pi x}{\beta }\right) , \end{aligned}$$

where the time dependent Fourier coefficients \(A_{mn}(t)\) are to be determined. Therefore, the full representation of the streamfunction takes the form

$$\begin{aligned} \Psi (x,y,t)= & {} \frac{\alpha F x}{\beta }+\sum _{n=1}^{\infty }A_n\sinh \left( \frac{n\pi }{\beta }(2+\lambda -y)\right) \sin \left( \frac{n\pi x}{\beta }\right) \nonumber \\&+ \sum _{n=1}^\infty B_n \sinh \left( \frac{(2n-1) \pi x}{2+\lambda }\right) \sin \left( \frac{(2n-1) \pi y}{2+\lambda }\right) \nonumber \\&+\sum _{m=1}^{\infty }\sum _{n=1}^{\infty }A_{mn}(t)\sin \left( \frac{m \pi y}{2+\lambda }\right) \sin \left( \frac{n \pi x}{\beta }\right) . \end{aligned}$$
(2.31)

As described in [7], the horizontal and vertical velocity components of the viscous momentum equations can be expressed in terms of vorticity as a single scalar equation, given by

(2.32)

in which the vorticity is represented as

$$\begin{aligned} \omega = \frac{\partial v}{\partial x} - \frac{\partial u}{\partial y} \end{aligned}$$
(2.33)

and \(\mu \) is the dimensionless viscosity parameter. As the streamfunction identically satisfies the incompressible component of the mass equation (2.29) such that

$$\begin{aligned} u=\frac{\partial \Psi }{\partial y} \qquad \text {and} \qquad v=-\frac{\partial \Psi }{\partial x}; \end{aligned}$$
(2.34)

the substitution of (2.34) into (2.33) results in the vorticity equation taking the form

$$\begin{aligned} \omega = - \nabla ^2\Psi . \end{aligned}$$
(2.35)

Upon substitution of (2.31) into (2.35) gives the fluid vorticity in the tank as

$$\begin{aligned} \omega (x,y,t) = \sum _{m=1}^{\infty }\sum _{n=1}^{\infty }C_{mn}A_{mn}(t)\sin \left( \frac{m \pi y}{2+\lambda }\right) \sin \left( \frac{n \pi x}{\beta }\right) \end{aligned}$$
(2.36)

in which

$$\begin{aligned} C_{mn} = \left( \frac{n \pi }{\beta }\right) ^2 + \left( \frac{m \pi }{2+\lambda }\right) ^2. \end{aligned}$$
(2.37)

From (2.32) it is evident that the expression for \(\partial \bar{\rho }/\partial x\) must have a similar structure to (2.36). Guided by this observation, we suppose that the perturbation density takes the form

$$\begin{aligned} \bar{\rho }(x,y,t) = \sum _{m=1}^{\infty }\sum _{n=1}^{\infty }B_{mn}(t)\sin \left( \frac{m \pi y}{2+\lambda }\right) \cos \left( \frac{n \pi x}{\beta }\right) + f(y,t), \end{aligned}$$

where the time dependent Fourier coefficients, \(B_{mn}(t)\), are currently unknown. The arbitrary function of integration f(yt) was written as a Fourier series which is even-valued about \(y=0\) so that

$$\begin{aligned} f(y,t) = \sum _{m=1}^{\infty }B_{m0}(t)\cos \left( \frac{m\pi y}{2+\lambda }\right) ; \end{aligned}$$

this particular form was chosen in order to minimise the amount of Gibbs’ phenomenon present in the solutions. Therefore, just as described in Sect. 2, the full representation of the density function takes the form

$$\begin{aligned} \begin{aligned} \rho (x,y,t) = \rho _2 + \sum _{m=1}^{\infty }\sum _{n=1}^{\infty }B_{mn}(t)\sin \left( \frac{m \pi y}{2+\lambda }\right) \cos \left( \frac{n \pi x}{\beta }\right) + \sum _{m=1}^{\infty }B_{m0}(t)\cos \left( \frac{m\pi y}{2+\lambda }\right) . \end{aligned} \end{aligned}$$
(2.38)

The important evolution equations for the time-dependent Fourier coefficients \(A_{mn}(t)\) and \(B_{mn}(t)\) are derived using spectral decomposition. The resultant system of equations are similar to those presented in Cosgrove and Forbes [7]; and for ease of reference for the reader, we include our results in Appendix A.

The fluid is initially assumed to be at rest so that all the coefficients \(A_{mn}(0)=0\). The starting values for the coefficients \(B_{mn}\) follow from the form of the initial density profile given by

$$\begin{aligned} \bar{\rho }(x,y,0)= {\left\{ \begin{array}{ll} D_1-1 &{} \text { if } \ 1+\lambda< y<= 2+\lambda , \\ 0 &{} \text { if } \ 1< y< 1+\lambda , \\ 1-D_2 &{} \text { if } \ 0<= y < 1, \end{array}\right. } \end{aligned}$$
(2.39)

which gives that

$$\begin{aligned} \begin{aligned} B_{m0}(0) = \frac{2}{m \pi }\left[ (1-D_1)\sin \left( \frac{m \pi (1+\lambda )}{2+\lambda }\right) +(1-D_2)\sin \left( \frac{m \pi }{2+\lambda }\right) \right] , \quad B_{mn}(0) = 0, \quad n \ge 1. \end{aligned} \end{aligned}$$
(2.40)

Once we had deduced the various Fourier coefficients it was then a simple task to reconstruct the forms of the streamfunction, vorticity and density using (2.31), (2.36) and (2.38) respectively.

3 Results and discussion

In all our calculations we set the diffusion and viscosity parameters \(\mu =\gamma =10^{-4}\) for consistency with the values used in [7]. While the qualitative behaviour of the results is unlikely to be sensitive to the values of \(\gamma \) and \(\mu \), they would need to be adjusted should there be a particular physical problem of interest. For example, should there be temperature or salt diffusion, it would be appropriate to set \(\gamma \approx 0.1\mu \) or \(\gamma \ll \mu \), respectively. Extensive testing suggested that the number of Fourier coefficients \(M=N=31\) provided a good compromise between the need to generate accurate solutions while ensuring that computational run times were not excessive. To check the adequacy of the resolution we set \(M=N=51\) in many of our calculation combinations and in all cases there was no discernible change to the results which suggests that our computations were sufficiently resolved; we generate all the figures with this number of Fourier coefficients. We supposed that the three fluid densities are given by \(\rho _1=0.900\), \(\rho _2=0.950\) and \(\rho _3=1.000\) so that the density ratios across the upper and lower interfaces are \(D_1=\rho _1/\rho _2=0.9474\) and \(D_2=\rho _2/\rho _3=0.9500\) respectively. Informed by the methods used by Cosgrove and Forbes [7] we optimised the choices of the various parameters by varying each in turn in order to achieve maximal total outflow V. For fixed \(\alpha \) the total outflow flux can be estimated as \(V=4\alpha F t_w\), where \(t_w\) is the time taken for the lower interface to reach one or more of the line sinks at the base of the tank. Furthermore, we do not have a precise definition for the interfaces because the three distinct density layers are modelled by a smeared density profile across the depth of the tank. For computational purposes we estimated the location of each interface to be the position where the calculated density equals the average of fluid densities either side of that interface; in other words the locations where \(\rho = 0.925\) and 0.975 were used to track the upper and lower interfaces respectively.

Figure 2 depicts the relationship between the total outflow V and the Froude number F for various values of \(\alpha \). It appears that the outflow is optimal when \(F\approx 0.03\); a result that seems to hold over the entire range of \(\alpha \) values tested. The justification for this choice of F is given by the observation that decreasing F much below 0.03 led to significantly longer computation times with an almost negligible increase in the outflow. At the other extreme, with \(F>0.08\), there was virtually no outflow. Table 1 lists the withdrawal times and total outflow for various combinations of \(\alpha \) and F. It is remarked that the value of \(\alpha =1\) appears to be close to the optimal drain half-width in the sense that this choice seems to achieve high outflow in a relatively short time. This tentative result can be justified by comparing the various outputs corresponding to \(F=0.03\) (the previously determined optimal Froude number). Although Table 1 shows that the total outflow V is greater for \(\alpha =0.95\) than \(\alpha =1\), this marginally increased outflow of only \(1\%\) is achieved at the expense of increasing the withdrawal time, \(t_w\), by more than \(6\%\). Conversely, if \(\alpha \) is increased to 1.05, the withdrawal time, \(t_w\), is reduced by \(11\%\) in comparison to \(\alpha =1\), but this time saving is accompanied by a reduction in the total outflow V of greater than \(6\%\). Thus, based on these observations, \(\alpha =1\) provides a good balance between computation time and outflow.

Table 1 Total outflow V and corresponding withdrawal time t shown for various combinations of \(\alpha \) and F. Other parameters are fixed with \(\beta =8\) and \(\lambda =1\)
Fig. 2
figure 2

The total outflow V plotted as a function of the Froude number F for a selection of values of \(\alpha \). The values of \(\alpha \) increase from top right to bottom left. The other parameters of the tank were fixed with \(\beta =8\) and \(\lambda =1\)

Density contour plots were generated and some representative solutions are shown in Fig. 3. Here the contours show the variation in densities in the vicinity of the interfaces. The white space in the following density plots denotes regions in which the fluid density equals the undisturbed values corresponding to the upper, middle and lower fluid regions. In all cases it was found that the lower interface was drawn through the lower side drains before reaching the central drain on the base of the tank. When \(\alpha =1\) the extraction times \(t_w\) were determined for both \(F=0.03,0.07\) (see Table 1) by determining when the the lower interface began to be drawn through the uppermost parts of the sidewall drains, as shown in Fig. 3. This is a good visual confirmation that increasing the Froude number much beyond the optimal \(F=0.03\) leads to a more rapid extraction of fluid and with a concomitant reduction in the total outflow. We remark that the small zone of high density contours \(\rho =0.975\) that appear towards the top of Fig. 3b, are spurious artifacts caused by the numerical approximation, probably as a result of the Gibbs’ phenomenon. As such they can be safely ignored.

Fig. 3
figure 3

Density contour plots when the lower interface begins to be drawn through the lower side wall drains. The thick lines indicate the average density contours \(\rho =0.925\) and \(\rho =0.975\) corresponding to the upper and lower interfaces respectively. Both cases use fixed tank parameters \(\alpha =1\), \(\beta =8\) and \(\lambda =1\). a \(F=0.07\) resulting in \(t_w=9\), b \(F=0.03\) resulting in \(t_w=82\)

Fig. 4
figure 4

The relationship between the tank width \(\beta \) and the withdrawal time \(t_w\) for fixed parameters \(\alpha =1\), \(F=0.03\) and \(\lambda =1\). Density contours for two choices \(\beta =2\) and \(\beta =6\) are plotted in Figs. 5a and  5b respectively

Fig. 5
figure 5

Density plots complementing the results in Fig. 4. a Density contours at \(t_w=18\) with \(\beta =2\). b Density contours at \(t_w=58\) with tank width \(\beta =6\). Other tank parameters are fixed at \(\alpha =1\), \(\lambda =1\) and \(F=0.03\)

Fig. 6
figure 6

Linearised interfaces (dashed lines) superimposed on the computed density contour plots at times \(t=3,6,12\) and 24. The tank parameters are chosen to be \(\alpha =1\), \(\beta =8\), \(\lambda =1\) and \(F=0.03\)

Having decided that the optimal Froude number is in the vicinity of \(F=0.03\) and with \(\alpha =\lambda =1\),we next looked at the effect of varying the tank half-width \(\beta \). Some representative results are shown in Fig. 4 which shows that the withdrawal time \(t_w\) is well approximated via the linear relationship \(t_w = (\beta -0.51)/0.09\). Figure 5 shows the extraction times for the two values \(\beta =2\) and \(\beta = 6\). We point out that these results hold for a fixed dimensionless height of the tank, so care must be taken if these findings are extended to examine other geometrical combinations.

Fig. 7
figure 7

Linearised interfaces (dashed lines) superimposed on the vorticity contour plots for times \(t=3,6,12\) and 24. Tank parameters are chosen to be \(\alpha =1\), \(\beta =8\), \(\lambda =1\) and \(F=0.03\)

Fig. 8
figure 8

Comparison of density contours of the two and three-layer fluid models for \(t_w=54\), both using parameter values \(\alpha =1\), \(\beta =8\), \(\lambda =1\) and \(F=0.03\). The dashed lines represent the corresponding linearised interfaces at \(t_w=54\). a A two-layer tank with density \(\rho _1=\rho _2=0.95\) and \(\rho _3=1.00\) in the upper and lower layers respectively. b A three-layer tank with density \(\rho _1=0.90, \rho _2=0.95\) and \(\rho _3=1.00\) in the upper, middle and lower layers respectively

Fig. 9
figure 9

Linearised interfaces at time \(t=6\) for values of \(\lambda = 0.2,0.4,0.6\) and 0.8. Tank parameters are fixed at \(\alpha =1\), \(\beta =8\) and \(F=0.03\)

Remembering that as the draining started impulsively, it might be expected that both the upper and lower interfaces would be drawn toward the line sinks located on the bottom of the side walls and on the base of the tank. Figure 6 shows density contours plotted using (2.38) with the inviscid linearised interfaces (2.15) and (2.16) superimposed. Both interfaces are initially drawn toward the sinks located at the bottom of the walls, mainly owing to the inward flux from the line sources at the top of the walls. As time progresses the lower interface is drawn more aggressively toward the central drain on the base of the tank than is the upper interface. Figures 6a and b confirm that for early times both interfaces are drawn toward the line sinks on the bottom of the side walls, with the lower interface drawn more noticeably toward the drain on the base of the tank. This result agrees nicely with the nonlinear model, as might be hoped. Travelling waves that propagate along the interfaces ensure that the interfaces flatten out and move toward the base of the tank in a quasi-horizontal fashion. Figures 6c and d suggest that as time progresses the linearised interfaces lose accuracy but this in unsurprising as nonlinear effects increasingly become the dominant mechanism.

Shown in Fig. 7a are contours of vorticity, plotted using (2.36) with the optimal parameter values \(\alpha =1\) and \(F=0.03\) and with \(\beta =8\) and \(\lambda =1\). Figure  7 shows vorticity contours immediately after the line sources and sinks are activated, where small but relatively intense regions of vorticity can be observed ; the production of vorticity is likely due to the bending of the isopycnal contours, as described by the Dubreil–Jacotin–Long equation [16]. In the central region there are small relatively weak vorticity structures forming on the lower interface, indicating that fluid is beginning to be drawn out through the line sink on the base of the tank. As time progresses through Figs. 7b–d the regions of vorticity on the sides of the tank expand in size but decrease in magnitude, in contrast, the vorticity centrally located on the lower interface expand and deepen. This is reassuring confirmation of the behaviour suggested by the density profiles in Fig. 6. Just as for the density plots, the linearised interfaces are in good accord with the vorticity behaviour at early times but diverge as time progresses and nonlinearity becomes more prominent.

One salient question raised in our study relates to the importance of modelling selective withdrawal with a three-layer rather than a two-layer profile. In order to assess the possible importance of the additional layer, we performed a few experiments in which the density of the upper most layer was set equal to that of the middle layer, namely \(\rho _1=\rho _2=0.95\), effectively simplifying the problem to that of two fluids separated by a single interface. We simulated the two-layer system using the parameter values \(\alpha =1\), \(\beta =8\), \(\lambda =1\) and \(F=0.03\) and the results are illustrated in Fig. 8. With these parameter choices, Fig. 8a shows the interface of the two-layer fluid achieves a maximum withdrawal time of \(t_w=54\), with a corresponding total outflow of \(V=6.48\). At this time, Fig. 8b shows the lower interface of the three-layer fluid is still well above the line sinks on the lower side walls so this solution can be continued; in fact it may be taken on until \(t_w=82\) and produces a total outflow of \(V=9.84\) as noted in Table 1. Therefore, for this particular case, the three-layer model produces a fluid output in excess of one-third greater than that of the equivalent two-layer counterpart. To ensure these results were not in some way peculiar and atypical, we simulated several other cases taken from Table 1 and repeated the calculations when the densities of the upper two layers were set equal. In all cases the outflow V was markedly greater in the case of the three-layer fluid system. We conclude that, in general, a three-layer fluid system exhibits significantly different behaviour to that of its two-layer counterpart. It is also worth noting that the linearised interfaces for our chosen tank geometry exhibit vastly different behaviour from that of [5, 7], most notably our linearised interfaces appear to remain almost ’flat’.

Changes in the value of \(\lambda \) affect both the depth of the middle fluid layer together with the height of the tank. Figure 9 shows that as the value of \(\lambda \) falls so the top interface begins to assume the shape of the lower interface, as seen in Fig. 9d. This indicates that as \(\lambda \rightarrow 0\) the three-layer problem approaches that of a two-layer case as we almost have two fluids separated by a single interface. However, this hypothesis could not be confirmed by taking \(\lambda \) to very small values, because then proper resolution of the thin middle layer requires increasing numerical resolution.

4 Conclusion

In this paper we have considered the selective withdrawal of a three-layer viscous fluid from a two-dimensional rectangular tank, with the aim of estimating the maximum volume of the most dense fluid that can be drawn from the tank before the undesirable middle transition layer begins to be removed as well. A suite of calculations gives the empirical result that the optimal flow rate occurs when the Froude number is approximately \(F=0.03\) and the drain half-width \(\alpha =1\).

At small Froude number a linearised solution can be developed by treating the pair interfaces as a coupled system; it is comforting that this gives a good description of the flow, at least for early times. After an impulsive start to the draining process, both linearised interfaces were drawn toward line sinks at the bottom of the side wall, with the lower interface more noticeably drawn toward the sink on the base of the tank initially. Travelling waves then propagate along the interfaces towards the tank walls, effectively reversing the drawdown effects. Over time the linearised interface continues to be drawn towards the base of the tank, but it descends at a much slower rate than seen in the corresponding nonlinear solutions; this would be anticipated on physical grounds. We point out that this is in stark contrast to the behaviour observed in two-layer problems [5, 7], when there seems to be no significant difference in the speeds at which the interface moves. We also remark that our calculations comparing two and three layer configurations suggest that inclusion of the third layer can have a surprisingly large effect on withdrawal times and outflow rates.

Nonlinear solutions were obtained using spectral methods. Contour and vorticity plots were employed as visualisation tools for studying the maximum withdrawal of the most dense, lower layer of fluid; the nonlinear predictions were pleasingly in accord with the linearised results at early times. In comparison to analogous two-layer problems, the interfaces of the three-layer system remained quasi-horizontal while drawn down occurred, with the lower interface being drawn out of the lower side wall drains before reaching the line sink on the base of the tank. This behaviour suggests that the addition of a transition layer into a selective withdrawal model might lead to improved quality of extracted fluids which may be significant for various industrial applications such as storm water management [2]. Moreover it was observed that as the Froude number increases so the interfaces are more rapidly drawn toward the line sinks on the lower side walls.

Much of what has been described here provides a foundation for further studies into the withdrawal of liquid from three-layer configurations. While, as expected, some of the properties of the flow are reminiscent of two-layer results, there are important extra features that do not appear to have been noted in the earlier studies. It would be of interest to investigate the robustness of some of these novel structures and ask whether they are inherent three-layer effects, or present only in particular flow regimes. Furthermore, here we have deliberately restricted ourselves to one particular geometrical configuration; can better withdrawal properties result from moving the sinks and sources to more advantageous locations? These, and other related issues, are deferred and await further work.