Solving incompressible Navier–Stokes equations on irregular domains and quadtrees by monolithic approach
Abstract
We present a second-order monolithic method for solving incompressible Navier–Stokes equations on irregular domains with quadtree grids. A semi-collocated grid layout is adopted, where velocity variables are located at cell vertices, and pressure variables are located at cell centers. Compact finite difference methods with ghost values are used to discretize the advection and diffusion terms of the velocity. A pressure gradient and divergence operator on the quadtree that use compact stencils are developed. Furthermore, the proposed method is extended to cubical domains with octree grids. Numerical results demonstrate that the method is second-order convergent in norms and can handle irregular domains for various Reynolds numbers.
Keywords Incompressible Navier–Stokes, Finite difference method, Quadtree, Octree, Level set method
1 Introduction
The motion of an incompressible fluid flow is described by the Navier–Stokes equations:
(1) |
Here, is the fluid velocity, is the pressure, is the external force such as gravity, and is the Reynolds number. The development of numerical methods for incompressible Navier–Stokes equations is very important in both science and engineering. Applications of incompressible flow, such as subsonic aerodynamics, ship hydrodynamics, and numerical weather prediction, sometimes involve complex geometry and require that small-scale turbulence and vortices be captured. An efficient way to solve the problem is to generate a body-fitted mesh and adaptively refine the mesh where small-scale phenomena are observed. Although various successful studies in recent decades have used body-fitted meshes, we focus on Cartesian grids in this study.
Peskin’s immersed boundary method (IBM) [35] is a popular and effective approach to handling irregular domains on Cartesian grids. However, the numerical delta function of the IBM lowers the order of convergence near the boundary. To address this issue, Leveque and Li [25] developed the immersed interface method (IIM) for elliptic interface problems, which shows second-order convergence in the norm. The IBM also motivated ghost fluid methods (GFMs) [16, 27, 23], which define ghost values at grid points outside the domain. Although the IIM and GFM were developed to handle discontinuity across the interface, the core concept of these sharp capturing methods has been extended to treat various boundary conditions for elliptic equations on irregular domains [18]. In addition to the IIM and GFM, various numerical methods are used to treat irregular domains. For example, in the virtual node method [3, 21], variational formulations on irregular domains embedded in a Cartesian grid are discretized. Coco and Russo developed ghost point finite difference methods [13, 14, 12], which adopt a multigrid method to impose boundary conditions. In a finite volume framework, cut-cell methods are widely used. Originally proposed by Purvis and Bulkhalter [37], these methods were used to develop Hodge projections of vector fields [32]. Recent works on finite volume cut-cell methods include the solution of Poisson’s equation [6] and the convection–diffusion equation [2] with Robin boundary conditions.
Chorin introduced the projection method [11] to solve incompressible Navier–Stokes equations on Cartesian grids. It uses Hodge decomposition of vector fields. The intermediate velocities are first computed and then projected to force a discrete divergence-free condition by solving Poisson’s equation for the Hodge variable. Although the method developed by Chorin is only first-order accurate, Brown et al. [7] analyzed a second-order projection method. They showed that the boundary conditions of the intermediate velocities are coupled with the Hodge variable, and thus appropriate boundary conditions for the intermediate velocities are necessary to obtain second-order-accurate solutions. For rectangular domains, the boundary conditions for the intermediate velocities and the Hodge variable can be decoupled by using the Hodge variable from previous time steps. However, for irregular domains, it is challenging to impose an accurate boundary condition. Furthermore, especially when the domain moves in time according to the flow, the intermediate velocities and Hodge variable should be solved simultaneously in a single linear system. Thus, the advantage of using the projection method is lost.
An alternative approach to solving the incompressible Navier–Stokes equations is to discretize the momentum equation while imposing a divergence-free condition in a single linear system for the velocities and pressure. This discretization is called the monolithic approach and results in a saddle-point linear system. Although this method creates a larger linear system than projection methods do, the boundary conditions for the velocities are no longer coupled with other variables. Similarly, the jump conditions of two-phase incompressible flow can be treated more easily than they can by projection methods, and recent works [10, 8, 39] have reported success in obtaining convergence in norms. For a single-phase flow problem on irregular domains, a very recent study by Coco [12] solved the equations using the monolithic approach. The author used a ghost-point finite difference method to impose boundary conditions and obtained second-order convergence of the velocity and divergence of the velocity in the and norms. These monolithic methods exhibit convergence with nontrivial analytical solutions; note, however, that discretized linear systems are rank-deficient (the pressure is unique up to a constant). In [10, 39], the right-hand side was projected onto the range space of the linear system by formulating the kernel of its transpose. By contrast, Coco [12] augmented the approach with an additional scalar unknown. Although Yoon et al. [43] remarked that finding a unique solution in the orthogonal complement of the kernel is equivalent to the augmentation strategy, the range space of the resulting linear system was not specified by Coco [12].
Staggered marker-and-cell (MAC) grids [20] have been widely used to solve the incompressible Navier–Stokes equations (1) numerically. In a MAC grid, the velocities are located on cell faces, whereas the pressures or Hodge variables are located at cell centers. MAC grids do not exhibit the checkerboard instability that occurs in a collocated grid, and they enable a simple discretization for the incompressibility condition. However, there are obstacles to developing numerical formulations on MAC grids for quad/octree data structures. The extension of numerical methods designed for uniform grids to the quad/octree grid is not trivial, and it requires additional effort. Early works on solving incompressible flow on quad/octree grids focused on the Euler equations, where the viscosity term in (1) was neglected. Popinet [36] introduced a second-order projection method on a graded octree grid, that is, a grid where the size ratio of adjacent cells must be 2:1. This work was later extended by Losasso et al. [28] to relax the restrictions on adaptive refinement. Although Popinet [36] discretized the advection term in the Eulerian approach using an upwind method, Losasso et al. [28] used a semi-Lagrangian method by extrapolating the velocities located on the cell faces to the cell vertices. For cases where the viscosity terms are not neglected, Olshanskii et al. [33] and Guittet et al. [19] developed second-order projection methods on a graded and non-graded octree MAC grid, respectively. The method of Olshanskii et al. [33] requires a relatively large stencil for discretizing the viscous term. By contrast, Guittet et al. [19] developed a finite volume method that requires a smaller stencil; however, a Voronoi mesh was generated with respect to the cell faces.
Min and Gibou [29] developed a second-order projection method for incompressible flow on quad/octree grids other than MAC grids, where the velocities and Hodge variables are collocated at cell vertices. The main advantage of the collocated grid on vertices is that second-order finite differences with compact stencils can be used. As in [19], Hodge decomposition that guarantees stability was proposed. However, the grid layout in [29] cannot be used in the monolithic approach because there is no boundary condition for the pressure, whereas homogeneous Neumann boundary conditions are imposed for the Hodge variable in the projection method.
In this paper, we introduce a numerical method for solving the incompressible Navier–Stokes equations on an irregular domain with non-graded quadtree structure and on a cubical domain with non-graded octree structure. Unlike many other methods on quad/octree grids, the proposed discretization is based on the monolithic approach. The velocities are collocated at cell vertices, and the pressure variable is stored at cell centers, which is also called the Arakawa B grid layout [1]. Because the Arakawa B grid layout is adopted, the effective and simple finite differences in [29] on the quadtree can be used. Furthermore, we propose gradient and divergence operators that map from cell centers to cell vertices and from cell vertices to cell centers, respectively. These operators are extended to treat an irregular boundary, and numerical results demonstrate that the proposed discretization is second-order accurate. The rest of the paper is structured as follows. Section 2 describes a level set method of capturing irregular domains and the proposed grid layout on a quadtree data structure. Section 3 explains the numerical method and discretization in detail. Numerical experiments and results are presented in Section 4.
2 Computational domain and grid layout
2.1 Level set method
We are interested in solving the incompressible Navier–Stokes equations (1) in an irregular domain within a rectangular computational domain . The interface between the fluid and the solid is captured by the level-set method [34]. The interface is described by the zero level set of a level set function as In particular, we define the fluid domain as and thus the solid domain is .
Among infinitely many level sets that represent the interface as a zero level set, a signed distance function has the desirable property that , and thus does not exhibit the instability caused by a steep or shallow gradient. Therefore, the level set function is reinitialized to become a signed distance function by solving the following eikonal equation:
where sgn denotes the signum function, and is the initial level set function. In particular, we adopt the subcell resolution technique of Russo and Smereka [38] to discretize the equation and the second-order discretization of Min and Gibou [30]. An advantage of the level set method is that can be used to compute geometric quantities such as the normal vector and curvature according to the following formula:
2.2 Quadtree data structure
For adaptive refinement, we define a root cell as the computational domain and recursively split each cell into quadrants until the desired level of refinement is achieved; that is, a parent cell is divided into four children cells of equal size. Here, the level of the cell is defined as the number of refinements used for its construction. The notation describes the level a quadtree grid, where the minimum level is , and the maximum level is . Note that a quadtree grid of level is equivalent to a uniform Cartesian grid. In this study, we consider non-graded quadtree grids, and thus the size ratio of adjacent cells is not restricted. When a partial differential equation on an irregular domain is solved on the Cartesian grid, the order of the local truncation error near the boundary is usually lower than that of interior grid points. Therefore, as suggested in many works [30, 41, 19], we split a cell when its size exceeds its distance to the boundary. More precisely, a cell is refined if the following condition is satisfied:
where refers to the Lipschitz constant of the level set function , and denotes the size of cell so that indicates the size of the cell diagonal. As we reinitialize the level set function that allows to become a signed distance function, we take the Lipschitz constant to be . Figure 1 shows an example of a quadtree grid generated in a circular domain. This locally refined grid structure enables a storage reduction compared to the uniform Cartesian grid, whose size is the same as that of the finest cell of the quadtree.

