Вы находитесь на странице: 1из 45

ASPECTS OF

NUMERICAL
DISSIPATION AND
DISPERSION

MODIFIED EQUATION
us consider upstream (First-Order Upwind or windward)
Let

Differencing Method. The FDE of wave equation


+ c is obtained by forward difference of time derivative
and backward differencing the space derivative as:

(1)
This is a first-order accurate method with T.E of O[t, x]. The
Von Neumann stability analysis shows that this method is
stable, provided that
0 v 1
(2)

MODIFIED EQUATION
Let us substitute Taylor-series
expansion into (1) for uit+t and ui-1t
as:
(3
)
(4)

Substituting Eqs (3) and (4) into (1) we


have
(5
)

MODIFIED EQUATION
Rearranging (5), we obtain

(6)

Note that the left-hand-side of this equation


corresponds to the wave equation and the righthand side is the T.E, which is not zero. The
significance of terms in T.E can be more easily
interpreted if time-derivative terms are replaced
by spatial derivatives.

MODIFIED EQUATION
In order to replace ()ti by spatialderivative term, we can take the
partial derivative of equation (6) with
respect to time, to obtain
(7
)

MODIFIED EQUATION
Now take the partial derivative of eq
(6) w.r.t x and multiply by a:

Subtracting (8) from (7) gives

(8
)

(9)

Eq (9) can be written in more compact form as:

In a similar manner, we can obtain the


following expressions for uttt, uttx ,and uxxt :
Uttt =- a3uxxx + O[t, x],
u ttx =a2uxx +
O[t, x]
Uxxt =-auxxx +O[t, x]
(11)

(10)

MODIFIED EQUATION
Combining eqs (6), (9),and (11) leaves
ut + a ux = (ax/2) ( 1-v)uxx - [a(x)2/6](2v 2
3v +1)uxxx + O[(x)3, (x)2 t, x(t)2 (t)3]
(12)
Equation (12) is called a modified equation. It
is important to emphasize that the equation
obtained after substitution of Taylor-series
expansions i.e. equation(6) must be used to
eliminate the higher-order time derivatives
rather than original PDE equation (1).

MODIFIED EQUATION
The
process of eliminating time derivatives can be
simplified if a table is constructed. The coefficients of
each term in equation (6) are placed in the first row of
the table. Note that all terms have been moved to the
left-hand side of the equation. The utt term is then
eliminated by multiplying eq (6) by operator
(-t/2)/t and adding the result to the first
row i.e. eq (6). This introduces the term -c t/2)u tx which
is eliminated by multiplying Eq(6) by operator ( )
adding the result to the to the first two rows of the
table. The procedure is continued until the desired time
derivatives are eliminated. The table is shown in the
next slid.

MODIFIED EQUATION
Each coefficient in the modified equation is obtained by
adding the coefficients in the corresponding column of
the table.
The right-hand side of the modified equation is T.E, since
it represents the difference between the original PDE
and FDE. Consequently, the lowest order term on the
right-hand side of modified equation gives the order of
the method. If v=1, the right-hand side of the modified
becomes zero and wave equation solved exactly. In this
case, the upstream differencing scheme reduces to
ujt+t=uj-1t . Finite-difference that exhibit this behaviour
are said to satisfy the shift condition .

MODIFIED EQUATION
The lowest order term of the T.E in the present case contains
the partial derivative uxx , which makes this term similar to
the viscous term in 1-D fluid flow equations. For example
the viscous term in the 1-D NS equation may be written as
/x(xx) =4/3 uxx
Thus when v 1, the above scheme introduces an artificial
viscosity into the solution. This is called implicit artificial
viscosity. There is another artificial viscosity which is
purposely added to a difference scheme. Artificial viscosity
tends to reduce all gradients in the solution whether
physically correct or numerically induced. This effect, which
is the direct result of even derivative terms in the T.E. is
called dissipation.

MODIFIED EQUATION
Another quasi-physical effect of
numerical schemes is called
dispersion. This is the direct result of
the odd derivative terms that appear
in the T.E. As a result of dispersion,
phase relations between various
waves are distorted. The combined
effect of dissipation and dispersion is
sometimes referred to as diffusion.

MODIFIED EQUATION
In general, if the lowest
order term in the T.E.
contain an even
derivative, the resulting
solution will predominantly
exhibit dissipative
(amplitude) errors. On the
other hand, if the leading
term is an odd derivative,
the resulting solution will
predominantly exhibit
dispersive (phase) errors.

Initia
l
wav
e

Dissipation

Dispersi
on

ERROR IN TERMS OF AMPLIFICATION


FACTOR AND PHASE ANGLE

In terms of amplification factor and


Phase angle, the error is analyzed by
considering even derivatives and odd
derivatives. Even derivative
dominating modified equation
predicted amplification factor, while
odd dominating derivative
modification equation predicted
phase angle change.

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
The amplification factor of upstream
differencing scheme is:
G= (1-v+vcos) i(vsin)
The modulus of this amplification factor,
G = [ (1-v+vcos)2 + (-vsin)2 ]1/2
can be plotted for several values of v. It
is clear from this plot that v must be less
than or equal to 1 if the Von Neumann
stability condition G 1 is to be met.

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME

