Numerical Computation of High Reynolds Number Cavity Flow Using SPH Method with Stream Function and Vorticity Formulation
Abstract
When numerically computing high Reynolds number cavity flow, it is known that by formulating the Navier-Stokes equations using the stream function and vorticity as unknown functions, it is possible to reproduce finer flow structures. Although numerical computations applying methods such as the finite difference method are well known, to the best of our knowledge, there are no examples of applying particle-based methods like the SPH method to this problem. Therefore, we applied the SPH method to the Navier-Stokes equations, formulated with the stream function and vorticity as unknown functions, and conducted numerical computations of high Reynolds number cavity flow. The results confirmed the reproduction of small vortices and demonstrated the effectiveness of the scheme using the stream function and vorticity.
1 Introduction
When numerically computing high Reynolds number cavity flow, it is known that by formulating the Navier-Stokes equations using the stream function and vorticity as unknown functions, finer flow structures can be reproduced, as has been shown in cases where methods such as the finite difference method are applied; for example, Ghia et al. [1] conducted numerical experiments on cavity flow with Reynolds numbers below 10,000 using a high-order finite difference method and confirmed the reproduction of small vortices. Erturk et al. [2] performed numerical experiments on cavity flow with Reynolds numbers up to 21,000 using a different high-order finite difference formulation and observed similar results. However, to the best of our knowledge, there are no reports of applying particle-based methods such as the Smoothed Particle Hydrodynamics (SPH) method [3, 4, 5] to this problem. The objective of this study is to apply the scheme using the stream function and vorticity to the SPH method and to confirm the reproduction of small vortices in high Reynolds number cavity flows.
On the other hand, there are some examples where the SPH method has been applied to numerical computations of cavity flow using formulations with velocity and pressure as the unknown functions. For example, Xu et al.[6] used an improved SPH method, which explicitly mitigates the non-uniformity of particle distribution through shifting, to numerically compute 2D cavity flow with Reynolds numbers below 1,000, showing that the velocity and pressure distributions agree with the numerical results of Ghia et al. [1] and Erturk et al. [2]. However, we have confirmed that applying Xu’s method to 2D cavity flow with Reynolds numbers above 1,000 does not reproduce the small vortices that occur near the boundaries.
Therefore, we applied the SPH method to the Navier-Stokes equations formulated with the stream function and vorticity, conducted numerical experiments on 2D cavity flow with Reynolds numbers above 1,000, and attempted to reproduce the small vortices. In this study, the Navier-Stokes equations formulated using the stream function and vorticity are discretized by forward difference in the time direction and by approximate differential operators using the SPH method in the spatial direction. For the vorticity at the boundaries, a certain discretization method derived from Taylor expansion was used.
This paper is structured as follows. Section 2 describes the formulation for incompressible flow using the stream function and vorticity, the discretization by the SPH method, and the handling of boundary data. Section 3 confirms the reproducibility of small vortices by comparing numerical experiments of cavity flow using the SPH method and high-order finite difference methods.
2 Methods
In this chapter, we describe the formulation of the Navier-Stokes equations using the stream function and vorticity, the discretization using the SPH method, and the boundary treatment method.
2.1 Formulation using stream function and vorticity
Let be a domain with a smooth boundary, and its boundary. Additionally, when the time interval is set as , the problem of incompressible flow is described by the following dimensionless Navier-Stokes equations, with the velocity and pressure as unknown functions:
(5) |
Here, , , , and represent external force, initial velocity, boundary velocity, and Reynolds number, respectively. Additionally, denotes the material derivative.
Next, let the stream function , the vorticity , and be defined as follows:
Here, denotes the transpose of a vector. From the first equation of motion and the continuity equation in (5), the following equations can be derived:
(6) | ||||
(7) |
2.2 SPH scheme using stream function and vorticity
The SPH method is a technique that defines approximate differential operators by finite particles distributed within a domain, for partial differential equations. Let the particles at time be with . The approximate operators for the gradient and Laplacian of a function are defined as follows:
(8) | ||||
(9) |
Here, , and . Additionally, and are the mass and density of the particle . Also, is called the smoothing function, which satisfies for , for (compact support), and
(the unity condition) as a continuous function.
Using these approximate differential operators, we discretize (6) and (7). For the time evolution equation of vorticity (6), we apply a forward difference in the time direction and the SPH method’s approximate differential operator (9) in the spatial direction as follows:
(10) |
Here, is the time step. Using this , the stream function’s Poisson equation;
(11) |
is solved to obtain the stream function at time . Using this stream function and (8), the particle positions at time are updated as follows:
In (10) and (11), initial conditions for the vorticity, as well as boundary conditions for the vorticity and stream function, are required. The initial condition for vorticity is given by , based on the initial velocity condition. Additionally, the stream function’s boundary condition is set as a constant because the contour lines of the stream function represent streamlines, and particles on the boundary remain on the boundary. On the other hand, the boundary condition for vorticity cannot be obtained from (5) and requires special treatment. Therefore, the next section describes the handling of boundary data for vorticity.
2.3 Handling of boundary
Generally, boundary data for vorticity is approximated using the boundary condition of the stream function corresponding to the velocity boundary condition in (5), i.e., . For example, Ghia et al.[1] approximated the vorticity on the boundary using high-order differences for the grid points on in the square domain as follows:
Here, is the grid spacing. However, in the SPH method, since particles move over time, such boundary treatments cannot be applied.
Therefore, we approximate the vorticity for particles on the boundary using the following procedure. First, perform a Taylor expansion of the function up to the fourth order:
By multiplying both sides of this equation by and integrating over , we obtain:
(12) |
Here,
From this, the left-hand side of (12) becomes:
Moreover, the third term on the right-hand side of (12) becomes zero since the integrand is an odd function with respect to . Therefore, by discretizing the integrals in (12), we obtain the following approximation for the Laplacian:
Here, . Assuming that the second equation in (7) holds on the boundary, for particles on the boundary at time , we have:
Using this approximation, the vorticity on the boundary is approximately assigned.
3 Numerical experiments on high Reynolds number cavity flow
3.1 Cavity flow
Cavity flow is a flow problem within a rectangular domain, where the boundary condition on the ceiling surface is fixed with a constant velocity along the boundary, while the velocity on all other surfaces is zero. In the case of a cubic cavity flow, the Reynolds number is given by , where is the length of one side of the cube, is the magnitude of the velocity on the boundary with fixed velocity, and is the kinematic viscosity of the fluid. Since cavity flow has sufficient length in the depth direction, it can be treated as a two-dimensional problem.
Next, we formulate the two-dimensional cavity flow. Let the domain be and the time interval be . Further, let be the boundary of , and define and as:
Then, and are given as follows:
Since no external force is considered, we set .
3.2 Numerical results
Following Ghia et al. [1], we set , , and the value of the stream function on the boundary to be 0. The computation conditions for the SPH method are as follows. The particles at the initial time are arranged in a grid configuration with a spacing of (the number of particles is ). T he smoothing length is fixed at 2.1 times the grid spacing, and the smoothing function used is the cubic spline:
Here, is a coefficient that satisfies the unity condition. The time step is set to .
Using these calculation conditions, we conducted numerical experiments applying the SPH method to the formulation using stream function and vorticity (SV scheme) and the formulation using velocity and pressure (VP scheme). The VP scheme uses Xu et al.’s improved SPH method [6], and SV scheme uses the SPH method described in the previous section. In both methods, particle distribution correction using shifting, as employed in Xu et al.’s improved SPH method, is applied at each step (the shifting coefficient is empirically set to 0.1). Numerical experiments were conducted for Reynolds numbers , and the calculations continued until the internal state reached a steady or periodic state.
Fig. 1 show the contour plots of the stream function and vorticity obtained from the numerical calculations of cavity flow at , in the following order: SV scheme, VP scheme, and Ghia et al.’s high-order finite difference method. Tables 1 and 2 present the contour values used in these plots (the same values are used for the contour plots in Fig. 2 and subsequent ones). For , it can be said that both SV scheme and VP scheme yield the same trends in the stream function and vorticity as those obtained by Ghia et al. However, from Fig. 1a and b, it is clear that secondary vortices at the bottom corners are well reproduced in the SV scheme, whereas they are hardly reproduced in the VP scheme.
Contour number | value of | Contour number | value of |
---|---|---|---|
Contour number | value of |
---|---|

