Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

The numerical solution of the incompressible Navier-Stokes equations requires appropriate spatial and temporal discretisation methods. For the spatial discretisation we consider a finite volume method (FVM), in which the conservation laws are integrated over a disjoint set of control volumes. The resulting semi-discrete conservation laws require fluxes which need to be approximated at the interfaces of the control volumes. Standard methods for the approximation of the fluxes include the central difference (CD) and upwind (UW) approximations. These methods are a consequence of two limit case solutions, i.e., the CD method results from the no-flow solution whereas the UW method corresponds to inviscid flow. This issue can be resolved if we use the exponential/hybrid scheme (as described in [1]), in which the flux approximation is based on the local balance of the convective and viscous forces, given by the solution of a homogeneous local BVP. The exponential scheme can be further extended by including the pressure gradient, the gradient of the transverse flux or the cross-flux and the time derivative of the velocity components as source terms in the local BVP. In this contribution we restrict ourselves to the steady computation of the flux and consider only the effects of including the pressure gradient and the gradient of the cross-flux.

Our objective in this paper is to formulate a flux approximation scheme, such that the computed numerical flux not only depends on the convective and viscous forces, but also includes the effects of the source terms affecting the fluid flow. Such a scheme should provide a flux approximation which is locally consistent with the corresponding conservation law. Our scheme is inspired by the complete flux-scheme for the convection-diffusion-reaction equation described in [2], in which an integral representation for the flux is derived using local BVPs for the entire equation, including the source term. In [3, 4] we have presented a similar method for the computation of the interface velocities required in the discrete convective terms using local BVPs, including the pressure gradient and the gradient of the cross-flux in the source term.

In this contribution we consider the case of two-dimensional flow. In Sect. 2 we outline the underlying FVM. Section 3 gives the integral representations of the fluxes as well as the closure of the flux scheme. In Sect. 4 we use the flux scheme to simulate flow in a lid-driven square cavity and compare the flux scheme with the CD scheme and the benchmark results. Finally, we end with a summary and concluding remarks in Sect. 5.

2 Finite Volume Method

In this section we briefly outline the FVM for the incompressible Navier-Stokes equations. Consider the two-dimensional incompressible Navier-Stokes equations

$$\displaystyle{ \nabla \boldsymbol{\cdot }\boldsymbol{ u} = 0, }$$
(1a)
$$\displaystyle{ \boldsymbol{u}_{t} + \nabla \boldsymbol{\cdot }\big (\boldsymbol{u}\boldsymbol{u} -\epsilon \nabla \boldsymbol{u}\big) = -\nabla p, }$$
(1b)

where \(\boldsymbol{u} = u\boldsymbol{e}_{x} + v\boldsymbol{e}_{y}\) is the flow velocity, p is the kinematic pressure and ε = 1∕Re, with Re being the Reynolds number of the flow. For the spatial discretisation we use a staggered grid configuration as shown in Fig. 1. We have different control volumes for the discretisation of the u- and v-momentum equations. We express equation (1b) component-wise, as

$$\displaystyle{ u_{t} + \nabla \boldsymbol{\cdot }\boldsymbol{ f}^{u} = -\nabla \boldsymbol{\cdot } (\,p\,\boldsymbol{e}_{ x}),\quad \Big(\boldsymbol{f}^{u}:= (u^{2} -\epsilon u_{ x})\boldsymbol{e}_{x} + (uv -\epsilon u_{y})\boldsymbol{e}_{y}\Big), }$$
(2a)
$$\displaystyle{ v_{t} + \nabla \boldsymbol{\cdot }\boldsymbol{ f}^{v} = -\nabla \boldsymbol{\cdot } (\,p\,\boldsymbol{e}_{ y}),\quad \Big(\boldsymbol{f}^{v}:= (uv -\epsilon v_{ x})\boldsymbol{e}_{x} + (v^{2} -\epsilon v_{ y})\boldsymbol{e}_{y}\Big). }$$
(2b)
Fig. 1
figure 1