1
1
1
1
1
0.5
0.5
0.5
0.5
0.5
1.25
1.25

0
45
90
135
180
0
45
90
135
180
0
180

(1- +cos)2
1
0.5
0
0.5
1
1
0.728
0.25
0.2
0
1
1.5

(-sin)2
G
0
1
0.5
1
1
1
0.5
1
0.5
1
0
1
0.125 0.923
0.25
0.705
0.125
0.380
0
0
0
1
0
1.5

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
The amplification factor can also be expressed
in the exponential form for a complex number:
G= G ei
Where is the phase angle given by
= tan-1[Im(G)/Re(G)]=tan-1[-vsin/1-v+vcos]
The phase angle for the exact solution of the
wave equation (e) is determined in the
similar manner once the amplification factor
of the exact solution is known.

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME

In order to find the exact amplification


factor we substitute the elemental
solution
u=eteikmx in to wave equation
and find that
=-ikmc which gives u=eikm(x-ct)
The exact amplification factor is then
Ge = u(t+t)/u(t)= [eikm[x-c(t+t)]/eikm(x-ct)]

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
Which reduces to
Ge= e-ikmct = eie
Where e =-kmc t = =-kmx ct/ x = -v
And
Ge =1
Thus the total dissipation (amplitude) error
that accrues from applying the upstream
differencing method to the wave equation
for N steps is given by
(1 G N)A0 where
A0 is the initial amplitude of the wave.

RELATIVE PHASE ERROR OF


UPSTREAMDIFFERENCING SCHEME

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME

Likewise the total dispersion (phase)


error can be expressed as N(e-).
The relative phase shift error after
one time step is given by
/e=tan-1[(-vsin/1-v+vcos)]/-v
For small wave numbers (i.e small )
the relative phase error reduces to
/e= 1-1/6(2v2-3v+1)2

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
If the relative phase error exceeds 1 for a
given value of , the corresponding Fourier
component of the numerical solution has a
wave speed greater than exact solution, and
this is a leading phase error . If the relative
phase error is less than 1, the wave speed of
the numerical solution is less than the exact
solution, and this is a lagging phase error. The
upstream differencing scheme has a leading
phase error for 0.5<v<1 and a lagging phase
error for v<0.5

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME

Example: Suppose the upstream


differencing scheme is used to solve
the wave equation
( c=0.75) with the initial condition
u(x,0)=sin(6x) 0x1
and periodic boundary conditions.
Determine the amplitude and phase
errors after 10 steps if t = 0.02 and
x=0.02.

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
Solution: In this problem a unique value of
can be determined because the exact
solution of the wave equation (for the present
initial condition) is represented by a single
term of Fourier series. Since the amplification
factor is also determined using a single term
of Fourier series that satisfies the wave
equation, the frequency of the exact solution
is identical to the frequency associated with
the amplification factor i.e fm=km/2

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
Thus the wave number for the present problem
is given by
km=2m/2L=6/1=6
and can be calculated as
=km x= 6(0.02)=0.12
Using the Courant number v=ct/x =
0.75(0.02)/0.02=0.75
The modulus of the amplification factor becomes
G = [ (1-v + vcos)2 + (-vsin)2]1/2 = 0.986745

AMPLIFICATION FACTOR AND PHASE


