Environmental Engineering Reference
In-Depth Information
1
15
0.5
10
0
5
12
10
8
6
4
2
0
Fig. 21.5 Solution of the example setting for the diffusion-decay equation
That is all we have to do; aside from initializing
D
and
lambda
in the first part of
the program. In the example we use the same boundary conditions as in the previous
sub-chapter. The result is shown in Fig.
21.5
.
We left the general source/sink-term considered so that we can actually solve a
diffusion-decay-source/sink problem with the M-file. In the example however,
there were no sources, i.e.
q ΒΌ
0.
The code can be found in the accompanying software under the name
'DiffDecay2D.m'
References
Moler CB (2004) Numerical computing with MATLAB. SIAM, Philadelphia
Thomas JW (1995) Numerical partial differential equations: finite difference methods (graduate
texts in mathematics). Springer, New York