TEST_NAVIER_STOKES_2D
Test Cases for 2D Navier-Stokes Flow


TEST_NAVIER_STOKES_2D is a FORTRAN77 library which describes some test cases for the Navier-Stokes equations in 2D, which model the velocity and pressure of an incompressible fluid. Graphics files are created using gnuplot.

The equations are written in terms of the horizontal and vertical velocity components u,v, and the pressure p. The equations also involve the mass density rho and the dynamic viscosity mu.

            du      (d^2 u   d^2 u           du         du   dp
        rho -- - mu (----- + ----- ) + rho u -- + rho v -- + -- = f(x,t)
            dt      (dx^2    dy^2            dx         dy   dx

            dv      (d^2 v   d^2 v           dv         dv   dp
        rho -- - mu (----- + ----- ) + rho u -- + rho v -- + -- = g(x,t)
            dt      (dx^2    dy^2            dx         dy   dy

                                                    du       du     
                                                rho -- + rho -- = h(x,t)
                                                    dx       dy 
      
The functions f(x,t), g(x,t) and h(x,t) are given "forcing functions", which are often simply zero. Along with these state equations, which hold inside some prescribed region, we generally have an initial condition, which gives the state variables at a starting time, and boundary conditions, which prescribe flow quantities on the boundary of the region.

Licensing:

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

Languages:

TEST_NAVIER_STOKES_2D is available in a C version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

GNUPLOT, FORTRAN77 programs which illustrate how a program can write data and command files so that gnuplot can create plots of the program results.

Reference:

  1. Maxim Olshanskii, Leo Rebholz,
    Application of barycenter refined meshes in linear elasticity and incompressible fluid dynamics,
    ETNA: Electronic Transactions in Numerical Analysis,
    Volume 38, pages 258-274, 2011.

Source Code:

SPIRAL is a time-dependent circulating flow enclosed in the unit square. The boundary conditions are u = v = 0 on the boundaries, and p(0,0) = 0. The density rho and viscosity mu are taken to be 1. The code includes routines UVP, which returns the solution at any point in space and time, RHS, which returns the right hand side forcing functions, and RES, which evaluates the residual.

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


Last revised on 09 May 2014.