2.3 Grid layout
A staggered MAC grid has typically been used [19, 33] to solve the incompressible Navier–Stokes equations (1) on quad/octree data structures. In a two-dimensional domain, the horizontal and vertical velocities are located on the horizontal and vertical cell faces, respectively, and the pressure variables are located at cell centers. One major difficulty of using a MAC grid on a quad/octree data structure is the discretization of the advection and viscous terms. For example, consider the discretization at the cell face marked with a circle in Figure 2(a). The cell face marked with a triangle represents the component velocity , which intersects the target cell face or is a face of the same cell. Within this compact stencil, and cannot be discretized with errors of and , respectively. To address this problem, Olshanskii et al. [33] used wider stencils to discretize the advection and diffusion terms. By contrast, Guittet et al. [19] addressed these difficulties by adopting a semi-Lagrangian scheme for the advection term and a finite volume approach to treat the viscous term. However, the quantities defined on the faces were interpolated to nodal values to employ the semi-Lagrangian scheme, and a Voronoi mesh with respect to the cell faces was constructed for the diffusion term. Furthermore, to ensure the stability, Olshanskii et al. developed an explicit filter that modifies the advection term near the coarse-to-fine grid interface, and Guittet et al. derived a discrete divergence operator that uses faces from different cells.
Recognizing these difficulties, we use an Arakawa B grid [1] on the quad/octree data structure for spatial discretization, as shown in Figure 2(b). That is, the velocity components are located at cell vertices, and the pressure variables are located at cell centers. One advantage of this grid layout is that the advection and diffusion terms can be discretized using compact stencils with a consistent truncation error. The Arakawa B grid layout is equivalent to the finite element method and is known to exhibit checkerboard instability. By adopting a stabilizing technique used in the finite element community, we develop a second-order monolithic method with reduced checkerboard instability for solving (1) in non-graded quad/octree grids in the following section.


