Finite Difference Method To Solve Incompressible Fluid Flow
Finite Difference Method To Solve Incompressible Fluid Flow
518 ( 1985)
A method to solve incomprcssihlc fluid flow is proposed. ‘fhe method uses primitive
variables (velocity and pressure of rhc fluid) and introduces an idea that the discretizcd
Navicr-Stokes equations hax an invariant implicitly in each iteration at any time step As
numcrlcal examples. transient two-dimensional Poiseuille flow and steady flow past a
backward-facing step arc calculated. It is shown that the method needs fwer iterations than
the MAC and the SMAC methods. and the accuracy of the plesent method is guaranteed by
comparison with the analytic solution and the existing methods. ( 19X5 Academc Prw. Ini
using a velocity vector v (Cartesian components U, v, w), time t, pressure p, and the
operator nabla V. Here, Re = UL/v is the Reynolds number, U the characteristic
speed, L the characteristic length of the flow field, and v the kinematic viscosity of
the fluid. The equation of continuity is
D=V.v=O, (2)
where D is dilatation.
When we take the rotation of Eq. (1) the vorticity transport equation
(3)
(7)
where 4 is a potential function. If we take the divergence of Eq. (7)
501
‘Thus an invariant is introduced at any time step, if Eq. (9) is solved for 4 in each
iteration. The new velocity field at k = k + I is obtained from llq. (7). and the
pressure field at t = t + At (nr = discrctizcd time incrcmcnt) is obtained from llq.
(1 1.
In the SMAC (simplified MAC) method [4]. the tentative velocities are modified
to their final values so as to preserve vorticity at every point. Hence. the basic idea
of the SMAC method is that it introduces a tentative velocity field. On the other
hand. the present method is based on the idea that the discretized Kavier Stokes
equation has an invariant in each iteration in the same way as in the stream
function and vorticity method. The author believes that the simplest invariant is
vorticity. If the vorticity is taken as an invariant: the formulation is somcwha:
similar to that of the SMAC method cxccpt for the calculation of pressure.
However. because of the difference of the basic idea bctwcen the proposed method
and the SMAC method, Eq. (9) plays an important role in the present method. but
in the SMAC method the time increment At is important. It should also bc noted
that a potential function 4 is calculated by
&V?Q (101
First, transient two-dimensional Poiscuille flow is studied. The initial and boun-
dary conditions of this flow arc
(12b)
(12c)
2 sin p,, y
w=3y+ f cxp( - /?,;t;Re),
,, _ 1 sin B,,
(13b)
-Pt.,-I’, I./ 14 1
h +Rc ph l.,+ll, -1.,-2u,,,)
1
+ 2 (lli.,+ I +",~, -I- 2ui.,J > (144
-1),.,-11),.,-l 1 1
+Re jp’“,, i.,+“;-,,-2”,,,)
s i
I
+ f (CL, , I + Ii,,+ , -- 2ZJ,/) .
II
FINITE DIFFERENCE METHOL~ 503
(15a)
(15b. c)
(16b)
(16c)
Pij
Ui.j”
Di,j
l “i+l,j
I
Hem, we introduce a relaxation factor RF,k for $. Velocity components ui.i and u,,,
are calculated from
Solutions arc obtained by four methods; the ICI-0 method, the MAC method, the
SMAC method, and the present method.
In the MAC method, the pressure field is obtained by solving
+ PI., -I)
+ d,., - I) - iji,jT
(19b)
Let Re = 5 and divide the flow field as shown in Fig. 2. Mesh sizes /I and .v are
h=s=O.l, and fC=61. JC= 13, and the time increment .4t= I/100.
The initial values for u, u, p, $, and (L) are all equal to zero, and the boundary
conditions are:
FIG. 2. Discretion of the flow field. B boundar) cell. open box - fluid cell
506 NORUMASA TAKEMITSU
4, I., = di,,
is imposed at the upstream end: then
#i+ I,/
A+; (iv,=,, + f (d;.., I I + di,, I) - nt,,
( /)
is used instead of Eqs. ( 18~) or (19b).
The numerical procedures per cycle arc:
(i) I+-o method
v
t=t+nt
w’ 0, 1A/ - $k,\.fT I)’’ A’
V’ Eq. (16a) 1 Eq. jlhc)l--<:;;;‘-i;q. (20)
V’
t=t+nt
The main calculations proceed from left to right, and the notation +- denotes
iterations. In the above numerical procedures, Eqs. (16b), (17a). ( l&z), and (19b)
are all solved by the SLOR method [ 101, the relaxation factors arc RF, = RF,, =
RF, = 1.8 in the I(/-0 method, the MAC method, and the SMAC method, and
RF, = 1 in the present method. In the I/-W method and the present method, the
pressure field at new time step is calculated by
r’v r
(VI)1I I Al_-- --v (vv)’ $ ; WV)‘, (2Oj
05
where (?v/Zt)’ is evaluated by simple forward differences. In this problem, pressure
is integrated from left to right at .r = I - s:2 and from top to bottom at s.
Figure 3 shows the convergence rate by various methods. In the figure. ;:, is
defined by
(22)
The solution by the SMAC method, while accurate (8,) = 1.1 x 10 2), required
many iterations to obtain convcrgcncc (see Fig. 3). The solutions by the present
method are very close to the analytic solution. When we stop iterations with the
condition that sr, is 0( 10V2), the velocity profile is very close to the one by the I,-(,>
method, and if we stop iterations when so is O(lO-“), the solution agrees almost
precisely with the solution by the I+-(9 method.
However, the convergent process is not easy to analyze and is not always stable
in the present method. Therefore 4 is set to zero when ~$1 becomes larger then
cj$ ‘1, or when cr,tk) becomes larger than I;{:-‘) and cy) becomes larger than ~2. I).
In this problem, previous values of 4 are used (cb < 10 -2), or 4 is set equal to zero,
when EE) becomes larger than cg ‘) (or) < 5 x 10 “). (See also Section B, Steady
Flow.)
Figure 5 shows velocity profiles by the four methods at t = 0.5 (at downstream
end). Again only the solution by the MAC method is not close to the analytic
solution. More time steps are necessary to make E,) small; E,, is still 5.2 in the MAC
method.
Y
Present (E0=4.5xlO-~)
1.0
0.8
0.6
0.4
P j
MAC
(Eo’10.5) SMAC kD=l.lxlO-*)
0.2
1.0
0.8
0.6
0.4
0.2
(23)
/=Z.J<‘ 2 ,= J,JC 2
is shown. The error by the I+!-o method, the SMAC method, and the present
method dccrcascs as time increases. The magnitude of the error by the SMAC
method is the same as that of the $ (9 method. Although I:~ is shown increasing
with time in the MAC method, it will eventually decrease.
Figure 7a shows the pressure distribution along the center line at t = 0.5. Only
the MAC method is quite different from the analytic solution.
Figures 4, 5, 6, and 7a indicate that the SMAC method is more accurate than the
present method since cp is small. However, this is not true in general. Figure 7b
lo2 - MAC
cn -...I-. ---
w .I--
- .A
103V 0 0.2 t
-1
-2
TABLE I
As a simple example which has a corner in fluid, a steady flow past a backward-
facing step is studied (see Fig. 8).
In steady flow problems, the Navier-Stokes equations are written in the form
(24b)
(24~)
and
i?uo
2X
+ 2 = ; v20, (25a)
Since the iterative solution of vorticity often diverges at higher Reynolds num-
bers, methods to stabilize the calculation of vorticity should be used. ln the present
calculation, the author’s method [ 1 l] is modified so that the vorticity obtained
from Eq. (25) is the same as that obtained from Eqs. (24). This method has second-
order accuracy in the whole flow ticld and avoids iteration divergence. Similar
stabilized finite difference equations, which arc different from second-order
upstream difference equations (see, for examples, Ref. [ 12]), have been previously
published [ 13-153. In this problem we use the finite difference equations
-pr*J-p’- ‘.J+k $ tu;; I,j + ui- I./)+ f t”i,J I 1 + ui.j- I )}* Pa)
h
#.+ 1) = Il(k) + RF (u? - U(kj)
1. I 1.J ” ‘.I r,, ’ (26b)
and
1 1
( >
- v’, .
I,2
+P ;+; fii.,
s >
-Pi.j- Pi,j- 1
+A ~CL:i+l,)+O, ,,J)+$.j+~+C.i.J-,) (26~1
s i
1.J (26e)
i h s > ’
where ,u, a relation factor, stabilizes the iterative process, and RF, and RF, arc
relaxation factors for u and v, respectively (present method).
FINITE DIFFERENCE METHOD 513
(27b)
where y, = 0.4. Pressure equals zero in the whole flow field. Boundary conditions
are imposed at the upstream end in the same form as Eqs. (28a), (28b), (28~):
on the wall.
In the present method, 4 is calculated by the equations
instead of Eq. (19b) at the corner C, since 4 is a multi-valued function (see Fig. 9).
514 NJBUMASA TAKEMITSU
Wa .II Wall
FIG. 9. Corner cell. R = Boudary cell, C = corner cell, open box = fluid cell.
* (k’
C!jCk’ $‘k i I’
k=k+l
__ #k+l’ (k-I 1)
P
“(k’ LL)(k+ 1)
I
Eq. (16d) Eqs. (24a), (24b)
(k’ Eqs. ( J~c), (27b)
p I i
The relaxation factors RF,, RF,,,, RF,, RF,., and p are all taken to be 1.
Table II shows the comparison of number of iterations and errors ,sf (.f-
tj, CO,U, v), cr, (Eq. (22)), and cM which is defined by
FIG. 10a. Velocity vectors obtained by the present method III. Unit velocity vector = + .
The $-o method is the fastest one to obtain a solution in steady flow. But the time-
marching method by the $-w method (calculated by Eqs. (16a), (16~) and At=
l/100) needs more time to obtain a converged solution, because E, is larger by one
order compared with the I,&u method (see also Fig. 11). Too many iterations are
needed to obtain convergence in the present method I, where 4 =0 in each
iteration; but the iteration process is the most stable. If we put 4 = 0 when .sg) >
&g-i) (present method II), the iteration process is less stable but .sD is smaller by
one order compared with the present method I with almost the same iteration num-
ber. If we put 4 = 0 when sg) > EK- l) and sr) >&g-i) (present method III), the
number of iterations is almost the same as that by the I+-u method, and the
solution obtained is accurate if the iteration process remains stable.
Velocity vectors and stream functions obtained by the present method III are
shown in Figs. 10a and b, respectively.
Figure 11 shows vorticity distributions on the wall by various methods. Solution
by the time-marching method has not yet converged in steady state because the
absolute values of the vorticity on the wall at the downstream end are not nearly
equal. Solution by the present method III is very close to the one by the t/-o
method.
From the table and figures, it is considered that the present method is accurate
and needs less time to obtain solution for steady flow, too.
-6
FIG. 1 I. Vorticity distributions on the wall obtained by various methods. 1 L rj (1). 2 - i-o (time-
marching method). 3 = present method III.
CONCLUSIONS
A new method, in which an idea that the Navicr- Stokes equations have an
invariant implicitly in each iteration at any time step or at any iteration is applied,
is presented. Using this method, some numerical experiments were performed. As a
result of this study, we conclude:
(1) Navier-Stokes equations with an invariant implicitly in each iteration
produce cfticient and accurate numerical solutions.
(2) The proposed method is also applicable to steady flow and three-dimen-
sional flow problems.
The method proposed here has also been extended to the Crank--Nicolson
method. a non-iterative implicit method, and a two-step method [16].
The author wishes to express his sincere gratitude to Professor M. Kawaguti and Prof. Y. Matunobu
of Kcio University, and to Professor S. Mizuki and assistant engineer N. Shinya of Hosei University.
Examples of unsteady flow were calculated by FACOM M-380R at Keio Unjversity and the steady flows
were calculated by ACOS 6 computer at Hosei C’nivcrsity.
REFERENCES