Environmental Engineering Reference
In-Depth Information
c
1
0.5
100
0
80
60
t
40
100
20
80
60
40
0
x
20
0
Fig. 4.5 Pure advection in a space (
x
)-time (
t
)-diagram
Run the program. After that a surface plot in the
x-t
-diagram is obtained with the
surf
-command (use MATLAB
command-window) (Fig.
4.5
):
®
As a next step we introduce diffusion into the model. For that purpose we set up
another m-file with the task to mimic diffusive/dispersive processes:
Store this m-file under the name
'diffusion.m'
. The Neumann number
Neumann
,
which appears here, has to be specified in the main module. The definition of the
dimensionless Neumann number is given in Sidebar 4.2; let's take it as simply a
parameter. The influence of that number is to examine. An auxiliary concentration
row
c2
is computed in the sub-module, where the value in each cell is calculated
from the last concentrations
c1
in the same cell and the two neighbouring
cells. Why such a procedure mimics diffusion is derived in the following.
The corresponding main m-file has a Neumann-number specification additionally
and a call of the diffusion sub-module (called by the
diffusion
command):
Store the m-file under the name
'simpletrans.m'
. Advection and diffusion are
simulated in the corresponding sub-modules, which are called within the
for
-loop of