stokes_2d_exact
    
    
    
      stokes_2d_exact,
      a MATLAB code which
      evaluates exact solutions (u,v,p)(x,y) to the incompressible steady
      Stokes equations in 2D, which are a system of partial differential
      equations (PDE) of the form: -uxx-uyy+px=f, -vxx-vyy+py=g, ux+vy=h.
    
    
      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 information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      stokes_2d_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:
    
    
      
      stokes_2d_exact_test
    
    
      
      matlab_exact,
      a MATLAB code which 
      evaluates exact solutions to a few selected examples of
      ordinary differential equations (ODE) and partial differential
      equations (PDE).
    
    
      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.
         
      
    
    
      Source Code:
    
    
      
        - 
          grid_2d.m, 
          returns a regular 2D grid.
        
 
        - 
          r8vec_uniform_ab.m, 
          returns a scaled pseudorandom R8VEC.
        
 
        - 
          resid_stokes1.m,
          evaluates the residuals at any point (x,y) 
          for flow #1.
        
 
        - 
          resid_stokes2.m,
          evaluates the residuals at any point (x,y) 
          for flow #2.
        
 
        - 
          resid_stokes3.m,
          evaluates the residuals at any point (x,y) 
          for flow #3.
        
 
        - 
          rhs_stokes1.m,
          evaluates the riht hand side functions at any point (x,y) 
          for flow #1.
        
 
        - 
          rhs_stokes2.m,
          evaluates the riht hand side functions at any point (x,y) 
          for flow #2.
        
 
        - 
          rhs_stokes3.m,
          evaluates the riht hand side functions at any point (x,y) 
          for flow #3.
        
 
        - 
          stokes_gnuplot.m, 
          writes the velocity vector field to files for GNUPLOT.
        
 
        - 
          uvp_stokes1.m,
          evaluates the velocity and pressure field at any point (x,y)
          for flow #1.
        
 
        - 
          uvp_stokes2.m,
          evaluates the velocity and pressure field at any point (x,y)
          for flow #2.
        
 
        - 
          uvp_stokes3.m,
          evaluates the velocity and pressure field at any point (x,y)
          for flow #3.
        
 
      
    
    
    
      Last revised on 22 March 2019.