Environmental Engineering Reference
In-Depth Information
Fig. 4.4 Pure advective passing of a concentration front through a 1D compartment
click. The sequence shows advection, i.e. pure transport with the flow field. What is
not correct is that the vertical front-line is slightly tilted. One could think that this
represents a tiny transition zone between the low and the high concentration regime,
but such a zone would be the result of diffusion or dispersion, which are not yet
included in the model. In fact the tilting is an effect of the spatial discretization, e.g.
the representation of a 1D-space interval by a finite number of discrete cells. The
plotting algorithm, implemented in MATLAB
, connects neighbouring positions
by a straight line. The tilting becomes less pronounced when the number of cells is
increased.
For further use modify the advection m-file slightly:
®
The concentration variable is re-named to c1 , as it contains the current value of
the concentration in a row vector. The c will be reserved for a matrix containing
concentrations for all cells at all time-instants. The 'advection.m' file is called as a
sub-module from a main m-file, in which the initialization and the post-processing
are performed. The main module should look like this:
In the first three lines, the input part, variables are initialised, tasks which were
done in the command window in the previous demonstration. In the forth line the
row vector of current concentrations is set to the constant initial value, and also the
first row of what is to become the concentration matrix c is filled with the initials. A
for -loop is introduced, in which N time steps are simulated. Advection is simulated
in 'advection.m ', called within the loop. Then the concentration is plotted, as
already shown in Fig. 4.4 . Finally the row of current concentrations is attached to
the matrix c . Store this file under the name 'simpletrans.m' .
Search WWH ::




Custom Search