**spiral_exact**,
an Octave 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:

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

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

The underlying function PHI is defined by

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

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)**.

The information on this web page is distributed under the MIT license.

**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.

kdv_exact, an Octave code which evaluates an exact solution of the Korteweg-deVries (KdV) partial differential equation (PDE).

gnuplot_test, an Octave code which illustrates the use of the gnuplot() graphics program.

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

navier_stokes_3d_exact, an Octave code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 3D.

pendulum_nonlinear_exact, an Octave code which evaluates an exact formula for the solution of the the ordinary differential equations (ODE) that represent the behavior of a nonlinear pendulum of length L under a gravitational force of strength G.

stokes_2d_exact, an Octave code which evaluates exact solutions to the incompressible steady Stokes equations over the unit square in 2D.

- grid_2d.m, returns a regular 2D grid.
- r8vec_uniform_ab.m, returns a scaled pseudorandom R8VEC.
- resid_spiral.m, computes the residual for a spiral velocity vector field.
- spiral_gnuplot.m, writes the velocity vector field to files for GNUPLOT.
- uv_spiral.m, computes a spiral velocity vector field.