1 Introduction

The tidal current is the principal movement in most shallow seas. Yet, the time scale of the tidal period is often not of major concern to people dealing with environment-related problems. People tend to pay much more attention to the fate of the pollutants on a time scale of days or even months. As a result, the movement of the tidal frequency needs to be filtered out of the total movement, making the residual current represent the mass transport in an intertidal time scale. In order to eliminate the tidal signal, the early work such as Abbott (1960) used a very direct and simple way by taking just the average of the current velocity over one or several tidal periods at a specific location. The so processed velocity, known as the Eulerian residual velocity (u E ), is still widely used to study the intertidal circulation nowadays (The definitions related to the residual currents used in this paper are summarized in Section 2.1). For example, Huijts et al. (2009) decomposed u E into several terms based on different mechanisms, and Burchard and Schuttelaars (2012) specifically studied in detail the mechanism of the tidal straining effect on u E which was used to represent the estuarine circulation in their study.

In all of these studies, it was implied a priori that u E could represent the circulation on an intertidal time scale, but it turns out that this is not the case. Nihoul and Ronday (1975) deduced the depth-averaged governing equations of u E from a tide-resolving primitive equation model and found that the so-called ’tidal stress’ term is responsible for generating the residual current because of the system’s nonlinearity. Heaps (1978) reexplored this problem and systematically derived the depth-averaged coastal sea circulation equations, which supported the results in Nihoul and Ronday (1975). These studies showed the researchers’ attempts to separate the intertidal residual circulation system from the tidal current system. Feng et al. (1984) expanded this methodology to a 3D baroclinic case and found that an additional term called ’tidal surface source’ exists at the sea surface even with no water supply imposed, which violates the mass conservation law. Moreover, in Fischer et al. (1979), it was found that there must be a tidal dispersion term in the intertidal mass transport equations for the closure of the equations, in which the dispersion coefficient is often of several orders’ variations in different cases.

Another approach to remove the tidal signal to get the coastal sea circulation is to use the definition of the Lagrangian residual current. As a matter of fact, this concept originated from the mass transport velocity (u L ), which was first made related to the large-scale ocean circulation by Longuet-Higgins (1969). He pointed out that the mass transport velocity (u L ) equals the sum of the Eulerian residual velocity (u E ) and the Stokes’ drift velocity (u S ). Zimmerman (1979) loosely defined the Lagrangian residual velocity (u L R ) as the net displacement of a labeled water parcel over one or several tidal periods. Under the weakly nonlinear condition, Feng et al. (1986a) proved rigorously that u L is a first-order approximation to u L R and the second-order of u L R is the Lagrangian residual drift velocity (u l d ), which displayed the Lagrangian nature of u L R . Then in Feng et al. (1986b), u L was used to replace u E to act as the advective velocity in the intertidal transport equation, in which the tidal dispersion term disappears. Feng (1987) deduced the dynamic equations governing u L in a 3D case with the tidal body force appearing in the inter-tidal momentum equations but with the fictitious ’tidal surface source’ in Feng et al. (1984) vanishing to keep the conservation of the mass. u L is also applied to the intertidal mass-transport equation, and the tidal dispersion term in Fischer et al. (1979) disappears naturally. These studies clearly show that u L is the appropriate representative of the residual circulation in tide-dominated shallow seas. A series of studies extended the idea to the study of the wind-driven baroclinic multi-frequency tide-induced system (Feng 1990), the system which takes into account the turbulence closure (Feng and Lu 1993) and the system with a zeroth-order strong background current (Feng and Wu 1995; Feng 1998). Recently, the Lagrangian mean theory without the restriction of the weak nonlinearity was proposed in Feng et al. (2008).

Although the application of the Lagrangian residual velocity to coastal seas is not rare (e.g., Jay and Smith 1990; Foreman et al. 1992; Ridderinkhof and Loder 1994; Delhez 1996; Wei et al. 2004; Hainbucher et al. 2004; Muller et al. 2009), and the dynamical equations proposed in Feng (1987) were also applied successfully under weakly nonlinear conditions (e.g., Dortch et al. 1992; Wang et al. 1993; Cerco and Cole 1993; Cerco 1995), this concept is not widely used in dealing with coastal circulation problems. This may be due to the fact that the residual current is often more than one-order smaller than the tidal current and is often of the order of centimeter per second. It is just of the same order with the measurement error and may be even smaller than the error in numerical modeling. Therefore, the difference between u L and u E cannot be clearly defined in all cases. As a result, the analytical solution becomes very important to the understanding of the mechanisms.

Ianniello (1977) gave the first analytical solution to the residual current in a breadth-averaged narrow tidal bay, with the solution confined to a vertical-longitudinal plane. In his solution, he clearly showed that u E flowed out of the bay at all depths, which indicates that the bay will be empty if u E is assumed to be the intertidal residual velocity, while u L has a two-layer structure with the inflow at the surface and the outflow near the bottom, which ensures the mass conservation. Li and O’Donnell (2005) solved the depth-averaged tidal system analytically by using the Eulerian residual transport velocity (u T ) proposed by Robinson (1983) to describe the intertidal movement. However, u T is different from the mass transport velocity (u L ) defined by Longuet-Higgins (1969). An interesting point is that u L used in Ianniello (1977) is of the same form as u T defined by Robinson (1983), but this is a mere coincidence because under general conditions an additional term is missing for u T , as pointed out in Feng et al. (1986b). Jiang and Feng (2011) proposed and analytically solved the depth-averaged Lagrangian residual current equations, which were the 2D counterpart of the 3D equations established by Feng (1987). This enhances the understanding of the differences between u L , u T , and u E pointed out in Feng et al. (1986b).

It should be noted that u L has a 3D nature (Feng 1987). Because the tidal current is generally of 3D, a water column at the initial time cannot be kept as the same water column during the whole tidal period, which means that the derivation of u L should start from the 3D primitive equations. Winant (2008) first gave the 3D u L in a narrow bay. He acquired u E first and obtained u L by adding up u E and u S following Longuet-Higgins (1969). The results showed that u E violates the mass conservation but u L does not, though Winant (2008) did not point this out explicitly. However, when the residual water transport was studied in Winant (2008), u T was used again which cannot represent the real exchange flow situation.

In the present study, the 3D governing equations for u L are deduced from the 3D primitive equations by applying the perturbation method and are then solved in a narrow bay directly. The feature and generating mechanisms of u L are discussed, and the exchange flow in the bay is obtained from the 3D u L . The structure of the paper is as follows: in Section 2, the formulation of the model is given. The solution procedure of u L is described in Section 3. And in Section 4, the discussion of the solution under several specific bottom profiles is made. Finally, the conclusions are drawn in Section 5.

2 Formulation

2.1 Definitions of residual velocities

As mentioned in the introduction, there are several ways to define the residual current. For clarity, the definitions used in this paper are summarized in Table 1 and more detailed discussion can be found in Jiang and Feng (2011).

Table 1 Symbols for major definitions of the residual current

The Lagrangian residual velocity u L R is loosely defined by Zimmerman (1979) as

$$\mathbf{u_{LR}}=\frac{\boldsymbol{\xi}(t_{0}+nT;\mathbf{x_{0}}, t_{0})}{nT}, $$

