DIRECTION_ARROWS_SEQUENCE2
Direction Field Arrow Sequence


DIRECTION_ARROWS_SEQUENCE2 is a MATLAB routine which makes velocity direction arrow plots using a sequence of files, each of which stores the X and Y coordinates, and U and V velocity components, at a set of nodes, stored as TABLE files (except that no "#" comment lines are allowed).

The program is mainly a preprocessor for MATLAB's quiver routine. It reads the (X,Y) coordinates and (U,V) velocity components at a set of points from an "XYUV" file.

It then makes a few settings, computes the direction field from the velocity field, calls quiver to plot the arrows, and also traces out the convex hull of the points, which is presumably the boundary of the region. The resulting image is displayed, and saved to a PNG file.

In addition, the program assumes that the user actually has a sequence of XYUV datasets, with "consecutive" names, each of which is to be plotted. The program automatically reads each such dataset and creates the sequence of PNG files. It is easy to take such a sequence and make an animation.

Related Data and Programs:

DIRECTION_ARROWS is a MATLAB program which will display the direction field for a single set of UV data.

DIRECTION_ARROWS_GRID is a MATLAB program which reads files of node and velocity data, and, using interpolation, creates a velocity direction plot with arrows place on a uniform grid of the user's specification.

DIRECTION_ARROWS_SEQUENCE is a MATLAB program which assumes that the XY coordinate data is fixed, and stored in a separate file.

FREE_FEM_STOKES is a MATLAB program which computes the pressure and velocity for a Stokes flow. The velocity vectors can be plotted using DIRECTION_ARROWS.

TABLE is the format used for the input files to this program.

VECTOR_MAGNITUDE_GRID is a MATLAB program which reads node and velocity data from a file, and using an interpolating function, is able to display a contour plot of the vector magnitude field.

VECTOR_PLOT is a FORTRAN90 program which can read an XY file and a UV file and plot the velocity and velocity direction fields.

VELOCITY_ARROWS_GRID2 is a MATLAB program which reads a single file of node and velocity data, and using interpolation is able to display a velocity vector field along any uniform grid of points specified by the user.

VELOCITY_ARROWS_SEQUENCE is a MATLAB program which plots the velocity field.

Source Code:

Examples and Tests:

INOUT is defined by the following data, for which the XY coordinates do not change:

The command

direction_arrows_sequence2 ( 'inout_xyuv001.txt', 1.0 )
created the following files:

CHANNEL is defined by the following data, for which the XY coordinates DOES change. This is an interesting demonstration, since the nodes seem to move with the flow.

The command

direction_arrows_sequence2 ( 'channel_xyuv001.txt', 0.25 )
created the following files:

You can go up one level to the MATLAB source codes.


Last revised on 16 September 2005.