A fully semi-Lagrangian discretizationfor the 2D Navier–Stokes equationsin the vorticity–streamfunction formulation

A fully semi-Lagrangian discretization
for the 2D Navier–Stokes equations
in the vorticity–streamfunction formulation

Luca Bonaventura,  Roberto Ferretti,
Lorenzo Rocchi
Abstract

A numerical method for the two-dimensional, incompressible Navier–Stokes equations in vorticity–streamfunction form is proposed, which employs semi-Lagrangian discretizations for both the advection and diffusion terms, thus achieving unconditional stability without the need to solve linear systems beyond that required by the Poisson solver for the reconstruction of the streamfunction. A description of the discretization of Dirichlet boundary conditions for the semi-Lagrangian approach to diffusion terms is also presented. Numerical experiments on classical benchmarks for incompressible flow in simple geometries validate the proposed method.

MOX – Modelling and Scientific Computing,

Dipartimento di Matematica, Politecnico di Milano

Via Bonardi 9, 20133 Milano, Italy

luca.bonaventura@polimi.it

Dipartimento di Matematica e Fisica

Università degli Studi Roma Tre

L.go S. Leonardo Murialdo 1, 00146, Roma, Italy

ferretti@mat.uniroma3.it, lor_89@fastwebnet.it

Keywords: Semi-Lagrangian methods, Advection–diffusion equations, Navier–Stokes equations, vorticity–streamfunction formulation.

AMS Subject Classification: 35L02, 65M60, 65M25, 65M12, 65M08

1 Introduction

Over the last 30 years, Semi-Lagrangian (SL) schemes have been extremely successful for advection dominated problems, allowing for example major reductions in the computational cost of operational weather predictions, see e.g. [5], [24]. The potential advantage of SL schemes comes from their unconditional stability with respect to the Courant number, which is in turn achieved by exploiting approximations of the characteristics of the advection equation.

Several extensions of SL schemes to advection–diffusion problems have been proposed in the last two decades. Some of these techniques are based on a splitting of the evolution operator, in which only the advective part is treated in SL form, whereas others treat the diffusion term in a consistently SL form by using multiple characteristics, as it will be shown in Section 3. A review of these proposals is presented, e.g., in [12].

Within the second line of work, which has been traditionally motivated by stochastic arguments, we quote here the seminal paper [8], along with the more recent contributions in [17], [18], [19] and [13]. Due to their stochastic origin, all these works treat diffusion operators in trace form, but extensions to divergence form operators has also been proposed in [3], [4]. In these papers, SL methods have proved to be accurate and efficient for linear and nonlinear advection–diffusion problems.

In the present work we are interested in applying the same approach to the incompressible Navier–Stokes (NS) equations

(1)

on a bounded domain , with proper initial and boundary conditions. SL techniques of both the forms outlined above have been proposed for this problem, we refer here for example to the papers [16], [29], [31], [30] and the review in [2], in which the application of the SL method is restricted to the advective part, and to [1], [20], which present and analyze a fully SL approach based on a stochastic framework. In particular, these latter works present a theoretical analysis for the time-discrete scheme, although with limited numerical validation.

In the present work, we study the application of a fully SL scheme, much in the same spirit of [1], [20], to the two-dimensional NS equations from a more numerical perspective. We will use the vorticity and streamfunction formulation for simplicity, as a first step towards the application of the same approach in the context of a projection method for the NS equations in their standard velocity-pressure formulation. We will show that the fully SL approach yields an explicit discretization of both advection and diffusion terms with very mild stability restrictions, that can achieve higher order spatial accuracy in a practically and conceptually simple way, while reducing the computational cost of the advection–diffusion step. The scheme will be constructed and its consistency analyzed. Moreover, we will provide details on the implementation of boundary conditions, which was not discussed in detail in our previous papers, and perform some classical numerical tests to validate the method. Numerical results show that the method yields good quantitative agreement with reference numerical solution of classical benchmarks, while allowing the use of time steps several times larger than those of a standard explicit scheme.