where \(\boldsymbol {\xi }(t;\mathbf{x_{0}}, t_{0})= \int_{t_{0}}^{t} \mathbf{u}(\mathbf{x_{0}}+\boldsymbol {\xi }, t^{\prime })dt^{\prime }\) defines the displacement of a water parcel with its initial position at x 0 when t = t 0, u is the tidal current velocity. Because x 0 and t 0 can be arbitrarily selected, u L R is well defined in the whole domain for any time which constitutes a Eulerian field. Thus, u L R is a Eulerian quantity.

In the weakly nonlinear case, the velocity can be expanded into the power series according to a small non-dimensional number κ, i.e.,

$$\mathbf{u}= \mathbf{u_{0}}+ \kappa \mathbf{u_{1}}+O(\kappa^{2})$$

with κ being the ratio of the tidal amplitude to the water depth.

Feng et al. (1986a) proved that

$$\mathbf{u_{LR}}=\mathbf{u_{L}}+O(\kappa), $$
(1)

where the mass transport velocity u L defined by Longuet-Higgins (1969) is

$$\mathbf{u_{L}}=(u_{L}, \upsilon_{L}, w_{L})=\mathbf{u_{E}}+\mathbf{u_{S}}.$$
(2)

The Eulerian residual velocity u E is defined as

$$\mathbf{u_{E}}=(u_{E}, \upsilon_{E}, w_{E})=< \mathbf{u_{1}} >, $$
(3)

and the Stokes’ drift velocity u S is defined as

$$\mathbf{u_{S}}=(u_{S}, \upsilon_{S}, w_{S})=< \boldsymbol{\xi_{0}} \cdot \nabla \mathbf{u_{0}} >, $$
(4)

where the tidal-averaging operator is defined as follows with T being the tidal period:

$$< \cdot > =\frac{1}{nT} \int_{t_{0}}^{t_{0}+nT} \cdot dt, $$
(5)

and

$$\boldsymbol{\xi_{0}}=(\xi_{0}, \eta_{0}, \iota_{0})= \int_{t_{0}}^{t} \mathbf{u_{0}}(\mathbf{x}, t^{\prime})dt^{\prime}.$$
(6)

Thus,

$$\mathbf{u_{0}}=(u_{0}, \upsilon_{0}, w_{0})=\frac{\partial \boldsymbol{\xi}_{0}}{\partial t}.$$
(7)

The definition of the Eulerian residual transport velocity u T is based on the idea that the calculation of the residual transport should take the water surface oscillation into consideration, thus,

$$\mathbf{u_{T}}=< \int_{-h}^{0} \mathbf{u_{1}}dz >+\frac{1}{h}< \mathbf{u_{0}}|_{z=0} \zeta_{0} >, $$
(8)

where ζ 0 is the zeroth-order water elevation and h is the undisturbed water depth.

2.2 The non-dimensional tidal equations

The 3D single frequency (e.g., the M 2 tide) tidal current equations will be solved in a semi-enclosed rectangular bay. The x and y coordinates are along the two horizontal sides of the bay with x = 0 at the open boundary and x = L at the end of the bay. y = 0 and y = B are the two lateral boundaries. z = 0 is set at the surface of the still water, while z = −h is set at the sea bottom. The free surface is at z = ζ(x, y, t) to represent the tidal elevation. The single frequency tidal signal with the period being T and the tidal amplitude being ζ c is imposed at the open boundary and the Coriolis force is omitted in the present study.

In this system, there are five basic characteristic values which are the spatial scales x c = λ c , y c = B, z c = h c , the temporal scale t c = T, and the scale for the tidal amplitude ζ c , with h c being the average depth of the sea area and \(\lambda_{c}=\sqrt {gh_{c}}T\) denoting the typical tidal wavelength.

In this paper, the water density is assumed to be constant to study the barotropic case only. Because the barotropic tidal wave is a long gravity wave, it holds that λ c h c . Then in the vertical direction, the hydrostatic condition is a natural inference. It is also clear that the major balance of the tidal wave system is the local acceleration term and the pressure gradient force term. The 3D non-dimensional governing equations for the tidal wave can be deduced from the normalization of the dimensional equations based on the notion above. The non-dimensional governing equations are

$$\nabla \cdot\mathbf{u}=0$$
(9)
$${\frac{\partial u}{\partial t}} + \kappa \mathbf{u}\cdot\nabla u=-{\frac{\partial { \zeta }}{\partial x}} +\beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial u}{\partial z}}\right)$$
(10)
$$\delta^{2}{\frac{\partial \upsilon}{\partial t}} + \delta^{2} \kappa \mathbf{u}\cdot\nabla \upsilon = -{\frac{\partial { \zeta }}{\partial y}}+\beta \delta^{2}{\frac{\partial}{\partial z}}\left(\nu{\frac{\partial \upsilon}{\partial z}} \right)$$
(11)

At the sea surface, z = κ ζ,

$$w= {\frac{\partial { \zeta }}{\partial t}}+\kappa \left(u{\frac{\partial { \zeta }}{\partial x}}+ \upsilon {\frac{\partial { \zeta }}{\partial y}}\right)$$
(12)
$${\frac{\partial (u, \upsilon )}{\partial z}}=0$$
(13)

At the sea bottom, z = −h,

$$\mathbf{u}=0$$
(14)

At the open boundary, x = 0,

$$\zeta=\zeta_{open}$$
(15)

where t, u = (u, υ, w), ζ and h are the non-dimensional time, the velocity and its components in x, y, and z directions, the sea surface elevation, and the water depth, respectively. L refers to the non-dimensional form of the bay length which is normalized by the tidal wavelength λ c. ζ o p e n denotes the non-dimensional tidal wave imposed at the open boundary. ν = ν(x, y, z) is the non-dimensional eddy viscosity coefficient with ν c being its characteristic value. For brevity, they take the forms identical to their dimensional counterparts. The velocity scales are \(u_{c}=\zeta_{c} \sqrt {g/h_{c}} \), υ c = ζ c B/(h c T c ), and w c = ζ c /T c , respectively.

Three non-dimensional numbers exist in the system, which are \(\beta =\nu_{c}T_{c}/{h^{2}_{c}}\), κ = ζ c /h c , and δ = B/λ c. β reflects the importance of the eddy viscosity force. Since in the shallow sea, the eddy viscosity can not be neglected, \(O\bigl (\beta \bigr )=1\) is assumed in general in the present study. The other two non-dimensional numbers are basic in the whole system. One is κ, the ratio of the tidal amplitude scale (ζ c ) to the depth scale (h c ), which reflects the advective nonlinearity effect in the system, and the other is δ, the aspect ratio, which reflects the asymmetric feature of the horizontal geometry of the sea area.

In the present study, the case for O(κ) < 1 is studied, which means that the tidal motion is of a weakly nonlinear case if the eddy viscosity coefficient is a known value. \(O \bigl (\delta \bigr ) < 1\) is also assumed so that the system describes a weakly nonlinear tide in a narrow bay.

2.3 The perturbation in a narrow bay

In reality, O(κ)=0.1 is very common for a typical bay and O(δ)=0.1 is also not uncommon in bays around the world. Therefore, in the weakly nonlinear case in a narrow bay considered in the present study, κ and δ are two small independent parameters. The perturbation method with two parameters is applied to the system of Eqs. 915.

Since in the system of Eqs. 915, only κ and δ 2 are present, u and ζ can be expressed in terms of a power series in small parameters κ and δ 2 to the order of O(κ δ 2),