3 Numerical method
In this section, we present a finite-difference-based second-order-accurate monolithic scheme for solving the incompressible Navier–Stokes equations (1) on the non-graded quadtree structure described in Section 2. Time is discretized using the semi-Lagrangian method combined with the second-order backward difference formula introduced by Xiu et al. [42]. By implicitly discretizing the incompressibility condition, we obtain the following temporal discretization for (1):
(2) |
Here, the subscript indicates departure points in the semi-Lagrangian scheme, and is a stabilizing operator used to ease the checkerboard instability of the pressure. In the next section, we describe the spatial discretization and then discuss the induced linear system briefly. We point out that the suggested discretization uses only the nodal values of adjacent cells.
3.1 Advection term
The advection term in (1) is treated by a semi-Lagrangian method, which discretizes the Lagrangian derivative of the velocity field in time instead of the Eulerian derivative. The semi-Lagrangian scheme consists of tracking a fluid particle backward by time integration of a characteristic equation and recovering the values at the departure point using suitable high-order interpolation schemes. The departure points are traced by a second-order Runge–Kutta method as
and
The velocity at the intermediate time step is approximated by the second-order extrapolation
Because the points and usually do not coincide with grid nodes, appropriate spatial interpolations with nodal values are required to obtain the velocity values at these points. As the domain evolves with time, these points may lie outside the domain at preceding time steps, and neighboring nodes may be external points, making interpolation impossible. Here we design an interpolation scheme to compensate for these problems using boundary ghost points. To describe the interpolation procedure formally, we use the following notation. Suppose we would like to approximate at a point and denote by the leaf cell in containing .


When all the vertices of the cell belong to , is approximated by the quadratic essentially non-oscillatory (ENO) interpolation. Let denote the lower left, lower right, upper left, and upper right vertices at the four corners of the cell, and represent the value of at these four vertices, respectively. In addition, let for the cell size . Then the quadratic ENO interpolation is defined as
where
for . Here, denotes a function that returns the value that has the minimum absolute value, and is a discretization of at according to the second-order finite differences in [29, 30]. For the detailed formula, see Section 3.2.
When one of the vertices does not belong to , interpolation is performed as follows.
-
1.
Replace with another cell that has at least one vertex belonging to .
-
2.
Approximate the velocity using the moving least-squares (MLS) method.
When has a vertex that belongs to , we skip step 1 above. By contrast, when there is no vertex that belongs to , we adopt the bisection algorithm introduced in [12]. First, we set . Then we repeat the sequence
until the cell containing has a vertex that belongs to . After the iteration terminates, we set to be the cell containing . This process is schematically illustrated in Figure 3(a).
After the cell is selected, we apply the MLS method. A linear polynomial with basis is constructed so as to minimize
where is a Gaussian weight function. To construct a sample point , we first set . Let denote a cell such that . Then we define , where
and
for the standard basis . Note that consists of neighboring grid points that belong to , and consists of the points that belong to , where the line segment with the point and lies along a Cartesian axis. In practice, we compute using the techniques in the GFM [27, 23]. For example, consider the situation illustrated in Figure 3(b). The grid point is not in the fluid domain . Let and denote the values of the level set function at and , respectively. Then is in , where is computed as
Sample points are then defined naturally; denotes the value of on when , and is given by the boundary condition when . After finding the polynomial , we simply approximate
A complete description of the MLS method is given in [26, 24].
3.2 Diffusion term
The Laplacian velocity operator is discretized using the method introduced by Min et al. [31]. We refer to a regular node as a node for which neighboring nodes in all the Cartesian directions exist; see Figure 4(a). Let be the values of at the nodes immediately adjacent to , and denote the distances between and the neighboring nodes to the right, left, top, and bottom, respectively. Then the Laplacian of at the regular node is discretized as


Nonuniform Cartesian grids produce hanging nodes, which appear only within the region of finer resolution. Referring to figure 4(b), the Laplacian of at a T-junction node is discretized by
for
When the node is close to the boundary , some of the adjacent nodes used in the discretization may lie outside the domain. For example, the right-hand neighbor may not belong to . In this case, as explained in the previous section, we find the boundary point by computing . Then, by replacing with and with the boundary condition, the Laplacian can be discretized at the node close to the boundary.
3.3 Pressure gradient
We now consider the discretization of the pressure gradient operator. In the Arakawa B grid structure, the pressure variables are located at cell centers. Pressure nodes are usually not aligned horizontally or vertically with velocity nodes. Therefore, when is discretized at the node , the intermediate value and corresponding points , which have the same coordinate as , are computed and used in the discretization.
First, consider the case when is a regular node. Referring to Figure 5(a), the pressure variables on the left side of are linearly interpolated to define
The distance between and is then
We can compute and in a similar manner. Then is discretized as
For the T-junction node in the cell configuration shown in Figure 5(b), the preceding discretization cannot be directly used to approximate because there is only one adjacent cell to the left of . In Figure 5(b), the coordinate of the node with is greater than that of . Then, the line segment connecting the two pressure nodes with and intersects the line on the left side of . Therefore, and its nodes are linearly interpolated to define and as
and
When the coordinate of the node with is less than that of , and its node are used instead of .


