FEM2D_STOKES_SPARSE_SPIRAL A Sample 2D Flow Problem

FEM2D_STOKES_SPARSE_SPIRAL is a square region that is 1 unit wide and 1 unit high. Zero Dirichlet conditions have been applied on all sides. Normally, this would result in zero flow. However, the right hand sides of the two momentum equations have been devised to induce a sort of spiral flow (actually, the flow is more like a series of concentric loops).

Usage:

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

You can run the program with the MATLAB command

```        fem2d_stokes_sparse ( 'nodes6.txt', 'triangles6.txt' )
```

Languages:

FEM2D_STOKES_SPARSE_SPIRAL is available in a MATLAB version.

Related Data and Programs:

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.

Source Code:

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

• boundary_type.m, adjusts the program's default assignment of boundary condition types.
• constants.m, sets flow constants, in this case just the kinematic viscosity NU.
• dirichlet_condition.m, evaluates the right hand sides of the Dirichlet boundary conditions.
• neumann_condition.m, evaluates the right hand sides of the Neumann boundary conditions.
• rhs.m, evaluates the right hand sides (source terms) of the equations.

The printed output from a run is:

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 pressures are a scalar quantity associated with the pressure nodes, the velocities are a vector quantity associated with the vector nodes.

Last revised on 10 November 2011.