(a ) The staggered grid for the spatial discretization. (b ) A control volume Ω i+1∕2, j u for the spatial discretisation of the u-momentum equation

Integrating equation (2a) over a control volume Ω u and applying Gauss’ theorem we get

$$\displaystyle{\int _{\varOmega ^{u}}u_{t}\,\mathrm{d}A +\oint _{\partial \varOmega ^{u}}\boldsymbol{f}^{u}\boldsymbol{ \cdot }\boldsymbol{ n}\,\mathrm{d}s = -\oint _{ \partial \varOmega ^{u}}p\,\boldsymbol{e}_{x}\boldsymbol{ \cdot }\boldsymbol{ n}\,\mathrm{d}s,}$$

where \(\boldsymbol{n}\) is the outward unit normal vector to the boundary ∂ Ω u. This integral form of the conservation law can be approximated over the control volume Ω i+1∕2, j u shown in Fig. 1 using the mid-point rule as follows:

$$\displaystyle{ \begin{array}{rl} \varDelta y\,\big(\,f_{i+1,j}^{u,x} - f_{i,j}^{u,x}\big)+&\varDelta x\,\big(f_{i+1/2,j+1/2}^{u,y} - f_{i+1/2,j-1/2}^{u,y}\big) = \\ & -\varDelta y\big(p_{i+1,j} - p_{i,j}\big) -\varDelta x\,\varDelta y\,(u_{t})_{i+1/2,j},\end{array} }$$
(3)

where f u, x: = u 2ε u x , f u, y: = uvε u y and f i, j u, x ≈ f u, x(x i , y j ). Similarly, equation (2b) can be discretised over the control volume Ω i, j v as:

$$\displaystyle{ \begin{array}{rl} \varDelta y\,\big(\,f_{i+1/2,j+1/2}^{v,x}-&f_{i-1/2,j+1/2}^{v,x}\big) +\varDelta x\,\big(f_{i,j+1}^{v,y} - f_{i,j}^{v,y}\big) = \\ & -\varDelta x\big(p_{i,j+1} - p_{i,j}\big) -\varDelta x\,\varDelta y\,(v_{t})_{i,j+1/2},\end{array} }$$
(4)

with f v, x: = uvε v x and f v, y: = v 2ε v y .

We begin with the approximation of the flux f i+1, j u, x using the quasi-one-dimensional formulation of equation (2a), i.e.,

$$\displaystyle{ (\,f^{u,x})_{ x} = s,\quad \quad \big(s:= -p_{x} - (f^{u,y})_{ y} - u_{t}\big). }$$
(5)

Restricting the above equation to the interval x ∈ [x i+1∕2, x i+3∕2] and y = y j , the boundary conditions read

$$\displaystyle{u(x_{i+1/2},y_{j}) = u_{i+1/2,j},\quad u(x_{i+3/2},y_{j}) = u_{i+3/2,j}.}$$

The term s acts as the source term for the flux f u, x, giving the forces driving the flux. We have included the inertial term u t in the source term. However, in this contribution we focus on the steady computation of the fluxes, i.e., u t  = 0.

The components of the fluxes \(\boldsymbol{f}^{u}\) and \(\boldsymbol{f}^{v}\) are nonlinear, thereby making the local BVPs nonlinear. The flux components are linearised using the interface velocities which are computed at the interface of the control volume. For example, the nonlinear term u 2 in f u, x is linearised as Uu, where U is the approximation of the interface velocity. The details regarding the iterative computation of the interface velocities using local BVPs are given in [3, 4]. Thus, for the approximation of the flux f i+1, j u, x we solve the linearised local BVP

$$\displaystyle{ (Uu -\epsilon u_{x})_{x} = -p_{x} - (f^{u,y})_{ y},\quad \quad x \in [x_{i+1/2},x_{i+3/2}],\;y = y_{j}, }$$
(6a)
$$\displaystyle{ u(x_{i+1/2},y_{j}) = u_{i+1/2,j},\quad u(x_{i+3/2},y_{j}) = u_{i+3/2,j}. }$$
(6b)