The discretization of is defined similarly. For nodes near the boundary, whenever one of the vertices of the cell belongs to , ghost pressure nodes are defined at the cell. As a result, the discretization described above can be directly applied to the nodes near the boundary.
3.3.1 Alternative discretization in finite volume approach
There is a relatively simple approach to discretizing the pressure gradient operator by the finite volume method. It does not require that an intermediate value be computed, and the extension to octrees is natural and simple. As shown in Figure 4, we define the control volume of the grid node as . Note that the control volume is consistent with the discretization of the Laplacian discussed in Section 3.2. Then the divergence theorem yields
where is the outward vector normal to . Let denote the cell intersecting the control volume and denote a pressure variable on the cell . By interpreting the pressure variable as a piecewise constant function on the cell, the integral can be approximated in the finite volume sense as
Then, is discretized by dividing this approximation by the area of the control volume . For example, in Figure 4(a) is discretized by
On the hanging node shown in Figure 4(b), the discrete pressure gradient is defined as
On the nodes near the boundary, the control volume is modified as described in Section 3.2. If , is computed such that , and is replaced with . Note that the finite volume approach is motivated by [37]. Although it is much simpler than the finite difference approach, it is found numerically that the order of convergence is reduced to first order at higher Reynolds number. The degradation of the order of accuracy is reported in Table 1. For this reason, the finite difference approach is used in most of the numerical experiments.
3.4 Divergence-free equation
The divergence of the velocities is discretized at each cell. Let denote a cell, and define a set as
where are ordered in the counterclockwise direction. Then is discretely approximated as the union of line segments :
where is a line segment connecting and . Here, . The normal vector corresponding to is obtained by clockwise rotation of . Then the divergence of the velocities is discretized in the finite volume sense using the divergence theorem:
(3) |
Precise discretization is demonstrated by considering the general cell configuration shown in Figure 6. The set consists of eight points; are grid nodes that belongs to , and are boundary points. As shown in the previous sections, , which define the position of the boundary, are computed by linear interpolation of . Consequently, the divergence operator is discretized as follows:
In the last expression, parentheses indicate boundary integrand values in the counterclockwise direction from the right edge.

Note that the discretization of the divergence-free equation (3) on a uniform Cartesian grid is equivalent to the discretization of the bilinear-constant velocity–pressure finite element method. It is also known as the element and exhibits pressure checkerboard instability. To reduce the instability, stabilizing techniques have been studied in the finite element community. For example, the penalty method [22] reduces the instability by decoupling the velocity and pressure variables. Other examples include local and global stabilizers [5, 40], which add an artificial term to the divergence-free equation, and the pressure gradient projection method [4, 15], which was inspired by fractional step methods. Among many stabilizers, we extend the global stabilizer in [40] to the quadtree grid as follows. Using the same notation as in (3), let be a neighboring cell to such that , and let denote the pressure variable in the cell . Then the stabilizer is defined as
for . In Section 4.1.2, the need for the stabilizer is described.
Remarks
Note that the presented pressure gradient operator is rank-2 deficient on a uniform Cartesian grid. For any real numbers , if the pressure variables are given as illustrated in Figure 7(a), at the interior vertices. However, for quadtree grids, this problem is resolved. The discretization at the vertex marked with a red circle in Figure 7(b) yields ; consequently, the checkerboard pressure distribution shown in Figure 7(a) no longer belongs to the kernel space unless . Therefore, on nonuniform Cartesian grids, the operator is rank-1 deficient. To show that the divergence operator is rank-1 deficient, let us denote the divergence operator by , and let be a diagonal matrix that maps a pressure variable to pressure variable and is defined as
where is the area of the cell . It can be shown that , like the pressure gradient operator, is rank-2 deficient on a uniform grid and is reduced to a rank-1 deficient matrix on a quadtree grid. Note that the kernel of is spanned by the vector of all those at cell centers. Because the kernel space of the transpose matrix has been determined, we project the right-hand side onto the range space before solving the linear system. Let denote a variable located at the cell center on the right-hand side. We define as
Then is replaced by .
Let denote the linear operator in the finite volume discretization introduced in Section 3.3.1. Then it can be shown that the discrete gradient operator is the negative adjoint of the discrete divergence, that is, . However, this property does not hold for the proposed discretization of the pressure gradient by the finite difference method. Despite the desirable matrix property, we do not adopt the finite volume approach because of the lower order of convergence at high Reynolds number.