The outline of the paper is the following. Section 2 recalls the vorticity–streamfunction formulation of 2D NS equations, along with the related boundary conditions. Section 3 describes the SL advection–diffusion solver, along with its consistency analysis and the implementation of the boundary conditions. A numerical validation of the proposed approach on classical benchmarks is presented in Section 5, while some conclusions and perspectives for future developments are outlined in Section 6.

2 The Navier–Stokes equations in the vorticity–streamfunction formulation

We briefly recall here the vorticity–streamfunction (VS) formulation of the NS equations. The basic idea, see [10] for an in-depth discussion, is that any two-dimensional divergence-free vector field can be obtained as

(2)

for a suitable streamfunction . Now, since is two-dimensional, its vorticity is a scalar given by

(3)

which, together with (2), gives

(4)

On the other hand, by taking the curl of both sides in (1) we get

(5)

i.e., an advection–diffusion equation for the vorticity. Then, the VS formulation combines (2), (4) and (5) in the form

(6)

in which the symbol denotes in compact form the operator defined by (2). Note that the incompressibility condition is ensured by (2) and that the advantage of treating a scalar problem for the vorticity only occurs in two space dimensions.

The precise derivation of boundary conditions for the vorticity–streamfunction formulation is not trivial, see e.g. the discussion in [11], [22]. Here, we will simply note that no slip boundary conditions amount to assigning

(7)

where denotes the outer normal at the boundary, while more general non homogeneous boundary conditions are assigned by setting non zero values for the normal derivative of the streamfunction.

3 The fully semi-Lagrangian numerical method

Our aim in this work is to employ the fully SL advection–diffusion method described in [3] in the framework a discretization of the NS equations in VS formulation. The general idea underlying this technique is to approximate the diffusion term by a convex combination of the known values at the locations of a time dependent stencil. Similar ideas, often justified by probabilistic arguments, have been proposed in various independent contexts, see [8], [13], [21], [25].

Given the advection–diffusion equation

(8)

we first consider the inviscid case . The construction of large time-step schemes for (3) stems from the application of the classical method of characteristics. The system of characteristic curves for (3) is defined by the solutions of:

(9)

The solution of (3) is constant along such curves, which means that it satisfies the relationship

(10)

Discretizing the representation formula (10) we obtain the advective SL approximation. More precisely, we denote by and respectively the time and space discretization steps, with for , and a space grid of points . The characteristics defined by (3) will be replaced by their numerical approximations We will also use the shorthand notation

(11)

to denote the foot of the approximate characteristic starting from In this work, we have employed characteristics approximations based on the standard explicit Euler and Heun schemes. These methods are applied with substepping, as described e.g. in [9], [14], [23]. More precisely, for the approximation of characteristics a time step is employed, that is a fraction of the total time step This time step is required to comply with a local CFL restriction. As discussed in [23], the value of can vary along each approximated characteristic, so that only in those (usually small) regions with really large Courant numbers. During these substeps, the velocity field is frozen at a constant time level for simplicity. Since employing entails at most first order accuracy, in the case of the Heun scheme the extrapolation

is employed, as common in the meteorological literature, see e.g. [24].

For inviscid problems with , (10) is discretized by replacing the exact upwinding with , and the value of at the foot of a characteristic with an interpolation :

(12)

where is the approximation of , is the vector of node values , and is an interpolation operator (e.g., a polynomial interpolation of degree ) which is assumed to satisfy the condition

As customary in the implementation of semi-Lagrangian schemes, whenever falls outside of the computational domain, it is redefined as the closest boundary point. Even though this implies in principle an error that is first order in time, its impact is minimized by the use of substepping approaches for the approximation of the trajectories, see e.g. the discussion in [23].