ANGLE OF UPSTREAM SCHEME
and the resulting amplitude error after 10 steps
is
(1- G N ) A0 = ( 1- G10)(1)= 1- 0.8751=0.1249
The phase angle after one step,
= tan-1[-vsin/1-v+vcos]=-0.28359
e= -v=-0.28274
to give the phase error after 10 steps
10(e- )= 0.0084465
Let us now compare the exact and numerical solutions
after 10 steps where the time is
t=10t=0.2, The exact solution is given by
u(x,0.2)= 0.8751{sin[6(x-0.15) 0.0084465

LAX METHOD (WAVE


EQUATION)
LAX METHOD: The Euler method can be
made stable by replacing ujn with the averaged
term (uj+1n + uj-1n )/2. The resulting algorithm is
the Lax Method and it is
[ujn+1 - (uj+1n + uj-1n )/2]/t +c[(uj+1n uj-1n )/2x]
This explicit one-step scheme is first-order accurate
with T.E of 0[t,(x)2]/t and is stable if v 1. The
modified equation is given by
Ut +cux = cx/2(1/v v)uxx +c(x) 2/3( 1-v2)uxxx +.
The amplification factor is as
G=cos - ivsin

LAX METHOD (WAVE


EQUATION)
The relative phase error is given by
/e =[tan-1(-vtan)]/-v
Which produces a leading phase error .

LAX METHOD AMPLIFICATION


FACTOR MODULUS

LAX METHOD RELATIVE PHASE


ERROR

LEAP FROG METHOD


This scheme is second-order accurate
method. When applied to the first-order
wave equation, this explicit one-step threetime-level scheme becomes
(ujn+1-ujn-1)/2t + c{uj+1n uj-1n/2x} =0
The leap frog method is referred to as a
three-time-level scheme, since u must be
known at time levels n, n-1 in order to find
u at time level n+1. This method has a T.E.
of 0[t2,x2] and stable where v 1

LEAP FROG METHOD


The modified equation of leap frog method is
ut +cux = c(x) 2/6(v2 1)uxxx +c(x) 4/120( 9v4
-10v2+1)uxxxxx +.
The leading term in the T.E. contains the odd
derivative uxxx and hence the solution will
predominantly exhibit dispersive errors. This is
typical of second-order accurate methods. In
this case, however there are no even derivative
terms in the modified equation, so the solution
will not contain any dissipation error.

LEAP FROG METHOD


As a consequence, the leap frog method is
neutrally stable, and errors caused by
improper boundary conditions or computer
round off errors will not be
damped( assuming periodic boundary
conditions and v1). The amplification
factor
G = (1-v2sin2)0.5 ivsin
And the relative phase error
/e =[tan-1(-vsin/ (1-v2sin2) 0.5]/-v

LEAP FROG METHOD


The leap frog method, while being second-order
accurate with no dissipation error, does have its
advantages. First, initial conditions must be
specified at two-time levels. The difficulty can be
circumvented by using a two-time level scheme for
the first time step. A second disadvantage is due
to the leap frog nature of differencing ( i.e u jn+1
does not depend on ujn), so that two independent
solution develop as the calculation proceeds. And
finally the leap frog method may require additional
computer storage because it is a three-time-level
scheme.

LEAP FROG METHOD AMPLIFICATION


FACTOR MODULUS

LEAP FROG METHOD RELATIVE


PHASE ERROR

LAX-WENDROFF METHOD
The lax-Wendroff finite difference scheme can be
derived from a Taylor-series expansion as
ujn+1=ujn+ tut+1/2(t)2utt+0[t3] (1)
Using wave equation
ut=cux and
utt=c2uxx (2)
Equation (1) may be written as
ujn+1=ujn -ctux+1/2c 2(t)2uxx+0[t3] (3)
And finally if ux and uxx are replaced by second-order
accurate central-difference expressions the LaxWendroff scheme is obtained :
ujn+1=ujn -ct/2x(uj+1n -uj-1n ) +c 2(t)2/2(x)2(uj+1 n -2ujn +
uj-1n)

LAX-WENDROFF METHOD
This explicit one step scheme is second-order
accurate with T.E. of 0[(x)2 (t)2 ] and stable
whenever v 1. The modified equation is
ut +cux= -c(x) 2/6(1-v2)uxxx-c(x) 3/8 v(1 -v2)uxxxx +.
The amplification factor
G =1-v2(1-cos) ivsin and the relative phase
error /e =[tan-1(-vsin/ 1-v2(1-cos) ]/-v
The Lax-Wendroff scheme has predominantly lagging
phase error except for large wave numbers with
0.5<v<1.

LAX-WENDROFF METHOD
AMPLIFICATION MODULUS

LAX-WENDROFF METHOD RELATIVE


PHASE ERROR

TWO-STEP LAX-WENDROFF
METHOD
Tow-Step Lax-Wendroff Method:
For non-linear equations such as the inviscid
flow equations, a two-step variation of the
original Lax-Wendroff applied to the wave
equation, this explicit two-step three-timelevel method becomes
step1. [uj+n+- (uj+1n +ujn)/2 ]/t/2 + c (uj+1n
+ujn)/x =0
Step2. (ujn+1 -ujn)/t + c (uj+n+- uj-n+) /x
=0

TWO-STEP LAX-WENDROFF
METHOD
This scheme is second-order accurate with T.E.
of 0[(x)2, (t)2] and is stable whenever v
1. step one is the Lax method applied at the
midpoint j+1/2 for half time step, and step2
is the is the leap frog method for remaining
half time step. When applied to linear wave
equation, the two-step Lax-Wendroff scheme
is equivalent to the original Lax-wendroff
scheme. The modified equation and
amplification Factor are same for both the
schemes.

MacCormack Method
MacCormack Method: The MacCormack
method is widely used scheme for solving
fluid flow equations. It is a variation of the
two-step Lax-Wendroff scheme that moves
the necessity of computing unknown at the
grid points j+1/2 and j-1/2. Because of this
feature, the MacCormack method is
particularly useful when solving nonlinear
PDEs. When applied to the linear wave
equation, this explicit, predictor-corrector
becomes:

MacCormack Method
Predictor.
ujn+1 = ujn ct/x[uj+1n - ujn]
Corrector ujn+1 =1/2[ujn + ujn+1 -ct/x(ujn+1 uj-1n+1 )]
The term ujn+1 is a temporary predictor value of u at
the time level n+1. The corrector equation provides
the final value of u at the time level of n+1. Note that
in predictor equation a forward difference is used for
u/x, while in corrector equation a backward
difference is used. For present wave equation, the
MacCormack scheme is equivalent to the original LaxWendroff scheme. Hence the T.E. , stability limit,
modified equation and amplification factor are
identical with those of the Lax-wendrofff scheme .

Вам также может понравиться