STOKES_2D_EXACT
Exact solutions to the
2D Incompressible Steady Stokes Equations
STOKES_2D_EXACT,
a C library which
evaluates exact solutions to the incompressible steady
Stokes equations in 2D.
The incompressible steady 2D Stokes equations seek functions u(x,y),
v(x,y), (the velocity vector) and p(x,y) (the pressure) such that
- uxx - uyy + dpdx = f
- vxx - vyy + dpdy = g
ux + vy = h
while satisfying boundary conditions for u and v, and a normalization
condition for p, such as specifying its value at one point, or requiring
that the integral of p over the region be 0.
Three exact solution fields are provided here.
Licensing:
The computer code and data files made available on this web page
are distributed under
the GNU LGPL license.
Languages:
STOKES_2D_EXACT is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
NAVIER_STOKES_2D_EXACT,
a C library which
evaluates an exact solution to the incompressible time-dependent
Navier-Stokes equations over an arbitrary domain in 2D.
NAVIER_STOKES_MESH2D,
MATLAB data files which
define triangular meshes for several
2D test problems involving the Navier Stokes equations
for fluid flow, provided by Leo Rebholz.
SPIRAL_DATA,
a C library which
computes a velocity vector field that satisfies the continuity
equation, writing the data to a file that can be plotted
by gnuplot.
Reference:
-
Junping Wang, Yanqiu Wang, Xiu Ye,
A robust numerical method for Stokes equations based on divergence-free
H(div) finite element methods,
SIAM Journal on Scientific Computing,
Volume 31, Number 4, 2009, pages 2784-2802.
-
Howard Elman, Alison Ramage, David Silvester,
Finite Elements and Fast Iterative Solvers with
Applications in Incompressible Fluid Dynamics,
Oxford, 2005,
ISBN: 978-0198528678,
LC: QA911.E39.
Source Code:
Examples and Tests:
Graphics files:
List of Routines:
-
GRID_2D returns a regular 2D grid.
-
R8VEC_AMAX returns the maximum absolute value in an R8VEC.
-
R8VEC_AMIN returns the minimum absolute value in an R8VEC.
-
R8VEC_MAX returns the value of the maximum element in a R8VEC.
-
R8VEC_MIN returns the value of the minimum element in a R8VEC.
-
R8VEC_NORM_L2 returns the L2 norm of an R8VEC.
-
R8VEC_UNIFORM_AB_NEW returns a scaled pseudorandom R8VEC.
-
RESID_STOKES1 returns residuals of the exact Stokes solution #1.
-
RESID_STOKES2 returns residuals of the exact Stokes solution #2.
-
RESID_STOKES3 returns residuals of the exact Stokes solution #3.
-
RHS_STOKES1 returns the right hand sides of the exact Stokes solution #1.
-
RHS_STOKES2 returns the right hand sides of the exact Stokes solution #2.
-
RHS_STOKES3 returns the right hand sides of the exact Stokes solution #3.
-
STOKES_GNUPLOT writes the Stokes velocity field to files for GNUPLOT.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
UVP_STOKES1 evaluates the exact Stokes solution #1.
-
UVP_STOKES2 evaluates the exact Stokes solution #2.
-
UVP_STOKES3 evaluates the exact Stokes solution #3.
You can go up one level to
the C source codes.
Last revised on 11 February 2015.