FEM2D_NAVIER_STOKES_CAVITY
A Sample 2D Navier-Stokes Problem


FEM2D_NAVIER_STOKES_CAVITY is a MATLAB library which sets up the geometry and data for the "cavity" problem. The 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.

To run the problem directly, you only need the user-supplied routines in dirichlet_condition.m and rhs.m, the node data in nodes6.txt, and the element data in triangles6.txt.

Usage:

Assuming the nodes and elements are stored as "cavity_nodes.txt" and "cavity_elements.txt", and that the files associated with fem2d_navier_stokes are in the path, we can run with:

        fem2d_navier_stokes ( 'cavity' )
      

Licensing:

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

Related Data and Programs:

FEM2D_NAVIER_STOKES, a MATLAB program which solves the 2D incompressible Navier Stokes equations in an arbitrary triangulated region. In order to run, it requires user-supplied routines that define problem data.

Source Code:

Some of the files needed to run the problem include:

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

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.

The Stokes equations are solved first, providing the solution of a linear system that can be used as a good estimate of the solution, especially for high values of the viscosity.

The nonlinear Navier Stokes equations are solved, using the Stokes solution as a starting point.


Last revised on 13 January 2011.