Graphics Reference
In-Depth Information
Let's first do it with the 1D model problem from the last section. The
backward Euler discretization is
tk q n +1
2 q n +1
i
+ q n +1
i− 1
q n +1
i
= q i
i +1
.
Δ x 2
This is the i th linear equation: we can complete the system by enforcing,
say, no-slip boundary conditions q 0 = q m +1 =0,leaving m equations in m
unknowns q n +1
1
, ... q n +1
m
. Rearranging gives
i +1 + 1+ tk
Δ x 2 q n +1
Δ tk
Δ x 2 q n +1
Δ tk
Δ x 2 q n +1
1 = q i .
i
i−
This can now be thought of as a classic matrix-times-unknown-vector-
equals-known-vector problem,
I + Δ tk
Δ x 2 A q n +1 = q n ,
where I is the identity matrix, and A is a tridiagonal matrix with 2 down
the main diagonal and
1 along the sub- and super-diagonals:
2
1
12
1
A =
.
. . .
. . . . . .
12
This is almost the same, up to scaling, as a 1D version of the Poisson prob-
lem for pressure, except now we are increasing the positive diagonal entries
even further. The matrix is symmetric positive definite—in fact slightly
better conditioned than the pressure matrix thanks to the incremented
diagonal—and so solving it with PCG works very eciently.
Does this solve the stability problem? Well, let's rewrite the i th equa-
tion again:
1+ tk
Δ x 2
q n +1
i
Δ tk
Δ x 2 q n +1
+ Δ tk
Δ x 2 q n +1
+ q i
=
i +1
i− 1
= Δ tk/ Δ x 2
1+2Δ tk/ Δ x 2
q n +1
i +1
+ Δ tk/ Δ x 2
1+2Δ tk/ Δ x 2
q n +1
i− 1
q n +1
i
+
q i .
1
1+2Δ tk/ Δ x 2
That is, the new value at a grid point is a weighted average (with guar-
anteed positive weights, summing to 1) of its neighbors' new values and
Search WWH ::




Custom Search