When , the scheme can be modified along the lines proposed in [3], [13], in order to introduce an approximation of the diffusion term. In fact, a first-order consistent discretization of the term is obtained by replacing the interpolation of the numerical solution at with an average of interpolated values obtained adding to a second displacement of the form

for all combination of both the sign and the index , and with

Notice that, in an alternative form of the diffusive part of the scheme, the displacements could be rather defined as

which corresponds to the definition given in [1, 20]. While this definition is perfectly equivalent in two space dimensions (the stencil of points is simply rotated), in three space dimensions this would require a higher number of interpolations at each node (eight interpolation points instead of six).

Figure 1: Modification of weights and displacements near the boundary

The resulting scheme then reads

(13)

in which is defined by (11). In case some of the displacements identifies a location out of the computational domain, the displacement is redefined so that the point is the boundary point along the line connecting and For these points, the scheme is redefined as

(14)

where . In order to define the displacements and weights in a consistent form, we consider without loss of generality the simple case depicted in Figure 1. A pure diffusion operator is discretized by the abstract scheme

in which we enforce the constraint

(15)

according to the scheme of Fig. 1. Following [3], consistency is achieved by imposing conditions on the moments of the discrete mass distribution defined by the weights and displacements Requiring the first and second moment to coincide with the original ones, we obtain the conditions:

(16)

The first condition is satisfied if

Using the relationship in the second equation of (3), we obtain

which gives in turn

(17)

Using now (17) in the third equation of (3), we obtain

that is,

(18)

To sum up, consistency under the constraint (15) would be obtained by setting

(19)

Note that, in general, (3) ensures only consistency of order 1/2 (see the analysis in [3]). Consistency of first order requires the further condition

which is false in general for the solution (19). Therefore, we should expect the consistency rate of the diffusive term to drop to at points where the constraint (15) holds.

Denoting by a numerical approximation of the operator (e.g., via a five-point discrete Laplacian), by an approximation of the operator (e.g., via centered differences), and by and the vectors of the node values and respectively, the final form of the scheme is therefore

(20)

with initial conditions given by where denotes the vector of the initial streamfunction values.

For a complete definition of the numerical method, boundary conditions for vorticity must be assigned, which do not follow immediately from the boundary conditions for the streamfunction. A wide range of possibilities is discussed in [11]. Here, we will employ one of the simplest formulations, corresponding to the so called Thom boundary conditions [26], which are obtained by converting (via Poisson’s equation) boundary conditions for the derivative of into Dirichlet boundary conditions for . More specifically, for a linear portion of the boundary on which a tangential (possibly zero) speed is imposed, the Thom boundary conditions read

(21)

A sketch of the reference geometry is given in Fig. 2. Note that the Thom conditions are directly written in terms of the approximate solution on the grid, in which the subscript denotes the index of the node with respect to the boundary, so that , refer to the boundary and to the first internal layer of nodes. Note also that, in (3), the computation of (21) should be performed at the start of time step after the Poisson equation has been solved for at time step (or from the initial data if ). The SL solution of the advection–diffusion equation should then be computed only at internal nodes, using the values provided by (21) as boundary data.

Figure 2: Node arrangement for the Thom boundary conditions

4 Consistency analysis of the method

We give now a simplified consistency analysis for the global method, assuming that it is posed on the whole of with a uniform orthogonal grid. The analysis of the advection–diffusion step has been carried out elsewhere (see [13, 3]), and shows that the error introduced between two successive time steps is

Using a five-point laplacian, the Poisson equation is solved with accuracy. On the other hand, since the right-hand side is perturbed by an error , the error introduced on the streamfunction is

Finally, the error introduced by the operator , when implemented by centered differences, is again of order . Since for the order of interpolation we have , we can drop the term , and dividing by we finally obtain the local truncation error