$$\mathbf{u}= \mathbf{u_{0}}+\kappa \mathbf{u_{1}}+ \delta^{2} \mathbf{u_{0}^{\prime}}+\kappa \delta^{2} \mathbf{u_{1}^{\prime}}+\boldsymbol{\dotsc}$$
(16)
$${\zeta}= {{\zeta}_{0}}+\kappa {{\zeta}_{1}}+ \delta^{2} {{\zeta}_{0}^{\prime}}+\kappa \delta^{2} {{\zeta}_{1}^{\prime}}+\dotsc$$
(17)

The system of Eqs. 915 can then be decomposed into different subsystems based on the different orders of κ and δ 2.

It should be noticed that at the sea surface z = κ ζ, the velocity u can be expanded in a Taylor series about z = 0. Then, the surface boundary condition Eqs. 12 and 13 can be changed to their equivalent forms at z = 0 after neglecting the high-order terms from the Taylor expansion. If we substitute the perturbation series Eqs. 16 and 17 into them, the surface boundary conditions of different orders can be obtained at z = 0. For brevity, only the equations used in the deduction procedure are listed as follows. All the details of the deduction procedure are supplied in the .

2.3.1 The O(1) order equations

$$\nabla \cdot \mathbf{u_{0}}=0$$
(18)
$$\frac{\partial {u_{0}}}{\partial t}= -{\frac{\partial {\zeta_{0}}}{\partial x}}+\beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {u_{0}}}{\partial z}} \right)$$
(19)
$$0=-{\frac{\partial {\zeta_{0}}}{\partial y}}$$
(20)

At the sea surface, z = 0,

$${w_{0}}={\frac{\partial {\zeta_{0}}}{\partial t}}$$
(21)
$${\frac{\partial {(u_{0}, \upsilon_{0})}}{\partial z}}=0$$
(22)

At the sea bottom, z = −h,

$$\mathbf{u_{0}}=0$$
(23)

At the open boundary, x = 0,

$$\zeta_{0}=\zeta_{open}$$
(24)

2.3.2 The O(κ) order equations

$$\nabla \cdot \mathbf{u_{1}}=0$$
(25)
$$\frac{\partial {u_{1}}}{\partial t}+\mathbf{u_{0}} \cdot \nabla {u_{0}}=-\frac{\partial {\zeta_{1}}}{\partial x}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {u_{1}}}{\partial z}}\right)$$
(26)
$$0=-{\frac{\partial {\zeta_{1}}}{\partial y}}$$
(27)

At the sea surface, z = 0,

$${w_{1}}={\frac{\partial {\zeta_{1}}}{\partial t}}+\frac{\partial {u_{0}}{\zeta_{0}}}{\partial x}+\frac{\partial {\upsilon_{0}}{\zeta_{0}}}{\partial y}$$
(28)
$${\frac{\partial {(u_{1}, \upsilon_{1})}}{\partial z}}= -{\zeta_{0}} \frac{\partial^{2} ({u_{0}}, \upsilon_{0})} { \partial z^{2} }$$
(29)

At the sea bottom, z = −h,

$$\mathbf{u_{1}}=0$$
(30)

At the open boundary, x = 0,

$$\zeta_{1}=0$$
(31)

2.3.3 The O(δ 2) order equations

$${\frac{\partial {\upsilon_{0}}}{\partial t}}=-\frac{\partial {\zeta_{0}^{\prime}}}{\partial y}+ \beta \frac{\partial}{\partial z}\left(\nu \frac{\partial {\upsilon_{0}}}{\partial z}\right)$$
(32)

2.3.4 The O(κ δ 2) order equations

$$\frac{\partial {\upsilon_{1}}}{\partial t}+\mathbf{u_{0}} \cdot \nabla {\upsilon_{0}}=-\frac{\partial {\zeta_{1}^{\prime}}}{\partial y}+\beta \frac{\partial}{\partial z}\left(\nu \frac{\partial {\upsilon_{1}}}{\partial z} \right)$$
(33)

2.4 The deduction of Lagrangian residual circulation equations

The mass transport velocity u L is a first-order accurate approximation to the Lagrangian residual velocity u L R which represents the water parcel’s net transport in one or several tidal periods. The physics of u L is revealed by its governing equations derived by Feng (1987) in general. In this section, the governing equations of u L will be given in a narrow bay. The non-dimensional form of the operator defined in Eq. 5 is listed as follows. It is used in the following part of the paper.

$$< \cdot > =\frac{1}{n} \int_{t_{0}}^{t_{0}+n } \cdot dt, $$
(34)

2.4.1 The continuity equation of u L

If the divergence operator is applied to both sides of Eq. 2 with noticing Eqs. 18 and 25 to get

$$\nabla \cdot \mathbf{u_{L}}= < \frac{\partial \boldsymbol{\xi_{0}}}{\partial x} \cdot \nabla u_{0}>+< \frac{\partial \boldsymbol{\xi_{0}}}{\partial y} \cdot \nabla \upsilon_{0}>+< \frac{\partial \boldsymbol{\xi_{0}}}{\partial z} \cdot \nabla w_{0}>$$
(35)

Because of Eq. 7, the method in Appendix A is applied to Eq. 35 and noticing the periodicity of the zeroth-order variables, Eq. 35 can be changed to

$$\nabla \cdot \mathbf{u_{L}}\, =\, -< \frac{\partial \mathbf{u_{0}}}{\partial x} \cdot \nabla \xi_{0}>\, -\, < \frac{\partial \mathbf{u_{0}}}{\partial y} \cdot \nabla \eta_{0}>\, -\, < \frac{\partial \mathbf{u_{0}}}{\partial z} \cdot \nabla \iota_{0}>$$
(36)

If we add Eqs. 35 and 36 and expand the right-hand side, it can be found that

$$\nabla \cdot \mathbf{u_{L}}=0$$
(37)

2.4.2 The x-direction momentum equation

Equation 34 is applied to Eq. 26, with the periodicity of u 1 taken into consideration and based on the assumption ν = ν(x, y, z), the following equation can be obtained

$$<\mathbf{u_{0}} \cdot \nabla {u_{0}}>=-\frac{\partial <{\zeta_{1}}>}{\partial x}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial <{u_{1}}>}{\partial z}}\right)$$
(38)

According to the definition of u L in Eq. 2, Eq. 38 is changed to

$$\begin{array}{@{}rcl@{}} <\mathbf{u_{0}} \cdot \nabla {u_{0}}>&=&-\frac{\partial <{\zeta_{1}}>}{\partial x}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {u_{L}}}{\partial z}}\right)\\ &&-\beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial <\boldsymbol {\xi_{0}} \cdot \nabla u_{0}>} {\partial z}}\right) \end{array}$$
(39)

Based on the method in Appendix A and Eq. 7, the following relation can be obtained,

$$<\mathbf{u_{0}} \cdot \nabla {u_{0}}>=-<\boldsymbol {\xi_{0}} \cdot \nabla \frac {\partial u_{0}} {\partial t}>$$
(40)

Then Eq. 39 can be written as

$$0=-\frac{\partial {\zeta_{E}}}{\partial x}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {u_{L}}}{\partial z}}\right)+\pi_{1}$$
(41)

where ζ E = <ζ 1>, which is independent of y according to Eq. 27, and

$$\pi_{1} =<\boldsymbol {\xi_{0}} \cdot \nabla \frac {\partial u_{0}} {\partial t}>-\beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial <\boldsymbol {\xi_{0}} \cdot \nabla u_{0}>} {\partial z}}\right)$$
(42)

π 1 is the x-direction tidal body force named in Feng (1987) which is composed of two terms. The first term means the transport of the local inertia, and the other term is the eddy viscosity term of the Stokes’ drift velocity, u S .

