Documente Academic
Documente Profesional
Documente Cultură
LONG CHEN
In this chapter, we present the most popular finite difference method, MAC [4], for
the Stokes equations and analyze the MAC scheme from different prospects. WE shall
consider the Stokes equation
−∆u + ∇p = f in Ω,
(1)
−∇ · u = 0 in Ω.
Here for the sake of simplicity, we fix the viscosity constant µ = 1.
1. MAC D ISCRETIZATION
Let u = (u, v) and f = (f1 , f2 ). We rewrite the Stokes equations into coordinate-wise
(2) −∆u + ∂x p = f1 ,
(3) −∆v + ∂y p = f2 ,
(4) ∂x u + ∂y v = 0.
The domain Ω = (0, 1)2 is decomposed into small squares with size h. We use two di-
mensional uniform grids for Ω = (0, 1)2 as a typical setting. Generalization to domains
composed by rectangles and to three dimensional domains composed by cubes is straight-
forward but with extra notation.
Standard central difference discretization of ∆ and ∂x , ∂y at vertices of the uniform grid
will not give a stable discretization of Stokes equations due to the failure of the discrete
inf-sup condition. To see this, one can view the 5-point stencil as using P1 element for
Laplacian operator and thus discretization at grid points is equivalent to use P1 − P1 un-
stable pair. Similarly changing pressure discretization to centers of cells corresponds to
P1 − P0 which is not stable neither.
The idea of MAC, Marker and Cell, is to place the unknown of (u, v, p) in different loca-
tions. Specifically the pressure p is located in the center of each cell and the x-component
velocity u on the middle points of vertical edges (red dots) and the y-component velocity
v on middle points of horizontal edges; see Figure 1.
The MAC scheme is to discretize the x-coordinate momentum equation (2) at vertical
edges, the y-coordinate momentum equation (3) at horizontal edges, and the continuity
equation (4) at cell centers using central difference schemes.
Let us introduce the indices system consistent to the matrix, which is easier for the
programming: i is the row index and j is the column index, running from 1 : n or 1 : n + 1,
where n the number of cells in one direction. The pressure is then discretized to a matrix
p(1:n,1:n), and the velocity is u(1:n,1:n+1), and v(1:n+1,1:n). One can easily
write out the mapping from the index (i, j) to the coordinate (xj , yi ) for different variables.
Note that it is not consistent with the traditional indices system where i for xi and j for
yj . The advtange to use the proposed index system is that once the mapping (algebraic to
2.2.2.MAC
MAC
MACDDDISCRETIZATION
ISCRETIZATION
ISCRETIZATION
2 LONG CHEN
j jj j jj jjj
i ii i ii i ii
( A()A(index
A)(a)
)index
index
pforfor
for
p pp ( B()B( B
) )index
index
index
(b) ufor
forfor
u uu ( C( C
)( C)index
)index
index for
vfor
(c)for vvv
FFIGURE
F IGURE 1.1.1.
IGURE Index
Index
Index for
forfor
p,p,u,
p,u,u,
v.v.v.
F IGURE 1. Location and indices of (u, v, p) variables.
2.1.
2.1.2.1. MAC
MACMAC Scheme.
Scheme.
Scheme. Suppose
Suppose
Suppose wewewe have
havehave a arectangular
arectangular
rectangular decomposition,
decomposition,
decomposition, for
forfor each
eacheach cell,
cell,
cell, the
thede-
the de-
de-
geometry
gree
greegree
ofofof mapping)
freedoms
freedoms
freedoms forfor
uisuand
for fixed,
uand
and in
vare
v vare almost
are located
located
located all
ononplaces
on the
thethe of coding,
vertical
vertical
vertical edge
edgeedge we operate
centers
centers
centers and
and on
and the matrix
horizontal
horizontal
horizontal and
edge
edge
edge
2 such indices system is more SOLVING STOKES
intuitive to EQUATION
traverse WITH
in the MAC
matrix.METHOD
centers,
centers,
centers, respectively,
respectively,
respectively, and
and and
thethe
the degree
degree
degree ofofof freedoms
freedoms
freedoms forfor
for pressure
pressure
pressure pare
ppare are located
located
located atatatcell
cell
cell centers.
centers.
centers.
The
The MAC
MAC scheme
scheme is
is written
written
The MAC scheme is written as (µ = 1) as
as (µ(µ= = 1)1)
i,ji,j
i,j i i1,j
4u4u
4u u uui 1,j1,j i+1,j
u uui+1,j
i+1,j i,ji,j
uuui,j1 11 uu ui,j+1
i,j+1
i,j+1
ppi,jpi,ji,j ppi,j
pi,ji,j1 11 i,ji,ji,j
(2.1)
(2.1)
(2.1) + ++ === ff1f11
ui 1,j h2hh22 i 1,j
hhh
v
4vi,ji,j v ivvi1,j
i,j
4v4v i 1,j
1,j i+1,j
v vvi+1,j
i+1,j i,ji,j
v vv i,j1 11 v i,j+1
vvi,j+1
i,j+1
ppi pi i1,j1,j
1,j i,j
pppi,ji,j i,ji,ji,j
(2.2)
(2.2)
(2.2) 22 + ++ === ff2f22 i,j
h2hh p i 1,j
hhh v
i,j+1
i,j+1 i,ji,j i,j i,j
i,j i+1,j i+1,j
i+1,j
u uu
i,j+1
u uu v v v
i,j
vv v
(2.3)
u(2.3)
(2.3)
i,j 1
u i,j
ui,j+1 v i,j 1 v i,j ++ v+i,j+1 === 000
pi,j 1 pi,j hhh hhh
It’s
It’seasy
easytotosee
tosee
see that
that the
the above
above scheme
scheme has
has second
second order
order truncation
truncation error.
error.
i,j
ui,j+1
It’s easy that the above scheme has second order truncation error. u
pi,j
1 1 1 pi,j
ui+1,j
v i+1,j v i+1,j
an example, consider the discretization at the index (1, j). We introduce the ghost value
at y = 1 + h/2, i.e. u(0, j). Then we can discretize the momentum equation at (1, j)
using (5). The ghost value is then eliminated by the linear extrapolation, i.e, requiring
(u0,j + u1,j )/2 = gD (xj , 1). Therefore the modified discretization (5) is
5u1,j − u2,j − u1,j−1 − u1,j+1 p1,j − p1,j−1 2gD (xj , 1)
2
+ = f11,j + .
h h h2
In short
(8) (5, −1, −1, −1, −2)
is the stencil for u-unknowns near the horizontal boundaries.
We can also use the quadratic extrapolation, i.e., use u1/2,j , u1,j , u2,j to fit a quadratic
function and evaluate at u0,j to get u0,j = −2u1,j + 31 u2,j + 83 u1/2,j . The modified
boundary scheme is:
6u1,j − 43 u2,j − u1,j−1 − u1,j+1 p1,j − p1,j−1 1,j
8
3 gD (xj , 1)
2
+ = f 1 + .
h h h2
We denote this near boundary stencil by
4 8
(9) (6, − , −1, −1, − ).
3 3
The quadratic extrapolation will lead to a better accuracy and the detailed error analysis
can be found in Section 3. It will, however, destroy the symmetry of the matrix since the
coefficient connecting u1,j to u2,j is −4/3 not −1.
For Neumann boundary condition ∂u/∂n|∂Ω = gN , the ghost value will be eliminated
by the central difference discretization (u0,j − u1,j )/h = gN (xj , 1) and the modified
stencil is
3u1,j − u1,j−1 − u1,j+1 − u2,j p1,j − p1,j−1 gN (xj , 1)
2
+ = f11,j + .
h h h
Unlike the Dirichlet boundary condition, similar modification is needed for all grids points
on or near the boundary edges and for points near corners two ghost degree of freedom
(dof) should be introduced; see Chapter: Finite Difference Methods.
We can write the discrete problem in the matrix form with familiar notation:
A BT uh fh
(10) = .
B 0 ph 0
Exercise 1.1. Verify the matrix BB T is the standard 5-point stencil of Laplacian operator
discretized at at cell centers and with Neumann boundary conditions.
2.1. Distributive Gauss-Seidel Relaxation. The standard relaxations, e.g., the Gauss-
Seidel relaxation, are not applicable to the system (10), since the matrix is not diagonally
dominant, and especially the zero block in the diagonal hampers the relaxation. The idea
of the distributive relaxation is to transform the principle operators to the main diagonal
and apply the equation-wise decoupled relaxation.
4 LONG CHEN
(14) g −1 (b − Lxk ),
xk+1 = xk + M(LM)
where to simply the notation denoted by xk = (uk , pk ), b = (f, g). It can be shown this is
indeed the projection method; see Chapter: Fast Solvers for Stokes Equations.
The so-called DGS smoother introduced by Brandt and Dinar [1] comes from consecu-
g Let Â, Âp be smoothers for A
tively Gauss-Seidel relaxation applied to the operator LM.
and Ap , respectively. We solve the transformed residual equation
−1
 0 δw r