which results in a first-order scheme when working at constant Courant number. A comparison with more conventional advection–diffusion solvers (see again [3]) shows that, despite being formally low-order, this strategy provides a good absolute accuracy. In addition, as usual in SL schemes, no stability restrictions on the Courant number are introduced. However, since the numerical stencil consists of points apart, some care should be taken to avoid under-resolution of the smaller spatial scales. The analysis carried out in [13] shows that, in order to have a smooth numerical domain of dependence at time , the compatibility condition

should be enforced on the discretization steps. In particular, this implies that time steps with Courant numbers quite larger than one are still acceptable, so that the efficiency of the semi-Lagrangian scheme for the advection term is not lost.

5 Numerical results

The method outlined in the previous sections has been implemented so far in a rather elementay way, employing structured Cartesian meshes on a rectangular domain. The boundary conditions described in section 3 were employed. In one numerical experiments, the mesh employed had constant step in either direction. The Poisson equation was discretized in this case via a standard five-point finite difference scheme, and the operator by centered finite differences. For the interpolation operator the monotonized bicubic interpolant implemented in the MATLAB native function interp2 was employed. Also piecewise linear interpolation was tested, but this resulted in an overly dissipative method, as well known in the SL literature for the advective terms (see e.g. [24]) and already shown for the diffusive terms in [3]. The corresponding results are not reported in the following. In the other tests, meshes with non constant steps were employed, in order to achieve higher resolution at the boundaries, where vorticity production takes place. In this case, first order finite differences approximations were employed both for the Poisson equation and the operator. For both the constant and non constant step cases, the finite difference approximations employed for the Poisson equation yield matrices that coincide with those that would arise from a linear finite element discretization on the same mesh. Furthermore, for the meshes with non constant steps, the the cubic spline option in interp2 was employed.

5.1 Test case with analytic solution

We consider the test case discussed e.g. in [15]. In this test, that was run with over the time interval the computational domain is given by with periodic boundary conditions. The exact solution is given by For this test, Cartesian meshes with constant node spacing were employed, as described above. The first order convergence behaviour is confirmed, but it can be seen that time steps up to four times those of explicit schemes can be used without any loss in accuracy.

Nodes rel. err. rel. err.
-
Table 1: Convergence test in benchmark with analytic solution

5.2 Lid driven cavity

This classical benchmark for numerical approximations of the Navier Stokes equations has been discussed in detail for the vorticity and streamfunction formulation in [11]. Reference solutions obtained with high order spectral methods and other accurate techniques are reported, among many others, in [6], [7]. In our assessment, we focus on low or moderate values of the Reynolds number. Indeed, it is known that for the flow becomes turbulent and unpredictable for this test, so that a more sophisticated statistical assessment would have to be carried out. Furthermore, the proposed method is expected to yield significant efficiency gains especially in laminar regimes, in which the stability restrictions due to the viscous term can affect the efficiency of standard explicit methods.

An example of the flow field and streamfunction obtained in the case at steady state (approximately ) is shown in Figure 3. The streamfunction is plotted with the same isoline values as suggested in [7]. The results were obtained using 100 nodes in each direction and a mesh whose 2 nodes closest to the boundary are separated by a spacing smaller than that used in the rest of the domain. The time step employed was such that for the smallest values and the solution was computed until steady state was achieved up to a tolerance of At a more quantitative level, the maximum horizontal velocity value along the centerline of the cavity was while the maximum and minimum vertical velocity values along the centerline of the cavity were respectively. These values imply a relative error of order with respect to the reference steady state solution in [6]. The vorticity value at the center of the cavity was computed as which implies a relative error of order with respect to the same reference solution.

Figure 3: Lid driven cavity benchmark at a) flow field b) streamfunction.

