An Appropriate Algorithm in Parallel Computations for ... - Science Direct

1 downloads 0 Views 1MB Size Report
Methods for computing these flows used to obtain numerical ... tical is between two and four times that required for the solution of the shallow water equations alone. ... The acceleration due to gravity is represented by the parameter g. ... equation (8) are set to zero, resulting in the following system of equations for crls.
Pergamon

Mathl. Comput. Modelling Vol. 20, No. 1, pp. 65-84,

1994 Copyright@1994 Elsevier Science Ltd Printed in Great Britain. All rights reserved 08957177/94-87.00 + 0.00

0895.7177(94)00092-l

An Appropriate Algorithm in Parallel Computations for Three-Dimensional Hydrodynamics H. M. CEKIRGE GFDI, Florida State University and FAMU/FSU Civil Engineering Tallahassee, FL 32306, U.S.A. J. BERLIN Thinking Machines Corporation 245 First Street, Cambridge, MA 02142, U.S.A.

R. A. BERNATZ Department of Mathematics, Luther College Decorah, IA 52010, U.S.A. M. KOCH GFDI, Florida State University Tallahassee, FL 32306, U.S.A. (Received and accepted April 1994)

Abstract-There

are a number of numerical methods for solving three-dimensional hydrodynam-

ical models. An important aspect of any method is its efficient use of parallel computer architectures in an effort to minimize the clock time requirements in certain simulations such as oil spill modeling which uses three-dimensional hydrodynamics. The vertical-horizontal splitting (VHS) algorithm, using the method of characteristics for the two-dimensional horizontal plane and a generalization of the Crank-Nicholson method for vertical integration, is well-suited for the parallel architecture of the CM-2 machine.

Keywords-Methods of characteristics, Tidal currents, Parallel computations, Three-dimensional hydrodynamics, Tidal currents in the Arabian Gulf.