2.4.3 The y-direction momentum equation

Equation 34 is applied to Eq. 33 while noticing the periodicity of υ 1 and the assumption ν = ν(x, y, z) to get

$$<\mathbf{u_{0}} \cdot \nabla {\upsilon_{0}}>=-\frac{\partial <{\zeta_{1}^{\prime}}>}{\partial y}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial <{\upsilon_{1}}>}{\partial z}}\right)$$
(43)

According to the definition of υ L in Eq. 2, Eq. 43 can be changed to

$$\begin{array}{@{}rcl@{}} <\mathbf{u_{0}} \cdot \nabla {\upsilon_{0}}>&=&-\frac{\partial <{\zeta_{1}^{\prime}}>}{\partial y}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {\upsilon_{L}}}{\partial z}}\right)\\ &&-\beta {\frac{\partial}{\partial z}} \left(\nu {\frac{\partial < \boldsymbol {\xi_{0}} \cdot \nabla \upsilon_{0} >}{\partial z}} \right) \end{array}$$
(44)

Based on the method in Appendix A and Eq. 7, the following relation can be obtained,

$$<\mathbf{u_{0}} \cdot \nabla {\upsilon_{0}}>=-<\boldsymbol {\xi_{0}} \cdot \nabla \frac {\partial \upsilon_{0}} {\partial t}>$$
(45)

Then Eq. 44 can be written as

$$0=-\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {\upsilon_{L}}}{\partial z}}\right)+\pi_{2}$$
(46)

where \(\zeta_{E}^{\prime }=<\zeta_{1}^{\prime }>\) and

$$\pi_{2} =<\boldsymbol {\xi_{0}} \cdot \nabla \frac {\partial \upsilon_{0}} {\partial t}>-\beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial <\boldsymbol {\xi_{0}} \cdot \nabla \upsilon_{0}>} {\partial z}}\right)$$
(47)

2.4.4 The kinematic boundary condition at the sea surface

When Eq. 34 is applied to Eq. 28 and based on the periodicity of ζ 1, Eq. 21, Eq. 7 and the method in Appendix A, the following equation can be obtained

$$<{w_{1}}> = -\frac{\partial < \xi_{0} w_{0} >}{\partial x} -\frac{\partial < \eta_{0} w_{0}>}{\partial y}$$
(48)

When Eq. 48 is inserted into Eq. 2, using the method in Appendix A repeatedly, the kinematic boundary condition at the sea surface can be obtained by noticing the zeroth-order continuity equation (Eq. 18).

$$\begin{array}{@{}rcl@{}} w_{L} &=& -\left\langle\frac{\partial \xi_{0}}{\partial x} w_{0} \right\rangle -\left\langle\frac{\partial \eta_{0}}{\partial y} w_{0} \right\rangle +\left\langle\frac{\partial w_{0}}{\partial z} \iota_{0} \right\rangle \\ &=& \left\langle\frac{\partial u_{0}}{\partial x} \iota_{0} \right\rangle +\left\langle\frac{\partial \upsilon_{0}}{\partial y }\iota_{0} \right\rangle +\left\langle\frac{\partial w_{0}}{\partial z} \iota_{0} \right\rangle \\ &=&0 \end{array}$$
(49)

2.4.5 The dynamic boundary condition at the sea surface

Equation 34 is applied to Eq. 29 with its right-hand side further manipulated by applying the method in Appendix A repeatedly, and based on Eqs. 182221, and 6, the following can be obtained

$$\begin{array}{@{}rcl@{}} -\frac{\partial^{2}}{\partial z^{2}} \left\langle\zeta_{0} (u_{0}, \upsilon_{0})\right\rangle &=&\frac{\partial^{2}}{\partial z^{2}} \left\langle w_{0}(\xi_{0}, \eta_{0})\right\rangle\\ &=&-\frac{\partial}{\partial z} \left\langle\left(\frac{\partial u_{0}}{\partial x}+\frac{\partial \upsilon_{0}}{\partial y}\right)(\xi_{0}, \eta_{0})\right\rangle\notag\\ &=&-\frac{\partial}{\partial z} \left\langle\boldsymbol{\xi_{0}} \cdot \nabla u_{0}, \boldsymbol{\xi_{0}} \cdot \nabla \upsilon_{0} \right\rangle \end{array}$$
(50)

Then Eq. 29 is changed to

$$\frac{\partial<u_{1}, \upsilon_{1}>}{\partial z} = -\frac{\partial}{\partial z} \left\langle\boldsymbol{\xi_{0}}\cdot \nabla u_{0}, \boldsymbol{\xi_{0}}\cdot \nabla \upsilon_{0}\right\rangle$$
(51)

Based on the definition in Eq. 2, Eq. 51 is changed to

$$\frac{\partial(u_{L}, \upsilon_{L})}{\partial z}=0$$
(52)

2.4.6 The boundary condition at the sea bottom

Because at the sea bottom, z = −h, u 0 = 0, and u 1 = 0, according to Eq. 6, ξ 0 = 0. Therefore, according to the definition in Eq. 2, u L = 0.

2.5 The tide-induced Lagrangian residual current equations

In summary, the tide-induced Lagrangian residual current equations are listed as follows by rewriting Eqs. 3541, and 47 here,

$${\frac{\partial {u_{L}}}{\partial x}}+{\frac{\partial {\upsilon_{L}}}{\partial y}}+{\frac{\partial {w_{L}}}{\partial z}}=0$$
(53)
$$0=-\frac{\partial {\zeta_{E}}}{\partial x}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {u_{L}}}{\partial z}}\right)+\pi_{1}$$
(54)
$$0=-\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}+ \beta {\frac{\partial}{\partial z}}\left(\nu{\frac{\partial {\upsilon_{L}}}{\partial z}}\right)+\pi_{2}$$
(55)

with the boundary conditions specified as follows:

At the surface, z = 0,

$$\, \, \, \, {w_{L}}=0$$
(56)
$${\frac{\partial {u_{L}}}{\partial z}}=0$$
(57)
$${\frac{\partial {\upsilon_{L}}}{\partial z}}=0$$
(58)

At the bottom, z = −h,

$$u_{L}=\upsilon_{L}=w_{L}=0$$
(59)

At the open boundary, x = 0, the residual water elevation ζ E = 0 and \(\zeta_{E}^{\prime }=0\).

At the fixed boundary, because of the no water inflow at the banks of the bay,

$$U_{L}=\int_{-h}^{0}{u_{L}}dz=0, \quad x=L$$
(60)
$$V_{L}=\int_{-h}^{0}{\upsilon_{L}}dz=0, \quad y=0, 1$$
(61)

It can be seen that the governing equations of the Lagrangian residual current are in linear form. The Lagrangian residual current is driven by the tidal body force π = (π 1, π 2) which is defined by the zeroth-order linear tide.

This set of equations clearly shows the dynamics of the tide-induced Lagrangian residual current. Compared with the so-called Eulerian residual velocity, the Lagrangian residual current satisfies the conservation law of the material surface. For example, at the sea surface, there is no fake source/sink term in Eq. 56, while in the case of the Eulerian residual velocity, such a term is inevitable (Feng et al. 1984).

3 The solution to the tide-induced residual current equations

In order to find an analytical solution to the Lagrangian residual current, the eddy viscosity coefficient is assumed to be a constant. Since ν c is the characteristic value of the eddy viscosity coefficient, the non-dimensional ν should be 1. It is assumed that the water depth h varies only with y.