Similarly, Fig. 2 presents the contour plots of the stream function and vorticity obtained from the numerical experiments for , and Fig. 3 show the results for , in the order of SV scheme, VP scheme, and Ghia et al.’s high-order finite difference method. From Ghia et al.’s numerical results, it can be observed that at (Fig. 2c), secondary vortices form in the corners of the bottom surface, and at (Fig. 3c), secondary and tertiary vortices form in the corners of the bottom surface, and secondary vortices form near one of the corners of the ceiling. This reproduction can also be confirmed in SV scheme (Fig. 2a, Fig. 3a). On the other hand, in VP scheme Fig. 2b, Fig. 3b), the small vortices are hardly reproduced. Additionally, the contour values of vorticity in SV scheme (Fig. 2e, Fig. 3e) and Ghia et al.’s high-order finite difference method (Fig. 2f, Fig. 3f) are generally consistent.


However, in the numerical experiment results of SV scheme for (Fig. 3a, d), discrepancies with Ghia et al.’s numerical results (Fig. 3 c, f) can be seen near the center of the domain. This discrepancy is due to the fact that the velocity magnitude near the center of the domain is relatively underestimated, indicating insufficient analysis accuracy. However, since Ghia and Erturk et al. increased the grid spacing by a factor of two for the high-order finite difference method at , it is considered that the insufficient number of particles is the cause in the case of the SPH method.
4 Conclusion
In this study, we applied the SPH method to the formulation of the Navier-Stokes equations using stream function and vorticity as unknown functions and conducted numerical experiments on cavity flow with Reynolds numbers of 100, 1,000, and 10,000. The following results were obtained:
-
(i)
The numerical results of the SPH scheme with stream function and vorticity (SV scheme) reproduce the small vortices seen in the high-order finite difference method, in contrast to the results obtained from the formulation using velocity and pressure.
-
(ii)
In cavity flow with Reynolds numbers of 10,000 or higher, the analysis accuracy becomes insufficient with a particle count of approximately 10,000.
Since the stream function cannot be defined in three-dimensional problems, it is difficult to extend these results to three-dimensional problems. Therefore, future challenges include conducting numerical experiments for higher Reynolds number problems and developing alternative formulations that can handle high Reynolds number problems in three dimensions.
References
- [1] UKNG Ghia, Kirti N Ghia, and CT Shin. High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. Journal of computational physics, 48(3):387–411, 1982.
- [2] Ercan Erturk, Thomas C Corke, and Cihan Gökçöl. Numerical solutions of 2-d steady incompressible driven cavity flow at high Reynolds numbers. International Journal for Numerical Methods in Fluids, 48(7):747–774, 2005.
- [3] Leon B Lucy. A numerical approach to the testing of the fission hypothesis. The astronomical journal, 82:1013–1024, 1977.
- [4] Robert A Gingold and Joseph J Monaghan. Smoothed particle hydrodynamics-theory and application to non-spherical stars. Monthly notices of the royal astronomical society, 181:375–389, 1977.
- [5] Gui-Rong Liu and MB Liu. Smoothed particle hydrodynamics: a meshfree particle method. World Scientific, 2003.
- [6] Rui Xu, Peter Stansby, and Dominique Laurence. Accuracy and stability in incompressible SPH (ISPH) based on the projection method and a new approach. Journal of Computational Physics, 228(18):6703–6725, 2009.