106 ANALYSIS OF EXPLICIT FINITE DIFFERENCE METHODS USED IN COMPUTATIONAL FLUID MECHANICS John Noye 1. INTRODUCTION It is now commonplace to simulate fluid motion by numerically solving the governing partial differential equations on high speed digital computers. Finite difference techniques, because of their relative simplicity and their long history of successful application, are the most commonly used. They have, for example, been used in depth-averaged and three- dimensional time dependent tidal modelling by many oceanographers and coastal engineers: see, for example, Noye and Tronson (1978), Noye et. al. (1982) and Noye (1984a). However, like finite element techniques and boundary integral methods, finite difference methods of solving the Eulerian equations of hydrodynamics seldom model the advective terms accurately. Errors in the phase and amplitude of waves are usual, particularly the former. The accuracy of various explicit finite difference methods applied to solving the advection equation, namely (1.1) + = 0, 0 S x S 1, t > 0, u a positive constant, is investigated in this work. The boundary condition to be used in practice is that T(O,t) is defined for t > 0, with no values prescribed at x = 1. The von Neumann amplication factor is not only used to find the stability criteria of the methods investigated, but also to determine the wave deformation properties of the technique. These properties are then linked to the "modified" equation; that is, the partial differen- tial equation which is equivalent to the finite difference equation, after the former has been modified so it contains only the one temporal derivative, dT/dt, all other derivatives being spatial. It will be seen that successively more accurate methods can be developed by systematic elimination of the higher order terms in the truncation error, which is the difference between the modified equation and the given equation (1.1).
13
Embed
ANALYSIS OF EXPLICIT FINITE DIFFERENCE METHODS USED IN ...maths-proceedings.anu.edu.au/CMAProcVol7/CMAProcVol7-Noye.pdf · ANALYSIS OF EXPLICIT FINITE DIFFERENCE METHODS USED IN COMPUTATIONAL
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
106
ANALYSIS OF EXPLICIT FINITE DIFFERENCE METHODS USED IN COMPUTATIONAL FLUID MECHANICS
John Noye
1. INTRODUCTION It is now commonplace to simulate fluid motion by numerically
solving the governing partial differential equations on high speed
digital computers.
Finite difference techniques, because of their relative simplicity
and their long history of successful application, are the most commonly
used. They have, for example, been used in depth-averaged and three
dimensional time dependent tidal modelling by many oceanographers and
coastal engineers: see, for example, Noye and Tronson (1978), Noye
et. al. (1982) and Noye (1984a).
However, like finite element techniques and boundary integral
methods, finite difference methods of solving the Eulerian equations of
hydrodynamics seldom model the advective terms accurately. Errors in
the phase and amplitude of waves are usual, particularly the former.
The accuracy of various explicit finite difference methods applied
to solving the advection equation, namely
(1.1) ~~ + u~~ = 0, 0 S x S 1, t > 0, u a positive constant,
is investigated in this work. The boundary condition to be used in
practice is that T(O,t) is defined for t > 0, with no values prescribed
at x = 1.
The von Neumann amplication factor is not only used to find the
stability criteria of the methods investigated, but also to determine
the wave deformation properties of the technique. These properties are
then linked to the "modified" equation; that is, the partial differen
tial equation which is equivalent to the finite difference equation,
after the former has been modified so it contains only the one temporal
derivative, dT/dt, all other derivatives being spatial.
It will be seen that successively more accurate methods can be
developed by systematic elimination of the higher order terms in the
truncation error, which is the difference between the modified equation
and the given equation (1.1).
107
The approach used by Molenkamp (1968) and Crowley (1968) to assess
oche accuracy of the numerical method to ·the advection equation is also
used to illus·trate the conclusions reached from the ma-thematical analy
sis; that is, the numerical method is applied to a simple problem whose
exact solution is knmvn, and the numerical solu·tion is compared with
the exact solution. The problem chosen is that of an infinite train of
Gaussian pulses, used as ir.i·tial condition to (1.1), for which the exact
solution at time t on the infinite domain --oo < x < co is the same ·train
displaced a dis·tance ut to the right along the x-axis. The corresponding
numerical solu·tion of ochis process is obtained using cyclic boundary
conditions at x = 0 and x = 1.
Higher order teclli,iques, such as the third order upwind biassed
method and Rusanov' s methods, are clearly more accurate than t:he
more widely used methods such as first order upwind and the Lax-Wendroff
methods. The increased accuracy justifies the increased computa·tional
time and complications near the boundary due to extension of the compu
'cat.ional molecule for cert.ain higher order methods.
2. THE FIRST-ORDER UPWIND METHOD At the gridpoint (j6x,nL'I·t), j
L'lx 1/J, the advection equa·tion
(2.1) ClTin + Clt . J
-,n dT uClx .
J
o,
l, 2, . ., J, n
becomes, on using ·the two-point forward time approximation and the two
point backward space approximation,
Tn.+l n n n - T. T. - T. l
(2,2) 1 J + u{ J J- } = 0. L'lt L'lx
On rearrangement, this gives 'che two point upwind equation, see Godunov (1959),
(2.3) n+l
T. J
n CT. _ +
J-1.
where T~ is an approxima·tion to T (j6x, nL'It) and c J
Courant nuzaber.
uL'It/L'Ix > 0 is the
The amplification factor, G(c,NA), of the von Neumann method of
stability analysis is obtained by substitu·ting Tr: = (G) nexp{i (2"ITj/N))}, J \
i = /-1, into (2.3), where the parameter N;.. is the number of grid-
108
spacings per waveleng·th of a particular Fourie1~ mode contained in ~che
initial conditions. For this me·thod we obtain
(2. 4)
The stabili'cy requirement is tha·t I G I ,; 1 for all
so long as 0 < c ~ l.
}.
2: 2, which. is true
The amplification fac·tor also yields information about 'che differ-
ence be'cween the numerical and exaci: solutions for an initial condition
consisting of an infinite sine wave of >vaveleng··th NA 1'-x. While t:he ad
vection equation (L 1) propa•:;ra'ces ·this wave at speed u and unchanged
amplitude, a finite difference equation may transmit 'che t•lave at another
speed and a different amplitude. These effects of t.he fini·te differ-
ence method may be described by two parameters, the relat.ive wave speed
and the amplitude attenua,tion which occurs in one wave period. The
relative wave speed is denoted and defined by
(2. 5) ).1 = u /u = -N, Arg{G (c,N,) N A /1.
and the amplit;ude a-ttenua·tion per •v1ave per:Lod is given by
(2. 6) y
(see 1\loye, l984b, p.l93).
The wave deformation parcuneters, ).1 and y, of the first order up-
voind equation (2.3) are graphed against for various c, in Figure lo
!/lave
109
'rhe loss of amplitude of component vlaves is very large; for instance,
with N~- = 40 and c = 0.4, the amplitude af·ter one '"ave period falls to
0, 7 of i·ts original value, so ·that. af-ter: two wave periods the amplitude
is less than half its original value.
The effec·t of this is seen in Figure 2, in which is shown the
numerical solution after 10 periods for the follm,;ring ·test case. The
initial conditions consis·t of an infinite set of Gaussian peaks (see
dashed curve), symmetrical about x = (P + !,;), P = 0,±1,±2, . , . , so it is - -
periodic in space with pe:ciod l; that is, T (x+l,t) = T (x,t). >-Ji·th
6x = 0. 025 and c = 0, 4, the munerical solution is obtained using cyclic
boundary conditions; tha·t is ';lith T; = j+J' j = 0,1, ... ,J--1. The ex
cessive \!tiave damping is clear" In spi·te of this, ~~firs~c~order upwinding
is t.he industry s·tandard in chemical, civil and mechanical engineering"
(Leonard, 1981). First-order upwinding is the basic differencing scheme
in many books including Gosman et.aL (1969) and Patankar (1980).
2 solved
The consistency analysis of (2. 3) invo.l<~res Taylor series expansions
of eacb t.erm of the finite difference equa·tion about. ·the gridpCJin·t
(j6x, nf'lt). This yields at ·this gridpoin·t tt.e eq;1ivalent par·cial
differen:tial equa·tion
+
from which mo_y be derived ·the 11 m.odif-Led 1 ~ equci.tion
110
on successive subs-titution of (2, 7) in itself to replace ·the t:emporal
deriva-tives on ·the right. side, by spa.tial derivatives (see Warming and
Hyett, 1974). Clearly ·the fini'ce difference equation (2,3) is consis
tent with the partial differential equations (l.l), because the right
sides of (2.7) and (2.8) tend to zero as the grid-spacings ~t, ~x both