Integrate Eq. 54 from z to 0 first and then from −h to z with noticing the boundary conditions Eqs. 57 and 59, we get

$${u_{L}}=\frac{z^{2}-h^{2}}{2 \beta }\frac{\partial {\zeta_{E}}}{\partial x}+\frac{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{1}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}} { \beta }$$
(62)

Then, the longitudinal volumic transport U L is

$${U_{L}}=\int_{-h}^{0} u_{L} dz=\frac{\Pi_{1}}{ \beta }-\frac{h^{3}}{3\beta }\frac{\partial {\zeta_{E}}}{\partial x}$$
(63)

where

$${\Pi_{1}}=\int_{-h}^{0}{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{1}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}dz}$$
(64)

The same procedure, when applied to Eq. 55, results in

$${\upsilon_{L}}=\frac{z^{2}-h^{2}}{2\beta}\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}+\frac{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{2}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}}{ \beta }$$
(65)

Then, the latitudinal volumic transport V L is

$${V_{L}}=\int_{-h}^{0} \upsilon_{L}dz =\frac{\Pi_{2}} { \beta }-\frac{h^{3}}{3\beta}\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}$$
(66)

where

$${\Pi_{2}}=\int_{-h}^{0}{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{2}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}dz}$$
(67)

When Eq. 53 is integrated from −h to 0 in the vertical direction, taking into account the boundary condition Eqs. 5659, it becomes

$${\frac{\partial {U_{L}}}{\partial x}}+{\frac{\partial {V_{L}}}{\partial y}}=0$$
(68)

The substitution of Eqs. 63 and 66 into Eq. 68 makes,

$${\frac{\partial}{\partial y}}\left(h^{3}{\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}}\right) +h^{3} { \frac{\partial^{2} {\zeta_{E}}} { \partial x^{2} }} -3{\frac{\partial {\Pi_{1}}}{\partial x}} -3{\frac{\partial {\Pi_{2}}}{\partial y}}=0$$
(69)

If Eq. 69 is integrated across the width of the bay, in view of the lateral boundary condition Eq. 61 with the substitution of Eq. 66 into it gives

$$\frac{\partial^{2} {\zeta_{E}}} { \partial x^{2} }=\frac{3{\frac{\partial}{\partial x}}{\int_{0}^{1}}{{\Pi_{1}}dy}} {{\int_{0}^{1}}{h^{3} dy}}$$
(70)

The integration of Eq. 70 from L to x with the boundary condition Eq. 60 with the substitution of Eq. 63 into it gives

$$\frac{\partial {\zeta_{E}}}{\partial x}=\frac{3{\int_{0}^{1}}{{\Pi_{1}}dy}} {{\int_{0}^{1}}{h^{3} dy}}$$
(71)

When Eq. 70 is substituted into Eq. 69 and integrated from 0 to y with the lateral boundary condition Eq. 61 taken into consideration,

$$\frac{\partial {\zeta_{E}^{\prime}}}{\partial y}= \frac {3\left({\Pi_{2}}-\frac{{\frac{\partial}{\partial x}}{\int_{0}^{1}}{{\Pi_{1}}dy}{\int_{0}^{y}}{h^{3} dy}} {{\int_{0}^{1}}{h^{3} dy}}+{\frac{\partial}{\partial x}}{\int_{0}^{y}}{{\Pi_{1}}dy}\right)} {h^{3}}$$
(72)

Then, according to Eqs. 63 and 66, the volumic transport in the x and y directions are

$${U_{L}}=\frac{\Pi_{1}}{ \beta }-\frac{h^{3}{\int_{0}^{1}}{{\Pi_{1}}dy}} {{\beta\int_{0}^{1}}{h^{3} dy}}$$
(73)
$${V_{L}}=\frac{{\frac{\partial}{\partial x}}{\int_{0}^{1}}{{\Pi_{1}}dy}{\int_{0}^{y}}{h^{3} dy}} { \beta {\int_{0}^{1}}{h^{3} dy}} -\frac{{\frac{\partial}{\partial x}}{\int_{0}^{y}}{{\Pi_{1}}dy}}{\beta }$$
(74)

The substitution of Eqs. 71 and 72 into Eqs. 62 and 65 gives

$${u_{L}}=\frac{3(z^{2}-h^{2}){\int_{0}^{1}}{{\Pi_{1}}dy}} {2 \beta {\int_{0}^{1}}{h^{3} dy}} +\frac{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{1}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}} { \beta}$$
(75)
$$\begin{array}{@{}rcl@{}} {\upsilon_{L}}&\, =\, &\frac{3(z^{2}\, -\, h^{2})\left({\Pi_{2}}\, -\, {{\frac{\partial}{\partial x}}{\int_{0}^{1}}{{\Pi_{1}}dy} \frac{{\int_{0}^{y}}{h^{3} dy}} {{\int_{0}^{1}}{h^{3} dy}}}\, +\, {\frac{\partial}{\partial x}}{\int_{0}^{y}}{{\Pi_{1}}dy}\right)}{2 \beta h^{3}}\\ &&+\frac{\int_{-h}^{z}{\int_{{z_{1}}}^{0}{{\pi_{2}}(x, y, {z_{2}})d{z_{2}}}d{z_{1}}}} { \beta } \end{array}$$
(76)

Then the vertical velocity w L can be deduced by inserting Eqs. 75 and 76 into the continuity equation Eq. 53, with the result integrated from −h to z based on the boundary condition Eq. 59 to obtain

$$\begin{array}{@{}rcl@{}} {w_{L}}&=&-\frac{z(z^{2}-3h^{2})}{2 \beta h^{3}}\\ &&\times {\int_{-h}^{0}{\int_{-h}^{z}{\int_{{z_{1}}}^{0}\left[{\frac{\partial {\pi_{1}}(x, y, {z_{2}})}{\partial x}}\, +\, {{\frac{\partial {\pi_{2}}(x, y, {z_{2}})}{\partial y}}}\right]d{z_{2}}}d{z_{1}}}dz}\\ &&+\frac{1}{\beta } {{\int_{z}^{0}}{\int_{-h}^{z}{\int_{{z_{1}}}^{0}\left[{\frac{\partial {\pi_{1}}(x, y, {z_{2}})}{\partial x}}\, +\, {{\frac{\partial {\pi_{2}}(x, y, {z_{2}})}{\partial y}}}\right]d{z_{2}}}d{z_{1}}}dz}\\ &&+ \frac{3z(z^{2}-h^{2})} {2 \beta h^{4}}\frac{\partial h}{\partial y} \left(\!{\Pi_{2}}\, -\, \frac{{\frac{\partial}{\partial x}}({\int_{0}^{1}}{{\Pi_{1}}dy}){\int_{0}^{y}}{h^{3} dy}} {{\int_{0}^{1}}{h^{3} dy}}\, +\, {\frac{\partial}{\partial x}}{\int_{0}^{y}}{{\Pi_{1}}dy}\!\right)\\ &&-\frac{z(z^{2}-h^{2})}{2 \beta h^{2}}\frac{\partial h}{\partial y} \int_{-h}^{0}{{\pi_{2}}(x, y, z)dz} \end{array}$$
(77)

Equations 7377 constitute the 3D LRV solution in a narrow bay, and they are expressed by the zeroth-order solution of the linear tide which is listed in Appendix B.

4 Results and discussions

In order to demonstrate the features of the residual current, two types of topography are used, the exponential type and the parabolic type. The non-dimensional depth profile is as follows