= u
B Â−1
p δq rp
and update (u, p) through the distributive matrix M. One iteration can be performed by
the following algorithm.
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 5
The uk+1 is still not used in the update of pk+1 but will contribute to the next update
of velocity uk+1+1/2 . If we skip uk+1 , the way of updating uk+1/2 and pk+1 can be
interpret as an inexact Uzawa using Ap Â−1p as an approximation for the inverse of the
Schur complement. From this point of view, the step (3) can be simplified as pk+1 =
pk + Buk+1/2 − g.
In the DGS iteration, only algebraic manipulation not the geometric realization of the
indices is needed. The neighboring indices of (i, j) for u, v, p can be found in Fig 2 in the
previous section.
When implement the Gauss-Seidel iteration for finite difference methods, the direct
update version is more efficient than the correction version. For example, the update for
velocity u(i,j) for i=2:n-1,j=2:n is simply
1 u(i,j) = (hˆ2*f1(i,j) + u(i-1,j) + u(i+1,j) + u(i,j-1) + u(i,j+1)...
2 - h*(p(i,j) - p(i,j-1)))/4;
For boundary and near boundary subscript i,j, the stencil should be modified to impose
the boundary condition. Red-black ordering can be used to vectorize the Gauss-Seidel
iteration. See Chapter: Programming of Finite Difference Methods.
After the update of velocity, we need to update the residual for the continuity equation,
i.e. compute rp = g − Bu = g + div u which can be done efficiently using the index
relation of p and u, v; see again Fig. 2 (C).
Then we apply Gauss-Seidel to solve the elliptic equation Ap δq = rp . Here recall
that Ap = BB T is the discrete Laplacian of pressure with Neumann boundary condi-
tion, i.e., (4, −1, −1, −1, −1) for interior cells and (3, −1, −1, −1) for boundary cells and
(2, −1, −1) for corners (dividing by h2 ). One Gauss-Seidel iteration for interior cells will
be
1 dq(i,j) = (hˆ2*rp(i,j) + dq(i-1,j) + dq(i+1,j) + dq(i,j-1) + dq(i,j+1))/4;
For boundary and corner cells, the stencil should be modified accordingly.
Then we should bring the correction dq to u, v, p through the distributive matrix.
Note that B T is just the discrete gradient operator. The update of u will be
1 u(i,j) = u(i,j) + (dq(i,j) - dq(i,j-1))/h;
The update of pressure requires the computation of Ap δq. Its matrix-free version is
1 p(i,j) = p(i,j) - (4*dq(i,j)-dq(i-1,j)-dq(i+1,j)-dq(i,j-1)-dq(i,j+1))/hˆ2;
For boundary and corner cells, the stencil should be modified accordingly.
6 LONG CHEN
2.2. Transfer Operators. At u- and v-grid points, we consider six-points restrictions, and
at p-grid points, a four-point cell-centered restriction. In the finite difference method, the
restriction is also applied to function values which is different with the finite element one
in a scaling.
In stencil notation, the restriction operators are
1 2 1 1 1 1 1
1 1 p 1
u
Rh,2h = ∗ , Rh,2h
v
= 2 ∗ 2 , Rh,2h = ∗ .
8 8 4
1 2 1 1 1 1 1
and Rh,2h are only defined for interior edges, since the dof is prescribed via Dirichlet
v
boundary
14 conditions for SOLVING
boundary edges.
STOKES EQUATION WITH MAC METHOD
1 3 5
0 0
2 4 6
F IGURE 9. Sketch
F IGURE of restriction
3. Sketch for vertical
of restriction foredge center
vertical dof center
edge 0 on coarse
dof 0grid, (A) fine grid
on coarse
points
grid, (A) 6 and coarse
· · · , points
fine1,grid 1, · · ·grid pointcoarse
, 6 and 0 on fine grid.
grid (B).0coarse
point gridgrid.
on fine point 0.
(B). coarse grid point 0.
For the prolongation operators, we typically apply bilinear interpolation of neighboring
coarse-grid unknowns in the staggered grid. See Figure 10. To compute the values at points
5, ·For
· · ,the
10,prolongation operators,
we first calculate we typically
a bilinear function apply
using bilinear interpolation
coarse grid points 1, ·of· ·neighboring
, 4, and the
coarse-grid unknowns in the staggered grid. See Figure 4. To compute
value for fine grid points 5, · · · , 10 are just the evaluation of the bilinear thefunction
values atatpoints
these
5, Onewe
· · · , 10,
points. first
can calculate
eaily derive athat:
bilinear function using coarse grid points 1, · · · , 4, and the
value for fine grid points 5, · · · , 10 are just the evaluation of the bilinear function at these
3 1 3 1
points. One can easily derive u5 = that:u1 + u2 , u6 = u2 + u1 ,
4 4 4 4
33 11 33 11
uu59 =
= uu13 + + uu24,, uu610== uu 2 4++ uu 1 ,3 ,
44 44 44 44
31 1 13 1
u97 = u (u3 5++ uu94),, uu10
8 == (u u 6 + u10u ).,
42 4 24 4 4 3
Following the same the approach, 1 one can also derive 1 formular for computing horizontal
u7 = (u5 + u9 ), u8 = (u6 + u10 ).
edge center degree of freedoms 2on fine grid from coarse 2 grid solution. Piecewise constant
(first-order) interpolation for the p variables.
Following the same approach, one can also derive formulae for computing horizontal
edge center degree of freedoms on the fine grid from the coarse grid solution. Piecewise
constant interpolation for the pressure p is used.
1 3 1 3
5 7 9
6 8 10
2 4 2 4
u5 = u1 + u2 , u6 = u2 + u1 ,
4 4 4 4
3 1 3 1
u9 = u3 + u4 , u10 = u4 + u3 ,
4 4 4 4
1 1
u7 = (u5 + u9 ), u8 = (u6 + u10 ).
2 2
Following the same the approach, one can also derive formular for computing horizontal
edge center degree of freedoms on fine grid from coarse grid solution. Piecewise constant
(first-order) interpolation for the p variables.
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 7
1 3 1 3
5 7 9
6 8 10
2 4 2 4
F IGURE 10. Sketch of prolongation for vertical edge center dofs. (A) coarse grid points
F IGURE 4. Sketch of prolongation for vertical edge center dofs. (A)
1, · · · , 4 on coarse grid. (B). coarse grid points 1, · · · , 4 and fine grid
coarse grid points 1, · · · , 4 on coarse grid. (B). coarse grid points
points 5, · · · , 10 on fine grid.
1, · · · , 4 and fine grid points 5, · · · , 10 on fine grid.
× × × ×
× × × ×
× × × ×
× × × ×
× × × × × ×
(a) Mesh Th1 for u (b) Mesh Th2 for v (c) Mesh Th for p
as shown in Figure 5. The triangulations Th1 and Th2 are modified from quadrangulations in
Han and Wu [3] by dividing rectangles into triangles using diagonals with positive slope.
Corresponding to the triangulations Th1 and Th2 , we define
With appropriate numerical quadrature, we are able to get a variant of MAC scheme.
It is easy to verify that the interior stencil corresponding to a(·, ·) is (4, −1, −1, −1, −1).
For near boundary nodes, again we take u as an example to derive the boundary stencil as
shown in Figure 6.
Denote the basis at point 1 as φ1 = (λ1 , 0)T , straightforward computation yields the
stencil for the near boundary node 1 is
9 3 3
a(uh , φ1 ) = u1 − u4 − u2 − u5 − 2u0 ,
2 4 4
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 9
4
3
τ3
τ4
τ2
p1 τ5 1 p2 2
h
5 τ1
y= 2
τ6
6
ih 0
where xi is the velocity nodes. The inner product (·, ·)h is a discrete version of the L2 -inner
product (·, ·) of V. One can easily show that (u, u)h h (u, u) for any u ∈ V.
Using these notation, we can write the discrete problem (16) in the operator form:
A BT uh Πh f
(20) = .
B 0 ph 0
where (uh , ph ) ∈ Xh := Vh × Qh , Πh f = f h or f I , and (Πh f , 0) ∈ Yh := V0h × Q0h .
10 LONG CHEN
3.2. Connection between FE and FD. For the finite difference schemes and the finite
element scheme (20), we get the same stencil for the divergence operator, and the same
stencil for the interior part for the Laplacian operator. The only difference is the near
boundary stencil of the Laplacian operator, which accounts for different ways of imposing
the Dirichlet boundary condition. We explore their connection below.
First we define the relation between vectors and functions and that between matrices and
operators. We chose the standard hat basis function for Vh and the characteristic functions
of cells as the basis for Qh . Then a function can be identified as its coordinate vector and
vice verse. We put an arrow to indicate this isomorphism. For example, for uh ∈ Vh ,
~ h ∈ RNu is its coordinate vector and similarly for ph ∈ Qh , p~h ∈ RNp is its vector
u
representation. The following identities can be used to define a matrix by a linear operator
and vice verse:
(21) hAuh , v h i = ~v ht A~
~ uh ,
(22) ~ uh .
hBuh , qh i = ~qht B~
In the rest of this notes, we will mix the usage of a matrix form or operator form which
should be clear by the context.
Therefore we can rewrite the MAC schemes using operator notation
AL B T uh fI
(23) = ,
B 0 ph 0
AQ BT uh fI
(24) = .
B 0 ph 0
where AL corresponds to the stencil (8) and AQ for (9). The corresponding Stokes operator
will be denoted by Llh and Lqh , respectively.
We can now show the connection between finite difference methods and the finite el-
ement method using these notation. For the linear extrapolated finite difference scheme
(23), we denote AΓ = AL − A. By direct calculation, A ~ Γ has stencil ( 1 , − 1 , − 1 ) on Γnb
2 4 4
and equal to zero on all other parts.
For the quadratic extrapolated finite difference scheme (24), we denote matrix D: ~
~ = 4 I~ on Γnb .
◦
(25) ~ = I~ in
D Ωh ,
D
3
~Q = D
Then we can easily verify the relation: A ~A~ by the stencil (9) and (17).
We shall prove the stability of schemes (23) and (24) by the stability results of finite
element method presented in [3] using these relations.
3.3. Stability of MAC Schemes. Following results of Lemma 4 and Lemma 6 in [3], we
have the stability of the finite element scheme as below. For completeness, we sketch a
proof below.
Lemma 3.1. There exists α, β > 0 independent of h, such that
hAuh , v h i hAuh , v h i
(26) inf sup = inf sup = α,
v h ∈Vh uh ∈Vh kuh kA kv h kA uh ∈Vh v h ∈Vh kuh kA kv h kA
hqh , Bv h i
(27) inf sup = β.
qh ∈Qh v h ∈Vh kqh kkv h kA
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 11
Proof. The inf-sup condition for A is trivial since hAuh , v h i = (∇uh , ∇v h ) is an inner
product on H 10 .
The inf-sup condition for B is more involved. For a given qh , the inf-sup condition in
the continuous level is applied to find v ∈ H 10 such that div v = qh and kvkA . kqh k.
Then a bounded Fortin operator Ih : H01 → Vh is defined such that div v = div Ih v, and
kIh vkA . kvkA . Let v h = Ih v, then we have div v h = qh and kv h kA . kqh k.
To define a Fortin operator, we first apply the integration by parts and write
Z Z
div u dx = u · n ds.
τ ∂τ
On the vertical edges, we define the nodal valueR on Th as the average of the integral of
1
The inf-sup condition of AL is based on the following norm equivalence. The finite
difference scheme is fitted into the finite element space, so that the trace theorem which
plays an essential role in the proof can be applied.
Lemma 3.2. The norm defined by AL is equivalent to the norm defined by A, that is:
(28) hAuh , uh i ≤ hAL uh , uh i . hAuh , uh i.
Consequently, the bilinear form hAL u, vi is stable in k · kA .
~L = A
Proof. Recall that A ~+A
~ Γ with A
~ Γ = ( 1 , − 1 , − 1 ) on Γnb . Therefore
2 4 4
~Q − A
Proof. The proof of the first part (30) is trivial, since A ~ = (D
~ − I)
~A ~ is semi-positive
definite. For the second part:
(32) hAQ uh , v h i = hAuh , Dv h i ≤ kuh kA kDv h kA .
It suffices to prove kDuh kA . kuh kA . To simplify the notation, we replace uh with
~ Γnb = I~Γnb u
u. We define uΓnb such that its coordinate vector u ~ . We can thus write
Du = u + 3 uΓnb .
1
In the last step, we have use the explicit formula of the stencil (9). By the triangle inequal-
ity,
1 1
kDukA = ku + uΓnb kA ≤ kukA + kuΓnb kA ,
3 3
√ √
we then get kDukA ≤ (1 + 6)/ 6kukA .
Since the operator B is the same in all three schemes, by the relation (28) and (30)
of the norm defined by A, AL , and AQ , the inf-sup condition for B is also satisfied. We
summarize as the following theorem:
Theorem 3.4. Let uh , ph be the solution of any MAC scheme (23) , (24) and (20). We
have the stability result:
(33) |uh |1 + kph k . kf h k−1,h
3.4.1. Consistency error of the quadratic extrapolation. Let us do the truncation error
analysis for the near boundary nodes. Again we take the point (ih, h2 ) for u component as
an example. Consider the following Taylor series expansions:
(34)
h h2 h3
u(ih, 0) = u(ih, 0.5h) − uy (ih, 0.5h) + uyy (ih, 0.5h) − uyyy (ih, 0.5h) + O(h4 ),
2 8 48
(35)
h2 h3
u(ih, 1.5h) = u(ih, 0.5h) + uy (ih, 0.5h)h + uyy (ih, 0.5h) + uyyy (ih, 0.5h) + O(h4 ).
2 6
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 13
Multiplying (34) by 2 and taking summation with (35) yields the following first order
approximation
4 2u0 − 3u1 + u2
(36) − uyy (ih, 0.5h) = − + O(h).
3 h2
Thus the scheme for the momentum equation of u at point 1 in Figure 6 (y = 0.5h) is
4 2u0 − 3u1 + u2 u3 − 2u1 + u4 p2 − p1
− · 2
− 2
+ = f1 .
3 h h h
The scheme derived above for the near boundary points at the top is equivalent to the
quadratic extrapolated scheme (24). From the truncation error analysis, it is clear that the
quadratic extrapolated MAC scheme (24) is second order at the interior nodes but only first
order at the near boundary nodes. However, the difference of Πh Lx and Lqh Ih x will still
be second order under the weaker norm k · k−1,h .
◦ ◦
For any v h ∈ Vh , we denote v h := v Γnb + v h . It is obvious that k v h k ≤ kv h k.
◦
Following the proof of Lemma 3.3, one can also prove | v h |1 . |v h |1 .
Lemma 3.5. For a function f ∈ H 2 (Ω) and its interpolation f I defined in (19), we have
◦ ◦
(37) |(f , v h ) − hf I , v h i| . h2 |f |2 kv h k, for any v h ∈ Vh .
Proof. For any interior basis function φi , i = N R b + 1, Nb + 2, ..., Nu , we consider the
linear functional ϕi (f ) = (f , φi ) − hf I , φi i = f φi − h2 f i . Since the support of φi is
symmetric, it is easy to check that the functional is bounded, and has zero value on linear
functions. By the standard scaling argument and the Bramble-Hilbert lemma, we have
|(f , φi ) − hf I , φi i| . h2 |f |2 . Then summing up with weight, we have
N Z
X u Nu
X
◦ ◦ ◦
(f , v h ) − hf I , v h i = f v i φi − 2
h f i v i . h2 |f |2 k v h k
i=Nb +1 i=Nb +1
.
1 T
Lemma 3.6. Assume u ∈ H 0 (Ω)∩W 3,∞ (Ω), ∆u ∈ H 2 (Ω), and p ∈ L20 (Ω) W 3,∞ (Ω).
For x = (u, p)t and Πh f = f I , we have:
(38) kΠh Lx − Lqh Ih xkYh . (kuk3,∞ + k∆uk2 + kpk3,∞ )h2
Proof. For any z h = (v h , qh ) ∈ Xh ,
|hΠh y − Lqh xI , z h i| = |hf I − Lqh xI , v h i| + |h0 − Lqh xI , qh i| := I1 + I2 .
The second term I2 can be easily estimated as
Nu +Np
X
I2 ≤ kh−2 BuI k∞ h2 |qh (xi )| . h2 kuk3,∞ kqh k.
i=Nu +1
Here we use the fact h BuI is the second order central difference scheme of − div u at
−2
cell centers.
We further split I1 into u and p parts as
I1 ≤ |h−(∆u)I − AQ uI , v h i| + |h(∇p)I − B T pI , v h i| = I1u + I1p .
Let ~tp be the vector representation of (∇p)I − h−2 B T pI . It is easy to verify, by the
Taylor series, k~tp k∞ . h2 kpk3,∞ . Then
I1p = (~tp , ~v h )h ≤ k~tp kh k~v h kh . h2 kpk3,∞ kv h k . h2 kpk3,∞ |v h |1 .
14 LONG CHEN
To estimate I1u , we further split it into the sum of near boundary part and interior part.
◦
I1u ≤ |h−(∆u)I − AQ uI , v Γnb i| + |h−(∆u)I − AQ uI , v h i| = I11 + I12 .
Due to the density of C 3 (Ω) in W 3,∞ (Ω), by the Taylor expansion analysis (36), for the
near boundary nodes, i.e., 1 ≤ i ≤ Nb ,
|(−(∆u)I − h−2 AQ uI )(xi )| ≤ Chkuk3,∞ .
We can then estimate the near boundary part I11 as follows:
Nb
X
I11 . hkuk3,∞ h2 |v h (xi )| . h2 kuk3,∞ kv h kL1 (Γnb ) . h2 kuk3,∞ |v h |1 .
i=1
In the last inequality, we have applied the trace theorem for H 1 functions.
To estimate I12 , we interpret the finite difference scheme as the finite element scheme
while both methods get the same stencil for the interior part. We have
◦ ◦
I12 = |h(4u)I − 4u, v h i + h∇(u − uI ), ∇ v h i|
. h2 (k∆uk2 + kuk3 )|v h |1 .
◦
In the above deducing, we have used Lemma 3.5 and the estimate |h∇(u − uI , ∇ v h i| .
h2 kuk3 |v h |1 on uniform grids; see for example [2].
Combining the estimate of I1 and I2 we have
|hΠh y − Lqh xI , z h i| . h2 (kuk3,∞ + k4uk2 + kpk3,∞ )kz h kXh
and Lemma 38 follows from the definition of the dual norm k · kYh .
3.4.2. Consistency error of the linear extrapolation. For the near boundary stencil of the
linear extrapolated MAC (23), the scheme approximates −uxx − 43 uyy but not −∆u at
Γunb , which causes the loss of consistency near the boundary.
T
Lemma 3.7. Assume u ∈ H 10 ∩ W 3,∞ (Ω), ∆u ∈ H 2 (Ω), p ∈ L20 (Ω) W 3,∞ (Ω). For
x = (u, p)t and Πh f = f I , we have:
(39) kΠh Lx − Llh Ih xkYh . (kuk3,∞ + k4uk2 + kpk3,∞ )h
Proof. The proof is similar to (38) with the only different term is I11 for which
|(−(∆u)I − h−2 AL uI )(xi )| ≤ Ckuk3,∞ .
Therefore we can get the first order estimate
Nb
X
I11 . kuk3,∞ h2 |v h (xi )| . h2 kuk3,∞ kv h kL1 (Γnb ) . hkuk3,∞ |v h |1 .
i=1
3.5. Convergence. Based on the stability and consistency, we present our main results.
Theorem 3.8. Let uh , ph be the solution of the MAC scheme (24) with quadratic extrap-
olation, and let uI , pI be the nodal interpolation of the solution
T u, p of Stokes equations.
Assume u ∈ H 10 (Ω) ∩ W 3,∞ (Ω), ∆u ∈ H 2 (Ω), and p ∈ L20 W 3,∞ (Ω). Then
|uI − uh |1 + kpI − ph k . (kuk3,∞ + k4uk2 + kpk3,∞ )h2
Similarly for linear extrapolation MAC, only first order convergence is obtained.
FINITE DIFFERENCE METHOD FOR STOKES EQUATIONS: MAC SCHEME 15
Theorem 3.9. Let uh , ph be the solution of the MAC scheme (23) with linear extrapolation,
and let uI , pI be the nodal interpolation of the solution
T u, p of Stokes equations. Assume
u ∈ H 10 (Ω) ∩ W 3,∞ (Ω), ∆u ∈ H 2 (Ω), and p ∈ L20 W 3,∞ (Ω). Then
|uI − uh |1 + kpI − ph k . (kuk3,∞ + k4uk2 + kpk3,∞ )h
Remark 3.10. Using triangle inequality and interpolation error estimate, we can easily
get the first order convergence of linear extrapolation which is equivalent to MAC using
co-volume method in Niclaides [5]. In view of approximation theory, first order is already
optimal. The second order result for the quadratic extrapolation is known as superconver-
gence, i.e., two discrete solutions could be more closer.
Using the following discrete embedding theorem (in two dimensions only)
kv h k∞ . | log h||vh |1 ,
and the second order interpolation error estimate
ku − uI k∞ . kuk2,∞ h2 ,
we obtain the nearly second order maximum norm for the quadratic extrapolation scheme.
Corollary 3.11. Let uh , ph be the solution of the MAC scheme (24) with quadratic extrapo-
lation. Assume the solution
T u, p of Stokes equations satisfying u ∈ H 10 (Ω)∩W 3,∞ (Ω), ∆u ∈
H 2 (Ω), and p ∈ L20 W 3,∞ (Ω). Then
ku − uh k∞ . (kuk3,∞ + k4uk2 + kpk3,∞ )| log h|h2 .
ACKNOWLEDGMENT
Thanks for Wang Ming for the help on the preparation of the tex file, especially those
nice figures.
R EFERENCES
[1] A. Brandt and N. Dinar. Multi-grid solutions to elliptic flow problems. Technical Report 79, Institute for
Computer Applications in Science and Engineering. NASA Langley Research Center, Hampton, Virginia,
New York, 1979.
[2] J. Brandts and M. Krizek. Gradient superconvergence on uniform simplicial partitions of polytopes. IMA
journal of numerical analysis, 23:489–505, 2003.
[3] H. Han and X. Wu. A New Mixed Finite Element Formulation and the MAC Method for the Stokes Equations.
SIAM J. Numer. Anal., 35(2):560–571, 1998.
[4] F. H. Harlow and J. E. Welch. Numerical calculation of time-dependent viscous incompressible flow of fluid
with free surface. Physics of fluids, 8(12):2182, 1965.
[5] R. A. Nicolaides. Analysis and Convergence of the MAC Scheme. I. The Linear Problem. SIAM J. Numer.
Anal., 29(6):1579–1591, 1992.