3.5 Extension to three spatial dimensions
The proposed method can be extended to three dimensions on cubical domains with octree data structure. The discretization of the advection and diffusion terms can be naturally extended to three spatial dimensions as in [29, 31]. However, the discretization of the pressure gradient and incompressibility condition require modifications.
We first describe the discretization of the pressure gradient. Consider the discretization of the derivative of the pressure in the direction at a node . As shown in Section 3.3, a standard approach is to compute the intermediate values and with their locations and , respectively, which have the same and coordinates as . In contrast to the two-dimensional case, three or four cells are used to approximate the intermediate values. If four cells are chosen, bilinear interpolation on the plane is applied to approximate the intermediate values. If three cells are used, linear interpolation is applied instead of bilinear interpolation. For example, suppose we have chosen three cells whose center is for , and let us denote by the pressure at the corresponding cell. Linear polynomials and are constructed on the plane so that
Then and are approximated as and .
The remaining difficulty is the suitable choice of cells, which depends on the number of adjacent cells in the positive direction with respect to , that is, cells for which the maximum coordinate is larger than .
When there are three or four cells in the positive direction, the cells are used to construct linear or bilinear polynomials, respectively. However, when there are only two cells or one cell in the positive direction, we use the cell information from the negative direction in the linear interpolation. Specifically, we select cells so that the point lies within a triangle with vertices , and . Figure 8 shows an example.


Now, consider the discretization of the divergence operator. As in two spatial dimensions, we use the divergence theorem to approximate the divergence operator in a cell . In three dimensions, the line fraction is replaced with a face fraction, and thus the line integration becomes an area integration. The discrete form of the divergence operator is given by
where denotes the set of all faces of the cell , and is the outward unit normal to each face. represents the volume of the cell , whereas is the area of the cell face. Moreover, is discretized by the average of at the four corner vertices of the face. As shown in Figure 9, the discretization of the area integration with the normal vector parallel to the axis is calculated as

4 Numerical results
In this section, we present the results of several numerical experiments to demonstrate the performance of the proposed method. We begin with numerical tests that confirm the second-order accuracy of the proposed method. Next, we provide numerical evidence that illustrates the performance of the method for standard benchmark problems. We implemented all the numerical experiments in C++ on a personal computer. To solve the saddle-point system (2) generated by our discretization, we used the generalized minimal residual method with an incomplete LU preconditioner.
4.1 Accuracy tests
To estimate the order of accuracy of the suggested method, we compare approximated numerical solutions to an analytic solution. For a two-dimensional example, consider a single-vortex problem whose exact solutions are given by
(4) | ||||
The corresponding forcing term is given by
The computational domain is taken to be , and the terminal time is set to .
4.1.1 Random quadtree
To demonstrate the robustness of the proposed method, we first describe numerical tests on randomly generated non-graded quadtrees of levels ranging from to for a wide range of Reynolds numbers between and . For each Reynolds number, a test was conducted in four randomly generated grids with . Figure 10 shows an example of the randomly generated quadtree of level and a refined grid of level . The average numerical errors on four randomly generated grids and the best-fit order of convergence are presented in Figure 11. The numerical results indicate that the proposed method is second-order accurate for the fluid velocity regardless of the grid formulation and Reynolds number. Second-order convergence of the pressure of the velocity in norms was not observed at relatively low Reynolds number; however, second-order convergence in norms was observed.








4.1.2 Irregular domains
To demonstrate the second-order accuracy in various irregular domains,
we conduct a numerical experiment with the same exact solutions as (4) with on the four domains in :
Circle | : | . |
Ellipse | : | . |
Flower | : | . |
Moving Flower | : | . |
Note that the domains Circle, Ellipse, and Flower do not change with respect to time, whereas the other domain, Moving Flower, rotates counterclockwise. The domains and the generated quadtree grid of level at are presented in Figure 12. Time step size is set to be . Second-order convergence of the velocity, pressure, and divergence in both the and norms are observed in
Figure 13. The results indicate that the proposed method can handle irregular domains and moving domains.
In Table 1, we present the results obtained by discretizing in the finite volume approach introduced in Section 3.3.1, which are compared with those obtained by the finite difference approach. The approximation errors of the velocity measured in the infinity norm and the order of accuracy at Reynolds numbers of on the circular domain are reported. The finite volume approach delivers second-order accuracy for ; however, it is reduced to first-order convergence at the higher Reynolds number, . Otherwise, the finite difference method shows satisfactory second-order convergence independent of Reynolds number, and the magnitude of the errors is lower at all resolutions.
We demonstrate the role of pressure stabilization by comparing the results with those of an unstabilized system, that is, . Table 2 reports the order of convergence of the velocity and pressure on the Moving Flower domain with Reynolds number . Although second-order accuracy of the velocity was achieved in both cases, the convergence rate of the pressure was degraded in the norm when the stabilizer was not applied. In addition, Figure 15 shows the change in the errors of the pressure on a quadtree grid of level with respect to time. Although both methods show oscillations in the error, the magnitudes of the oscillations and errors are smaller when the stabilizer is used.


















