Environmental Engineering Reference
In-Depth Information
Fig. 14.1 Surface plot for a potential function; derived from superposition of 1D baseflow and
flow towards a sink
source/sink position for all mesh-points. The potential array
phi
is evaluated in the
following command and finally plotted as surface plot.
The result of the entire series of commands is given in Fig.
14.1
. The outer
gradient, due to baseflow, is clearly visible as well as the dramatic drawdown where
the sink is approached. As the M-file is written, a positive value for
Q
produces
a sink, while a negative value results in a source. The user may check the direction
and gradient of baseflow by variation of the variables
Qx0
and
Qy0
. Note that the
given logarithm has a single singularity at the source/ sink position with r
r
0
.
In 3D the point source/sink solution, corresponding to formula (
14.5
), is given by
¼
Q
4
1
'ðx; y; zÞ¼
(14.6)
p
j
r
r
0
j
the 3D potential is calculated by the following command
sequence. The resulting plot is depicted in Fig.
14.2
.
In MATLAB
®
Q = 1;
Qx0 = 1;
i = linspace(1,3,50)
[x,y,z] = meshgrid (i,i,i)
r = sqrt((x-2.05).^2+(y-2.05).^2+(z-2.05).^2);
xslice = [1.5;1.9;2.3];
yslice = [3];
zslice = [1.5;2.2];
phi = -Qx0*x-Q/4/pi/r;
slice (x,y,z,phi,xslice,yslice,zslice)