spiral_exact


spiral_exact, a Fortran77 code which computes a 2D velocity vector field that is an exact solution of the continuity equation.

The continuous velocity field (U,V)(X,Y) that is discretely sampled here satisfies the homogeneous continuity equation, that is, it has zero divergence. In other words:


        dU/dX + dV/dY = 0.
      
This is by construction, since we have

        U(X,Y) =  10 * d/dY ( PHI(X) * PHI(Y) )
        V(X,Y) = -10 * d/dX ( PHI(X) * PHI(Y) )
      
which guarantees zero divergence.

The underlying function PHI is defined by


        PHI(Z) = ( 1 - cos ( C * pi * Z ) ) * ( 1 - Z )^2
      
where C is a parameter.

The velocity data satisifes the (continuous) continuity equation; this in no way implies that it satisfies the momentum equations associated with Stokes or Navier-Stokes flow! Moreover, a flow solution for those equations would normally also require specifying a value for the scalar pressure field P(X,Y).

Licensing:

The computer code and data files made available on this web page are distributed under the MIT license

Languages:

spiral_exact is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

spiral_exact_test

gnuplot, Fortran90 programs which illustrate the use of the gnuplot graphics program.

navier_stokes_2d_exact, a Fortran77 library which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations over an arbitrary domain in 2D.

STOKES_2D_EXACT, a Fortran77 library which evaluates exact solutions to the incompressible steady Stokes equations over the unit square in 2D.

Source Code:


Last revised on 18 December 2023.