1
Numerical Solution of the Incompressible NavierStokes Equations
The incompressible NavierStokes equations describe a wide range of problems in fluid
mechanics. They are composed of an equation in mass conservation and two momentum
conservation equations, one for each Cartesian velocity component. The dependent
variables will be the pressure p and the velocity components u and v in the x and y
directions respectively. The use of numerical methods to solve the governing equations
will follow the same methods as used in the previous discussion on numerical solution of
nonlinear equations. The three governing equations in nondimensional conservative
form are,
The variables have been nondimensionalized using the free stream velocity V
∞
, density
ρ
∞
, viscosity µ
∞
, and a length scale L, shown below.
The superscript denoting nondimensional format will be subsequently dropped from here
on. Unlike the compressible NavierStokes equations, the incompressible form does not
have a time dependent term in the mass conservation equation. In the compressible form,
the time dependent term provided a direct reference to density, allowing for a numerical
scheme to solve for density directly. In the incompressible for, the momentum equations
can be used to solve for u and v, but the continuity equation does not reference p because
of the absence to this term. An artificial compressibility term must be added to the
continuity equation to allow for the solution of p, shown below.
The term a denotes a pseudo speed of sound. As the numerical scheme progresses
towards a steady state solution, the new time dependent term tends to zero magnitude.
This implies that in the steady state the original continuity equation is recovered.
Explicit Solution
Explicit solution of the incompressible NavierStokes is relatively straightforward given
the previous notes on nonlinear terms. Numerous methodologies make be used, forward
time central space (FTCS), Dufort Frankel, MacCormack, CrankNicolson to name a


.

\

∂
∂
+
∂
∂
= +
∂
∂
+
∂
∂
+
∂
∂


.

\

