Environmental Engineering Reference
In-Depth Information
1. In the execution part of the M-file add a command by which the streamfunction
is computed under the variable
psi
:
The command is an implementation of the two formulae given in (
15.5
).
Following the principle of superposition (see Chap. 14), the formulae have to be
added to account for a situation with baseflow and a single well. The angle
is
ϑ
calculated by the arcustangens function. In MATLAB
there are two ways of
computing the arcustangens. Here we chose not to use the standard
atan
command, which delivers angles in the interval between
®
2
2
. The
and
atan2
command is chosen, because angles in the range between
p
and
p
are computed. We will come back to that point below.
2. Add another plot option in the input part of the M-file:
3. Plot baseflow with the
contour
command (without filling colors):
The
gstream
parameter is not only a switch for streamline graphics, but also
determines the number of contours to be depicted. According to the property of
the streamfucntion mentioned above, there is no flux between two locations on
the same contour. This means that the
-contours are
streamlines
, a term
already met in Chap. 14 in connection with the MATLAB
C
®
streamline
command. The streamfunction offers an alternative method for plotting
streamlines.
Figure
15.1
shows the output of the M-file if both the streamline and the
streamfunction contours are active. Streamfunction contours are depicted in black
colour, lines from
streamline
in yellow, using the
gowp_dot
option, introduced
in Chap. 14. Obviously the flow field representations coincide
1
. But streamline
distributions are obviously different. Using
streamline
, the lines are determined
by starting points; the MATLAB
algorithm thus is a flowpath algorithm by
which a flowpath is traced forward or backward in time. Another word for such
a procedure is
particle tracking
. In 2D these are numerical solutions of the differ-
ential equations:
®
1
Of course, there should be no cross-overs between the streamline patterns if both representations
are correct. The user may play around and find out that under certain conditions there are cross-
overs. One important example is given, when the mesh spacing in
x
- and
y
-direction is not equal, as
the output of the streamline command is not a correct representation of the flow field.