A Sample 2D Flow Problem

**FEM2D_STOKES_SPARSE_BIG_CAVITY** is a square region that is 1 unit wide and 1 unit
high. The tangential velocity is specified to be 1 along the
top boundary, with a zero normal component. On all other parts
of the boundary, the velocity is specified to be zero.

This is a more ambitious version of the cavity problem, with a nonuniform mesh, comprising 4,000 element, 8,185 nodes, 18,463 variables, and 539,069 nonzero entries in the jacobian matrix.

To run the problem, you only need the user-supplied routines
and the user-supplied node data (**nodes6.txt**) and element data
(**triangles6.txt**).

You can run the program with the MATLAB command

ffs_sparse ( 'nodes6.txt', 'triangles6.txt' )

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**FEM2D_STOKES_SPARSE_BIG_CAVITY** is available in
a MATLAB version.

FEM2D_STOKES_SPARSE,
a MATLAB program which
solves the steady (time independent) incompressible Stokes equations
on an arbitrary triangulated region,
using the finite element method and MATLAB's **sparse** facility.

FEM2D_STOKES_SPARSE_CAVITY,
a MATLAB library which
contains the user-supplied routines necessary to run **fem2d_stokes_sparse**
on the "cavity" problem.

FEM2D_STOKES_SPARSE_CHANNEL,
a MATLAB library which
contains the user-supplied routines necessary to run **fem2d_stokes_sparse**
on the "channel" problem.

FEM2D_STOKES_SPARSE_INOUT,
a MATLAB library which
contains the user-supplied routines necessary to run **fem2d_stokes_sparse**
on the "inout" problem.

FEM2D_STOKES_SPARSE_SPIRAL,
a MATLAB library which
contains the user-supplied routines necessary to run **fem2d_stokes_sparse**
on the "spiral" problem.

The user-supplied files needed to run the problem include:

- boundary_type.m, the user-supplied routine to adjust the program's default assignment of boundary condition types.
- dirichlet_condition.m, the user-supplied routine to evaluate any Dirichlet boundary conditions.
- neumann_condition.m, the user-supplied routine to evaluate any Neumann boundary conditions.
- rhs.m, the user-supplied routine to evaluate the right hand side.

The printed output from a run is:

- big_cavity_output.txt, output from a run of the program;

The geometry is defined by sets of nodes and triangles. The velocities use the full set of nodes, and quadratic (6 node) triangles.

- nodes6.txt, a text file containing the velocity nodes;
- nodes6.png, a PNG image of the velocity nodes;
- triangles6.txt, the quadratic triangulation;
- triangles6.png, a PNG image of the order 6 triangulation;

The pressures are associated with a subset of the nodes called "pressure nodes", and linear (3 node) triangles. Note that, in the order 3 triangulation, the nodes are renumbered, and do NOT inherit the labels used in the order 6 triangulation.

- nodes3.txt, a text file containing the pressure nodes;
- nodes3.png, a PNG image of the pressure nodes;
- triangles3.txt, the linear triangulation;
- triangles3.png, a PNG image of the linear triangulation;

The pressures are a scalar quantity associated with the pressure nodes, the velocities are a vector quantity associated with the vector nodes.

- pressure3.txt, a text file containing the pressure P at each linear node;
- pressure3.png, a PNG image of a contour plot of the pressure, produced by TRIANGULATION_ORDER3_CONTOUR.
- velocity6.txt, a text file containing the velocity (U,V) at each velocity node;
- velocity6_dir.png, a PNG image of the velocity direction field, created by DIRECTION_ARROWS_GRID.
- velocity6_vec.png, a PNG image of the velocity field, created by VELOCITY_ARROWS_GRID.