




















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





















































This document comprises the first volume of the theoretical and computational documentation for the Environmental Fluid Dynamics Code (EFDC). The material in this volume was previously distributed as:
Hamrick, J. M., 1992: A THREE-DIMENSIONAL ENVIRONMENTAL FLUID DYNAMICS COMPUTER CODE: THEORETICAL AND COMPUTATIONAL ASPECTS. Special Report No. 317 in Applied Marine Science and Ocean Engineering, Virginia Institute of Marine Science School of Marine Science, The College of William and Mary, Gloucester Point, VA 23062
This original document is reproduced in its entirety with corrections to a number of errors in equations listed at the end.
(Hamrick, 1992)
This report describes and documents the theoretical and computational aspects of a three- dimensional computer code for environmental fluid flows. The code solves the three- dimensional primitive variable vertically hydrostatic equations of motion for turbulent flow in a coordinate system which is curvilinear and orthogonal in the horizontal plane and stretched to follow bottom topography and free surface displacement in the vertical direction which is aligned with the gravitational vector. A second moment turbulence closure scheme relates turbulent viscosity and diffusivity to the turbulence intensity and a turbulence length scale. Transport equations for the turbulence intensity and length scale as well as transport equations for salinity, temperature, suspended sediment and a dye tracer are also solved. An equation of state relates density to pressure, salinity, temperature and suspended sediment concentration.
The computational scheme utilizes an external-internal mode splitting to solve the horizontal momentum equations and the continuity equation on a staggered grid. The external mode, associated with barotropic long wave motion, is solved using a semi- implicit three time level scheme with a periodic two time level correction. A multi-color successive over relaxation scheme is used to solve the resulting system of equations for the free surface displacement. The internal mode, associated with vertical shear of the horizontal velocity components is solved using a fractional step scheme combining an implicit step for the vertical shear terms, with an explicit step for all other terms. The transport equations for the turbulence intensity, turbulence length scale, salinity, temperature, suspended sediment and dye tracer are also solved using a fractional step scheme with implicit vertical diffusion and explicit advection and horizontal diffusion. A number of alternate advection schemes are implemented in the code.
(Hamrick, 1992)
The work described in this report was funded by the Commonwealth of Virginia under the Three-Dimensional Model Research Initiative at the Virginia Institute of Marine Science, College of William and Mary. Many members of the VIMS faculty and staff provided advice, encouragement and support during the development of the environmental fluid dynamics computer code described in this report. Dr. Albert Y. Kuo is thanked for his continued technical advice and encouragement. The administrative support of Drs. Robert J. Byrne and Bruce J. Neilson is gratefully acknowledged. Mr. Gamble M. Sisson, Ms. Sarah Rennie, and Mr. John N. Posenau are thanked for their support in data analysis, graphics programming and computer systems management.
List of Figures
Figure 1. The stretched vertical coordinate system and the vertical location of discrete variables.
Figure 2. Free surface displacement centered horizontal grid. 52
Figure 3. U centered grid in the horizontal ( x,y ) plane. 52
Figure 4. Dispersion relations: ωθ, vertical axis, versus kxmx and kymy , horizontal axes, for wave propagation schemes.
Figure 5. Magnitude of phase velocity, |c|/sqrt(gh), vertical axis, as a function of horizontal wave number, kxmx and kymy , horizontal axes.
Figure 6. Magnitude of group velocity, |G|/sqrt(gh), vertical axis, as a function of horizontal wave number, kxmx and kymy , horizontal axes.
Figure 7. U centered grid in the vertical ( x,z ) plane. 56
Figure 8. S centered grid in the vertical ( x,z ) plane. 56
Figure 9. Dispersion relations: ωθ, vertical axis, versus kxmx and kymy , horizontal axes, for advection schemes.
Figure 10. Magnitude of amplification factor, vertical axis, versus kxmx and kymy , horizontal axes, for upwind advection scheme.
The ability to predict the transport and mixing of materials discharged into the hydrosphere and atmosphere is an essential element in environmental management. The field of environmental fluid dynamics has emerged in response to the need to understand and predict environmental fluid flows and the associated transport and mixing for dissolved and suspended materials in these flows. A large range of space and time scales characterize transport and mixing in the hydrologic and atmospheric environments. For example, local mixing associated with the discharge of a buoyant waste fluid into an ambient environmental flow can be described in terms of the three dimensional dynamics of buoyant turbulent jets and plumes (Fischer et al ., 1979). Outside of this region of local or initial mixing, the further mixing and transport of discharged material is governed by the dynamics of the ambient environmental flow.
A large class of incompressible ambient environmental flows is characterized by
horizontal length scales which are orders of magnitude greater than their vertical length
scales or length scales in the direction aligned with the gravitational vector. Such flows
are essentially hydrostatic in the vertical and of the boundary layer type. Example flows
in the hydrosphere range from rivers and lakes through estuaries and coastal seas to ocean
basins. Similarly in the atmosphere, mesoscale through global scale circulation can be
described by equations of motion simplified by the hydrostatic and boundary layer
approximations. This class of natural environmental flows is also characterized by
complex boundaries and topography and a host of nonlinear processes. The realistic
simulation of these complex flows necessitates the numerical solution of the equations of
motions and transport equations describing the transport and mixing of dissolved and
suspended materials.
The development of numerical or computational techniques appropriate for the solution of the incompressible, vertically hydrostatic equations of motion occurred largely in the field of numerical weather prediction. The monograph by Haltiner and Williams (1980) and the volume edited by Chang (1977) provide excellent descriptions of the techniques developed through the late 1970's. These techniques provided the basis for the development of numerical ocean circulation models such as those of Bryan (1969) and Semtner (1974). The growing concern for environmental problems in lakes, estuaries and
The formulation of the governing equations for ambient environmental flows characterized by horizontal length scales which are orders of magnitude greater than their vertical length scales begins with the vertically hydrostatic, boundary layer form of the turbulent equations of motion for an incompressible, variable density fluid. To accommodate realistic horizontal boundaries, it is convenient to formulate the equations such that the horizontal coordinates, x and y, are curvilinear and orthogonal. To provide uniform resolution in the vertical direction, aligned with the gravitational vector and bounded by bottom topography and a free surface permitting long wave motion, a time variable mapping or stretching transformation is desirable. The mapping or stretching is given by:
where * denotes the original physical vertical coordinates and -h and ζ are the physical vertical coordinates of the bottom topography and the free surface respectively, Figure 1. Details of the transformation may be found in Vinokur (1974), Blumberg and Mellor (1987) or Hamrick (1986). Transforming the vertically hydrostatic boundary layer form of the turbulent equations of motion and utilizing the Boussinesq approximation for variable density results in the momentum and continuity equations and the transport equations for salinity and temperature in the following form:
1 ∫ )^ +^ ∂y^ (mx^ H^0 vdz
1 ∫ )^ =^0
ρ = ρ( p,S,T) (^) (7)
In these equations, u and v are the horizontal velocity components in the curvilinear, orthogonal coordinates x and y, mx and my are the square roots of the diagonal components of the metric tensor, m = mxmy is the Jacobian or square root of the metric tensor determinant. The vertical velocity, with physical units, in the stretched, dimensionless vertical coordinate z is w, and is related to the physical vertical velocity w* by:
The total depth, H = h + ζ, is the sum of the depth below and the free surface displacement relative to the undisturbed physical vertical coordinate origin, z* = 0. The pressure p is the physical pressure in excess of the reference density hydrostatic pressure, ροgH( 1 - z), divided by the reference density, ρο. In the momentum equations (2, 3) f is the Coriolis parameter, Av is the vertical turbulent or eddy viscosity, and Qu and Qv are momentum source-sink terms which will be later modeled as subgrid scale horizontal diffusion. The density, ρ, is in general a function of temperature, T, and salinity or water vapor, S, in hydrospheric and atmospheric flows respectively and can be a weak function of pressure, consistent with the incompressible continuity equation under the anelastic approximation (Mellor, 1991; Clark and Hall, 1991). The buoyancy, b, is defined in equation (4) as the normalized deviation of density from the reference value. The continuity equation (5) has been integrated with respect to z over the interval (0,1) to produce the depth integrated continuity equation (6) using the vertical boundary conditions, w = 0, at z = (0,1), which follows from the kinematic conditions and equation (10). In the transport equations for salinity and temperature, equations (8) and (9), the source and sink terms, QS and QT include subgrid scale horizontal diffusion and thermal sources and sinks, while Ab is the vertical turbulent diffusivity. It is noted that constraining the free surface displacement to be time independent and spatially constant yields the equivalent of the rigid lid ocean circulation equations employed by Smetner (1974) and equations similar to the terrain following equations used by Clark (1977) to model mesoscale atmospheric flow.
The equations of motion (equations 2-6) will be solved in a region subdivided into six faced cells. The projection of the vertical cell boundaries to a horizontal plane forms a curvilinear, orthogonal grid in the orthogonal coordinate system (x,y). In a vertical (x,z) or (y,z) plane, the cells bounded by the same constant z surfaces will be referred to as cell layers or layers. The equations will be solved using a combination of finite volume and finite difference techniques, with the variable locations shown in Figure 2. The staggered grid location of variables is often referred to as the C grid (Arakawa and Lamb, 1977) or the MAC grid (Peyret and Taylor, 1983). To proceed, it is convenient to modify equations (2,3) by eliminating the vertical pressure gradients using equation (4). After some manipulation, the horizontal momentum equations become:
The vertical discretization of Equations (16,17) is considered first. The equations are integrated with respect to z over a cell layer assuming that variables defined vertically at the cell or layer centers are constant and that variables defined vertically at the cell layer interfaces or boundaries vary linearly over the cell, to give:
layer interfaces are defined by:
( τxz )k = 2 H −^1 (Av)k(∆k+ 1 + ∆k )−^1 (uk+ 1 − uk ) (20)
( τyz )k = 2 H −^1 (Av)k(∆k+ 1 + ∆k )−^1 (vk+ 1 − vk ) (21)
If there are K cells in the z direction, the hydrostatic equation can be integrated from a cell layer interface to the surface to give:
pk = gH ∆ (^) j bj − ∆kbk j = k
K ∑
+^ ps
where ps is the physical pressure at the free surface or under the rigid lid divided by the reference density. The continuity equation (5) is also integrated with respect to z over a cell or layer to give:
The numerical solution of the vertically discrete momentum equations (18,19) now proceeds by splitting the external depth integrated mode associated with external long surface gravity waves from the internal mode associated with vertical current structure.
The external mode equations are obtained by summing equations (18,19) over K cells or layers in the vertical utilizing equation (22), and are given by:
∂t (mHu) + ( ∂ (^) x (myH∆kukuk ) + ∂y (mxH∆kvkuk ) − H(mf + vk ∂x my − uk ∂ymx )∆kvk) k= 1
K ∑
k= 1
K ∑
^ ∂x H
−0.5myH 2 ∂x ∆k βk k= 1
K ∑
+^ m(^ τxz)K −^ m(^ τxz) 0 +^ Qu
∂t (mHv ) + ( ∂ (^) x (myH∆kukvk ) + ∂y(mxH∆kvkvk ) + H(mf + vk ∂x my − uk ∂y mx )∆kuk) k= 1
K ∑
k= 1
K ∑
^ ∂y H
−0.5mxH 2 ∂y ∆k βk k= 1
K ∑
+^ m(^ τyz)K −^ m(^ τyz) 0 +^ Qv
∂t (mH ∆^ −k^1 +^ 1, k(vk+ 1 − vk ))+ ∂x (m (^) yH∆^ −k^1 +^ 1, k(uk + 1 vk+ 1 − ukvk ))+ ∂y (m (^) xH∆^ −k^1 +^ 1, k(vk+ 1 vk+ 1 − vkvk ))
∆k +1,k = 0. 5 (∆k + 1 + ∆k) (^) (32)
Inspection of equations (30,31) reveals that they could have also been obtained by differentiating the horizontal momentum equations (16,17) with respect to z and introducing a finite difference discretion in z. Using equations (20,21) to relate the shear stresses to the velocity differences across the interior interfaces suggest that equations (30,31) be interpreted as a system of K-1 equations for either the K-1 interfacial velocity differences or the K-1 interior interfacial shear stresses. Details of the solution of the internal mode equations (30,31) will be presented in Section 5.
The solution of the vertical velocity, w, employs the continuity equations. Dividing equation (23) by ∆k, and subtracting equation (26) gives:
wk = wk− 1 − m−^1 ∆k( ∂ (^) x (m (^) yH (uk − u ))+ ∂y (m (^) x H(vk − v))) (33)
Since wo = 0, the solution proceeds from the first cell layer to the surface. Provided the constraints (equations 28-29) are satisfied, the surface velocity at k = K will be zero and satisfy the boundary condition.
The formulation of a computational algorithm for the numerical solution of the external mode equations (24-26) begins by introducing modified variables and reorganizing the equations to give:
∂tU = − mx^ −^1 myHg ∂x ζ − mx^ −^1 myH ∂x ps + mx^ −^1 myHg( b ∂xh − B ∂xH − 0.5H ∂x β)
− mx^ −^1 ∆k( ∂ (^) x(Ukuk ) + ∂y (Vkuk )) k= 1
K ∑ +^ mx^ −^1 ∆k (mf^ +^ vk^ ∂x my −^ uk^ ∂ymx )Hvk k= 1
K ∑
∂tV = − mxmy^ −^1 Hg ∂y ζ − mxmy^ −^1 H ∂y ps + mxmy^ −^1 Hg (^) (b ∂yh − B ∂y H − 0.5H ∂y β)
− my^ −^1 ∆k( ∂ (^) x(Ukvk ) + ∂y(Vkvk )) k= 1
K ∑ −^ my^ −^1 ∆k(mf^ +^ vk^ ∂x my −^ uk^ ∂y mx)Huk k= 1
K ∑
∂t ζ + m−^1 ( ∂ (^) xU + ∂yV) = 0 (36)
U = myH u (37)
V = mxH v (38)
Uk = myHuk (39)
Vk = mxHvk (40)
β = ∆k βk k= 1
K ∑
B = (∆ (^) k β (^) k + 0.5∆k (zk + zk− 1 )bk) k = 1
K ∑
Equations (34,35) now equate the time rate of change of the external or depth integrated volumetric transports to the pressure gradients associated with the free surface slope, atmospheric pressure and buoyancy, the advective accelerations, the Coriolis and curvature accelerations, the free surface and bottom tangential stresses and the general source, sink terms. The staggered location of variables on the computational grid, Figure 2, allows most horizontal spatial derivatives in equations (34-36) to be represented by
with θ being the time step. All terms in equations (43-45) are understood to be evaluated at the center time level n except those evaluated at the forward and backward time levels, n+1 and n-1, which are denoted by superscripts. The u, v, and ζ superscripts indicate that a variable is evaluated, or that a spatial derivative is centered, at the corresponding spatial point.
The subscript of the spatial central difference operator, δ, indicates direction. The grid cells are presumed to be bounded in the horizontal by lines of constant integer values of the dimensionless orthogonal coordinates x and y, resulting in the central spatial differences having the forms:
Application of these finite difference operators to the advective accelerations is illustrated by:
δx^ u^ (U (^) k(x)uk (x)) = Uk(x + 0.5)uk (x + 0.5) − Uk (x − 0.5)uk(x − 0.5) (48)
where the constant y dependence of the variables is implied. Since the u type variables are located at integer values of x, averaging is necessary to obtain values at the half intervals. Averaging both the transport and the velocity gives:
−0.25( U (^) k(x) + Uk (x − 1))( u (^) k (x) + uk (x − 1))
which is consistent with a central difference approximation of the non-conservative form of this portion of the advective acceleration. Averaging the transport and allowing the velocity to be advected from the upwind direction gives:
δxu^ (U (^) k(x)uk (x)) = 0.5Max U(( (^) k(x + 1) + Uk(x)),0)ukn−^1 (x, y) +0.5Min( (^) ( U (^) k (x + 1) + Uk (x)),0)ukn−^1 (x + 1, y) −0.5Max( (^) ( U (^) k (x) + Uk(x − 1)),0)ukn^ −^1 (x − 1, y) −0.5Min( (^) ( U (^) k (x) + Uk (x − 1)),0)ukn−^1 (x, y)
which is consistent with an upwind or backward difference approximation of the non- conservative form of this portion of the advective acceleration. In equation (50), the transport is still at time level n, while the velocity is at time level n-1, for both stability and accuracy (Smolarkiewicz and Clark, 1986). The preference for the use of equation (49) or equation (50) will generally depend upon the physical situation being simulated. The central difference form introduces no numerical diffusion but may produce solution fields which exhibit cell to cell spatial oscillations. These oscillations can be eliminated by the addition of horizontal diffusion terms to the momentum equations. Specification of the horizontal diffusivity allows the degree of spatial smoothing to be controlled. The upwind difference form introduces numerical diffusion and does not produce spatial oscillations in the solution field. The Coriolis and curvature terms in equations (43,44) are discretized using an energy conserving spatial averaging and differencing (Arakawa and Lamb, 1977; Haltiner and Williams, 1980). For example, the Coriolis and curvature term in equation (43) is given by:
(^ ( mf^ +^ vk^ ∂x my −^ uk^ ∂ymx )Hvk)
u = 0.5( ( RHv (^) k)^ ζ (x + 0.5, y) + ( RHvk)^ ζ (x − 0.5,y)) (51)
Rk^ ζ^ (x + 0.5) = fm(x + 0.5, y) + vk^ ζ^ (x + 0.5, y)( m (^) y(x + 1,y) − my (x, y)) −uk^ ζ^ (x + 0.5,y)( m (^) x (x + 0.5, y + 0.5) − mx (x + 0.5, y − 0.5))
vk^ ζ^ (x + 0.5, y) = 0.5 (v (^) k(x + 0.5, y + 0.5) + vk (x + 0.5, y − 0.5)) (53)
uk^ ζ^ (x + 0.5, y) = 0.5( u (^) k (x + 1, y) + uk (x, y)) (54)
where the variables locations are shown in Figure 3.
Since the bottom tangential stresses in equations (43,44) must be supplied from the internal mode solution which follows the external solution, it is lagged at the backward time level. The general source, sink term has been replaced by horizontal diffusion terms having the form proposed by Mellor and Blumberg (1985). The horizontal stress tensor is taken of the form:
( τ (^) xx)k = 2 AH mx^ −^1 ∂xuk (55)
(^ τ (^) xy)k =(^ τ (^) yx)k =^2 AH (m (^) x^ −^1 ∂xvk +^ my^ −^1 ∂yuk) (56)
(^ τ (^) yy)k =^2 AH my^ −^1 ∂yvk (57)