FV approach | order | FD approach | order | FV approach | order | FD approach | order | ||
---|---|---|---|---|---|---|---|---|---|
4/6 | 1.23.E-03 | 6.81.E-04 | 2.12.E-02 | 5.00.E-03 | |||||
5/7 | 3.09.E-04 | 2.00 | 2.26.E-04 | 1.59 | 9.66.E-03 | 1.14 | 1.89.E-03 | 1.52 | |
6/8 | 7.83.E-05 | 1.98 | 6.40.E-05 | 1.82 | 5.94.E-03 | 0.70 | 5.48.E-04 | 1.78 | |
7/9 | 2.13.E-05 | 1.88 | 1.71.E-05 | 1.91 | 2.70.E-03 | 1.14 | 1.30.E-04 | 2.07 |
Not stabilized | Stabilized | ||||||||
---|---|---|---|---|---|---|---|---|---|
errors of | order | errors of | order | errors of | order | errors of | order | ||
4/6 | 7.73.E-04 | 2.89.E-02 | 7.82.E-04 | 8.37.E-03 | |||||
5/7 | 3.33.E-04 | 1.21 | 2.24.E-02 | 0.36 | 3.36.E-04 | 1.22 | 3.69.E-03 | 1.18 | |
6/8 | 8.09.E-05 | 2.04 | 1.23.E-02 | 0.87 | 8.20.E-05 | 2.04 | 1.25.E-03 | 1.56 | |
7/9 | 2.16.E-05 | 1.90 | 1.32.E-02 | -0.10 | 2.16.E-05 | 1.93 | 5.31.E-04 | 1.24 |
4.1.3 Random octree
As a three-dimensional example, we consider the following analytical solution on the cubical domain :
(5) | ||||
Simulations were conducted up to with on a random octree grid of levels ranging from to . Two Reynolds numbers, , are considered. Figure 14 presents the and errors, which are compared to those of the analytical solutions. Although the convergence rate of the pressure attained at is lower than 1, we observe overall second-order convergence rates even for a random octree grid.
4.2 Driven cavity flows
In this section, we consider the lid-driven cavity flow problem. Because there is no exact solution of cavity flow, we compare the simulation results to those reported in previous works. We first simulated cavity flow on a rectangular domain and compared it with the reference results of Ghia et al. [17]. The numerical simulation of driven cavity flow around a flower-shaped object introduced by Coco [12] follows. In this example, we adaptively refine the cell when for a tolerance and cell size . As a two-dimensional example, we set the tolerance to .
4.2.1 Lid-driven cavity on a rectangular domain
We solve the lid-driven cavity flow problem on the computational domain with the boundary condition
Numerical simulations were conducted for two Reynolds numbers, and , on quadtree grids of level and , respectively.
In both cases, the simulations were run until . Streamlines and the quadtree grids are shown in Figure 16. In Figure 17, the results are quantitatively compared with the reference solution of Ghia et al. [17]. The results are in overall agreement with the reference solutions for all cases.






4.2.2 Lid-driven cavity flow around a flower-shaped object
Using the experimental setup designed by Coco [12], we tested the driven cavity flow on the computational domain , where the level set function is given in polar coordinates as
As in 4.2.1, no-slip boundary conditions were used on all but the top wall, where the wall velocity was specified by the unit horizontal velocity, . A no-slip boundary condition was also imposed on the boundary of the flower-shaped object. The cavity flow was studied for several Reynolds numbers: at with a quadtree grid of level and at with a quadtree grid of level . Simulations were conducted up to and for low () and high () Reynolds numbers, respectively. Streamlines of the velocities at the terminal time are plotted in Figure 18.
The results for the low Reynolds numbers show good agreement with those reported in [12]. Two primary vortices are observed at the upper left and upper right near the flower-shaped object for , and the vortex at the upper left is not observed at . According to [12], the flower-shaped object prevents the formation of counterclockwise vortices in the lower corners. However, we found that counterclockwise vortices appear at the lower corners after a sufficiently long time at the high Reynolds numbers (). Furthermore, the primary vortex that appears in the standard square cavity flow problem is split into five vortices around the flower-shaped object.






4.3 Rotating flower
As a third example, we consider the rotating flower-shaped object problem proposed by Coco [12]. A flower-shaped object rotates counterclockwise about the origin with angular velocity . Mathematically, the computational domain at time can be expressed as where the level set function is given in polar coordinates by
A no-slip boundary condition is imposed on all four walls, and the boundary condition is imposed on the flower-shaped object, which agrees with the movement of the interface.
Numerical experiments were conducted on a quadtree grid of level for two Reynolds numbers, and , whereas Coco performed experiments using only . As in [12], we plotted streamlines of the resulting fluid flow in the test with every quarter rotation, that is, every 1.25 s, as shown in Figure 19(f). The black dot is plotted on the same petal. Figure 19(f) shows that the positions of the vortices agree with those presented in [12]. After a full rotation, we observe four clockwise vortices in the corners. For the high Reynolds number, , streamlines appear every 10 s in Figure 20(f). In contrast to the case, vortices are formed in each corner around . The results from to shows that the fluid converges to a steady-state solution.
4.4 Application to two-dimensional rising bubble
Although the proposed method is applicable only to single-phase flow, it can be easily extended to two-phase flow problems. The level set function divides into and . The densities and viscosities for may differ. According to the delta function equation, two-phase flow with surface tension can be described as
(6) |
Here, represents the outward normal pointing from to the interface, represents gravity, denotes the mean curvature of the interface, and is the surface tension coefficient. A time-step procedure similar to that for the single-phase flow described in Section 3 is used to simulate two-phase flow, as follows:
-
1.
From time level , compute the appropriate , and define . Advect the level set to obtain at time level , and then reinitialize it.
-
2.
Generate a quadtree grid with respect to the level set .
-
3.
Solve for and at time level .
For advection and the reinitialization of the level set function, we adopt the second-order finite difference method on a quadtree grid [30]. By using the numerical delta function, the Navier–Stokes equations can be discretized as
where are determined according to the second-order backward differences as follows:
The discretization of and does not differ from the discretization introduced in Section 3. Using notation similar to that in Figure 4, the terms , , and at are discretized by
where and are defined similarly. Here, and are numerical Heaviside and delta functions and are defined as
with .
In this section, we consider the evolution of a bubble rising in a rectangular domain . A bubble of radius is initially located at the origin. We consider three-dimensionless quantities: the Reynolds number , the Eötvös number , and the Morton number . Then the corresponding density, viscosity, surface tension, and gravity coefficient are determined:
Simulations were performed up to , and was computed under the following Courant–Friedrichs–Lewy condition:
In Figure 21, the terminal shapes of the bubble at time are shown on uniform grids of and quadtree grids of level , and . In addition, the relative area loss, rising velocity, and center of mass are plotted in Figure 22. We observe that the results on the quadtree grid are comparable to those on the uniform grid.







