You are on page 1of 2

2.

44 Computational Fluid Dynamics

Use upwind differencing on a weak conservative form of the equation.


The upwind differencing is known to retain the transportive property.
Show that the formulation preserves the conservative property of the con-
tinuum as well [you are allowed to exclude the diffusive term from the
analysis].

7. In order to investigate and analyze the properties of numerical schemes,


often the following scalar (one-dimensional) convection equation is con-
sidered:
∂ω ∂ω
+λ =0
∂t ∂x
Here ω is any scalar parameter. The spatial derivative is approximated by
a central difference scheme on an equidistant grid with ∆x = Constant.
Please explain the following time-marching schemes based on the scalar
transport equation:

A: explicit Euler scheme


B: implicit Euler scheme
C: three-point backward scheme (implicit)
D: Lax-Keller scheme (explicit)
E: Lax-Wendroff scheme (explicit)
F: Mac Cormack scheme (predictor-corrector, explicit)
G: Low-storage Runge-Kutta scheme (3 sub-steps, explicit)

Appendix
Thomas algorithm

We have already seen in Chapter2 that in Crank Nicolson solution procedure,


we get a system of algebric equations which assumes the form of a tridiagonal
matrix problem. Here we shall discuss a very well known solution procedure
known as Thomas algorithm(1949), which utilizes efficiently the advantage of
the tridiagonal form. A tridiagonal system is:
    
d1 a1 0 0 ... ... 0 x1 c1
 b2 d2 a2 0 0 .   x2   c2 
    
 0 b3 d3 a3 0 0 .   x3   c3 
   

0 0 b d a 0 0
4 4 4   x4  =  c4 
    

. 0 0  .   . 
    
0 aN −1   .   . 
0 . . . . . . . . . 0 bN dN xN cN

The Thomas Algorithm is a modified Gaussian matrix-solver applied to a tridaig-


onal system. The idea is to transform the coefficient matrix into a upper trian-
gular form. The intermediate steps that solve for x1 , x2 ...xN :
Finite Difference Method 2.45

Change di and ci arrays as


 old
bi
dnew
i = dold
i − ai−1 , i = 2, 3 . . . N
di−1
and

dnew
1 = dold
1

Similarly

 old
bi
cnew
i = cold
i − ci−1 , i = 2, 3 . . . N
di−1
and

cnew
1 = cold
1

At this stage the matrix in upper triangular form. The solution is then obtained
by back substitution as
cN
xN =
dN
and

ck − ak xk+1
xk = , k = N − 1, N − 2, N − 3, . . . 1
dk
Please refer to the Pseudo codes below. Pseudo code-1 is meant for the new
diagonal array and the new RHS vector calculations.

Pseudo Code-1:
do i = 2, n
r = b(i)/d(i − 1)
d(i) = d(i) − r ∗ a(i − 1)
c(i) = c(i) − r ∗ c(i − 1)
end do
Pseudo Code-2 is meant for the Back Substitution:
x(n) = c(n)/d(n)
do i = 2, n
j =n−i+1
x(j) = c(j) − a(j) ∗ c(j + 1)/d(j)
end do

You might also like