$$exponential: h=[5+10 e^{-(40y-20)^{2}/49}]/8.1$$
(78a)
$$parabolic: h=[10-9(2y-1)^{2}]/7$$
(78b)

In the exponential profile, there is a deep channel in the middle of the bay and a shoal along either bank of the bay. The water depth in the channel decreases sharply before it reaches the shoals. This kind of depth profile can represent the typical topography in an estuary.

For the parabolic topography, no shoals exists along the banks of the bay and the water depth decreases smoothly from the center of the bay towards the banks. This is used as a comparison to the exponential topography.

β = 1 is selected to reflect the fact that the vertical turbulence effect is always present in the zeroth-order basic balance. It is found that the bay length is an important factor in determining the pattern of the residual current(e.g., Li and O’Donnell 2005, Winant 2008 and Jiang and Feng 2011). In the present study, the same conclusion can also be drawn. So the non-dimensional bay length L of 0.3, 1.0, and 1.5 are chosen to reflect the effect of the bay length in the model.

4.1 The 3D structure of the results

4.1.1 The results of the cross section

In a bay with the exponential topography, the solutions of u L for different bay length L are displayed in Fig. 1, which exhibits the u L pattern at different cross sections. For all the cross sections, the magnitude of the first-order LRV is approximately the same, that is of O(1). This reflects the correctness of the nondimensionalization procedure.

Fig. 1
figure 1

The Lagrangian residual current at four cross sections for three different bay lengths with the depth profile being exponential. The contour lines denote the magnitude of the axial velocity u L and the contour interval is 0.1. The axial velocity is negative in the shaded area, which is towards the mouth of the bay. The arrows represents the velocity in y-z plane with the scale at the lower-left corner

It can be seen in all cross sections that the longitudinal current flows towards the head of the bay in the upper part of the deep channel. The area with a positive longitudinal residual velocity at different sections becomes larger and larger from the open boundary of the bay to the head of the bay and in the mean time the speed of the current gets weaker and weaker.

In the shallow part of the bay, that is along both banks of the bay, the first-order LRV is negative when the cross section is less than one wavelength away from the head of the bay. This indicates that the water flows out of the bay through these areas. However, if the cross section is more than 1.1 wavelengths away from the head of the bay, two areas with a positive longitudinal velocity will evolve from both banks of the bay.

The solutions of u L with parabolic cross sections defined in Eq. 78b are displayed in Fig. 2. This cross section is similar to that used in Winant (2008) defined in Eq. 79.

$$h=0.1+0.9(1-y^{2})$$
(79)
Fig. 2
figure 2

As in Fig. 1, but with the parabolic depth profile

Since the nondimensionalization procedure in the present study is different from that in Winant (2008), the pattern of the first-order LRV in Fig. 2 is only similar to Fig. 7 in Winant (2008). However, it can be easily proved that if y ∈ [−1, 1], β = 0.5, and L = 1.5, with the maximum water depth taken as the characteristic depth and the characteristic value of the longitudinal velocity taken as \(L \zeta_{c} \sqrt {g h_{c}}\), then the present solution is the same as that in Winant (2008) neglecting the rotation of the earth (figures are omitted). These two mutually demonstrate the validity of the results without considering the effects of the rotation.

The pattern of the first-order LRV in bays with the parabolic bottom topography displayed in Fig. 2 is generally similar to that in Fig. 1. The water flows in through the upper layer of the central deeper part and flows out at the areas either adjacent to the sea bottom or the bank of the bay. One striking difference occurs near the open boundary when the bay is 1.5 wavelengths long. Almost no inflow area can be found in Fig. 2 near the open boundary as in Fig. 1. This reflects the importance of the shoals along the banks defined in Eq. 78a.

4.1.2 The discussion of w L

The acquisition of w L is important in the study of the sediment transport and ecosystem modeling. Because normally w L is too small to get both in the field research and in numerical modeling, the analytical solution becomes an important method in discussing the upwelling and the downwelling process especially for the residual current study.

It is noticed that the water flows in through the upper half of the deep channel in Fig. 1. In order to keep the mass conservation, the water goes out either through the horizontal circulation or through the vertical circulation. The horizontal circulation was discussed in the above subsection. The vertical circulation seems to have a rather stable feature. The water sinks at the center of the deep channel from the surface down to the bottom as displayed by the arrows in Fig. 1 for different bay lengths and at different depths. On either side of the downwelling area, there exists an upwelling area, which expands from the bottom to the surface and extends to a little more than 0.5 wavelengths from the head of the bay in the longitudinal direction in Fig. 1. In the latitudinal direction, the expansion stops at the distance of 0.1 to 0.4 bay widths away from each bank. Another two upwelling areas also present themselves at the upper half of the water column and are more than 1.2 wavelengths away from the head of the bay in Fig. 1.

If the results of the parabolic depth profile defined in Eq. 78b are compared with those of the exponential bottom profile, it can be found that the depth profile plays an important role in determining the upwelling and downwelling areas. For the parabolic one, the upwelling areas are expanded horizontally to the banks of the bay and vertically to the surface of the water, but are confined within 0.5 wavelengths away from the head of the bay. Another difference between the two depth profiles is that there is no upwelling area near the open boundary in the parabolic bottom case. This shows the importance of the bottom topography.

4.2 The results of the water transport

In a bay or an estuary, the horizontal water transport, i.e., the exchange flow, is important in understanding the environmental problems associated with the water exchange and the mass transport, such as salt, nutrients, or pollutants. Since the 3D Lagrangian residual current is obtained in Section 3, the residual horizontal water transport can be obtained by integrating it across the depth as defined in Eqs. 73 and 74.

4.2.1 The feature of the water transport

The water transport is displayed in Fig. 3 for the exponential cross section. In Fig. 3, it can be obviously seen that the water flows in through the deep channel of the bay until it strikes the head, where the water is split into two branches which flow out along the shoals. However, if the bay is longer than one wavelength, the outflowing water will detach from the bank of the bay and flows towards the deep channel, forming a front with the inward flow in the deep channel. At the outer part of the bay, the water flows in along the banks of the bay and turns towards the deep channel before joining the outflow from the inner bay at around one wavelength away from the head.

Fig. 3
figure 3

The streamline of the depth-integrated Lagrangian residual current in bays with different lengths (a L = 0.3, b L = 1, and c L = 1.5). The depth profile is exponential and the colorbar represents the magnitude

The pattern of the water transport in a bay whose length is shorter than one wavelength is similar to the result in Fig. 8a of Jiang and Feng (2011) when the 2D depth-averaged Lagrangian residual current equations were solved with the linear bottom friction term. However, when the bay is 1.5 wavelengths long, the water transport shows a more complex feature in the outer part of the bay than that in Fig. 8a of Jiang and Feng (2011) but is similar to that in Fig. 3a of Jiang and Feng (2011). If the parabolic depth profile is taken as in Eq. 78b, the transport pattern is simpler than that in Fig. 3 (figures are omitted). For all the bay lengths, the water goes in from the deep channel to the head of the bay and goes back along the banks towards the entrance of the bay. This again demonstrates the importance of the bottom topography.