5 Conclusion
We presented a second-order-accurate monolithic method for solving the two-dimensional incompressible Navier–Stokes equations on irregular domains and quadtree grids. In the proposed grid layout, velocities are located at cell vertices, and pressure variables are located at cell centers. Simple and effective second-order finite differences on the vertices of a quadtree grid [29] were used to discretize the advection and diffusion terms of the velocity. The pressure gradient was discretized using finite differences, and ghost points were used for cells outside the domain. The divergence of the velocity was discretized using the divergence theorem, whereas a cut-cell method was used to treat the boundary conditions. Numerical experiments included analytical and practical examples. For the analytical test, we presented the order of convergence of the velocity and pressure in both the and norms. The results indicate that the suggested method is second-order accurate for velocity regardless of the Reynolds number and domain shape. Second-order convergence of the pressure was observed only for relatively high Reynolds numbers, and first-order convergence was obtained for low Reynolds numbers. Classical lid-driven cavity flow and recent numerical experiment of incompressible flow on irregular domains were conducted and compared to the reference results. To demonstrate a more demanding application, numerical simulation of a rising bubble was investigated.
Although an extension of the proposed method to an octree grid on a cubical domain was presented, the full three-dimensional extension of the method to irregular domains was not studied. The main difficulty in three dimensions is the discretization of the divergence-free equation using the cut-cell approach. As reported by Cheny et al. [9], there are many different cases, and developing consistent discretization on irregular domains may require surface integration on general polygons and curved elements. As a future work, we will extend the proposed method on an octree grid to three-dimensional irregular domains. Furthermore, the extension of the proposed method to a multiphase flow problem and fluid–structure interaction will also be an interesting future work.
References
- [1] Arakawa, A., Lamb, V.R.: Computational design of the basic dynamical processes of the ucla general circulation model. General circulation models of the atmosphere 17(Supplement C), 173–265 (1977)
- [2] Barrett, A., Fogelson, A.L., Griffith, B.E.: A hybrid semi-lagrangian cut cell method for advection-diffusion problems with robin boundary conditions in moving domains. arXiv preprint arXiv:2102.07966 (2021)
- [3] Bedrossian, J., Von Brecht, J.H., Zhu, S., Sifakis, E., Teran, J.M.: A second order virtual node method for elliptic problems with interfaces and irregular domains. Journal of Computational Physics 229(18), 6405–6426 (2010)
- [4] Blasco, J., Codina, R.: Space and time error estimates for a first order, pressure stabilized finite element method for the incompressible navier–stokes equations. Applied Numerical Mathematics 38(4), 475–497 (2001)
- [5] Bochev, P.B., Dohrmann, C.R., Gunzburger, M.D.: Stabilization of low-order mixed finite elements for the stokes equations. SIAM Journal on Numerical Analysis 44(1), 82–101 (2006)
- [6] Bochkov, D., Gibou, F.: Solving poisson-type equations with robin boundary conditions on piecewise smooth interfaces. Journal of Computational Physics 376, 1156–1198 (2019)
- [7] Brown, D.L., Cortez, R., Minion, M.L.: Accurate projection methods for the incompressible navier–stokes equations. Journal of computational physics 168(2), 464–499 (2001)
- [8] Chen, X., Li, Z., Álvarez, J.R.: A direct iim approach for two-phase stokes equations with discontinuous viscosity on staggered grids. Computers & Fluids 172, 549–563 (2018)
- [9] Cheny, Y., Botella, O.: The ls-stag method: A new immersed boundary/level-set method for the computation of incompressible viscous flows in complex moving geometries with good conservation properties. Journal of Computational Physics 229(4), 1043–1076 (2010)
- [10] Cho, H., Kang, M.: Fully implicit and accurate treatment of jump conditions for two-phase incompressible navier-stokes equation. arXiv preprint arXiv:2005.13724 (2020)
- [11] Chorin, A.J.: A numerical method for solving incompressible viscous flow problems. Journal of computational physics 135(2), 118–125 (1997)
- [12] Coco, A.: A multigrid ghost-point level-set method for incompressible navier-stokes equations on moving domains with curved boundaries. Journal of Computational Physics 418, 109623 (2020)
- [13] Coco, A., Russo, G.: Finite-difference ghost-point multigrid methods on cartesian grids for elliptic problems in arbitrary domains. Journal of Computational Physics 241, 464–501 (2013)
- [14] Coco, A., Russo, G.: Second order finite-difference ghost-point multigrid methods for elliptic problems with discontinuous coefficients on an arbitrary interface. Journal of Computational Physics 361, 299–330 (2018)
- [15] Codina, R., Blasco, J.: Stabilized finite element method for the transient navier–stokes equations based on a pressure gradient projection. Computer Methods in Applied Mechanics and Engineering 182(3-4), 277–300 (2000)
- [16] Fedkiw, R.P., Aslam, T., Merriman, B., Osher, S.: A non-oscillatory eulerian approach to interfaces in multimaterial flows (the ghost fluid method). Journal of computational physics 152(2), 457–492 (1999)
- [17] Ghia, U., Ghia, K.N., Shin, C.: High-re solutions for incompressible flow using the navier-stokes equations and a multigrid method. Journal of computational physics 48(3), 387–411 (1982)
- [18] Gibou, F., Fedkiw, R.P., Cheng, L.T., Kang, M.: A second-order-accurate symmetric discretization of the poisson equation on irregular domains. Journal of Computational Physics 176(1), 205–227 (2002)
- [19] Guittet, A., Theillard, M., Gibou, F.: A stable projection method for the incompressible navier–stokes equations on arbitrary geometries and adaptive quad/octrees. Journal of Computational Physics 292, 215–238 (2015)
- [20] Harlow, F.H., Welch, J.E.: Numerical calculation of time-dependent viscous incompressible flow of fluid with free surface. The physics of fluids 8(12), 2182–2189 (1965)
- [21] Hellrung Jr, J.L., Wang, L., Sifakis, E., Teran, J.M.: A second order virtual node method for elliptic problems with interfaces and irregular domains in three dimensions. Journal of Computational Physics 231(4), 2015–2048 (2012)
- [22] Hughes, T.J., Liu, W.K., Brooks, A.: Finite element analysis of incompressible viscous flows by the penalty function formulation. Journal of computational physics 30(1), 1–60 (1979)
- [23] Kang, M., Fedkiw, R.P., Liu, X.D.: A boundary condition capturing method for multiphase incompressible flow. Journal of Scientific Computing 15(3), 323–360 (2000)
- [24] Lancaster, P., Salkauskas, K.: Surfaces generated by moving least squares methods. Mathematics of computation 37(155), 141–158 (1981)
- [25] LeVeque, R.J., Li, Z.: The immersed interface method for elliptic equations with discontinuous coefficients and singular sources. SIAM Journal on Numerical Analysis 31(4), 1019–1044 (1994)
- [26] Levin, D.: The approximation power of moving least-squares. Mathematics of computation 67(224), 1517–1531 (1998)
- [27] Liu, X.D., Fedkiw, R.P., Kang, M.: A boundary condition capturing method for poisson’s equation on irregular domains. Journal of computational Physics 160(1), 151–178 (2000)
- [28] Losasso, F., Gibou, F., Fedkiw, R.: Simulating water and smoke with an octree data structure. In: ACM SIGGRAPH 2004 Papers, pp. 457–462 (2004)
- [29] Min, C., Gibou, F.: A second order accurate projection method for the incompressible navier–stokes equations on non-graded adaptive grids. Journal of computational physics 219(2), 912–929 (2006)
- [30] Min, C., Gibou, F.: A second order accurate level set method on non-graded adaptive cartesian grids. Journal of Computational Physics 225(1), 300–321 (2007)
- [31] Min, C., Gibou, F., Ceniceros, H.D.: A supra-convergent finite difference scheme for the variable coefficient poisson equation on non-graded grids. Journal of Computational Physics 218(1), 123–140 (2006)
- [32] Ng, Y.T., Min, C., Gibou, F.: An efficient fluid–solid coupling algorithm for single-phase flows. Journal of Computational Physics 228(23), 8807–8829 (2009)
- [33] Olshanskii, M.A., Terekhov, K.M., Vassilevski, Y.V.: An octree-based solver for the incompressible navier–stokes equations with enhanced stability and low dissipation. Computers & Fluids 84, 231–246 (2013)
- [34] Osher, S., Sethian, J.A.: Fronts propagating with curvature-dependent speed: Algorithms based on hamilton-jacobi formulations. Journal of computational physics 79(1), 12–49 (1988)
- [35] Peskin, C.S.: Numerical analysis of blood flow in the heart. Journal of computational physics 25(3), 220–252 (1977)
- [36] Popinet, S.: Gerris: a tree-based adaptive solver for the incompressible euler equations in complex geometries. Journal of Computational Physics 190(2), 572–600 (2003)
- [37] Purvis, J.W., Burkhalter, J.E.: Prediction of critical mach number for store configurations. AIAA Journal 17(11), 1170–1177 (1979)
- [38] Russo, G., Smereka, P.: A remark on computing distance functions. Journal of computational physics 163(1), 51–67 (2000)
- [39] Schroeder, C., Stomakhin, A., Howes, R., Teran, J.M.: A second order virtual node algorithm for navier–stokes flow problems with interfacial forces and discontinuous material properties. Journal of Computational Physics 265, 221–245 (2014)
- [40] Silvester, D.J., Kechkar, N.: Stabilised bilinear-constant velocity-pressure finite elements for the conjugate gradient solution of the stokes problem. Computer Methods in Applied Mechanics and Engineering 79(1), 71–86 (1990)
- [41] Theillard, M., Gibou, F., Saintillan, D.: Sharp numerical simulation of incompressible two-phase flows. Journal of Computational Physics 391, 91–118 (2019)
- [42] Xiu, D., Karniadakis, G.E.: A semi-lagrangian high-order method for navier–stokes equations. Journal of computational physics 172(2), 658–684 (2001)
- [43] Yoon, M., Yoon, G., Min, C.: On solving the singular system arisen from poisson equation with neumann boundary condition. Journal of Scientific Computing 69(1), 391–405 (2016)