This preview shows pages 1–3. Sign up to view the full content.
Computational Fluid Dynamics
Lecture 4
Tridiagonal matrices are very efficient to solve computationally using the Thomas algorithm.
Pg
183184 using forward substitution and backward elimination.
11
1
222
2
333
111
iii
mmm
mm
bc
u
abc
u
ab
−−−
%
%
1
2
33
ii
R
R
uR
−−
=
##
Consider the linearized advectiondiffusion equation.
2
2
uu
Cv
tx
∂∂∂
+=
u
x
discretized with the backward Euler method, and second order spatial differences.
1
2
2
2
nn
C
uuu
v
1
n
i
x
++
+
+−
=−
∆∆
−+
+
∆
+
1
+
There are three unknowns.
,,
nnn
Write system in the form
[]
[] []
i
Au
Bu
Cu
R
R
+++
++=
=
1
22
Rearranging gives
2
1
n
i
Ct vt
vt
u
xx
x
+
∆
−− +
+
+
− =
∆
2
n
i
u
special conditions are required near boundaries
1
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Documenti.e. when
i
is undefined.
1,
1
i
=−
Appropriate boundary conditions might be
0 or
0
B
B
u
u
x
∂
==
∂
These prescribed B.C.’s take precedence over the governing equation and so the equation at the
boundary is just
21
1
0, or
0
uu
u
x
−
∆
and with the definitions that
1
2
and
gives for
0
Ct
vt
u
xx
µβ
∆∆
=
.
1
1
1
2
1
1
1
10
12
22
1
2
0
1
n
n
n
m
n
m
u
u
u
u
µµ
ββ
β
+
+
+
−
+
−−
+
+−
+
%
#
%
#
2
1
1
0
0
What would first line look like for
0?
n
n
m
u
u
u
x
−
=
∂
=
∂
#
#
The cases in HW #2 have much more complicated R.H.S. vectors.
This is the end of the preview. Sign up
to
access the rest of the document.
 Spring '07
 Slinn

Click to edit the document details