This transport pattern, however, is contrary to Fig. 4 in Winant (2008), in which the transport result was obtained when f = 0 is assumed, though the solution of the 3D LRV is the same as that described in the previous text in this section. Indeed, the transport obtained according to (35) and (36) in Winant (2008) is the Eulerian residual transport defined by Robinson (1983). It was pointed out in Feng et al. (1986b) theoretically that the Eulerian residual transport is different from the Lagrangian residual transport, the depth-integrated LRV. Therefore, it cannot represent the net transport behavior of the water and the corresponding material in it after removing the tidal effect. Li and O’Donnell (2005) calculated the Eulerian residual transport in a 2D narrow bay, which explains why the similar results are obtained as declared in Winant (2008). Jiang and Feng (2011) solved the depth-averaged LRV equations analytically and after comparing their results with those in Li and O’Donnell (2005), concluded that the Eulerian residual transport is different from the depth-integrated LRV. In this study, the same conclusion can also be reached from a 3D analytical solution. Indeed, this conclusion can also be made if Figs. 4 and 7 in Winant (2008) are examined against each other. According to the distribution of the contour lines in the lower-left figure in Fig. 7 of Winant (2008), the depth-integrated LRV, i.e., the Lagrangian residual transport, should be positive, which is contrary to that in Fig. 4 of Winant (2008). Therefore, the Eulerian residual transport is different from the Lagrangian residual transport and cannot represent the net transport effect after getting rid of the tide.

Fig. 4
figure 4

The water flux a and residence time b along the section of the bay with the depth profile being exponential. All the lines are aligned with each other at x = 1.5 where the head of the bay is located. The tag denotes the length of the bay and is placed near the open boundary of the bay

4.2.2 The effect of the bottom friction

If Eq. 54 is integrated from −h to 0, and the boundary condition at sea surface Eq. 57 is taken into consideration, then

$$0=-h{\frac{\partial {\zeta_{E}}}{\partial x}}- \beta \nu{\frac{\partial {u_{L}}}{\partial z}}|_{z=-h}+\int_{-h}^{0}{{\pi_{1}}dz}$$
(80)

When Eq. 63 is inserted into Eq. 80,

$$\beta \nu \frac{\partial {u_{L}}}{{\partial z}}|_{z=-h}= -\frac{3\beta \nu}{h^{2}}U_{L}-\left(\frac{3{\Pi}_{1}}{h^{2}}+\int_{-h}^{0} \pi_{1} dz\right)$$
(81)

This shows that the bottom friction for u L is in the linear form. Actually, if the zeroth-order tide is examined, the bottom friction is also in the linear form. From Eq. 86 in Appendix B, it can be seen that

$$\begin{array}{@{}rcl@{}} {\frac{\partial {U_{0}} }{\partial z}}{|}_{z=-h} &\, =\, &\frac{i+1}{\sqrt{2\beta \nu}}\tan \left(\frac{(i+1)h}{\sqrt{2\beta\nu}}\right)\\ &&\times\left[\frac{\sqrt{2\beta\nu}}{i+1} \tan\left(\frac{(i+1)h}{\sqrt{2\beta \nu}}\right) -h\right]^{-1}\! \int_{-h}^{0} U_{0} dz\notag\\ \end{array}$$
(82)

This indicates that the vertical shear of the horizontal velocity at the sea bottom is proportional to the depth-integrated velocity. This result may be due to the fact that the eddy coefficient ν is regarded as a constant and this simplification filters out some complexity of the real nature of the Lagrangian residual current.

4.2.3 The water exchange in the bay

Water exchange is one of the important processes governing the environmental problems in a coastal sea, and the tidal effect is always an important factor in determining the water exchange. Since u L is obtained in the present elongated narrow bay, the tide-induced water exchange can be obtained naturally. The water exchange flux can be calculated at each latitudinal cross section by integrating the residual current of either positive or negative values. The water flux calculated on the basis of the positive residual currents is equal in the magnitude but is opposite in signs to the water flux calculated on the basis of their negative counterparts, which again reflects the fact that the mass conservation of the Lagrangian residual current is kept. The residence time of the water is also calculated at each section by dividing the volume of the water between the section and the head of the bay by the water exchange flux.

The water exchange flux and the residence time for different bay lengths ranging from 0.3 to 1.5 wavelengths with 0.1 wavelengths apart are calculated and six of them are plotted in Fig. 4. The heads of the bays are aligned with each other for bays with different lengths. The horizontal coordinate of the leftmost point of each line in Fig. 4 can be used as the indicator of different bay lengths. It can be seen in the upper panel of Fig. 4 that the water exchange flux increases smoothly with the distance away from the head of the bay and the increasing trend becomes sharpen at around one wavelength away from the head of the bay. The water exchange flux is also related to the length of the bay. In the present case, the water exchange flux increases with the bay length if the latter is less than around 0.8 wavelengths. If the bay is longer than 0.9 wavelengths long, the water exchange flux will decrease with the bay length. This feature is different from that in a 2D model in Jiang and Feng (2011), which demonstrates the Lagrangian residual currents’ 3D nature and its complex 3D feature.

The residence time shown in the lower panel of Fig. 4 exhibits a similar feature in accordance with the water exchange flux, but the change of the residence time along the bay displays a prominent point at around one wavelength away from the head of the bay. This point is determined by the corresponding point in the water exchange flux line. This means that two separate systems of u L occur with the separating point at around one wavelength away from the head of the bay, which is also noted in the previous section of the present paper.

4.3 The results of the breadth-averaged currents

In a narrow bay or an estuary, the circulation in the longitudinal-vertical section is important to the transport of the materials. The breadth-averaged model is a classical simplification when studying the estuary circulation, e.g., the analytical study by Ianniello (1977). But this kind of simplification ignored the lateral variation of the depth profile. In the present study, 3D u L is obtained directly with taking into consideration of the lateral variation of the topography. Then, the 3D u L can be averaged across the bay to get the breadth-averaged residual current. The results are compared with those in Ianniello (1977), and the effects of the lateral variation of the sea bottom are discussed between flat and non-flat bottom.

4.3.1 The flat bottom

The breadth-averaged u L in a flat bottom bay is displayed in Fig. 5 for different bay lengths. It can be found that the water flows in at the upper half of the bay and turns back at the lower half, which is just contrary to the gravitational flow in an estuary. The speed of the current is higher at the open mouth of the bay than inside the bay. The pattern remains the same with different bay lengths. The results are in accordance with those in Ianniello (1977).

Fig. 5
figure 5

The streamline of the breadth-averaged Lagrangian residual current in bays with different lengths (a L = 0.3, b L = 1, and c L = 1.5). The depth profile is flat and the colorbar represents the magnitude

4.3.2 The non-flat bottom

Normally, the bottom of a bay cannot be flat and the results show different features in such non-flat bottom conditions. The breadth-averaged u L in a bay with the exponential bottom profile as that in Eq. 78a is shown in Fig. 6. The pattern shown in Fig. 6 is different from that in Fig. 5, the flat bottom case. It can be seen in Fig. 6b, c that an anti-clockwise gyre exists in the inner part of the bay. At the surface, the gyre extends to the point where it is 0.8 wavelengths away from the head of the bay. In the vertical direction, the gyre does not occupy the whole water column but stops at around 0.1 water depth above the bottom. In the outer part of the bay, there is a clockwise semi-gyre, which intrudes into the bay and squeezes the inner gyre before submerging beneath it. In Fig. 6a, because the bay length is less than 0.8 wavelengths, only two semi-gyres exist. Therefore, in the area which is less than 0.8 wavelengths away from the head, the water flows out of the upper layer of the bay, which will enhance the gravity flow if fresh water is discharged from the head of the bay. Then, the water goes downward and flows inside at the near bottom layer. However, in the outer part of the bay, the water flows inside at the surface layer and flows outside at the bottom layer, similar to the pattern shown in Fig. 5. It should be noticed that there is always an outward flow at the bottom.

