Environmental Engineering Reference
In-Depth Information
due to the approximate representation of the differentials by finite differences is
higher than in the later simulation. The error can be reduced by an increase of the
number of cells, which is done here by lowering the input value for dxmax .
The differences at the end of the outflow boundary are due to a different reason.
In fact the boundary condition, which is included in the numerical algorithm, does
not coincide with the analytical solution, which is valid for the infinite half space
x
@c=@x ¼
0. The 'erfc'-solutions ( 4.1 ) and ( 4.4 ) do not fulfil the
0 Neumann
condition at any finite location.
The Neumann boundary condition is in fact approximated by the numerical
algorithm, more precisely in the command
appearing in the module 'diffusion.m' . The formula results from the general finite
difference formulation by setting c1(N + 1) ¼ c1(N) ,where c1(N + 1) represents the
concentration in the outflow reservoir behind the final cell. The slope of the numerical
solution vanishes at the right boundary, which is clearly visible in Fig. 4.9 .
The boundary condition is not altered by a finer discretization, and thus the
deviation on the outflow side remains. Figure 4.10 , obtained for 100 cells,
demonstrates that the deviation on the left side is reduced in comparison to
Fig. 4.9 , but the deviation on the right side remains.
1
dashed - num
solid - anal
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
20
40
60
80
100
space
Fig. 4.10 Comparison of analytical and numerical results for the 1D transport equation, for a finer
discretization
Search WWH ::




Custom Search