function velocity_spiral_test ( )

%*****************************************************************************80
%
%% velocity_spiral_test() plots the spiral flow.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 September 2025
%
%  Author:
%
%    John Burkardt
%
  nu = 1.0;
  rho = 1.0;
  t = 1.0;

  xmin = 0.0;
  xmax = 1.0;
  ymin = 0.0;
  ymax = 1.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'velocity_spiral_test():\n' );
  fprintf ( 1, '  spiral() generates a velocity field on a regular grid.\n' );
  fprintf ( 1, '  %g <= X <= %g, %g <= Y <= %g\n', xmin, xmax, ymin, ymax );
  fprintf ( 1, '  T = %g\n', t );
  fprintf ( 1, '  Store in GNUPLOT data and command files.\n' );

  x_num = 21;
  y_num = 21;
  [ x, y ] = grid_2d ( x_num, xmin, xmax, y_num, ymin, ymax );

  n = x_num * y_num;
  [ u, v, p ] = uvp_spiral ( nu, rho, n, x, y, t );

  header = 'spiral';
  s = 2.0 / max ( max ( sqrt ( u.^2 + v.^2 ) ) ) / sqrt ( n );
  velocity_gnuplot ( header, n, x, y, u, v, p, s );

  return
end