∂
∂
+
∂
∂
=
∂
∂
+ +
∂
∂
+
∂
∂
=
∂
∂
+
∂
∂
∗
∗
∗
∗
∗ ∗
∗
∗ ∗
∗ ∗
∗
∗
∗
∗
∗
∗ ∗
∗
∗ ∗
∗ ∗
∗
∗
∗
∗
∗
2
2
2
2
2
2
2
2
2
2
Re
1
) ( ) (
Re
1
) ( ) (
0
y
v
x
v
p v
y
v u
x t
v
y
u
x
u
v u
y
p u
x t
u
y
v
x
u
2
, , , , ,
∞ ∞
∗
∞
∗
∞
∗
∞
∗ ∗ ∗
= = = = = =
V
p
p
V
v
v
V
u
u
L
tV
t
L
y
y
L
x
x
ρ
∞
∞ ∞
=
µ
ρ L V
Re
0
2
= 
.

\

∂
∂
+
∂
∂
+
∂
∂
y
v
x
u
a
t
p
2
few. If central differencing is used on the convective terms, artificial dissipation may be
needed to ensure stability if the Reynolds number is fairly large. Another method of
improving stability for incompressible flows is with the use of a staggered grid. An
example of a staggered grid is shown below. This grid arrangement provides stronger
coupling between the pressure and velocity variables thus improving stability. The
original primary grid is denoted with
solid lines while the secondary grid is
shown with dashed lines. The pressure
is assigned to the nodes on the primary
while the velocities are defined on the
secondary nodes. More specifically,
the u velocity is defined on the 1/2 grid
line between the nodes on the primary
in the x direction. While the v velocity
is at the 1/2 lines in the y direction, as
shown.
An explicit algorithm based on the staggered grid as shown can begin with the
discretization of the momentum equations using a first order difference in time and a
central scheme in space. The velocity components are solved first using,
Once the velocity components are computed for the time level n+1, the modified
continuity expression can be solved for the pressure,
0
1
2 / 1 ,
1
2 / 1 ,
1
, 2 / 1
1
, 2 / 1 2 ,
1
,
=


.

\

∆
−
+
∆
−
+
∆
−
+
−
+
+
+
−
+
+
+
y
v v
x
u u
a
t
p p
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
Since the velocities are only available on the secondary grid, an interpolation must be
used to obtain velocities at points on the primary grid. The following approximations can
be used,
2
, 2 / 1 , 2 / 3 , 1
2
) (
4
1
) (
j i j i j i
u u u
+ + +
+ =
2
, 2 / 1 , 2 / 1 ,
2
) (
4
1
) (
j i j i j i
u u u
− +
+ =
( ) ( ) ( ) ( )
∆
+ −
+
∆
+ −
=
∆
−
+
∆
−
+
∆
−
+
∆
−
+ + + − + + + −
− + + + + + +
+
+
2
1 , 2 / 1 , 2 / 1 1 , 2 / 1
2
, 2 / 3 , 2 / 1 , 2 / 1
2 / 1 , 2 / 1 2 / 1 , 2 / 1 , , 1 ,
2
, 1
2
, 2 / 1
1
, 2 / 1
2 2
Re
1
y
u u u
x
u u u
y
uv uv
x
p p
x
u u
t
u u
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
( ) ( ) ( ) ( )
∆
+ −
+
∆
+ −
=
∆
−
+
∆
−
+
∆
−
+
∆
−
+ + − + + + + −
+ − + + + + +
+
+
2
2 / 3 , 2 / 1 , 2 / 1 ,
2
2 / 1 , 1 2 / 1 , 2 / 1 , 1
2 / 1 , 2 / 1 2 / 1 , 2 / 1 , 1 , ,
2
1 ,
2
2 / 1 ,
1
2 / 1 ,
2 2
Re
1
y
v v v
x
v v v
x
uv uv
y
p p
y
v v
t
v v
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
P
i,j
P
i+1,j
v
i,j+1/2
P
i,j+1
v
i,j+3/2
v
i,j1/2
u
i1/2,j u
i+1/2,j
u
i+3/2,j
v
i+1,j+1/2
u
i+1/2,j+1
3
2
2 / 1 , 2 / 3 , 1 ,
2
) (
4
1
) (
+ + +
+ =
j i j i j i
v v v
2
2 / 1 , 2 / 1 , ,
2
) (
4
1
) (
− +
+ =
j i j i j i
v v v
) )( (
4
1
) (
2 / 1 , 1 2 / 1 , 1 , 2 / 1 , 2 / 1 2 / 1 , 2 / 1 + + + + + + + +
+ + =
j i j i j i j i j i
v v u u uv
) )( (
4
1
) (
2 / 1 , 1 2 / 1 , 1 , 2 / 1 , 2 / 1 2 / 1 , 2 / 1 − + − − + + − +
+ + =
j i j i j i j i j i
v v u u uv
) )( (
4
1
) (
2 / 1 , 1 2 / 1 , 1 , 2 / 1 , 2 / 1 2 / 1 , 2 / 1 + − + + − − + −
+ + =
j i j i j i j i j i
v v u u uv
In a large number of cases a pressure boundary condition will not be available at a given
boundary. This means that the pressure at a boundary will be unknown. In this instance,
the algorithm just outlined, often called the Marker and Cell approach, will alleviate the
problem. If the boundaries are selected to coincide with the secondary grid, pressure on
the boundaries will not be needed. For example, consider an inflow boundary and a wall,
shown below. If the wall is aligned with j = ½, and the inflow with i = ½, the pressure
does not appear on the surface and is calculated only in the interior. However, values of
u
3/2,0
and v
0,3/2
must be specified.
Since the wall is solid, no slip conditions prevail, therefore,
0 ...
2 / 1 , 3 2 / 1 , 2 2 / 1 , 1
= = = = v v v
0 ...
2 / 1 , 2 / 7 2 / 1 , 2 / 5 2 / 1 , 2 / 3
= = = = u u u
The values such as u
3/2,0
will be required in the analysis, which can be found from,
0 ) (
2
1
1 , 2 / 3 0 , 2 / 3 2 / 1 , 2 / 3
= + = u u u
which provides,
1 , 2 / 3 0 , 2 / 3
u u − =
wall
boundary
inflow
boundary
i=1/2
i=1
i=3/2
i=2 i=0
j=0
j=1/2
j=1
j=3/2
j=2
u
3/2,0
v
0,3/2
u
1/2,1
u
3/2,1
v
1,3/2
v
2,3/2
v
1,1/2
v
2,1/2
p
1,1
p
2,1
u
3/2,1/2
4
At the inflow boundary the u velocities are specified directly from the input conditions.
Values such as u
1/2,1,
u
1/2,2
are know from any problem definition and need no special
treatment. The v components of velocity outside of the boundary, such as v
0,3/2
, v
0,5,2
..
can be found from extrapolation,
At an outflow boundary, one could use the same approach to calculate v or even u.
Both the time step size and the value of the pseudo speed of sound define the stability
requirement for this method. The time step size is limited by
Here, ∆
min
means the smallest ∆x or ∆y on the grid, N is the number of dimensions in the
domain, and a is the speed of sound used in the pseudo continuity equation. This value is
defined by the maximum velocity,
Note that it is not necessary to use a staggered grid but it does naturally enforce
conservation at the main grid points. Also note that all variables are nondimensional,
meaning that the incoming velocity at the inflow boundary in the above example will be
u/V
∞
= 1.
Implicit Solution
The implicit solution of the incompressible NavierStokes is more easily accomplished if
the equations are written in conservative form,
In an implicit scheme, the nonlinearity of the flux terms must be addressed if a system of
linear algebraic equations is to be developed. Using Newton's method,
2 / 3 , 2 2 / 3 , 1
2 / 3 , 1 2 / 3 , 2
2 / 3 , 1 2 / 3 , 1 2 / 3 , 0
2
) (
v v x
x
v v
v x
x
v
v v − = ∆
∆
−
− = ∆
∂
∂
− =
[ ] Q M
y
F
x
E
t
Q 2
Re
1
∇ =
∂
∂
+
∂
∂
+
∂
∂
=
+
=
+ =
=
1 0 0
0 1 0
0 0 0
, , ,
2
2
2
2
M
p v
uv
v a
F
uv
p u
u a
E
v
u
p
Q
) 5 1 (
2
2 / 1
min
+
∆ ⋅
≤ ∆
a N
t
2 2
max
1 v u V
a
V
+ = <
n n
n n
n n
n n
n n
Q Q Q
t O Q
Q
E
E E
t O t
t
Q
Q
E
E E
t O t
t
Q
Q
E
E E
t O t
t
E
E E
− = ∆
∆ + ∆
∂
∂
+ =
∆ + ∆
∆
∆
∂
∂
+ =
∆ + ∆
∂
∂
∂
∂
+ =
∆ + ∆
∂
∂
+ =
+
+
+
+
+
1
2 1
2 1
2 1
2 1
) (
) (
) (
) (
5
The terms ∂E/∂x and ∂F/∂y are Jacobian matrices and will be denoted as A and B from
this point on. As an example, matrix A is defined as,
These values can be determined by rewriting the original flux vectors in terms of the
components of the solution vector, Q
1
, Q
2
, Q
3
. The flux vectors are written in terms of
these values and differentiated,
and
Inserting the linear approximations into the vector form of the NavierStokes equations,
and approximating the time derivative term,
using
Using approximate factorization, the equation above in the form Ax=B, can be separated
into equations involving x and y directions involving tridiagonal matrices
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
∂
=
3
3
2
3
1
3
3
2
2
2
1
2
3
1
2
1
1
1
Q
E
Q
E
Q
E
Q
E
Q
E
Q
E
Q
E
Q
E
Q
E
A
=
+ =
+ =
=
=
3
2
1
3 2
1
2
2
2
2
2
2
3
2
1
E
E
E
Q Q
Q Q
Q a
uv
p u
u a
E
Q
Q
Q
v
u
p
Q
....... 2 , 1 , 0 , , 0
2
2
1
2
3
1
2
2
1
1
1
u
Q
E
Q
E
Q
E
a
Q
E
Q
E
=
∂
∂
=
∂
∂
=
∂
∂
=
∂
∂
=
∂
∂
=
=
v
u v
a
B
u v
u
a
A
2 0 1
0
0 0
,
0
0 2 1
0 0
2 2
[ ]
1 2
Re
1
) ( ) (
+
∇ = ∆ +
∂
∂
+ ∆ +
∂
∂
+
∆
∆ n n n
Q M Q B F
y
Q A E
x t
Q


.

\

∂
∂
+
∂
∂
+
∂
∂
−
∂
∂
− ∆ = ∆


.

\



.

\

∂
∂
+
∂
∂
−
∂
∂
+
∂
∂
∆ +
2
2
2
2
2
2
2
2
Re Re
y
Q
x
Q
M
y
F
x
E
t Q
y x
M
y
B
x
A
t I
n n
n n
n n
Q Q Q + ∆ =
+1
RHS Q
y
M
y
B
t
x
M
x
A
t I = ∆


.

\

∂
∂
−
∂
∂
∆ +


.

\

∂
∂
−
∂
∂
∆ +
2
2
2
2
Re
1
Re
6
x direction tridiagonal equation,
y direction,
In these two tridiagonal equations, second order artificial dissipation has been added to
the left hand side (LHS) and fourth order to the RHS to ensure stability. The star super
script on the ∆Q indicates an intermediate solution preceding the final solution of the y
equation. A staggered grid is not necessary in this approach due to the coupling afforded
by the implicit scheme. If a central difference is applied to all spatial terms the x direction
equation would become,
in tridiagonal form the x equation is,
the y equation is
n
i i
Q
y
y
x
x RHS Q
x
x
x
M
x
A
t I
∂
∂
∆ +
∂
∂
∆ − = ∆
∂
∂
∆ +


.

\

∂
∂
−
∂
∂
∆ +
∗
4
4
4
4
4
4
4
2
2
2
2
2
2
) ( ) ( ) (
Re
ε ε
∗
∆ = ∆
∂
∂
∆ +


.

\

∂
∂
−
∂
∂
∆ + Q Q
y
y
y
M
y
B
t I
i
2
2
2
2
2
2
) (
Re
ε
( ) ( ) [ ]
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
n
j i
j i j i j i i
j i j i j i j i
n
j i j i
n
j i j i
Q Q Q Q Q Q Q Q Q Q
y
Q Q Q
M
x
Q Q Q
M
y
F F
x
E E
t
Q Q Q
Q Q Q
x
t M
Q A Q A
x
t
Q
2 , 1 , , 1 , 2 , , 2 , 1 , , 1 , 2 4
2
1 , , 1 ,
2
, 1 , , 1 1 , 1 , , 1 , 1
, 1 , , 1 2
, 1 , , 1
2
, 1 , 1 , 1 , 1 ,
4 6 4 4 6 4
2
Re
2
Re 2 2
) 2 (
) 2 (
Re
) (
2
+ + − − + + − −
− + − + − + − +
∗
−
∗ ∗
+
∗
−
∗ ∗
+
∗
− −
∗
+ +
∗
+ − + − + + − + − −
∆
+ −
+
∆
+ −
+
∆
−
−
∆
−
− ∆
= ∆ + ∆ − ∆ +
∆ + ∆ − ∆
∆
∆
− ∆ − ∆
∆
∆
+ ∆
ε
ε
∗
+ +
− −
∆ = ∆
+


.

\

∆
∆
− 
.

\

∆
∆
+
∆
−


.

\

∆
∆
+ + ∆
+


.

\

∆
∆
−

.

\

∆
∆
−
j i j i i
n
j i
j i i j i i
n
j i
Q Q
y
t M
B
y
t
Q
y
t M
I Q
y
t M
B
y
t
, 1 , 2
2
1 ,
, 2
2
1 , 2
2
1 ,
Re 2
2
Re
2
Re 2
ε
ε ε
j i j i i
n
j i
j i i j i i
n
j i
RHS Q
x
t M
A
x
t
Q
x
t M
I Q
x
t M
A
x
t
, , 1 2
2
, 1
, 2
2
, 1 2
2
, 1
Re 2
2
Re
2
Re 2
= ∆
+ 
.

\

∆
∆
−

.

\

∆
∆
+
∆
− 
.

\

∆
∆
+ + ∆
+ 
.

\

∆
∆
−

.

\

∆
∆
−
∗
+ +
∗ ∗
− −
ε
ε ε
7
Reference
Hoffmann, K.A., Chiang, S.T., Computational Fluid Dynamics, Vol. 1, Engineering
Education System, Wichita, Kansas, 1998, ISBN 0962373117.