1. INTRODUCTION The shallow water equations are the basis for two-dimensional models for computing the flows due to tides or storm surges. Methods for computing these flows used to obtain numerical solutions of the shallow water equations include finite difference schemes (l-51, finite element schemes [6,7], harmonic analysis in time combined finite elements in space [8,9], and the method of characteristics [lo-131. In general, the two-dimensional models are quite reliable for tidal flows where currents are nearly uniform throughout the water column, justifying the approximations made in deriving the shallow water equations are reasonable. However, for baroclinic and winddriven flows, there is considerable variation of velocity with depth and the two-dimensional model The authors would like to acknowledge the Supercomputer Computations Research Institute on the campus of Florida State University and Thinking Machines Corporation for supplying computer time on the CM-2 machine for the calculations presented in this study.

65

66

H. M. CEKIRGE et al.

is not so reliable. Predicting the movement of a surface oil slick is one application for which it is necessary to compute the vertical profile of the velocity field rather than simply the depthaveraged velocity components computed from the shallow water equations. For this and other applications, a three-dimensional model is needed. In the last twenty years, a number of threedimensional algorithms have been developed. Many are based on a finite difference scheme of some kind in three dimensions (e.g., [14-161). A Galerkin method with an appropriate set of basis functions in the vertical dimension was used by Davies and Owen [17] and Davies [18] and [19]. Several recent three-dimensional models are described by Nihoul and Jamart [20]. A limitation on most three-dimensional algorithms is their enormous demand on computing time. The vertical-horizontal splitting (VHS) method provides an alternative approach for computing three-dimensional current distributions. As its name indicates, the VHS method splits the dependence of the dependent variables into the horizontal plane (X and y coordinates) and vertical (z) coordinate. Algorithms using this method have been developed by Davies [21], Backhaus [22], Lardner and Cekirge [23], and Lardner and Smoczynski [24]. An algorithm based on the VHS will be used in the present study, and a brief outline of its workings will now be given. The VHS method consists of two stages at each time step. In the first part, the depth-averaged momentum and continuity equations are solved for the surface elevation and the depth-averaged velocity components. These depth-averaged equations differ from the shallow water equations in that no approximations are made for the vertical integral of the advective terms or the bottomfriction terms-these terms are computed exactly from the vertical profiles of velocity derived in the second part of the algorithm. However, the numerical scheme employed for this first part can be virtually the same as those used for the conventional shallow water equations. We have experimented successfully with several such schemes, including the method of characteristics [5], a leapfrog finite difference scheme [24] and Leendertsee’s original AD1 scheme [2,25]. In this study, the method of characteristics is used because it is well-suited for the parallel architecture of the CM-2 machine. In the second stage of the VHS method, the momentum equations for the full velocity field are solved using the surface gradients computed in the first stage and a sigma-coordinate in the vertical direction, The advective terms are treated explicitly, which allows the equations to be solved independently at each horizontal grid point. Two alternative algorithms have been developed for this purpose, the first is based on a generalized Crank-Nicholson method and the other using finite elements in the sigma-coordinate [26]. Both of these algorithms are viable, and the former method will be used in this study for the second stage of the VHS method. The VHS method has several advantages over alternative approaches such as the finite difference method for three dimensions. First, the stability properties of the Crank-Nicholson method mean that there is no restriction on the time step based on the vertical grid spacing. The only such restriction comes from the horizontal stage of the algorithm. If an explicit method is used for this part, the CFL condition will apply. Second, since the vertical profiles of velocity are constructed independently by solving one tri-diagonal system in the sigma-coordinates for each horizontal grid point, the algorithm is relatively efficient. Numerical experiments by Lardner et al. [26] indicate the CPU time required for the VHS method using ten grid levels in the vertical is between two and four times that required for the solution of the shallow water equations alone. In contrast, a finite difference solution to a conventional N-layer model with N = 10 would require more than ten times as much CPU time. Third, and perhaps most significantly, because of the unconditional stability of the second part (vertical integration) of the method, it need not be performed every time step in cases where the time step is short. A brief description of the method of characteristics is given in Section 2. Section 3 outlines the first order computation scheme, based on the method of characteristics, which is used to numerically integrate the two-dimensional shallow water equations. The generalized Crank-Nicholson method adapted to the vertical integration for second stage of the VHS method is outlined in Section 4.

Appropriate

Algorithm

67

Both integrations will be performed by using parallel computations on a CM-2 machine. For the first stage of the method, the grid covering the computational domain is decomposed into smaller subgrids. The explicit nature of the method of characteristics allows each subgrid to be assigned to its own processor. For the second step of the VHS method, the vertical integration at each horizontal node location is done independently, so that a single processor is assigned to a given location and the calculations are done simultaneously.

2. THE METHOD

OF CHARACTERISTICS

An outline of the derivation of the basic equations for the method of characteristics is given in this section. For a more comprehensive presentation of the method, the reader is referred to [27]. Flows in coastal regions are modeled using the shallow-water equations. The equations for depth-average components of water velocity u and v, and the height < of the free surface above a certain reference level are,

(1) (2)

ut+uu,+vu,+g~~=@, vt+uv,+vv,+g&/==,

ct-i-UG + vcy+ H(u,

(3)

+ vy) = x.

The Cartesian coordinates in the horizontal plane are represented by z and y, and t is time. Subscripts of z, y, and t denote partial derivatives with respect to these independent variables. The acceleration due to gravity is represented by the parameter g. The total depth of the water is given by H = h + C, where h(z, y) gives the depth of the bottom below the reference level. The expressions on the right hand sides of equations (l)-(3) are given by

$

Q=fv+ 9 =

--fu +

x = -h,u

(SZ -B”)

--&(9

-

- By

$P,, and

- + Py,

- h,v.

(6)

In these equations, f = 2R sin X is the Coriolis parameter, where R is the earth’s angular velocity and A is the latitude. In addition, P is the atmospheric pressure and p the density of water. Wind generated surface shear stress components are represented by S” and SY, and bottom drag components B” and By are given by

(B", BY)

=

$~~(u,v)

(7)

where c is the Chezy coefficient. When equations (l)-(3) are multiplied by scalars 01, (~2and (~3, respectively, and summed, the result is glut + (giu + asH)u, + (rlvuy + c72vt + (T~UV, + (62’~ + a3H)v, + 036 = 01@

+ (w

+ a2Q

+ ~3UKz

+

(a29

+ g3321)&/

(8)

+ 03x,

where coefficients of like partial derivative terms are collected. These coefficients define three directional derivative vectors in z-y-t space. The goal is to select proper values for the gi so that these vectors are co-planar. To that end, let N E (cos 0, sin 8, N) define a normal vector to the desired plane. The dot products of & with the three directional derivative vectors defined in equation (8) are set to zero, resulting in the following system of equations for crls (ucosf9+vsinB+N)ai+HcosBas=O, (ucosB+vsin0+N)~s+HsinBas gcos&ri+gsinBa2+(ucosB+vsin8+N)as=O, which has two distinct solutions.

=O,

and

(9)

H. M. CEKIRGE et al.

68

Stream Plane Solution The first solution to (9) is N = -ucosCJ - usin@ and o1 = -sine,

u2 = cos e,

63 =

0,

(10)

and defines the stream plane. This plane envelopes the vector (u, v, 1) which is tangent to the particle path. The compatibility equation (8) reduces to

- sine g

+ g(- sin ecz + cos e