Results at are shown instead in 4. Again, the streamfunction is plotted with the same isoline values as suggested in [7] and a good general agreement is found between our results and those reported in [6], [7]. At a more quantitative level, we show in Figure 5 the component of velocity and the vorticity values along the axis of the cavity, as computed by the proposed method (black line) on the same mesh described above with a time step that yields The results are compared to those of reference solutions presented in [6], shown in blue dots and red circles for velocity and vorticity, respectively. It can be seen that also good quantitative agreement is achieved, in spite of the relatively coarse mesh, even though the accuracy loss at the boundaries discussed in Section 3 is apparent in the results for the vorticity variable. The maximum horizontal velocity value along the axis of the cavity was while the maximum and minimum vertical velocity values along the horizontal centerline of the cavity were respectively. The vorticity value at the center of the cavity was computed as These values imply relative errors of order with respect to the reference steady state solution in [6].

Figure 4: Lid driven cavity benchmark at a) flow field b) streamfunction.
Figure 5: Lid driven cavity benchmark at a) comparison with velocity component values of reference solution b) comparison with values of reference solutions

6 Conclusions

We have presented a fully semi-Lagrangian, explicit time discretization method for the Navier Stokes equations in the vorticity streamfunction formulation, which allows to use time steps much longer than conventional explicit discretizations without the need to solve any linear systems apart from the one resulting from the discretization of the Poisson equation. While only first order in time, the method allows in practice to achieve a sufficient accuracy for many applications, since high order interpolants can be used to reduce numerical dissipation in a very straightforward way.

The effectiveness of the method was demonstrated by numerical results on classical benchmarks of two dimensional incompressible flows. In ongoing work, this approach is being extended to the pressure–velocity formulation of the Navier Stokes equations. Furthermore, we are aiming to implement this approach in the framework of the high order adaptive SL-DG discretizations proposed in [27], [28].

Acknowledgements

Part of this research work has been financially supported by the INDAM–GNCS project “Metodi numerici semi-impliciti e semi-Lagrangiani per sistemi iperbolici di leggi di bilancio” and by University Roma Tre.