In the next section we give the details regarding the solution of the above local BVP.

3 Integral Representation of the Fluxes

The flux approximation scheme is based on the computation of the flux for the scalar advection-diffusion-reaction equation as described in [2]. The model equation is given by φ t + (a φε φ x ) x  = s, where the scalar flux is defined as f = aφεφ x , φ being the unknown quantity. We outline the computation of the scalar flux using a local BVP and then extend the scheme to the Navier-Stokes equations. The computation of the flux f i+1 at the cell edge \(x_{i+1} = \tfrac{1} {2}(x_{i+1/2} + x_{i+3/2})\) is based on the following model BVP:

$$\displaystyle{ (a\,\varphi -\epsilon \,\varphi _{x})_{x} = s,\quad x_{i+1/2} < x < x_{i+3/2}, }$$
(7a)
$$\displaystyle{ \varphi (x_{i+1/2}) =\varphi _{i+1/2},\quad \varphi (x_{i+3/2}) =\varphi _{i+3/2}. }$$
(7b)

For the solution of the above local BVP we need the following variables:

$$\displaystyle{\lambda:= \dfrac{a} {\epsilon },\;\,P:=\lambda \varDelta x,\;\,\varLambda (x):=\int _{ x_{i+1}}^{x}\lambda (\xi )\mathrm{d}\xi,\;\,S(x):=\int _{ x_{i+1}}^{x}s(\xi )\mathrm{d}\xi,}$$

with Δ x = x i+3∕2x i+1∕2 and where P is the (grid) Péclet number. From [2], we get that the flux f i+1 is the sum of a homogeneous (f h) and an inhomogeneous (f i) part, i.e.,

$$\displaystyle{ f_{i+1} = f_{i+1}^{\mathrm{h}} + f_{ i+1}^{\mathrm{i}}, }$$
(8a)
$$\displaystyle{ f_{i+1}^{\mathrm{h}} =\Big (e^{-\varLambda _{i+1/2} }\varphi _{i+1/2} - e^{-\varLambda _{i+3/2} }\varphi _{i+3/2}\Big)/\int _{x_{i+1/2}}^{x_{i+3/2} }\epsilon ^{-1}e^{-\varLambda }\mathrm{d}x, }$$
(8b)
$$\displaystyle{ f_{i+1}^{\mathrm{i}} = -\int _{ x_{i+1/2}}^{x_{i+3/2} }\epsilon ^{-1}e^{-\varLambda }S\,\mathrm{d}x\,/\int _{ x_{i+1/2}}^{x_{i+3/2} }\epsilon ^{-1}e^{-\varLambda }\mathrm{d}x. }$$
(8c)

