Environmental Engineering Reference
In-Depth Information
We add a
gflowp_fit
switch as another option where graphic options are specified.
At the end we add the following commands:
if
gflowp_fit
% flowpaths
xstart = []; ystart = [];
for
i = 1:100
if
v(1,i) > 0 xstart = [xstart xvec(i)];...
ystart = [ystart yvec(1)];
end
if
v(100,i) < 0 xstart = [xstart xvec(i)];...
ystart = [ystart yvec(100)];
end
if
u(i,1) > 0 xstart = [xstart xvec(1)];...
ystart = [ystart yvec(i)];
end
if
ystart = [ystart yvec(i)];
end
end
h = streamline (x,y,u,v,xstart,ystart);
set (h,'Color','red');
end
The
streamline
command, almost at the end of the last command listing,
obtains mesh and velocity field information like the
quiver
command. There are
two new vectors to be added, which have to contain the starting values for the
flowpaths. With the
for
loop the starting positions for the flowpaths are determined.
Each mesh node at the boundary becomes a start position if the flow velocity is
directed into the model region.
A nice way to determine the catchment of a well is to choose startpositions near
the well position and trace the flowpath backward in time. In the code we introduce
another option parameter
gflowp_bit
. The value of the parameter determines
whether backward tracing is performed at all. In case of backward tracing, the
value of the parameter determines the number of starting positions around the well.
The well radius
R
is introduced as another new input parameter that is used for the
calculation of the starting locations.
if
gflowp_bit
xstart = x0 + R*cos(2*pi*[1:1:gflowp_bit]/gflowp_bit);
ystart = y0 + R*sin(2*pi*[1:1:gflowp_bit]/gflowp_bit);
h = streamline (x,y,-u,-v,xstart,ystart);
set (h,'Color','y');
end
Another nice feature is the option to use dots along the flowpaths in order
to indicate the size of the velocity. The use of the option is demonstrated on the
following commands:
if
gflowp_dot
[verts averts] = streamslice(x,y,u,v,gflowp_dot);
sc = 10/mean(mean(sqrt(u.*u+v.*v)));
iverts = interpstreamspeed(x,y,u,v,verts,sc);
h = streamline (iverts);
set (h,'Marker','.','Color','y')
end