Fig. 6
figure 6

As in Fig. 5, but with the exponential depth profile

The pattern of the breadth-averaged u L for the parabolic profile Eq. 78b is also studied (figures are omitted). Because the parabolic bottom is flatter than the exponential bottom, the result is more like that in Fig. 5. The clockwise semi-gyre occupies almost the whole section with a small anti-clockwise gyre huddled at the inner surface corner of the bay. Therefore, the results in Ianniello (1977) are valid only when the bottom profile is flat. When it is in a complex form, the breadth-averaged LRV becomes complex accordingly.

4.4 The contribution from each component

In Eqs. 54 and 55, π = (π 1, π 2) is the force to generate the residual current caused by the tidal movement, which was called the tidal body force in Feng (1987). Based on the different dynamic features, the tidal body force can be decomposed into three components, which are π N = (π N1, π N2), the inviscid term, π b = (π b1, π b2), the bottom friction related term, and π ν = (π ν1, π ν2), the turbulent viscosity related term, respectively. The expression for them is in Appendix C and D, and the detailed decomposition procedures are described in the supplementary material. The set of the residual current equations (Eqs. 5361) describes a linear system, so each component of π can act separately. The contribution of each component to the depth-integrated and breadth-averaged residual currents is discussed as follows.

4.4.1 The contribution to the depth-integrated currents

It can be seen that the depth-integrated π drives the depth-integrated residual currents directly if Eqs. 54 and 55 are integrated from the bottom to the surface. It can be seen in Fig. 7 that the depth-integrated residual currents driven by each of the three components have a rather stable pattern.

Fig. 7
figure 7

The streamline of the depth-integrated Lagrangian residual current driven by each component of the tidal body force (a π b , b π N , and c π ν ). The depth profile is exponential and the colorbar represents the magnitude

Among the three components, π b is the dominant one, and the pattern of the residual currents is mostly determined by it. According to the expression of π b , its value at the bottom alone contributes to the depth-integrated residual currents. It is shown in Fig. 7 that the water goes in from the deep channel till the head of the bay. Then, the water is split into two branches before returning towards the head of the bay along the banks. After that, it encounters two reversing gyres, detaches from the banks, and flows out of the bay at the slope of the channel. In the case of the parabolic bottom profile, the reversing gyres stay at the corner of the outer part of the bay (the figure is omitted). This reflects its sensitivity to the bottom topography.

The general pattern of the residual currents driven by π N is similar to that driven by π. The water goes in from the deep part and goes out from the shallow part. But the residual currents driven by π N is smoother than those of the other two components.

The residual currents driven by π ν is generally reverse to the other two and the total one. The water goes out from the deep channel till the head of the bay. Two gyres of 0.9 wavelengths long exist at the inner part of the bay. Two semi-gyres with opposite direction exist at the outer half of the bay. The water goes in along the banks of the bay and is compressed by the two inner gyres to formulate two intrusion gyres. The velocity is higher at the open boundary of the deep channel. But, in general, the value is small, and this may hint that the detailed structure of the eddy viscosity is not important to the residual transport circulation.

4.4.2 The contribution to the breadth-averaged currents

The three components of the tidal body force also play different roles in the breadth-averaged Lagrangian residual currents displayed in Fig. 8. The component driven by π b always goes in at the surface and goes out at the bottom, no matter what the bottom topography is like. The component driven by π ν dominates the general pattern. The result in Fig. 8c looks similar to that in Fig. 6c, but there is a difference in the location of the contacting line between the two gyres, with the line in Fig. 6c stretching further into the bay.

Fig. 8
figure 8

As in Fig. 7, but for the breadth-averaged Lagrangian residual current

The component driven by π N is sensitive to the bottom topography, and the results are totally different between the flat and non-flat bottom profiles. When the bottom is not flat, the currents caused by π N will go out at the surface and go in at the bottom, with the direction of the residual current components opposite to the direction of those driven by π b and π ν .

5 Conclusions

In this paper, the governing equations for the 3D mass transport velocity (u L ), the first-order approximation of the Lagrangian residual velocity, are deduced by the perturbation method. This set of equations defines an independent system on an intertidal time scale, with the tidal effect reflected in the tidal body force. The analytical solution to u L is given in a narrow bay in this paper, and the results for several bottom profiles are presented.

The results show clearly the 3D structure of u L . The water flows in through the deep channel from the open boundary directly to the head of the bay. The inflow does not expand to the whole water column, but occupies the upper half of the water only, and the inflow layer becomes thicker when it approaches the head of the bay. When the inflow reaches the head of the bay, the water will be squeezed to the bottom and the two sides of the bay. This makes the water flow out of the bay through the layer just above the bottom. However, when the bay with shoals is longer than one wavelength, there are also inflows from the shoal area at the outer bay which is more than one wavelength away from the head.

If the results are integrated vertically, the intertidal water transport can be obtained. An obvious feature is that the water flows in at the deep bay until it strikes the head of the bay and flows out along the two banks within one wavelength away from the head of the bay. If the bay length is greater than one wavelength, the outward flow detaches from the banks from the point more than one wavelength away from the head and goes out at the slope with two branches of water flowing in along the banks. This pattern is generally similar to the results in Jiang and Feng (2011) in which the 2D depth-averaged Lagrangian residual current equations were solved. It can be found that in the present 3D case when the vertical eddy viscosity is assumed as a constant, the bottom friction is proportional to the depth-integrated velocity. This may explain the similarity. However, the disappearance of the two small gyres in Jiang and Feng (2011) may be due to the vertical movement in the 3D case.

The water exchange flux is then calculated in this paper. It can be found that the water exchange flux increases smoothly with the distance to the head of the bay increasing until about one wavelength away from the head, and the water exchange flux is also related to the bay length. In the present case, the water exchange flux increases with bay length until the bay length reaches around 0.8 wavelengths before the trend reverses. This feature is different from that in a 2D model in Jiang and Feng (2011), which further demonstrates the Lagrangian residual currents’ 3D nature and its complex 3D feature. However, as far as the residence time is concerned, another feature can be detected. Generally, the residence time increases with the distance away from the head of the bay, but when the distance is more than one wavelength, the residence time decreases with the distance away from the head of the bay. The relationship between the residence time and the bay length is in accordance with the relationship between exchange flux and the bay length. When the bay length is around 0.8 wavelengths, the residence time is the smallest.

In the vertical direction, the downwelling area covers most of the bay. In the deep channel area, in particular, the water sinks down to the bottom. The upwelling area is centered around the deep channel with two sub-areas near the head of the bay and another two near the open boundary when the bay length is greater than one wavelength.

As to the breadth-averaged Lagrangian residual current, if a flat bottom profile is assumed, the feature is the same as that in Ianniello (1977), which is against the traditional density gradient flow. On the other hand, if the bottom profile is non-flat, one may find that the pattern is dependent on the bay length. In the inner bay which is within 0.8 wavelengths, the surface flow is outward as the density gradients flow, while in the outer bay it is again contrary to that of the density gradient flow.

The tidal body force can be divided into three terms, which are π N , the inviscid term, π b , the bottom friction related term, and π ν , the turbulent viscosity-related term. It is found that the depth-integrated LRV is mainly determined by π b , the bottom friction-related term and the breadth-averaged LRV are mainly determined by the π ν , the turbulent viscosity-related term.