VECTOR_MAGNITUDE_GRID is a MATLAB routine which reads vector data defined at possibly scattered points, creates an interpolating function to the data, and evaluates that data on an even grid to produce a contour plot of the vector magnitude.
The program is mainly a preprocessor for MATLAB's contour routine. It reads the (X,Y) coordinates of a set of points from a "node" file, and the corresponding vector values from a "vector" file. It uses MATLAB's griddata facility to create an interpolatory function to the given data. The interpolated function is then sampled on a regular grid, and the data is used to produce a contour plot.
Both the node and vector files are simple "table" files whose format is described online.
This program was written as a quick and convenient way to view finite element data. It can also be used for any situation in which a collection of points and vectors are available.
However, a small "sin" is committed when we use this program on finite element data, since we take only the node locations and vector values, but not the elements. We simply use MATLAB's grid data feature which constructs a cubic spline interpolant to scattered data. This is OK, and probably doesn't distort the data too much, but in fact, we are not actually viewing values of the finite element function, and there is no guarantee that this surrogate function will actually satisfy the boundary conditions or other characteristics of the finite element function.
VECTOR_MAGNITUDE_GRID is based in part on a plotting routine written by Professor Hyung-Chun Lee of Ajou University, Korea.
The calling sequence is:
vector_magnitude_grid ( node_file, vector_file, grid_num, contour_num )where
BUMP is a FORTRAN90 program which computes the pressure and velocity for a Navier Stokes flow in a channel with a bump.
CHANNEL is a program which computes the pressure and velocity for a Navier Stokes flow in a channel. It is available in a FORTRAN77 version and a FORTRAN90 version.
DIRECTION_ARROWS is a MATLAB program which plots the velocity direction field.
DIRECTION_ARROWS2 is a MATLAB program which plots the velocity direction field, assuming that the XY and UV data are stored in a single table file.
DIRECTION_ARROWS_SEQUENCE is a MATLAB program which plots the velocity direction fields of many data files with names that are numbered in sequence.
FFNS_SPARSE is a MATLAB program for solving the steady incompressible Navier Stokes equations on an arbitrary triangulated region, using the finite element method and MATLAB's sparse facility.
FFS_SPARSE is a MATLAB program for solving the steady incompressible Stokes equations on an arbitrary triangulated region, using the finite element method and MATLAB's sparse facility.
FLOW3 is a FORTRAN90 program for solving the steady incompressible Navier Stokes equations.
FLOW5 is a FORTRAN90 program for solving the steady incompressible Navier Stokes equations.
FLOW7 is a FORTRAN90 program for solving the steady incompressible Navier Stokes equations.
FREE_FEM_NAVIER_STOKES is a MATLAB program for solving the steady incompressible Navier Stokes equations on an arbitrary triangulated region, using the finite element method.
FREE_FEM_STOKES is a MATLAB program which computes the pressure and velocity for a Stokes flow.
HCELL is a FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in an "H"-shaped region.
INOUT is a FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in a square region with an inlet and an outlet.
MHD_CONTROL is an executable FORTRAN90 program which tries to control the evolution of an MHD system so that a particular state is achieved.
MHD_FLOW is an executable FORTRAN90 program for the evolution of an MHD system.
NAST2D is a C++ program which computes the pressure and velocity for a Navier Stokes flow.
NAST2D_F90 is a FORTRAN90 program which computes the pressure and velocity for a Navier Stokes flow.
NSASM is a C library of routines, intended to be used with a MATLAB calling program, and which set up the sparse matrix needed for a Newton iteration to solve a finite element formulation of the steady incompressible 2D Navier Stokes equations.
TABLE is a format used for the input files to this program.
TCELL is a FORTRAN77 program which computes the pressure and velocity for a Navier Stokes flow in a "T"-shaped region.
VECTOR_PLOT is a FORTRAN90 program which can read an XY file and a UV file and plot the velocity and velocity direction fields.
VECTOR_STREAM_GRID is a MATLAB program which reads node and vector data from a file, computes an interpolatory function, evaluates on a uniform grid of points specified by the user, and displays a streamline plot of the vector field.
VELOCITY_ARROWS is a MATLAB program which plots a velocity vector field.
VELOCITY_ARROWS_GRID is a MATLAB program which reads node and velocity data from a file, and using interpolation is able to display a velocity vector field along any uniform grid of points specified by the user.
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 can process a set of many data files with names that are numbered in sequence.
VELOCITY_ARROWS_SEQUENCE2, is a MATLAB program which reads a single XYUV file of nodes and velocities, plots the data and writes it to a PNG file, and then repeats the process for the next file.
VELOCITY_ARROWS2 is a MATLAB program which plots a velocity field, and assumes that the node and velocity data are stored in a single table file.
A GZIP'ed TAR file of the contents of this directory is available. This is only done as a convenience for users who want ALL the files, and don't want to download them individually. This is not a convenience for me, so don't be surprised if the tar file is somewhat out of date.
BIG_CAVITY is a fluid flow problem involving an irregular mesh of 8,185 nodes in a square region.
You can go up one level to the MATLAB source codes.