References

  • [1] Y. Belopolskaya and G.N. Milstein. An approximation method for Navier–Stokes equations based on probabilistic approach. Statistics & Probability letters, 64(2):201–211, 2003.
  • [2] Rodolfo Bermejo and Laura Saavedra. Lagrange–Galerkin methods for the incompressible Navier-Stokes equations: a review. Communications in Applied and Industrial Mathematics, 7(3):26–55, 2016.
  • [3] L. Bonaventura and R. Ferretti. Semi-Lagrangian methods for parabolic problems in divergence form. SIAM Journal of Scientific Computing, 36:A2458 – A2477, 2014.
  • [4] L. Bonaventura and R. Ferretti. Flux form semi-Lagrangian methods for parabolic problems. Communications in Applied and Industrial Mathematics, 7:53–70, 2016.
  • [5] L. Bonaventura, R. Redler, and R. Budich. Earth System Modelling 2: Algorithms, Code Infrastructure and Optimisation. Springer Verlag, New York, 2012.
  • [6] O. Botella and R. Peyret. Benchmark spectral results on the lid-driven cavity flow. Computers and Fluids, 27:421–433, 1998.
  • [7] C.H. Bruneau and M. Saad. The 2D lid-driven cavity flow revisited. Computers and Fluids, 35:326–348, 2006.
  • [8] M. Camilli and M. Falcone. An approximation scheme for the optimal control of diffusion processes. Mathematical Modelling and Numerical Analysis, 29:97–122, 1995.
  • [9] V. Casulli. Semi-implicit finite difference methods for the two dimensional shallow water equations. Journal of Computational Physics, 86:56–74, 1990.
  • [10] A.J. Chorin and J.E. Marsden. A mathematical introduction to fluid mechanics. Third edition, chapter 1. Springer, 1993.
  • [11] W. E and J.G. Liu. Vorticity boundary conditions and related issues for finite difference schemes. Journal of Computational Physics, 124:368–382, 1996.
  • [12] M. Falcone and R. Ferretti. Semi-Lagrangian Approximation Schemes for Linear and Hamilton–Jacobi Equations. SIAM, 2013.
  • [13] R. Ferretti. A technique for high-order treatment of diffusion terms in semi-Lagrangian schemes. Communications in Computational Physics, 8:445–470, 2010.
  • [14] F.X. Giraldo. Trajectory computations for spherical geodesic grids in cartesian space. Monthly Weather Review, 127:1651–1662, 1999.
  • [15] J.G. Liu and C.W. Shu. A high order DG method for 2D incompressible flows. Journal of Computational Physics, 160:577–596, 2000.
  • [16] Y. Maday, A.T. Patera, and E.M. Rønquist. An operator-integration-factor splitting method for time-dependent problems: application to incompressible fluid flow. Journal of Scientific Computing, 5:263–292, 1990.
  • [17] G.N. Milstein. The probability approach to numerical solution of nonlinear parabolic equations. Numerical Methods for Partial Differential Equations, 18:490–522, 2002.
  • [18] G.N. Milstein and M.V. Tretyakov. Numerical algorithms for semilinear parabolic equations with small parameter based on approximation of stochastic equations. Mathematics of Computation, 69:237–567, 2000.
  • [19] G.N. Milstein and M.V. Tretyakov. Numerical solution of the Dirichlet problem for nonlinear parabolic equations by a probabilistic approach. IMA Journal of Numerical Analysis, 21:887–917, 2001.
  • [20] G.N. Milstein and M.V. Tretyakov. Solving the Dirichlet problem for Navier–Stokes equations by probabilistic approach. BIT Numerical Mathematics, 52(1):141–153, 2012.
  • [21] G.N. Milstein and M.V. Tretyakov. Stochastic numerics for mathematical physics. Springer Science & Business Media, 2013.
  • [22] Luigi Quartapelle. Numerical solution of the incompressible Navier-Stokes equations. Birkhäuser, 2013.
  • [23] G. Rosatti, L. Bonaventura, and D. Cesari. Semi-implicit, semi-Lagrangian environmental modelling on cartesian grids with cut cells. Journal of Computational Physics, 204:353–377, 2005.
  • [24] A. Staniforth and J. Coté. Semi-Lagrangian integration schemes for atmospheric models-a review. Monthly Weather Review, 119:2206–2223, 1991.
  • [25] J. Teixeira. Stable schemes for partial differential equations: The one-dimensional diffusion equation. Journal of Computational Physics, 153:403–417, 1999.
  • [26] A. Thom. The flow past circular cylinders at low speeds. Proceedings of the Royal Society of London. Series A, 141(845):651–669, 1933.
  • [27] G. Tumolo and L. Bonaventura. A semi-implicit, semi-Lagrangian, DG framework for adaptive numerical weather prediction. Quarterly Journal of the Royal Meteorological Society, 141:2582–2601, 2015.
  • [28] G. Tumolo, L. Bonaventura, and M. Restelli. A semi-implicit, semi-Lagrangian, adaptive discontinuous Galerkin method for the shallow water equations. Journal of Computational Physics, 232:46–67, 2013.
  • [29] D. Xiu and G.E. Karniadakis. A semi-Lagrangian high-order method for Navier–Stokes equations. Journal of Computational Physics, 172:658–684, 2001.
  • [30] D. Xiu, S.J. Sherwin, and G.E. Karniadakis. Strong and auxiliary form of the semi-Lagrangian method for incompressible flows. Journal of Scientific Computing, 25:323–346, 2005.
  • [31] J. Xu, D. Xiu, and G.E. Karniadakis. A Semi-Lagrangian method for turbulence simulations using mixed spectral discretizations. Journal of Scientific Computing, 17:585–597, 2002.
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
""
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
   
Add comment
Cancel
Loading ...
57282
This is a comment super asjknd jkasnjk adsnkj
Upvote
Downvote
""
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters
Submit
Cancel

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test
Test description