Information Technology Reference
In-Depth Information
@t D @ 2 u
@ u
;
(7.102)
@x 2
u .0; t / D 0;
(7.103)
u .1; t / D 1;
(7.104)
u .x; 0/ D 0; x 0:5;
1; x > 0:5:
(7.105)
Before running any simulations, we should have an idea of what the solution looks
like. As time increases, the initial jump in temperature is smoothed out, and for very
large times we expect that no further changes in the temperature takes place. This
means that as t !1 , we expect @ u =@t ! 0. The PDE is then reduced to the
problem @ 2 u =@x 2 D 0 with boundary conditions u .0/ D 0 and u .1/ D 1.This
stationary problem has the solution u .x/ D x. We therefore expect the jump to
diffuse into a straight line.
A sequence of plots is displayed in Fig. 7.14 . As we see, this problem is numer-
ically tough to compute. The initial jump triggers a wavy solution, but the waves
eventually disappear and a straight line is obtained. Using x D 0:005,i.e.,ten
times as many spatial points (and 100 times as many time levels, since we keep
t D x 2 =2), shows that the wavy nature of the solution curves is significantly
reduced. As x ! 0, it seems that the wavy nature disappears, so we can conclude
that the waves in Fig. 7.14 are numerical artifacts.
In much more complicated PDE problems, such as those solved in industry and
scientific research, one can encounter wavy solutions. A fundamental question is
then whether the waves are physical or purely numerical. Insight into numerical
methods and experience with numerical artifacts as in the present test case constitute
important knowledge when judging solutions to complicated PDE problems. Effects
that decrease when making the grid finer are very often non-physical effects.
7.4.5
Instability
Let us investigate the numerical solution generated by Algorithm 7.1 in more detail.
The quality of the numerical solution will depend on the choice of x and t .
We expect that the smaller these discretization parameters are, the more accurate
the solution will be. Looking at the scheme in Algorithm 7.1 , we see that x and
t enter the formula only through the fraction ˛ D t=x 2 . The quality of the
numerical solution therefore depends on the choice of ˛. How should we choose ˛?
Let us start with the problem
@t D @ 2 u
@ u
for x 2 .0; 1/; t > 0;
@x 2
u .0; t / D u .1; t / D 0
for t>0;
u .x; 0/ D sin.3x/
for x 2 .0; 1/:
Search WWH ::




Custom Search