For the incompressible Navier-Stokes equations, we first linearise the flux component f u, x by defining \(\tilde{f}^{u,x} = Uu -\epsilon u_{x}\), which can be computed using the model BVP (7). In the following we restrict ourselves to the approximation of the linearised flux \(\tilde{f}^{u,x}\). Now, the source term is given by s = −p x − (f u, y) y . To simplify the computation of the inhomogeneous part, we make the following assumptions for the source term:

  1. 1.

    Pressure gradient: The pressure p is taken to be piecewise linear, consequently the pressure gradient is piecewise constant, given by its CD approximation:

    $$\displaystyle{ p_{x}(x,y_{j}) \approx \left \{\begin{array}{@{}l@{\quad }l@{}} (\delta _{x}p)_{i+1/2,j} = \frac{1} {\varDelta x}(p_{i+1,j} - p_{i,j}),\quad \quad &x_{i+1/2} \leq x \leq x_{i+1}, \\ (\delta _{x}p)_{i+3/2,j} = \frac{1} {\varDelta x}(p_{i+2,j} - p_{i+1,j}),\quad \quad &x_{i+1} < x \leq x_{i+3/2}.\end{array} \right. }$$
  2. 2.

    Cross-flux gradient: the gradient of the cross-flux (f u, y) y is taken to be piecewise constant, given by the CD approximation:

    $$\displaystyle{ (\,f^{u,y})_{ y}(x,y_{j}) \approx \left \{\begin{array}{@{}l@{\quad }l@{}} C_{i+1/2,j}^{u},\quad x_{i+1/2} \leq x \leq x_{i+1},\quad \\ C_{i+3/2,j}^{u},\quad x_{i+1} < x \leq x_{i+3/2},\quad \end{array} \right. }$$

    with

    $$\displaystyle{C_{i+1/2,j}^{u} = \dfrac{1} {\varDelta y}\Big(F_{i+1/2,j+1/2}^{u,y} - F_{ i+1/2,j-1/2}^{u,y}\Big),}$$

    F u, y being the numerical approximation of the linearised flux component \(\tilde{f}^{u,y}\).

From the above we get that s is piecewise constant over the domain making S piecewise linear. Moreover, we also have that U and ε are constants on the domain x i+1∕2 < x < x i+3∕2. Thus, evaluating expressions (8b) and (8c), we get that F i+1, j u, x, is given by

$$\displaystyle{ F_{i+1,j}^{u,x} = F_{ i+1,j}^{u,x,\mathrm{h}} + F_{ i+1,j}^{u,x,\mathrm{i}}, }$$
(9a)
$$\displaystyle{ F_{i+1,j}^{u,x,\mathrm{h}} = \dfrac{\epsilon } {\varDelta x}\big(B(-P^{u})u_{ i+1/2,j} - B(P^{u})u_{ i+3/2,j}\big), }$$
(9b)
$$\displaystyle{ F_{i+1,j}^{u,x,\mathrm{i}} =\varDelta x\big(W(-P^{u})s_{ i+1/2,j} - W(P^{u})s_{ i+3/2.j}\big), }$$
(9c)

where P u = U Δxε and

$$\displaystyle{B(z):= \frac{z} {e^{z} - 1},\quad W(z):= \frac{e^{z/2} - 1 - z/2} {z(e^{z} - 1)}.}$$

We further split the inhomogeneous part into terms depending on the gradient of the cross-flux term (F u, x, c) and the pressure gradient (F u, x, p), using s i+1∕2, j  = −(δ x p) i+1∕2, j C i+1∕2, j u in equation (9c).

Thus, we have computed the numerical flux F i+1, j u, x as the sum of a homogeneous and an inhomogeneous part using local BVPs. Observe that the homogeneous flux component can be expressed as a weighted mean of the CD flux (F cd) and the UW flux (F uw) as follows

$$\displaystyle{ F^{\mathrm{h}} =\big (1 - A(\vert P^{u}\vert )\big)F^{\mathrm{uw}} + A(\vert P^{u}\vert )F^{\mathrm{cd}}, }$$
(10)

where A(z) is a weight function defined as A(z): = 2(1 − B(z))∕z. Figure 2 for the function A(z), shows that for diffusion dominated flows (P u → 0), the homogeneous scheme reduces to the CD scheme, whereas for convection dominated flows ( | P u | ≫ 1), it reduces to the UW scheme. Analogously, the discrete source terms s i+1∕2, j and s i+3∕2, j involved in the inhomogeneous part have equal contributions, when the Péclet number is zero. For higher Péclet numbers the upwind source term has a larger contribution to the inhomogeneous flux part (Fig. 2).

Fig. 2
figure 2

Plots of the functions (a ) A( | z | ), (b ) W(z) with varying Péclet numbers

3.1 Closure of the Scheme

So far we have derived an expression for the approximation of the flux component F i+1, j u, x. For the semi-discrete momentum equation (3) we also need to approximate the cross-flux f u, y. For the closure of the scheme we restrict ourselves to the homogeneous flux part for the cross-flux component. Thus, the flux f i+1∕2, j+1∕2 u, y is computed from the local BVP :

$$\displaystyle{ (V u -\epsilon u_{y})_{y} = 0,\quad x = x_{i+1/2},\,\,y_{j} \leq y \leq y_{j+1}, }$$
(11a)
$$\displaystyle{ u(x_{i+1/2},y_{j}) = u_{i+1/2,j},\quad u(x_{i+1/2},y_{j+1}) = u_{i+1/2,j+1}, }$$
(11b)

where V is the estimate of the interface velocity at (x i+1∕2, y j+1∕2). On solving the above homogeneous local BVP we find that the flux is given by :

$$\displaystyle{F_{i+1/2,j+1/2}^{u,y} = \frac{\epsilon } {\varDelta y}\big(B(-P^{v})u_{ i+1/2,j} - B(P^{v})u_{ i+1/2,j+1}\big),\;\,\Big(P^{v} = V \varDelta y/\epsilon \Big).}$$

Similarly, the fluxes and the cross-fluxes in equation (4) are also computed from local BVPs. The flux f i, j+1 v, y is computed using the inhomogeneous local BVP :

$$\displaystyle{ (V v -\epsilon v_{y})_{y} = -(\delta _{y}p) - (f^{v,x})_{ x},\quad x = x_{i},\;y_{j+1/2} \leq y \leq y_{j+3/2}, }$$
(12a)
$$\displaystyle{ v(x_{i},y_{j+1/2}) = v_{i,j+1/2},\quad v(x_{i},y_{j+3/2}) = v_{i,j+3/2}, }$$
(12b)

for which expressions analogous to (9) can be derived. Again, for the computation of the cross-flux f i+1∕2, j+1∕2 v, x we solve the homogeneous local BVP :

$$\displaystyle{ (Uv -\epsilon v_{x})_{x} = 0,\quad x_{i} \leq x \leq x_{i+1},y = y_{j+1/2}, }$$
$$\displaystyle{ v(x_{i},y_{j+1/2}) = v_{i,j+1/2},\quad v(x_{i+1},y_{j+1/2}) = v_{i+1,j+1/2}. }$$

In the following section we test the flux schemes described in this section for the lid-driven flow.

4 Numerical Results

In this section we apply the flux schemes to the flow in a lid-driven cavity, in order to assess the accuracy of the scheme. The lid-driven cavity flow is well suited to investigate the effects of including the cross-flux term in the source term. We use the results from Ghia-Ghia-Shin [5] as the reference. Figures 3 and 4 show the u-velocity profile along the vertical center-line of the cavity. In Fig. 3 we compare the homogeneous flux scheme, the 1-D flux scheme (including the pressure-gradient as the source term), and the 2-D flux scheme (including both cross-flux and the pressure-gradient), computed on a coarse 20 × 20 grid, with the finer grid (128 × 128) Ghia-Ghia-Shin solution for Re = 100. Since the pressure gradient is practically zero across the domain, we do not see much difference between the homogeneous and the 1-D flux scheme. However the inclusion of the cross-flux term in the source term gives us a higher accuracy.

Next, we compare the flux scheme with the CD scheme for Re = 400, (see Fig. 4). Again we compare the coarse-grid solution (20 × 20) with the Ghia-Ghia-Shin results. We can observe that the flux schemes exhibit higher accuracy compared to the CD scheme. The difference between the flux schemes becomes very small, with the 2-D flux scheme still being more accurate than the others though.

Fig. 3
figure 3

u-velocity profiles along the vertical centerline of the cavity for Re = 100

Fig. 4
figure 4

u-velocity profiles along the vertical centerline of the cavity for Re = 400

5 Conclusion

In the preceding sections we presented methods for the approximation of the fluxes derived from local BVPs. The computed flux is the sum of a homogeneous and an inhomogeneous part. The homogeneous part is a weighted mean of the UW and CD scheme and the inhomogeneous part depends on the source term in the BVP, i.e., the pressure-gradient and the cross-flux gradient. The inclusion of the source terms provides higher accuracy to the flux approximation schemes, as observed from the case of lid-driven cavity flow.

The scheme can be further extended by including the time derivative of the velocity-component in the source term in the local BVP for the flux computation, giving the transient flux scheme (TFS). The TFS combined with implicit Runge-Kutta methods, should provide an accurate temporal discretisation method.