formulation and numerical implementation of the 2d/3d ... · formulation and numerical...

74
1 Formulation and Numerical Implementation of the 2D/3D ADCIRC Finite Element Model Version 44.XX Rick Luettich University of North Carolina at Chapel Hill Institute of Marine Sciences 3431 Arendell St. Morehead City, NC 28557 Joannes Westerink Department of Civil Engineering and Geological Sciences University of Notre Dame Notre Dame, IN 46556 12/08/2004

Upload: tranliem

Post on 19-Jul-2018

241 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

1

Formulation and Numerical Implementation of the 2D/3D ADCIRC Finite Element Model Version 44.XX

Rick Luettich

University of North Carolina at Chapel Hill

Institute of Marine Sciences

3431 Arendell St.

Morehead City, NC 28557

Joannes Westerink

Department of Civil Engineering and Geological Sciences

University of Notre Dame

Notre Dame, IN 46556

12/08/2004

Page 2: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

2

TABLE OF CONTENTS

1.0 CONTINUITY EQUATION______________________________________________ 3

2.0 2D MOMENTUM EQUATIONS _________________________________________ 15

3.0 3D MOMENTUM EQUATIONS _________________________________________ 30

4.0 VERTICAL VELOCITY _______________________________________________ 50

5.0 SPERHICAL COORDINATE FORMULATION ___________________________ 53

6.0 LATERAL BOUNDARY CONDITIONS __________________________________ 57

7.0 BAROCLINIC PRESSURE GRADIENT CALCULATION NOTES __________ 67

8.0 APPENDIX - BASIC CALCULATIONS ON LINEAR TRIANGLES _________ 68

9.0 REFERENCES________________________________________________________ 74

Page 3: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

3

1.0 CONTINUITY EQUATION

Both the vertically-integrated (ADCIRC-2DDI) and the fully three-dimensional (ADCIRC-3D) versions of ADCIRC solve a vertically-integrated continuity equation for water surface elevation. To avoid the spurious oscillations that are associated with a primitive Galerkin finite element formulation of this equation, ADCIRC utilizes the Generalized Wave Continuity Equation (GWCE) formulation. Development of the weak weighted residual form of the GWCE used in ADCIRC is described below.

The vertically-integrated continuity equation is

( ) ( ) 0H UH VHt x y

∂ ∂ ∂+ + =

∂ ∂ ∂ (1.1)

where

1, ,

,h

U V u v dz depth-averaged velocities in the x,y directionsH

u v vertically-varying velocities in the x,y directionsH h total water column thicknessh bathymetric depth (distance from the geiod t

ζ

ζ

−≡ =

=≡ + ==

o the bottom)free surface departure from the geoidζ =

Take t∂ ∂ of Eq. (1.1), add to this Eq. (1.1) multiplied by the parameter oτ (which may be variable in space), assume a bathymetric depth that does not change in time, (i.e.,

ζH t t∂ ∂ = ∂ ∂ ) and rearrange using the chain rule

2

2- - 0y o ox

oJJ UH VH

t x y x ytζ ζ τ ττ

∂ ∂∂ ∂ ∂∂+ + + =∂ ∂ ∂ ∂ ∂∂

%% (1.2)

where

( ) ox UH UHJ tτ∂

≡ +∂

% (1.3)

xo x

Q Qt

τ∂= +

∂ (1.4)

oU H U UHt t

ζ τ∂ ∂= + +

∂ ∂ (1.5)

Page 4: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

4

( ) oy VH VHJ tτ∂

≡ +∂

% (1.6)

yo y

Q Q

∂= +

∂ (1.7)

oV H V VHt t

ζ τ∂ ∂= + +

∂ ∂ (1.8)

, ,yx UH VH x, y - directed fluxes per unit widthQ Q ≡ =

Note that Eqs. (1.3) - (1.5) are equivalent as are Eqs. (1.6) - (1.8).

The weighted residual method is applied to Eq. (1.2) by multiplying each term by a weighting function jφ and integrating over the horizontal computational domain Ω .

2

2, , , , , , 0y o ox

oj j j j j jJJ UH VH

t x y x ytζ ζ τ τφ φ φ φ φ φτ

∂ ∂∂ ∂ ∂∂+ + + − − =∂ ∂ ∂ ∂ ∂∂

%% (1.9)

where, the inner product notation is defined as

, j j dφ φΩ

ϒ ≡ ϒ Ω∫ (1.10)

Integrating the terms involving and x yJ J% % by parts, yields a weak form of this equation

2

2, , , ,

, , 0

j jo x yj j

o o Noj j jN

J Jt x yt

Q UH VH dQx y t

φ φζ ζφ φτ

τ τφ φ φτΓ

∂ ∂∂∂ + − −∂ ∂ ∂∂

∂ ∂ ∂− − + + Γ = ∂ ∂ ∂ ∫

% %

(1.11)

The integration by parts introduces an integral along the boundary of the computational domain, Γ , involving the components of and x yJ J% % normal to the boundary. Using Eqs. (1.4) and (1.7), this can be converted to the integral of the outward flux per unit width normal to the boundary,

NQ , contained in Eq. (1.11).

Page 5: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

5

The GWCE derivation is completed by substituting the vertically-integrated momentum equations in conservative form, (Eqs. (2.2)) into Eqs. (1.4) and (1.7) or in non-conservative form (Eqs. (2.1)) into Eqs. (1.5) and (1.8). Kolar et al, (ref) has shown that the form of the momentum equations used in the GWCE should match that used for the momentum (velocity) solution (see Section 2). The original version of ADCIRC-2DDI uses the non-conservative momentum equations, although a conservative formulation has been added to ADCIRC (version 44.15). Making this substitution and isolating the linear free surface gravity wave terms gives:

xx

yy

ghJJ x

ghJJ y

ζ

ζ

∂= −

∂∂

= −∂

%

%

(1.12)

where for the non-conservative formulation:

[ ]

[ ]

2

2

2

2

s o sx bxx x y y

o o

ox x x x

s sy byoy x y x

o o

oy y y y

gU U g Pf gHQ Q QJx y x x

U QM D B tgV V g Pf gHQ Q QJ

x y y y

V QM D B t

αηρζ τ τρ ρ

ζ τ

αηρζ τ τρ ρ

ζ τ

∂ −∂ ∂ ∂= − − + − − + −

∂ ∂ ∂ ∂

∂+ − − + +

∂∂ −∂ ∂ ∂

= − − − − − + −∂ ∂ ∂ ∂

∂+ − − + +

(1.13)

and for the conservative formulation:

[ ]

[ ]

2

2

2

2

sy o sx bxxx y

o o

ox x x x

sy sy byoxy x

o o

oy y y y

UQ gUQ g Pf gHQJ x y x xQM D B

VQ gVQ g Pf gHQJx y y y

QM D B

αηρζ τ τρ ρ

τ

αηρζ τ τρ ρ

τ

∂ ∂ −∂ ∂= − − + − − + −

∂ ∂ ∂ ∂

+ − − +

∂ ∂ −∂ ∂= − − − − − + −

∂ ∂ ∂ ∂

+ − − +

(1.14)

Substituting Eqs. (1.12) into Eq. (1.11) and rearranging yields the weighted residual form of the GWCE that is solved by ADCIRC:

Page 6: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

6

2

2, , , ,

, , , , 0

j joj j

j j o o Nx y oj j jx y N

gh ght x x y yt

Q dQ Q QJ Jx y x y t

φ φζ ζ ζ ζφ φτ

φ φ τ τφ φ φτΓ

∂ ∂∂ ∂ ∂∂ + + +∂ ∂ ∂ ∂ ∂∂

∂ ∂ ∂ ∂ ∂= + + + − + Γ = ∂ ∂ ∂ ∂ ∂ ∫ (1.15)

Term by term integration of Eq. (1.15) yields:

3 2 3 222

,2 2 221 1 1 1 1

A, 12

j j j

n n

NE NE NEni i

ij j i jjn n i n in n

d d t t tt

ζ ζζζ φ φ φφ ϕ= = = = =Ω ΩΩ

∂ ∂∂∂ ≡ Ω = Ω = ∂ ∂ ∂ ∂∑ ∑∑ ∑ ∑∫ ∫

3 3

,1 1 1 1 1

A, 12

j j j

n n

NE NE NEn oi n i

io on nj j i jo jn n i n in n

d d t t tt

ζ ζζζ τφ φ φφ ϕτ ττ= = = = =Ω Ω Ω

∂ ∂∂ ∂ ≡ Ω = Ω = ∂ ∂ ∂∂ ∑ ∑∑ ∑ ∑∫ ∫

( )

3

1 1 1

3

11 1

,

A4 A

j j

n n

j j

NE NEj j j

i in n in

NE NEj n

n j in ii nnn nn

gh gh d g dhx x x x x x

ghg b bh x x

φ φ φζ ζ ζ φ

φζ ζ

= = =Ω Ω

== =

∂ ∂ ∂∂ ∂ ∂ ≡ Ω = Ω ∂ ∂ ∂ ∂ ∂ ∂

∂∂ = = ∑ ∂ ∂

∑ ∑ ∑∫ ∫

∑ ∑

( )

3

1 1 1

3

1 1 1

,

A4 A

j j

n n

j j

NE NEj j j

i in n in

NE NEj n

n jn iinn n in n

gh gh d g dhy y y y y y

ghg ah ay y

φ φ φζ ζ ζ φ

φζζ

= = =Ω Ω

= = =

∂ ∂ ∂ ∂ ∂ ∂≡ Ω = Ω ∂ ∂ ∂ ∂ ∂ ∂

∂ ∂= = ∂ ∂

∑ ∑ ∑∫ ∫

∑ ∑ ∑

( )3

1 1 1 1 1, A 2

j j j j

n n

NE NE NE NEj j j j xn

nx x i jx xi nnn n i n n

Jd dJ J bJ Jx x x xφ φ φ φ

φ= = = = =Ω Ω

∂ ∂ ∂ ∂= Ω = Ω = =

∂ ∂ ∂ ∂∑ ∑∑ ∑ ∑∫ ∫

( )3

1 1 1 1 1, A 2

j j j j

n n

NE NE NE NEyj j j j n

y ny y i y ji nnn n i n n

Jd dJJ J J ay y y yφ φ φ φ

φ= = = = =Ω Ω

∂ ∂ ∂ ∂= Ω = Ω = =

∂ ∂ ∂ ∂∑ ∑∑ ∑ ∑∫ ∫

( )

3

1 1 1

3 3

1 1 1 1

,

A3 6

j j

n n

j j

NE NEo o i

oi jxj jx x nn n i

n

NE NEn ii

o oi ix xn nnn i n i n

Qd d Q Qx x x

bQ Q x

φτ τ φφ φ τ

φτ τ

= = =Ω Ω

= = = =

∂∂ ∂= Ω = Ω ∂ ∂ ∂

∂ = = ∂

∑ ∑ ∑∫ ∫

∑ ∑ ∑ ∑

Page 7: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

7

( )

3

1 1 1

3 3

1 1 1 1

,

A3 6

j j

n n

j j

NE NEo o i

oiy jj jy y nn n i

n

NE NEn ii

o oi iy yn nnn i n i n

Qd d Q Qy y y

aQ Q y

φτ τ φφ φ τ

φτ τ

= = =Ω Ω

= = = =

∂∂ ∂= Ω = Ω ∂ ∂ ∂

∂ = = ∂

∑ ∑ ∑∫ ∫

∑ ∑ ∑ ∑

2 2 2 2

,1 1 1 1

L6

n NN iN io on NN j i j i j ion N i

n i n in nn

QQ Qd d QQ Qt ttφ φ φ ϕτ ττ

= = = =Γ Γ

∂∂ ∂+ Γ = Γ = ++ ∂ ∂∂ ∑∑ ∑ ∑∫ ∫

where

1

A

AAj

n

NE

nNE jn

j

area of element n

area of all elements containing node j

number of elements containing node jNE=

=

≡ =

=

Page 8: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

8

3

13

1

L1313

n

ini

oo on ii

length of element leg n

average bathymetric water depth over element nhh

average over element nττ τ

=

=

=

≡ =

≡ =

∑3

13

1

,

1, , ,3

1, , ,3

12

x yyy xx in ini

yy xx i x yn ini

i j

j

average over element nJ JJJ JJ

QQ QQ average over element nQ Q

if i jif i j

horizontal weighting function, =1 at node j, =0 at all other nodes,varies linearly

ϕ

φ

=

=

≡ =

≡ =

≠≡ ==

3 3

1 1

1 3 2 2 1 3 3 2 1

1 2 32 3 3 1 1 2

, ,2A 2A

1 1;2A 2A

; ;

; ;

,

j j j j

n n

i ii ii in nn n nn

i i

between adjacent nodes

b ax y

b ax y

a x x a x x a x x

y y y y y yb b b

horizontal coordinates oyx

φ φ

ζ ζζ ζ

= =

∂ ∂=

∂ ∂

∂ ∂ ≡ ≡ ∂ ∂ ≡ − ≡ − ≡ −

≡ − ≡ − ≡ −

=

∑ ∑

f node i

The definition of the weighting function jφ reduces integration over the horizontal domain Ω to integration over only the NEj elements containing node j. Also, we assume a Galerkin finite element formulation in which the basis and weighting functions vary linearly within an element. Therefore, spatial derivatives are constant within an element and can be pulled out of elemental integrations.

After integration, Eq. (1.15) becomes

23 3 3 3

, ,21 1 1 1 1

3 3

1 1 1

2 2

,1 1

A12 4A

12 3 3

L6

j

j

NEn i i n

j i j ioni j i j i in i i i in n

NEi i

o oi iyj y j xx nn nnn i i n

n N io Nni j i

n i n

gh b b a att

b aQQb J aJ

Q Q

t

ζ ζϕ ϕ ζ ζτ

τ τ

ϕ τ

= = = = =

= = =

= =

∂ ∂ + + + = ∂∂

+ + +

∂ − + ∂

∑ ∑ ∑ ∑ ∑

∑ ∑ ∑

∑ ∑

(1.16)

Page 9: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

9

Equation (1.16) presents the spatially discretized solution for elevation at horizontal node j used by ADCIRC. This equation is discretized in time using a three time level scheme at the past (s-1), present (s) and future (s+1) times as described below:

1 12

2 2

2s s si i i i

t tζ ζ ζ ζ+ −− +∂ =∂ ∆

1 1

2

s si i i

t tζ ζ ζ+ −−∂

=∂ ∆

1 11 2 3

s s si i i iζ ζ ζ ζα α α+ −= + +

1 1

2

s sN NN i i i

Q QQt t

+ −−∂=

∂ ∆

1 11 2 3

s s sN i N NN i ii

Q Q Q Qα α α+ −= + +

, , ssyx yn xn n nJJ JJ=

, , ssy yx xn n n n

Q QQ Q=

Substituting these time discretizations into Eq. (1.16) and re-arranging yields:

( )

3* 1

,1

3 31 * 1 * 11

1 1

3*

,1

3 3 31

1 2 31 1 1

1A12 2

4A

1A12 2

4A

j

sn oni j iNE

i

n s snj i j ii i

i in

sn oni j i

i

s s snj i j i j i ji i i i

i i in

t t

gh b b a a

t t

gh b b a a b b a

τ ϕ ζ

α ζ ζ

τ ϕ ζ

ζ ζ ζα α α

+

=

= + +

= =

=

= = =

+ ∆ ∆ = + +

− ∆ ∆

− + + + +

∑∑

∑ ∑

∑ ∑ ∑3

1

1 1

3 3

1 1

1 12 2

,1 1

1 12 6

L6 2

jNEs

in i

sssso oi ij j i iyy xx n nn n

i i

s ssN Nn i i

oni j N in i

a

QQb a b aJJ

Q Q Q

t

ζ

τ τ

ϕ τ

= =

= =

+ −

= =

+ + + + − − + ∆

∑ ∑

∑ ∑

∑ ∑

(1.17)

Page 10: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

10

where

* 1 1

* 1

s s si i i

s s si i i

ζ ζ ζ

ζ ζ ζ

+ +

= −

= − (1.18)

The left side of Eq. (1.17) is a sparse symmetric matrix (number of nodes x number of nodes) and the right side is a vector. The normal flux terms are only included in equations corresponding to boundary nodes.

Eq. (1.18) requires evaluation of , ssyxn nJJ as defined in Eqs. (1.13) and (1.14).

For the non-conservative formulation:

[ ]

( )

3 3 3 32

1 1 1 1

*

3 3

1 1

2 2 4 2

2 2 4

ss sy ss sxn n is ss

si i i i i iy oxn i ini i i in n n n

s s sssx bx ss s s n

ox x x nn n n x no on n

ssy sxn ns s s

i i i iy xnni in n n

QQ g g Hf gQU b U a b bPJA A A A

QUM D B t

QQ gf QV b V aJA A A

αηρζ

τ τ ζτρ ρ

= = = =

= =

= − − + − − −

+ − + − − + +

= − − − −

∑ ∑ ∑ ∑

∑ ∑ [ ]

( )

3 32

1 1

*

2

sss i

si ioi ii in

s s sssy by s s s s n

oy y y nn n n y no on n

g H ga aPA

M D B QV t

αηρζ

τ τ ζτρ ρ

= =

− −

+ − + − − + +

∑ ∑

(1.19)

For the conservative formulation (version 1):

[ ] ( )

3 3 32

1 1 1

3

1

3 32

1 1

1 12 2 4

2

1 12 2 4

s sss s ssi i i i iy yxx in ii n

i i in n ns s

s ss sx bx s s sios i x x xn n no xi no oin n n

ss sss s si i i i iyy xi x inin

i in n n

gQ f QQ U b U a bJA A A

g H g QbP M D BA

gQ fQ QV b V a aJA A A

ζ

τ ταηρ τρ ρ

ζ

= = =

=

= =

= − − + −

− − + − + − − +

= − − − −

∑ ∑ ∑

∑ ∑

[ ] ( )

3

1

3

12

is s

s ssy bys s s sioy y ys io n n n yi no oin n n

g H g M D B QaPA

τ ταηρ τρ ρ

=

=

− − + − + − − +

(1.20)

A second conservative formulation (version 2) is obtained by expanding the advective terms using the product rule:

Page 11: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

11

[ ] ( )

3 3 3 3 32

1 1 1 1 1

3

1

3

1

2 2 2 2 4

2

2

ss s sy s ssx sn ns s n ns

i i i i i i iy yxx in ii ni i i i in n n n n

s ss ss sx bx s s si

os i x x xn n no xi no oin n n

syxn ns s

i iy nin

QQ gU U Q f QQU b U a b a bJA A A A A

g H g QbP M D BA

QV bJ

A

ζ

τ ταηρ τρ ρ

= = = = =

=

=

= − − − − + −

− − + − + − − +

= − −

∑ ∑ ∑ ∑ ∑

[ ] ( )

3 3 3 32

1 1 1 1

3

1

2 2 2 4

2

ss s

ss sss n ni i i i iyxi x ini

i i i in n n ns s

s ssy bys s s sioy y ys io n n n yi no oin n n

Q gV V Q fQ QV a b a aA A A A

g H g M D B QaPA

ζ

τ ταηρ τρ ρ

= = = =

=

− − − −

− − + − + − − +

∑ ∑ ∑ ∑

(1.21)

Using definitions and expressions for the various terms in the momentum equations presented in Section 2.0, the evaluation of ,x yJ J using Eqs. (1.19) - (1.21) is straightforward with the exception of the vertically-integrated lateral stress gradient terms, ,x yM M , that are defined as:

yxxxx

xy yyy

HHM x yH H

M x y

ττ

τ τ

∂∂≡ +∂ ∂

∂ ∂≡ +∂ ∂

(1.22)

The vertically-integrated, lateral stresses, Hτxx, Hτyx= Hτxy, Hτyy, derive from time averaging the advection terms in the momentum equations. They are due to high frequency fluctuations in the flow field that are not explicitly included in the model solution and they have no absolute relationship to the time averaged variables that are solved for. Rather, they must be approximated using a closure assumption. It is usually assumed that their significance is small compared to the other terms in the momentum equations, yet in practice most models depend on these terms to stabilize the numerical solution. While the use of a diffusive-type expression for these terms is standard, the exact form is equivocal.

The original version of ADCIRC represents these terms in the GWCE as:

x xh hxx yx

y yh hxy yy

Q QH HE Ex y

Q QH HE Ex y

τ τ

τ τ

∂ ∂= =

∂ ∂∂ ∂

= =∂ ∂

(1.23)

As described in Section 2, several alternative lateral stress closures have been added to more recent version of ADCIRC.

Page 12: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

12

Substituting Eqs. (1.23) (or one of the alternates) into Eq. (1.22) generates terms containing second derivatives of Qx, Qy or U, V. This requires additional consideration because second derivative terms can not be represented directly using linear basis functions (i.e., the second derivative of a linear function is zero).

Kolar and Gray (1990) proposed a solution to this difficulty provided the lateral stresses are computed using Eq. (1.23) and the lateral stress coefficient, Eh, is constant in space. Isolating the lateral stress gradient terms from ,x yJ J in Eq. (1.15) yields:

, ,j jx yM Mx y

φ φ∂ ∂+

∂ ∂ (1.24)

Integrating by parts:

, , , ,j j yxx y j j jN

MM dM M Mx y x yφ φ

φ φ φΓ

∂ ∂ ∂∂+ = − − + Γ∂ ∂ ∂ ∂ ∫ (1.25)

where NM is the component of the lateral stress gradient normal to the boundary.

Inserting the definition of the lateral stress gradients, Eq. (1.22), and the closure in Eq. (1.23) into Eq. (1.25) and rearranging terms gives:

,y yx x

h h h h j jN

Q QQ Q dE E E E Mx x x y x y x y y yφ φ

Γ

∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ − + + + + Γ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∫

Using the product rule and substituting in the depth-averaged continuity equation, yields:

,y yh h h hx xh h j

jN

Q QQ QE E E EE Ex x x y x x t y x y y y y t

dM

ζ ζφ

φΓ

∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂− + − + + − ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂

+ Γ∫

This can be condensed to

, ,yxj j jN

MM dMx yφ φ φ

Γ

′∂′∂− − + Γ∂ ∂ ∫ (1.26)

Page 13: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

13

by defining modified lateral stress gradient terms:

yh hxx h

yh hxy h

QQE EM Ex x y x x tQQE EM Ex y y y y t

ζ

ζ

∂∂ ∂ ∂ ∂ ∂≡ + −′ ∂ ∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂≡ + −′ ∂ ∂ ∂ ∂ ∂ ∂

(1.27)

Integrating Eq. (1.26) by parts yields:

, ,j jx y j jN N

d dM M M Mx yφ φ

φ φΓ Γ

∂ ∂+ + Γ − Γ′ ′ ′

∂ ∂ ∫ ∫ (1.28)

where NM ′ is the component of the modified lateral stress gradient normal to the boundary.

Neglecting the two boundary integral terms in Eq. (1.28), reduces Eq. (1.28) to Eq. (1.24) and suggests that ' ',x x y yM M M M≈ ≈ . Boundary integrals of lateral stress gradient terms are also neglected in the development of the momentum equations in Section 2. Discretizing in time and averaging in space on an element yields final expressions for the lateral stress gradient terms:

*

*

ss ss sys sh hx

x h

ss ss sys sh hx

y h

QQE EM Ex x y x x

QQE EM Ex y y y y

ζ

ζ

∂ ∂∂∂ ∂≈ + −∂ ∂ ∂ ∂ ∂

∂ ∂∂∂ ∂≈ + −∂ ∂ ∂ ∂ ∂

(1.29)

If hE is constant in space, Eq. (1.29) is equivalent to the lateral stress gradient terms derived by Kolar and Gray (1990) and implemented in the original version of ADCIRC.

An alternative, two part approach for evaluating the lateral stress gradient terms is first to compute the lateral stresses, Hτxx, Hτyx, Hτxy, and Hτyy, at the nodes and second to expand these values using linear basis functions, thereby allowing spatial gradients to be computed. This approach has a considerable advantage over the previous approach because it is not restricted to a specific lateral stress closure.

For purposes of illustration the first step is applied to Hτxx in Eq. (1.23). Multiplying by a weighting function and integrating across the domain gives:

, , 0xhxx j j

QH E x

φ φτ∂

− =∂

Page 14: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

14

The first term is integrated using mass lumping (i.e., Rule 1 described in APPENDIX – BASIC CALCULATIONS ON LINEAR TRIANGLES). The second term is integrated consistently (i.e., Rule 2). The resulting vertically-integrated lateral stress at node j is:

( )

3

1 1

12 A

j

j

NE

x iihn i

xx NEj

nn

Q bEHτ = =

=

=∑∑

Page 15: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

15

2.0 2D MOMENTUM EQUATIONS

Both the vertically-integrated (ADCIRC-2DDI) and the fully three-dimensional (ADCIRC-3D) versions of ADCIRC substitute the vertically-integrated momentum equations into the continuity equation to form the GWCE as described in the previous section. The GWCE is solved to determine the new free surface elevation. ADCIRC-2DDI solves the vertically-integrated momentum equations to determine the depth-averaged velocity. The vertically-integrated, momentum equations can be written in either non-conservative form:

[ ]s x x xsx bxo

o o

sy by y y yos

o o

gU U U P M D BU V fV gt x y x H H HH H

gPV V V M D BU V fU gt x y y H H HH H

ζ αηρ τ τρ ρ

αηζ ρ τ τρ ρ

∂ + −∂ ∂ ∂+ + − = − + − + − −

∂ ∂ ∂ ∂

∂ −+ ∂ ∂ ∂ + + + = − + − + − −∂ ∂ ∂ ∂

(2.1)

or conservative form,

[ ]sx x sx bxoxy x x x

o o

y y y sy byosx y y y

o o

gQ Q Q PU V f gHQ M D Bt x y x

Q Q Q gPU V f gHQ M D Bt x y y

ζ αηρ τ τρ ρ

αηζ ρ τ τρ ρ

∂ + −∂ ∂ ∂+ + − = − + − + − −∂ ∂ ∂ ∂

∂ ∂ −+ ∂ ∂ + + + = − + − + − −∂ ∂ ∂ ∂

(2.2)

where,

( )( )

( )( )

( )( )

, ,yx

uu uvx

uv vvy

uu h

uv h

vv h

yxxxx

UH VH x, y - directed flux per unit widthQ Q

D D momentum dispersionD x yD D momentum dispersionD x y

u U u U dzD

u U v V dzD

v V v V dzD

HH vertically-intM x y

ζ

ζ

ζ

ττ

≡ =

∂ ∂≡ + =∂ ∂

∂ ∂≡ + =∂ ∂

≡ − −

≡ − −

≡ − −

∂∂≡ + =∂ ∂

∫∫∫

xy yyy

egrated lateral stress gradient

H H vertically-integrated lateral stress gradientM x yτ τ∂ ∂≡ + =∂ ∂

Page 16: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

16

( )

( )

x xh

y yh

ox z

o

oy z

o

vertically-integrated baroclinic pressure gradientdzbB

vertically-integrated baroclinic pressure gradientdzbB

g dz baroclinic pressure gradientb x

g dz baroclinicb y

ζ

ζ

ζ

ζ

ρ ρρ

ρ ρρ

≡ =

≡ =

−∂≡ =

−∂≡ =

∫∫

∫ pressure gradient

2 sinf φ= Ω , Coriolis parameter, Ω=7.29212x10-5 rad s-1, φ = degrees latitude

ρ = time and spatially varying density of water due to salinity and temperature variations

oρ = reference density of water

, ,xx yx xy yyH H H Hτ τ τ τ= = vertically integrated lateral stresses

,sx syτ τ = imposed surface stresses

,bx byτ τ = bottom stress components, suitably defined, e.g., using a linear or quadratic drag law

sP = atmospheric pressure at the sea surface

η = Newtonian equilibrium tide potential

hE = vertically integrated lateral stress coefficient (often called the horizontal eddy viscosity)

Evaluation of the momentum dispersion terms requires knowledge of the vertical profile of the horizontal velocity. This is available only from a three-dimensional model solution utilizing the three-dimensional momentum equations described in the next section. Consequently, the momentum dispersion terms are retained only in the GWCE for ADCIRC-3D. In ADCIRC-2DDI, they are assumed negligible and dropped from both the GWCE and the momentum equations.

The vertically-integrated, lateral stresses, , ,xx yx xy yyH H H Hτ τ τ τ= , derive from time averaging the advection terms in the momentum equations. They are due to high frequency fluctuations in the flow field that are not explicitly included in the model solution and they have no absolute relationship to the time averaged variables that are solved for. Rather, they must be approximated using a closure assumption. It is usually assumed that their significance is small compared to the other terms in the momentum equations, yet in practice most models depend on these terms to stabilize the numerical solution. While the use of a diffusive-type expression for these terms is standard, the exact form is equivocal.

Page 17: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

17

The original version of ADCIRC represents these terms in the momentum equations as:

h hxx yx

h hxy yy

U UH HHE HEx y

V VH HHE HEx y

τ τ

τ τ

∂ ∂= =

∂ ∂∂ ∂

= =∂ ∂

(2.3)

Several alternative expressions have been added to more recent version of ADCIRC (version 44.15):

x xh hxx yx

y yh hxy yy

Q QH HE Ex y

Q QH HE Ex y

τ τ

τ τ

∂ ∂= =

∂ ∂∂ ∂

= =∂ ∂

(2.4)

and (version 44.XX):

2

2

yx xh hxx yx

y yxh hxy yy

QQ QH HE Ex y x

Q QQH HE Ey x y

τ τ

τ τ

∂ ∂ ∂= = + ∂ ∂ ∂

∂ ∂ ∂= + = ∂ ∂ ∂

(2.5)

2

2

h hxx yx

h hxy yy

U U VH HHE HEx y x

U V VH HHE HEy x y

τ τ

τ τ

∂ ∂ ∂= = + ∂ ∂ ∂

∂ ∂ ∂= + = ∂ ∂ ∂

(2.6)

Eqs. (2.5) and (2.6) are conceptually more attractive than Eqs. (2.3) and (2.4) because they maintain the theoretical condition that τyx= τxy.

The buoyancy terms can be simplified from the form shown above by recognizing that there is no z-dependence in a 2DDI model and using Leibnitz’s rule. Thus we can integrate these terms in the vertical:

Page 18: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

18

( ) ( ) ( ) ( ) ( )

( ) ( )

( ) ( )

2 2 2

2 2

2 2

2

2

D o D o D ox h h

o o o

D o D o

o o

D o D oy

o o

hg z dz g z dz gHB x x x

HgHx x

HgHB y y

ζ ζρ ρ ρ ρ ρ ρζ ζ

ρ ρ ρ

ρ ρ ρ ρζρ ρ

ρ ρ ρ ρζρ ρ

− −

− − −∂ ∂ ∂= − = − − ∂ ∂ ∂

− −∂ ∂= + ∂ ∂

− −∂ ∂= + ∂ ∂

∫ ∫

where 2Dρ represents the vertically constant, depth-averaged density that is represented by a 2DDI model.

ADCIRC-2DDI utilizes a generalized slip formulation for the bottom stress term:

; slipslip by ybx xslip slip

o o

QQ KK U VK KH Hττ

ρ ρ= = = =

where,

2 2

,slip slip

slip d d

constant linear slip boundary condition, ( = linear drag coefficent)K K

, quadratic slip boundary condition, ( = quadratic drag coefficent)C U V CK

= =

= + =

The weighted residual method is applied to Eqs. (2.1) or (2.2) by multiplying each term by a weighting function jφ and integrating over the horizontal computational domain Ω . Thus the momentum equations become in non-conservative form:

[ ]

[ ]

, , , , ,

, , , ,

, , , , ,

, , , ,

s oj j j j j

slip x xsxj j j j

o o

s oj j j j j

sy slip y yj j j j

o o

gU U U PU V fV gt x y x

UK M BH HH H

gV V V PU V fU gt x y y

VK M BH HH H

ζ αηρφ φ φ φ φ

τ φ φ φ φρ ρ

ζ αηρφ φ φ φ φ

τ φ φ φ φρ ρ

∂ + −∂ ∂ ∂+ + − = −

∂ ∂ ∂ ∂

+ − + −

∂ + −∂ ∂ ∂+ + + = −

∂ ∂ ∂ ∂

+ − + −

(2.7)

and in conservative form:

Page 19: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

19

[ ]

[ ]

, , , , ,

, , , ,

, , , , ,

, , , ,

sx x oxyj j j j j

slipsx xx xj j j j

o

y y y s oxj j j j j

slipsy yy yj j j j

o

gQ Q Q PU V f gHQt x y x

QKM BH

Q Q Q gU V Pf gHQt x y y

QKM BH

ζ αηρφ φ φ φ φ

τ φ φ φ φρ

ζ αηρφ φ φ φ φ

τ φ φ φ φρ

∂ + −∂ ∂ ∂+ + − = −∂ ∂ ∂ ∂

+ − + −

∂ ∂ + −∂ ∂+ + + = −

∂ ∂ ∂ ∂

+ − + −

(2.8)

where, the inner product notation is defined by Eq. (1.10).

Integrations in Eqs. (2.7) and (2.8) are carried out using one of two basic integration rules as noted in the text. These rules are described in APPENDIX - BASIC CALCULATIONS ON LINEAR TRIANGLES.

Term by term integrations of Eqs. (2.7) and (2.8) are presented below (only the x-component equations are presented as the y-component equations are fully analogous).

Integration of the transient terms in Eqs. (2.7) and (2.8) utilizes Rule 1:

A, 3NE j j

j

UUtt

φΩ

∂∂ =∂∂

A, 3xNE j jx

j

QQtt

φΩ

∂∂ =∂∂

Integration of the advection terms in Eq. (2.7) utilizes Rule 2 and assumes the un-differentiated

terms are elementally averaged (i.e., 3

1

13 in

iUU

=

≡ ∑ , 3

1

13 in

iVV

=

≡ ∑ ,)

( ) ( )1 3

,jNE

nj n n

n n n

U U UUAU V U Vx y yx

∂ ∂ ∂∂φ=

Ω

= + + ∂ ∂ ∂∂ ∑

Two different integrations have been used for the advection terms in Eq. (2.8). Version 1 uses Rule 2 and a linear expansion in space for the conservative flux terms UQx, VQx:

Page 20: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

20

( ) ( )1 3

,jNE

nx x xxj

n n n

U V VUQ Q QQAx y yx

∂ ∂ ∂∂φ=

Ω

= + + ∂ ∂ ∂∂ ∑

Version 2 expands the advection terms with the product rule, utilizes Rule 2 on the derivative terms and assumes the un-differentiated terms are elementally averaged:

( ) ( ) ( ) ( )1 3

,jNE

nx x xxj nn xn x n

n n nn n

U VQ Q QQ VUA QVU Qx y y yx x

∂ ∂ ∂∂ ∂∂φ=

Ω

= + + + + ∂ ∂ ∂ ∂∂ ∂ ∑

Integration of the Coriolis terms in Eqs. (2.7) and (2.8) utilizes Rule 1:

, 3NE j

jj

AfVfV

φΩ=

, 3NE j

x jx j

Af Qf Q

φΩ=

Integration of the combined barotropic pressure (i.e., the free surface elevation, atmospheric pressure and tidal potential) gradient terms in Eqs. (2.7) and (2.8) utilizes Rule 2 and assumes the undifferentiated total water depth term in the conservative form of the equations is

elementally averaged (i.e., 3

1

13 in

iHH

=

≡ ∑ ):

[ ] [ ]1

,3

jNEs sno o

jn n

g gP PAg gx x

ζ αη ζ αηρ ρφ

∂ + − ∂ + −= ∂ ∂ ∑

1,

3

jNEs so on n

jn n

g gP PA HgH gx x

ζ αη ζ αηρ ρφ

∂ + − ∂ + − = ∂ ∂ ∑

Integration of the surface and bottom stress terms in Eqs. (2.7) and (2.8) utilizes Rule 1:

, ,3NEslip j slipsx sx

j jo o o o

j j

AU UK KH H H Hτ τφ φρ ρ ρ ρ

Ω Ω

− = −

Page 21: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

21

, ,3NEslip j slipsx sxx x

j jo o o o

j j

AQ QK KH H

τ τφ φρ ρ ρ ρΩ Ω

− = −

The vertically-integrated, baroclinic pressure gradient terms in Eqs. (2.7) and (2.8) are assumed to vary linearly across an element. Integration of these terms utilizes Rule 2:

1

,3

jNEx n x

jn n

B A BH H

φ=Ω

=

( )1

,3

jNEn

x xj nn

AB BφΩ

=

= ∑

The lateral stress gradient terms in Eqs. (2.7) and (2.8) are initially integrated by parts to eliminate the second derivatives of flux or velocity that result from the lateral stress closure:

1, ,

, , N

yxx xxj j

j j h xxx yx j

HHMH H x y

E dH Hx H y H H N

ττφ φ

φ φ τφτ τ

Ω Ω

ΓΩ Ω

∂∂= + ∂ ∂

∂ ∂ ∂= − − + Γ ∂ ∂ ∂

, ,

, , N

yxxxx j j

j j xhxx yx j

HHM x y

dH H Ex y N

ττφ φ

φ φ τφτ τ

ΩΩ

ΓΩ Ω

∂∂= + ∂ ∂

∂∂ ∂= − − + Γ∂

∂ ∂ ∂∫

where Γ represents the external boundary of the computational domain. In both cases we assume that the lateral stresses are small along all external boundary segments and therefore that the boundary integral term can be neglected. In addition we replace the depth by the central nodal depth and assume that the lateral stress is spatially constant across an element:

1

1,jNE

j jxn xx yxj

nj n

M H HAH x yH

φ φφ τ τ

∂ ∂ = − + ∂ ∂

1,

jNEj j

x n xx yxjn n

H HM A x yφ φ

φ τ τΩ

=

∂ ∂ = − + ∂ ∂ ∑

Page 22: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

22

Following integration and multiplication by 3 NE jA , the non-conservative Eq. (2.7) becomes:

( ) ( )1 1

1 1

1

3 1

1

j j

j j

NE NEsj o

n nn n jn nNE NEj jn nn

NE NEslip j j xsx

n nxx yxo o n nj NE NE nj jnj j

j

NE j

gg PU UU fVA AU Vt xyxA A

UK B H HA Ax y HH H H A A

Vt A

ζ αηρ∂∂

φ φτ τ τρ ρ

= =

= =

∂ + − ∂ + + − = − ∂ ∂∂∂ ∂ ∂ + − − + − ∂ ∂

∂ +∂

∑ ∑

∑ ∑

( ) ( )1 1

1 1

3 1

j j

j j

NE NEs o

n nn n jn nNE jn nn

NE NEsy slip j j y

n nxy yyo o n nj NE NEj j nnj j

gg PVV fUA AU V yyx A

VK B H HA Ax y HH H H A A

ζ αηρ∂∂

φ φττ τρ ρ

= =

= =

∂ + − + + = − ∂∂∂ ∂ ∂ + − − + − ∂ ∂

∑ ∑

∑ ∑

(2.9)

the conservative Eq. (2.8) for version 1 becomes:

( ) ( )1

1

1 1

1

3 1

1

j

j

j j

NEx j xx

n y jnNE j n n

NEs slipo sx x

n nonNE j jjn

NE NEj j

n xx yx n x nn nj NE NEj jn

y jn

NE j n

Q VQUQ f QAt yxA

g Qg P KA H x HA

H HA A Bx yH A A

QAt A

∂∂

ζ αηρ τρ

φ φτ τ

=

=

= =

∂+ + − =

∂ ∂∂ ∂ + − − + − ∂

∂ ∂ − + − ∂ ∂

∂+

∑ ∑

( ) ( )1

1

1 1

3 1

j

j

j j

NEy y

x jn n

NEslips sy yo

n nonNE j jjn

NE NEj j

n yn xy yy nn nj NE NEj jn

UQ VQ fQx y

Qg Kg PA H y HA

A BH HA x yH A A

ζ αηρ τρ

φ φτ τ

=

=

= =

+ + =

∂ ∂ ∂ + − − + − ∂

∂ ∂ − + − ∂ ∂

∑ ∑

(2.10)

and the conservative Eq. (2.8) for version 2 becomes:

Page 23: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

23

( ) ( ) ( ) ( )1

1

1 1

1

3 1

j

j

j

NEx j xx

n ynn x n jx nnNE j n nn n

NEs slipo sx x

n nonNE j jjn

NEj j

n xx yx n x nn nj NE NEj jn

Q QQ VU f QQA VU Qt y yx xA

g Qg P KA H x HA

H HA A Bx yH A A

∂∂ ∂∂

ζ αηρ τρ

φ φτ τ

=

=

= =

∂+ + + + − =

∂ ∂ ∂∂ ∂ ∂ + − − + − ∂

∂ ∂ − + − ∂ ∂

( ) ( ) ( ) ( )1

1

1

1

3 1

j

j

j

j

NE

NEy j y y

n n n y x jyn nnNE j nn n n

NEslips sy yo

n nonNE j jjn

NEj j

n yn xy yy nnj NE NEj jn

Q Q Q VUQ fQQA U Vt x y yxA

Qg Kg PA H y HA

AH HA x yH A A

∂ ∂ ∂∂

ζ αηρ τρ

φ φτ τ

=

=

=

∂+ + + + + =

∂ ∂ ∂ ∂∂ ∂ + − − + − ∂

∂ ∂ − + − ∂ ∂

∑1

jNE

nB

=∑

(2.11)

As noted above, early versions of ADCIRC-2DDI used an approximation to the exact integration contained in integration Rule 2. If integration Rule 2a is used instead of Rule 2, the non-conservative Eqs. (2.9) become:

( ) ( )

( )

1 1

1 1

1

3 1

1

j j

j j

NE NEsj o

n n jn nj jn nn

NE NEslip j j xsx

xx yxo o n nj j j nnj j

jn n

j n n

gg PU UU fVU Vt xNE y NEx

UK B H Hx y HH H NE NEH

V VVU Vt NE x

ζ αηρ∂∂

φ φτ τ τρ ρ

∂∂

= =

= =

∂ + − ∂ + + − = − ∂ ∂∂∂ ∂ ∂ + − − + − ∂ ∂

∂ + +∂ ∂

∑ ∑

∑ ∑

( )1 1

1 1

3 1

j j

j j

NE NEs o

jn nj n

NE NEsy slip j j y

xy yyo o n nj j j nnj j

gg PfUyy NE

VK B H Hx y HH H NE NEH

ζ αηρ

φ φττ τρ ρ

= =

= =

∂ + − + = − ∂∂ ∂ ∂ + − − + − ∂ ∂

∑ ∑

∑ ∑

(2.12)

The formulated using approximate integration Rule 2a for the conservative equations is not presented.

Equations (2.9) - (2.12) present four spatially discretized, vertically-integrated versions of the momentum equations that may be used to solve for velocity at horizontal node j. A two level time discretization at the present (s) and future (s+1) time levels is described below (only the x-component equations are presented as the y-component equations are fully analogous):

Page 24: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

24

Non-conservative transient term: 1s s

j jU Ut

+ −∆

Conservative transient term: 1s s

x xj jQ Qt

+ −

Non-conservative horizontal advection: ( ) ( )1

1 jNE sss s

n n nnNE j n n

UUA U VyxA =

∂∂ + ∂∂

Conservative horizontal advection, version 1: ( ) ( )1

1 jssNE

xxn

nNE j n n

VQUQAyxA =

∂∂ + ∂∂

Conservative horizontal advection, version 2:

1

1 js ss sNE

s s s sx xn n n x xn n

nNE nj n n n

Q Q U VA U V Q Qx y x yA

∂ ∂ ∂ ∂=

+ + + ∂ ∂ ∂ ∂ ∑

Non-conservative Coriolis: ( )112

s sj jfV fV+ +

Conservative Coriolis: ( )112

s sy yj j

f fQ Q+ +

Non-conservative barotropic pressure gradient:

[ ] [ ] 1

1

12

js sNE

s sn o o

nNE j n

g gP PAgx xA

ζ αη ζ αηρ ρ +

=

∂ + − ∂ + −+

∂ ∂ ∑

Conservative barotropic pressure gradient:

[ ] [ ] 11

1

12

js sNE

s so on s sn n

nNE j n

g gP PAg H Hx xA

ζ αη ζ αηρ ρ+

+

=

∂ + − ∂ + − + ∂ ∂

Page 25: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

25

Non-conservative free surface stress: 1

1

12

s ssx sxj j

s sj jo oH H

τ τ

ρ ρ

+

+

+

Conservative free surface stress: 11

2

s ssx sxj j

o o

τ τρ ρ

+ +

Non-conservative bottom stress: 1

12

s s sslip j j j

s sj j

K U UH H

+

+

+

Conservative bottom stress: 1

12

s ssslip x xj j j

s sj j

Q QK

H H

+

+

+

Non-conservative baroclinic pressure gradient: 1

1 jsNE

xn

nNE nj

BA HA =

Conservative baroclinic pressure gradient: 1

1 jNEs

n xnnNE j

A BA =

Non-conservative lateral stress: 1

3 jNEj js s

n xx yxsnj NE j n

H HA x yH A

φ φτ τ

=

∂ ∂ + ∂ ∂

Conservative lateral stress: 1

3 jNEj js s

n xx yxnNE j n

H HA x yA

φ φτ τ

=

∂ ∂ + ∂ ∂

These time discretizations are substituted into the spatially discretized equations, multiplied by t∆ and grouped at time levels s+1 and s, to yield the fully discretized equations.

Non-conservative, exact integration, (Eq. (2.9)):

Page 26: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

26

( ) ( )[ ] [ ]

1 11

11

1

1

1

1

122

122

2

2

j

j

sslip j s s

j jsj

s sNE ssslip j js ssnj n ns

nj NE j n n

s sNEs so o

nnNE j n

ssx sxj j

sj o

tK f tU V

H

t t fVK t UUU A U VyxH A

g gg t P PA x xA

t

H

ζ αη ζ αηρ ρ

τ

ρ

+ ++

+=

+

=

+

+

∆ ∆+ − =

∆ ∆∆ ∂∂− − + +

∂∂ ∂ + − ∂ + −∆ − + ∂ ∂

∆+ +

( ) ( )

1

1

1 11

11

3

122

12

j

j

j

s NEj js s

n xx yxss nj NE j nj o

sNEx

nnNE nj

sslip j s s

j jsj

s NE ssslip j s ssnj n ns

nj NE j n n

tH HA x yH AH

t BA HA

tK f tV U

H

tK t VVV A U VyxH A

φ φττ τ

ρ =

=

+ ++

+=

∂ ∂ ∆ − + ∂ ∂

∆ −

∆ ∆+ + =

∆ ∆ ∂∂− − +

∂∂

[ ] [ ] 1

1

1

1 1

1

2

2

32

j

j

j

sj

s sNEs so o

nnNE j n

s s NEsy syj j j js sn xy yyss s nj NE j nj jo o

sNEy

nnNE j n

t fU

g gg t P PA y yA

t t H HA x yH AH H

t BA HA

ζ αη ζ αηρ ρ

τ τ φ φτ τ

ρ ρ

+

=

+

+ =

=

∆−

∂ + − ∂ + −∆ − + ∂ ∂

∂ ∂ ∆ ∆ + + − + ∂ ∂

∆ −

(2.13)

Page 27: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

27

Conservative version 1, exact integration (Eq. (2.10)):

[ ] [ ]

111

1

11

11

1

122

122

2

j

j

sslip ssj

yx j jsj

ss sNEslip ssj x x

n yx j jsnj NE j n n

s sNs so os s

n n nnNE j n

tK f t QQH

tK UQ VQt f t QQ A x yH A

g gg t P PA H Hx xA

ζ αη ζ αηρ ρ

++

+

+

+=

+

+

=

∆ ∆+ − =

∆ ∂ ∂∆ ∆ − − + + ∂ ∂

∂ + − ∂ + −∆ − + ∂ ∂

1

1

1

1 11

11

32

122

12

j

j

j

E

s s NEsx sxj j j js s

n xx yxnNE jo o n

NEs

n x nnNE j

sslip s sj

y x jjsj

ss NEslip sj y

ny jsnj NE j n

t t H HA x yA

tA B

A

tK f tQ QH

t UQK tQ A xH A

φ φτ ττ τ

ρ ρ

+

=

=

+ +

+

+=

∂ ∂ ∆ ∆+ + − + ∂ ∂

∆−

∆ ∆+ + =

∆ ∂ ∆− − + ∂

[ ] [ ]

1

11

1

1

1

1

2

2

32

j

j

j

ssy

x jn

s sNEs so os s

n n nnNE j n

s s NEsy syj j j js sn xy yy

nNE jo o n

NEs

yn nnNE j

VQ f t Qy

g gg t P PA H Hy yA

t t H HA x yA

tBA

A

ζ αη ζ αηρ ρ

τ τ φ φτ τ

ρ ρ

+

+

+

=

+

=

=

∂ ∆ − ∂ ∂ + − ∂ + −∆ − + ∂ ∂

∂ ∂ ∆ ∆+ + − + ∂ ∂

∆−

(2.14)

Page 28: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

28

Conservative version 2, exact integration (Eq. (2.11)):

111

11

1

122

12

2

2

j

sslip ssj

yx j jsj

s ss s sNEslip sj s s s sx x

n n nx js x xn nnj NE nj n n n

sy j

ss os

n nNE j n

tK f t QQH

tK Q Qt U VQ A U V Q Qx y x yH A

f t Q

gg t PA H

A

∂ ∂ ∂ ∂

ζ αρ

++

+

+=

+

∆ ∆+ − =

∆ ∆ − − + + + ∂ ∂ ∂ ∂

∆+

∂ + −∆−

[ ] [ ] 11

1

1

1 1

1 11

1

32

122

12

j

j j

sNEs os

nn

s s NE NEsx sxj j j j ss s

n nxx yx x nn nNE NEj jo o n

sslip s sj

y x jjsj

sslip jsj

gPHx x

t t t H HA A Bx yA A

tK f tQ QH

tK

H

η ζ αηρ

φ φτ ττ τ

ρ ρ

+

+

=

+

= =

+ +

+

+

∂ + − + ∂ ∂

∂ ∂ ∆ ∆ ∆+ + − + − ∂ ∂

∆ ∆+ + =

∆−

∑ ∑

[ ] [ ]

1

1

11

1

1

2

2

2

j

j

s s ssNEs y y s ss s

ny n n y yj n nnNE nj nn n

sx j

s sNEs so os s

n n nnNE j n

s ssy syj j

o o

Q Qt U VQ Q QA U Vx y x yA

f t Q

g gg t P PA H Hy yA

t

∂ ∂ ∂ ∂

ζ αη ζ αηρ ρ

τ τρ ρ

=

+

+

+

=

+

∆ − + + + ∂ ∂ ∂ ∂ ∆

∂ + − ∂ + −∆ − + ∂ ∂

∆+ +

1 1

3 j jNE NEsj js s

yn nxy yy nn nNE NEj jn

t t BH HA Ax yA A

φ φτ τ

= =

∂ ∂ ∆ ∆− + − ∂ ∂

∑ ∑

(2.15)

Page 29: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

29

Non-conservative, approximate integration (Eq. (2.12)):

( ) ( )[ ] [ ]

1 11

11

1

1

1

1

122

122

2

2

j

j

sslip j s s

j jsj

s sNE ssslip j js ssj n ns

nj j n n

s sNEs so o

njn

s ssx sxj j

s sj jo o

tK f tU V

H

t t fVK t UUU U VNE yxH

g gg t P Px xNE

t

H H

ζ αη ζ αηρ ρ

τ τ

ρ

+ ++

+=

+

=

+

+

∆ ∆+ − =

∆ ∆∆ ∂∂− − + +

∂∂ ∂ + − ∂ + −∆ − + ∂ ∂

∆+ +

( ) ( )

1

1

1 11

11

3

122

122

j

j

j

NEj js s

xx yxsnj j n

sNEx

nj n

sslip j s s

j jsj

s sNE ssslip j js ssj n ns

nj j n n

tH Hx yNEH

t BHNE

tK f tV U

H

t t fUK t VVV U VNE yxH

g t

φ φτ τ

ρ =

=

+ ++

+=

∂ ∂ ∆ − + ∂ ∂

∆ −

∆ ∆+ + =

∆ ∆∆ ∂∂− − + −

∂∂

∆−

[ ] [ ] 1

1

1

1 1

1

2

32

j

j

j

s sNEs so o

njn

s s NEsy syj j j js sxy yyss s nj j nj jo o

sNEy

nj n

g gP Py yNE

t tH Hx yNEHH H

t BHNE

ζ αη ζ αηρ ρ

τ τ φ φτ τ

ρ ρ

+

=

+

+ =

=

∂ + − ∂ + − + ∂ ∂

∂ ∂ ∆ ∆ + + − + ∂ ∂

∆ −

(2.16)

Each momentum equation discretization requires the solution of a 2x2 matrix at every node j in the model domain. This is accomplished in ADCIRC-2DDI using Kramer’s rule.

The original version of ADCIRC-2DDI uses the non-conservative, approximate integration presented in Eq. (2.16). The other formulations have been added as of ADCIRC version 44.15.

Page 30: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

30

3.0 3D MOMENTUM EQUATIONS

ADCIRC uses the shallow water form of the momentum equations (applying the Boussinesq and hydrostatic pressure approximations).

[ ]

[ ]

s zxox x

o

s zyoy y

o

gu u u u Pu v w fv g b mt x y z x z

gv v v v Pu v w fu g b mt x y z y z

ζ αηρ τρ

ζ αηρ τρ

∂ + − ∂ ∂ ∂ ∂ ∂+ + + − = − + − + ∂ ∂ ∂ ∂ ∂ ∂

∂ + − ∂ ∂ ∂ ∂ ∂+ + + + = − + − + ∂ ∂ ∂ ∂ ∂ ∂

(3.1)

where,

zxz

o

zyz

o

z

x

u, v, w = velocity components in the coordinate directions x, y, zu vertical stressE zv vertical stressE z

vertical eddy viscosityEu u lateral stress gm E Ex x y y

τρ

τρ

∂= =

∂= =

=

∂ ∂ ∂ ∂ ≡ + = ∂ ∂ ∂ ∂ l l

( )

( )

y

ox z

o

oy z

o

radient

v v lateral stress gradientm E Ex x y ylateral stress coefficient (often called the lateral eddy viscosity)E

g dz baroclinic pressure gradientb x

g dzb y

ζ

ζ

ρ ρρ

ρ ρρ

∂ ∂ ∂ ∂ ≡ + = ∂ ∂ ∂ ∂ ≡

−∂≡ =

−∂≡

l l

l

baroclinic pressure gradient=∫

All horizontal derivatives in Eq. (3.1) and the accompanying definitions are computed in a level or “z” coordinate system. ADCIRC utilizes a generalized stretched vertical coordinate system

Page 31: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

31

( )a bσ a z ζH− = + −

(3.2)

σ az H ζa b− = + −

(3.3)

(Figure 1) in which the vertical dimension is transformed from z, ranging from -h to ζ , to σ, ranging from b to a, where b and a are arbitrary constants. (Most models assume b=-1, a=0. ADCIRC assumes b=-1, a=1.) While ADCIRC uses the variable σ to represent the stretched vertical coordinate, a traditional “σ” coordinate system implies that the nodes are spaced uniformly over the vertical at any given horizontal location. ADCIRC does not carry this limitation, but rather nodes can be distributed over the vertical in any manner desired.

Using the chain rule we can relate derivatives along level (z) surfaces to derivatives along the stretched (σ) surfaces:

z σ z z

σ b ζ σ a ha b a b zx x x x

∂ ∂ − ∂ − ∂ ∂ = − + − − ∂ ∂ ∂ ∂ ∂

z σ z z

σ b ζ σ a ha b a b zy y y y

∂ ∂ − ∂ − ∂ ∂ = − + − − ∂∂ ∂ ∂ ∂ (3.4)

a bz H σ∂ − ∂ = ∂ ∂

Figure 1. Schematic of level and stretched coordinates

Page 32: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

32

where for clarity, σ subscripts have been used on the horizontal derivatives computed along the stretched surfaces in Eqs. (3.4).

Considerable discussion exists in the literature regarding the generation of spurious circulation due to the use of stretched vertical coordinates. Most of this attention has focused on problems arising from the baroclinic pressure gradient terms and to a lesser extent the lateral stress terms. In ADCIRC we apply the stretched coordinate system to all but the baroclinic pressure gradient terms resulting in the following transformed momentum equations:

[ ]

[ ]

s zxox x

o

s o

u u u a b uu v fvwt Hyxg a bP g b mx H

v v v a b vu v fuwt Hyxg a bP gy H

σσ σ

σ

σσ σ

σ

ζ αηρ τσ ρ

σ

ζ αηρσ

∂ ∂ ∂ − ∂ + + + − = ∂ ∂∂ ∂

∂ + − − ∂ − + − + ∂ ∂ ∂ ∂ ∂ − ∂ + + + + = ∂ ∂∂ ∂

∂ + − − ∂ − + ∂ ∂ zy

y yo

b m σ

τρ

− +

(3.5)

Note that the first term on the right hand side of each equation is not a function of depth and therefore horizontal derivatives in level coordinates are identical to horizontal derivatives in stretched coordinates.

Introduction of the stretched coordinate system in the advection terms produces similar-looking advection terms in the stretched coordinate system, Eqs. (3.5), provided a stretched-coordinate, vertical velocity, wσ , is introduced that is related to the true vertical velocity by:

σ b ζ σ b ζ σ a h σ b ζ σ a hw u vw a b t a b x a b x a b y a b yσ − ∂ − ∂ − ∂ − ∂ − ∂ ≡ − − + − + − ∂ − ∂ − ∂ − ∂ − ∂

(3.6)

ADCIRC does not formally transform the lateral stress terms ( ,x ym m ) in Eqs. (3.4) to obtain equivalent terms in Eqs. (3.5). Rather, the original lateral stress terms (along horizontal surfaces) are approximated as lateral stresses “along stretched surfaces”, i.e.,

x

y

u u lateral stress gradients along stretched surfaceE Em y yx x

v v lateral stress gradients along stretched surfaceE Em y yx x

σσ σ σ σ

σσ σ σ σ

∂ ∂ ∂ ∂≡ + = ∂ ∂∂ ∂

∂ ∂ ∂ ∂≡ + = ∂ ∂∂ ∂

l l

l l

(3.7)

Page 33: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

33

The generation of spurious circulation because of this assumption has also been discussed in the literature. ADCIRC uses the lateral stress gradient terms purely to dampen numerical noise in the solution and therefore assumes a lateral stress coefficient that is as small as possible. This should minimize the generation of spurious circulation by these terms.

The weighted residual method is applied to Eqs. (3.5) by multiplying each term by a horizontal weighting function jφ and integrating over the horizontal computational domain Ω and then multiplying the result by a vertical weighting function kψ and integrating over the vertical domain, Ζ . By constructing the grid so that the vertical nodes line up vertically beneath each horizontal node, the horizontal and vertical integrations can be performed independently.

( )[ ]

, , , , , ,

, , ,,

, ,, ,

k kj j j k

s o zxj k kj

o

k kx xj j

u u u ua bu v w fvt yx H

gP a bgx H

b m

σσ σ

σ

∂ ∂ ∂φ ψ φ ψ φ ψ∂σ

ζ αηρ τφ ψ ψφ∂σ ρ

ψ ψφ φ

Ω ΖΩ Ζ Ω Ζ

Ω Ζ Ω Ζ

Ω ΩΖ Ζ

∂ −+ − =+ + ∂ ∂∂

∂ + − − ∂ − + ∂

− +

(3.8)

( )[ ]

, , , , , ,

, , ,,

, ,, ,

k kj j j k

s o zyj k kj

o

k kyy j j

v v v va bu v w fut yx H

gP a b gy H

mb

σσ σ

σ

∂ ∂ ∂φ ψ φ ψ φ ψ∂σ

ζ αηρ τφ ψ ψφ∂σ ρ

ψ ψφ φ

Ω ΖΩ Ζ Ω Ζ

Ω Ζ Ω Ζ

Ω ΩΖ Ζ

∂ −+ + =+ + ∂ ∂∂

∂ + − − ∂ − + ∂

− +

(3.9)

Horizontal integrations of each term in Eq. (3.8) are presented below (Eq. (3.9) is fully analogous) and are carried out using one of two basic integration rules as noted in the text. These rules are described in APPENDIX - BASIC CALCULATIONS ON LINEAR TRIANGLES:

Horizontal integration of the transient term in Eq. (3.8) utilizes Rule 1:

, , ,3j

jNEk kj

uAut tφ ψ ψ

Ω ΖΖ

∂∂=

∂ ∂

Page 34: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

34

Horizontal integration of the horizontal advection terms in Eq. (3.8) utilizes Rule 2 and assumes

the un-differentiated velocity terms are elementally averaged (i.e., 3

1

13n i

iu u

=

≡ ∑ and3

1

13n i

iv v

=

≡ ∑ ):

( )1

, , ,3

NE j nn nk kj

n n n

A u uu uu v u v

y yx xσ σσ σ

∂ ∂∂ ∂ φ ψ ψ=Ω Ζ Ζ

=+ ∂ ∂∂ ∂

+∑

Horizontal integration of the vertical advection term in Eq. (3.8) utilizes Rule 1:

( ), , ,3NE j j

k kj jj

A a bu ua bw wH H

σ σ∂ ∂φ ψ ψ∂σ ∂σ ΖΩ Ζ

− − =

Horizontal integration of the Coriolis term in Eq. (3.8) utilizes Rule 1:

, , ,3NE j

kj k j

Afvfv

φ ψ ψΩ ΖΖ

=

Horizontal integration of the combined barotropic pressure (i.e., the free surface elevation, atmospheric pressure and tidal potential) gradient term in Eq. (3.8) utilizes Rule 2:

[ ] [ ]1

, , ,3

jNEs sno o

j k kn n

g g gP PA gx x

ζ α η ζ αηρ ρφ ψ ψ

=Ω Ζ Ζ

∂ + − ∂ + −= ∂ ∂ ∑

Horizontal integration of the vertical stress gradient term in Eq. (3.8) utilizes Rule 1:

, ,, 3NE j zx jzx

k kjj oo

A a ba bHH

ττ ψ ψφ σ ρσ ρΩ ΖΖ

− ∂ − ∂ = ∂∂

Horizontal integration of the baroclinic pressure gradient terms in Eq. (3.8) utilizes Rule 2:

1, ,, 3

jNEn

xnk kx jn

Abb ψ ψφ

Ω Ζ = Ζ

= ∑

Horizontal integration of the lateral stress gradient term in Eq. (3.8) initially utilizes integration by parts

Page 35: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

35

1

, ,, ,

,j

n n

k kx j j

NEj j

j kn

u uE Em y yx x

u u u u d dE Ey y yx x x

σσ σ σ σ

σ σσ σ

ψ ψφ φ

φ φφ ψ

Ω ΖΩ Ζ

=Γ Ω Ζ

∂ ∂ ∂ ∂≡ + ∂ ∂∂ ∂

∂ ∂ ∂ ∂ ∂ ∂= + Γ − + Ω ∂ ∂ ∂∂ ∂ ∂

∑∫ ∫

l l

l l

1,

j

n n

NEj j

j kn n

u u u u d dE Ey y yx x xσ σσ σ

φ φφ ψ

=Γ ΩΖ

∂ ∂ ∂ ∂ ∂ ∂= + Γ − + Ω ∂ ∂ ∂∂ ∂ ∂ ∑∫ ∫l l

where, n external boundary segment of element n=Γ . The term is further reduced by assuming that the lateral stresses are zero along all external boundary segments and by lumping the lateral stress coefficient

1, ,,

jNEj j

njk kx jn n

u uAEm y yx xσ

σ σ

φ φψ ψφ

Ω Ζ =Ζ

∂ ∂ ∂ ∂= + ∂ ∂∂ ∂ − ∑l

Thus, following horizontal integration and multiplication by 3 NE jA , Eqs. (3.8) and (3.9)

become:

[ ]

1

1

1

1, , ,

1, , ,

1

j

j

NE jj jn n nk k kj

n jn nNE j

NEs zx jo

kj n k kn oNE j jn

NE

n xnnNE j

u u u a b uu vA wt yxA H

g a bP =fv gA xA H

A bA

σσ σ

∂ ∂ ∂ψ ψ ψ∂σ

ζ αηρ τψ ψ ψσ ρ

= ΖΖΖ

Ζ=

Ζ Ζ

= Ζ

∂ −+ + ∂ ∂∂

∂ + − − ∂− − + ∂ ∂

+∑

∑1

3, ,

jNEj j

njk kNE nj n

u uAEA y yx xσ σ

φ φψ ψ

∂ ∂ ∂ ∂ − + ∂ ∂∂ ∂

∑l

(3.10)

Page 36: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

36

[ ]

1

1

1

1, , ,

1, , ,

1 3,

j

j

NE jj jn n nk k kj

n jn nNE j

NEzys jo

kj n k kn oNE j jn

NE

yn knn jNE j

v v v a b vu vA wt yxA H

g a bP=fu gA yA H

bAA

σσ σ

∂ ∂ ∂ψ ψ ψ∂σ

ζ αηρ τψ ψ ψσ ρ

ψ

= ΖΖΖ

Ζ=

Ζ Ζ

= ΖΖ

∂ −+ + ∂ ∂∂

∂ + − − ∂+ − + ∂ ∂

− −

+∑

∑1

,jNE

j jnj k

NE n n

v vAEA y yx xσ σ

φ φψ

=

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂

∑l

(3.11)

A standard one-dimensional, Galerkin FEM discretization is used in the vertical, yielding the following integration rule,

1 1

1 1

1 1

1 11 1

1 1

1

1 1

1,

k k

k kk k k k

k k

k k k

k k kk k k k k kk

k k k

k

k kk k k k

k

d d k NV

d d d k NVz

d

σ σσ σψ ψ ψ ψ

σ σσ σ σ

σ σ σψ ψ ψ ψ ψ ψψσ σ σ

σσψ ψ ψ ψ

σ

− −

− −

+ +

− +− +

− −

+

+ +

+ =ϒ ϒ

≡ + + < <ϒ ϒ ϒ ϒ

+ϒ ϒ

∫ ∫

∫ ∫ ∫

∫1

1k

k

d kσ

σσ

+

=

In shorthand notation this can be written as:

3

1 2,2 ,3 ,1 ,11

, k k k mk k k mk kkm

Inm Inm Inm Inmzψ + + −−=

≡ + + =ϒ ϒ ϒ ϒϒ ∑

where,

1

k vertical weighting function, =1 at node k, =0 at all other nodes, varies linearly between adjacent nodesk at the bottomk NV at the free surfaceNV number of nodes in the vertical

ψ =

===

Page 37: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

37

( )

11

,11 1

,2 ,1 ,3

1

1,3

1 12 6

0 1

2

k kk k

k k k kk

k k

k k k

k

k kk

k

d d for kInm

for k

Inm Inm Inm

d Inm

σ σσ σσ σψ ψ ψ ψ

σ σ

σσψ ψ

σ

−−

− −

+

+

− = = ≠=

== +

=

∫ ∫

∫1

112 6

0

kk k

k k

k

d for k NV

for k NV

σσ σσψ ψ

σ

++

− = = ≠

=

(3.12)

Note, that the definition of the weighting/basis function kψ reduces integration over the vertical domain Ζ to integration over only the two vertical elements containing node k, i.e., from node

1k − to node 1k + . Also, because the basis functions are linear in space, their derivatives are constant within an element and can be pulled out of elemental integrations.

Vertical integration of the transient term in Eq. (3.10) yields

3, 2

,1

,j j k m

k mkm

u uInmt t

ψ + −

∂ ∂=∂ ∂∑

Vertical integration of the horizontal advection terms in Eq. (3.10) yields

1

3

,1 1

2

1,

1

NE j

n n n kn nNE nj

NE j

k mn n nNE m nj n n k m

u uu vA

yxA

u u Inmu vAyA x

σ σ

σ σ

∂ ∂ψ

∂ ∂

= =+ −

∂∂

= + ∂∂

+∑

∑ ∑

Vertical integration of the vertical advection term in Eq. (3.10) yields

Page 38: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

38

( )( )

1, 1 ,-1, 1 1

1 1

1, , 1, 1

,k k

j jkj k k k kj k j k

j j k k k k

k kj

k k k kj k j kj k k k k

a b a bu u d d w w wH H

a b u d d w wH

σ σ σ

σ σ

σ σσ σψ ψ ψ ψ ψ

σ σ σ σσ σ

σ σψ ψ ψ ψσ σ σ

−−Ζ − −

+ +

+++

− −∂ ∂ = + ∂ ∂ − ∂+ + ∂

∫ ∫

∫ ∫

( ) ( ),1 ,3, 1 , , , 1-1, , 1

2 2j j

k kj k j k j k j kj k k k k

a b u u = Inm Inmw w w wH σ σ σ σσ σ− ++

− ∂ ∂+ + + ∂ ∂

where,

( ) ( ) ( )( ) ( ) ( )

, , 11, 1 ,

1-1, -1,-1,

, 1 ,1, , 1

1, 1 , 1, 1

j k j kj k kj k j k

k kk k k kk k

j k j kj k kj k j k

k kk k k kk k

u uuu u

u uuu u

ψ ψσ σ σ σ σ

ψ ψσ σ σ σ σ

−−−

+++

++ ++

−∂ ∂∂ ≡ + =∂ ∂ ∂ −

−∂ ∂∂ ≡ + =∂ ∂ ∂ −

Vertical integration of the Coriolis term in Eq. (3.10) yields

3

,, 21

, k mkj j k mm

fv fv Inmψ + −Ζ =

=∑

Vertical integration of the barotropic pressure gradient term in Eq. (3.10) yields

[ ] [ ]11

1 1,

jj NENEs os o

n kn kNE NE nnj j nn

gg PP gg LVnAA xxA A

ζ αηρζ αηρψ

==Ζ

∂ + − ∂ + − = ∂∂ ∑∑

where

1

1

11 1

1

11

2

12

12

kk k

k

k

kk k

k k

k

kk k

k

k

d k NV

d k NVLVn

d k

σσ σσψ

σσ

σ σσψσσ

σ σσψσ

++ −

++

− = = −≡ = < < −

= =

(3.13)

Page 39: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

39

Vertical integration of the baroclinic pressure gradient term in Eq. (3.10) yields

3

,1 11 2

1 1,

jj NENE

n k mxnn xn kNE NE m nnj j k m

InmA bA bA A

ψ= == + −Ζ

=

∑ ∑∑

Vertical integration of the lateral stress terms in Eq. (3.10) yields

1

3

,1 1

2

3,

3

j

j

NEj j

nj kNE nj n

NEj j

n k mjm nNE j n k m

u uAEA y yx x

u u InmAE y yx xA

σ σ

σ σ

φ φψ

φ φ

= =+ −

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂

∂ ∂ ∂ ∂ = + ∂ ∂∂ ∂

∑ ∑

l

l

The vertical stress gradient term in Eq. (3.10) is initially integrated by parts, yielding

1, ,

sx bxj jzx zxj j kk o oj j jk NV ko oj

a b a b a ba bH H HH

τ τ ψτ τψ ρ ρσ σρ ρ= = ΖΖ

− − −− ∂∂ = − − ∂ ∂

where the free surface stress, sx jτ (applied only for k=NV) and bottom stress bx jτ (applied only for k=1) have been introduced. Expressing the vertical stress in terms of the vertical gradient of velocity in the remaining integral term, yields:

( )1

, 1 , 1, 1 ,1, 1, 1, 1 1

, , 1, 1 , 1

, ,zx j jk kz j

jo

k kk k k

j k j k k kz zj k j kk k k k k k k k

jk

j k j kk k k k

a b uEH

d d u u E Ea bH

u u

ψ ψτσ σ σρ

σ σψ ψ ψσ σψ ψ

σ σ σ σ σ

ψσ

ΖΖ

−− −−

− − −− −

++ +

∂ ∂− ∂= =∂ ∂ ∂

∂ ∂ ∂ + + ∂ ∂ ∂ − ∂ + + ∂

∫ ∫

1 11

1, , 1, 1

k kk k

k kz zj k j kk k k k

d d E Eσ σψ ψ

σ σψ ψσ σ σ σ

+ ++

+++

∂ ∂ + ∂ ∂

∫ ∫

or in shorthand notation

3

, 2 , ,1

,zx j kj k m j k m

mjo

a bu KVnm

Hψτσρ

+ −=

Ζ

−∂ = ∂

Page 40: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

40

where

( )

11, 1 ,

1, 1, 1 1

1, 1 ,, ,11, 1, 1 1

, , 1

12

k kk k

k kz zj k j kk k k k k k

k kk k

k kz zj k j kj kk k k k k k

z zj k j k

k k

d d E E

d d E EKVnm

E E

σ σψ ψ σ σψ ψσ σ σ σ

σ σψ ψσ σψ ψ

σ σ σ σ

σ σ

−−−

− −− −

−−− −

− −

∂ ∂ + ∂ ∂ ∂ ∂ = − + = ∂ ∂

+= −

∫ ∫

∫ ∫

, ,

1

0 1

j k

for k

for k

=

( )2 ,1 ,3

1 11

1, , 1, 1 , 1

1 1

1, , 1, ,3, 1 , 1

,

k k

k kk k

k kz zj k j kk k k k k k

k kk k

k kz zj k j kj kk k k k k k

j k

KVnm KVnm KVnm

d d E E

d d E EKVnm

σ σψ ψ σ σψ ψσ σ σ σ

σ σψ ψσ σψ ψ

σ σ σ σ

+ ++

+++ +

+ +

+++ +

+

= − +

∂ ∂ + ∂ ∂ ∂ ∂ = − + = ∂ ∂

= −

∫ ∫

∫ ∫

( )1 ,

120

z z j k

k k

E E for k NV

for k Nσ σ+

+≠

=

V

(3.14)

ADCIRC utilizes a generalized slip formulation for the bottom stress term:

;bybx j j

slip slipj jj jo o

K Ku vττ

ρ ρ= =

where,

2 2

,slip j

slip slipj j

slip d j jj

no slip bottom boundary conditionK

constant linear slip bottom boundary condition, ( = linear drag coefficent)K K

, quadratic slip bottom boundary K C u v

→∞ =

= =

= + = dcondition, ( = quadratic drag coefficent)C

In final form, the vertical stress gradient term is:

Page 41: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

41

23

, 2 , ,11

,sx jzx j

slipj j k m j k mjk ko mj j j jk NVo

a b a b a b a bKu u KVnmH H H H

ττ ψ ρσ ρ+ −=

==Ζ

− − − −∂ = − − ∂ ∑

Page 42: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

42

Thus, following vertical integration Eqs. (3.10), (3.11) become:

( ) ( )

3 3, 2

, ,1 1 1

2

,1 ,3, 1 , , , 1-1, , 1

,

1

2 2

NE jj k m

k m k mn n nm mNE nj n n k m

j jk kj k j k j k j k

j k k k k

j

u u uInm Inmu vAt A yx

a b u u Inm Inmw w w wH

σ σ

σ σ σ σ

∂ ∂

σ σ

+ −

= = =+ −

− ++

∂ + + ∂ ∂∂

− ∂ ∂+ + + + ∂ ∂

∑ ∑ ∑

[ ]3

,21 1

23

, 2 , ,11

3

,1 1 2 2

1

1 3

j

j

NEs o

nk m kk mNEm nj n

sx jslipj j k m j k mjko mj j jk NV

NE

n k mx jnNE m n NE jj k m k m

gPgf v Inm LVnA xA

a b a b a b Ku u KVnmH H H

InmA bAA

ζ αηρ

τρ

+ −= =

+ −===

= = + − + −

∂ + −= − ∂

− − −+ − −

− −

∑ ∑

∑ ∑ l

3

,1 1

jNEj j

n k mm n n

u uInmAE y yx xσ σ

φ φ

= =

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂

∑ ∑

(3.15)

( ) ( )

3 3, 2

, ,1 1 1

2

,1 ,3, 1 , , , 1-1, , 1

1

2 2

NE jj k m

k m k mn n nm mNE nj n n k m

j jk kj k j k j k j k

j k k k k

j

v v vInm Inmu vAt A yx

a b v v Inm Inmw w w wH

σ σ

σ σ σ σ

∂ ∂

σ σ

+ −

= = =+ −

− ++

∂ + + ∂ ∂∂

− ∂ ∂+ + + + ∂ ∂

+

∑ ∑ ∑

[ ]3

,, 21 1

23

, 2 , ,11

3

,1 1 2

1

1 3

j

j

NEs o

nk m kk mm nNE j n

sy jslipj j k m j k mjko mj j jk NV

NE

yn k mnm nNE NEj jk m k m

gPgf u Inm LVnA yA

a b a b a b Kv v KVnmH H H

b InmAA A

ζ αηρ

τρ

+ −= =

+ −===

= = + − +

∂ + −= − ∂

− − −+ − −

− −

∑ ∑

∑ ∑3

,1 1

2

jNEj j

n k mjm n n

v vInmAE y yx xσ σ

φ φ

= =−

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂

∑ ∑l

(3.16)

Equations (3.15), (3.16) present the spatially discretized solution for velocity at horizontal node j and vertical node k used by ADCIRC 3D. These equations are discretized in time using a two time level scheme at the present (s) and future (s+1) time levels as described below:

Transient term: 13

, 2 , 2,

1

s sj k m j k m

k mm

u uInmt

++ − + −

=

−∆∑

Page 43: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

43

Horizontal advection: 3

,1 1

2

1 NE j s ss s

k mn n nmNE nj n n k m

u u Inmu vAA yxσ σ

∂ ∂= =

+ −

+ ∂∂

∑ ∑

Vertical advection:

( ) ( ) ( ) ( ),1 ,3, 1 , , , 1

-1, , 1

2 2s sj js s s s

k kj k j k j k j ksj k k k k

a b u u Inm Inmw w w wH

σ σ σ σσ σ− +

+

− ∂ ∂+ + + ∂ ∂

Coriolis: ( )3

11 , 2 1 , 2 ,

11s s

j k m j k m k mm

f v v Inmα α++ − + −

=

+ − ∑

Free surface stress: 1

12o o

s ssx sxj j

s sj j k NV

a b

H Hτ τ

ρ ρ

+

+

=

−+

Bottom stress: ( ) ( )122

11

1 sss jjslip s sj

j j k

uua b KH H

αα +

+=

−− +

Barotropic pressure gradient:

[ ] [ ] 1

1

12

js sNE

s sn o ok

nNE j n

g gP PA g g LVnx xAζ αη ζ αηρ ρ +

=

∂ + − ∂ + −+

∂ ∂ ∑

Vertical stress: ( )( )

( )( )

132 , 2 , 2

3 3 , ,2 2111

s sj k m j k m s

j k ms sm j j

u ua b KVnmH H

α α++ − + −

+=

− + −

Baroclinic pressure gradient: 3

,1 1 2

1 jNEs

n k mxnNE m nj k m

b InmAA = = + −

∑ ∑

Lateral stress: 3

,1 1

2

3 jNE s sj js

n k mjm nNE j n k m

u u InmE Ay yx xA σ σ

φ φ

= =+ −

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂ ∑ ∑l

Substituting these into Eqs. (3.15) and (3.16), multiplying by t∆ and grouping velocities at time levels s+1 and s yields:

Page 44: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

44

( )

( ) ( )

( ) ( )

3 3 21 1 1, 2 , 1 , 2 , 1 1

1 1

23 3 3

13 , 2 , , , 2 , 1 , 2 ,1

1 1 1

2

1

1

sslip js s s

j k m k m j k m k m js km m j

s s s s j k m j k m j k m k m j k m k ms

m m mj

a b t Kt fu Inm v Inm u

H

a b t t fu KVnm u Inm v InmH

a b t

αα

α α

α

+ + ++ − + − + =

= =

++ − + − + −+

= = =

− ∆ − ∆ +

−+ ∆ = + ∆ −

− ∆ −−

∑ ∑

∑ ∑ ∑

( ) ( )

( ) ( )

23

3 , 2 , ,11

3

,1 1

2

,1, 1 ,

-1,

1

2

sslip j s s s

j j k m j k ms k smj j

NE j s ss s

k mn n nmNE nj n n k m

sj s s

kj k j ksj k k

K a btu u KVnmH H

t u u Inmu vAA yx

a b u t Inmw wH

σ σ

σ σ

α

∂ ∂

σ

+ −==

= =+ −

− − − ∆

∆ − + ∂∂

− ∂− ∆ + + ∂

∑ ∑

( ) ( )

( )

[ ] [ ]

,3, , 1

, 1

1

1

1

1

,1 2

2

2

2

o o

j

j

sj s s

kj k j k

k k

s ssx sxj j

s sj j k NV

s sNEs so on

kNE nj n

NEs

n kxnNE nj k m

uInmw w

t a b

H H

g gt P PA g g LVnx xA

t bAA

σ σσ

τ τρ ρ

ζ αη ζ αηρ ρ

+

+

+

+

=

+

=

= + −

∂ + ∂

∆ −+ +

∂ + − ∂ + −∆ − + ∂ ∂

∆−

∑3 3

,1 1 1

2

3 jNE s sj js

nm k mjm m nNE j n k m

t u uInm InmE Ay yx xA σ σ

φ φ

= = =+ −

∂ ∂ ∆ ∂ ∂ − + ∂ ∂∂ ∂ ∑ ∑ ∑l

(3.17)

Page 45: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

45

( )

( ) ( )

( ) ( )

3 3 21 1 1, 2 , 1 , 2 , 1 1

1 1

23 3 3

13 , 2 , , , 2 , 1 , 2 ,1

1 1 1

2

1

1

sslip js s s

j k m k m j k m k m js km m j

s s s s j k m j k m j k m k m j k m k ms

m m mj

sslip j

a b t Kt fv Inm u Inm v

H

a b t t fv KVnm v Inm u InmH

a b t

αα

α α

α

+ + ++ − + − + =

= =

++ − + − + −+

= = =

− ∆ + ∆ +

−+ ∆ = −∆ −

− ∆ −−

∑ ∑

∑ ∑ ∑

( ) ( )

( ) ( )

23

3 , 2 , ,11

3

,1 1

2

,1, 1 ,

-1, , 1

1

2

s s sj j k m j k ms k s

mj j

NE j s ss s

k mn n nmNE nj n n k m

sj js s

kj k j ksj k k k k

K a btv v KVnmH H

t v v Inmu vAA yx

a b v t Inmw wH

σ σ

σ σ

α

∂ ∂

σ

+ −==

= =+ −

+

− − − ∆

∆ − + ∂∂

− ∂− ∆ + + ∂

∑ ∑

( ) ( )

( )

[ ] [ ]

,3, , 1

1

1

1

1

3

,1 1 2

2

2

2

3

o o

j

j

ss s

kj k j k

s ssy syj j

s sj j k NV

s sNEs so on

knNE j n

NEs

n k mynm nNE NEj jk m k

vInmw w

t a b

H H

g gt P PA g g LVny yA

t t b InmAA A

σ σσ

τ τρ ρ

ζ αη ζ αηρ ρ

+

+

+

=

+

=

= = + −

∂ + ∂

∆ −+ +

∂ + − ∂ + −∆ − + ∂ ∂

∆ ∆− −

∑ ∑3

,1 1

2

jNE s sj js

n k mjm n n m

v v InmE Ay yx xσ σ

φ φ

= =+ −

∂ ∂ ∂ ∂ + ∂ ∂∂ ∂ ∑ ∑l

(3.18)

Page 46: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

46

Prior to obtaining the 3D velocity solution in ADCIRC, a complex velocity, q, is defined as

1q u iv where i≡ + ≡ −

and Eqs. (3.17) and (3.18) are rewritten so that the x momentum equation is the real part and the y momentum equation is the imaginary part of a single complex equation:

( )

( ) ( )

( ) ( )

3 3 21 1 1, 1 ,, 2 , 2 1 11 1

23 3 3

13 , , , 1 ,, 2 , 2 , 21

1 1 1

2

1

1

sslip js s s

k m k mj k m j k m js km m j

s s ss j k m k m k mj k m j k m j k ms

m m mj

s j

a b t Ki t fq q qInm Inm

H

a b t i t fq q qKVnm Inm InmH

a b t

αα

α α

α

+ + ++ − + − + =

= =

++ − + − + −+

= = =

− ∆ + ∆ +

−+ ∆ = − ∆ −

− ∆ −−

∑ ∑

∑ ∑ ∑

( ) ( )

( ) ( )

23

3 , ,, 211

3

,1 1

2

,1, 1 ,

-1, ,

1

2

slip s s s

j k mj j k ms skmj j

NE s sjs s

k mn n nmNE nj n n k m

sj s s

kj k j ksj

k k k k

K a btq q KVnmH H

t q q Inmu vAA yx

qa b t Inmw wH

σ σ

σ σ

α

∂ ∂

σ

+ −==

= =+ −

+

− − − ∆

∆ − + ∂∂

∂ −− ∆ + + ∂

∑ ∑

( ) ( )

( )

[ ] [ ]

,3, , 1

1

11

1 1

1

1

2

2

2

j

sj s s

kj k j k

s ss ssy sysx sxj j j j

s s s so o o oj j j j

k NV

s sNEs so on

knNE j n

NE j

qInmw w

t a b i

H H H H

g gt P PA g g LVnx xA

i t A

σ σσ

τ ττ τρ ρ ρ ρ

ζ αη ζ αηρ ρ

+

++

+ +

=

+

=

∂ +∂

∆ −+ + + +

∂ + − ∂ + −∆ − + ∂ ∂

∆−

[ ]

( )

1

1

3

,1 1 2

3

,1 1

2

2

3

j

j

j

ssNEss o on

kn

n

NEs s

n k myxn nm nNE j k m

s sNEj js

n k mjm nNE j n k m

g gPPA g g LVny y

t ib b InmAA

t q qInmE A

y yx xA σ σ

ζ αηζ αη ρρ

φ φ

+

=

= = + −

= =+ −

∂ + −∂ + − + ∂ ∂

∆− +

∂ ∂ ∆ ∂ ∂ − + ∂ ∂∂ ∂

∑ ∑

∑ ∑l

(3.19)

Page 47: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

47

Re-arranging and consolidating terms yields the form of the 3D momentum equations solved in ADCIRC:

( ) ( )( )

( )( ) [ ]

23 3

1 11 , 3 , ,, 2 , 21

1 1

2 11 1

3

1 ,, 2 , 21

, ,

1

1 1

s s sk m j k mj k m j k ms

m mj

sslip sj

js kj

sk mj k m j k m

m

kjj k j

a bi t f tq qInm KVnmH

a b t K + q

H

i t f t ladvec lstress bcpgq Inm

tt vadvec btpg LVn

α α

α

α

+ ++ − + −+

= =

++ =

+ − + −=

−+ ∆ + ∆

− ∆

= − ∆ − − ∆ + +

− − ∆ −∆

∑ ∑

( )( ) ( )

( )

2

3 1

11

1 1

11

2

sslips sj

jsk kj

s ss ssy sysx sxj j j j

s s s so o o oj j j j

k NV

a b t Kt vstress q

H

t a bi

H H H H

αα

τ ττ τρ ρ ρ ρ

=

++

+ +

=

− ∆ − −− ∆

∆ −+ + + +

(3.20)

where,

( ) ( ) ( ) ( )

( )

,1

, ,1 ,3, 1 , , , 1

-1, , 1

,1

1

2 2

1

NE s sjs s

j k n n nnNE j n n k

s sj js s s s

j k k kj k j k j k j ksj

k k k k

s sj k n yxn n

nNE j k

q qladvec u vAyxA

q qa b vadvec Inm Inmw w w wH

bcpg ib bAA

σ σ

σ σ σ σ

∂ ∂

σ σ

=

− +

+

=

≡ + ∂∂

∂ ∂ − ≡ + + + ∂ ∂

≡ +

[ ] [ ]

[ ] [ ]

1

11

12

j

j

NE

s ss so o

NEn

j s snNE j s so o

n

g gP Px xg Abtpg

A g gP Piy y

ζ αη ζ αηρ ρ

ζ αη ζ αηρ ρ

+

+=

∂ + − ∂ + − + ∂ ∂ ≡ ∂ + − ∂ + − + +

∂ ∂

Page 48: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

48

( ),

1

23

, , ,, 21

3 s NE s sjj j j

nj kn nNE j k

ss sj k j k mj k ms

mj

E q qlstress A

y yx xA

a b qvstress KVnmH

σ σ

φ φ

=

+ −=

∂ ∂∂ ∂≡ + ∂ ∂∂ ∂

−≡

l

Eq. (3.20) has a matrix structure, although due to the specific formulation that was used to obtain this equation, the matrix is uncoupled in the horizontal direction and is tri-diagonal in the vertical direction. Thus, Eq. (3.20) is solved separately for each horizontal node j. Symbolically, Eq. (3.20) can be written as:

rMq F=

where,

r

M complex tridiagonal matrixq complex solution vector for velocity

complex forcing vectorF

===

M consists of:

( ) ( ) ( )2

1 ,1 3 , ,111 1, 1

0

sk j ks

j

a bi t f t for kInm KVnmM k k H

α α+

−+ ∆ + ∆ ≠− =

( )( ) ( )( ) ( ) ( )

2

1 ,2 3 , ,21

22

1 ,2 3 , ,2 11

1

1 1

,

1 1

sk j ks

j

sslip js

k j k ssjj

for k

a bi t f t for kInm KVnmH

M k ka b t Ka bi t f t for kInm KVnm

HH

α α

αα α

+

++

=

− + ∆ + ∆ ≠

= − ∆− + ∆ + ∆ + =

( ) ( ) ( )2

1 ,3 3 , ,311, 1

0

sk j ks

j

a bi t f t for k NVInm KVnmM k k H

α α+

−+ ∆ + ∆ ≠+ =

for k NV

=

and Fr consists of:

Page 49: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

49

( )( ) [ ] ( )

( ) ( )

( )( )( )

3

1 ,, 2 , 22

3, ,

2

,

1 , 2 , 2

1 1

1 1

1

1 1

sk mj k m j k m

ms

k jj k j k

sslip j s

j ksj

sj k m j k m

r

i t f t ladvec lstress bcpgq Inm

t t vstress for kt vadvec btpg LVn

a b t Kq

H

i t f t ladvec lstrqkF

α

α

α

α

+ − + −=

+ − + −

− ∆ − − ∆ + +

= − − ∆ − − ∆ =∆

− ∆ − −

− ∆ − − ∆ +=

[ ] ( )

( )( ) [ ] ( )

( )

3

,1

3, ,

2

1 ,, 2 , 21

3, ,

1 1,

1 1

1

2j

k mm

sk jj k j k

sk mj k m j k m

ms

k jj k j k

ess bcpg Inm

t t vstress for k NVt vadvec btpg LVn

i t f t ladvec lstress bcpgq Inm

t t vstress for k NVt vadvec btpg LVn

t a b

α

α

α

=

+ − + −=

+

− − ∆ − − ∆ ≠∆

− ∆ − − ∆ + +

= − − ∆ − − ∆ =∆

∆ −+

11

1 1j j j

s ss ssy sysx sx

s s s so o o oj j j j

iH H H H

τ ττ τρ ρ ρ ρ

++

+ +

+ + +

Page 50: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

50

4.0 VERTICAL VELOCITY

The vertical component of velocity is obtained in ADCIRC by solving the 3D continuity equation

z z

w u vyz x

∂ ∂ ∂= − +

∂∂ ∂ (4.1)

for w after u and v have been determined from the solution of the 3D momentum equations. In Eq. (4.1), the subscript “z” has been added to the horizontal derivatives to emphasize that these derivatives are evaluated along level coordinate surfaces. Eq. (4.1) is solved subject to the free-surface and bottom kinematic boundary conditions:

s s sz z

ζ ζ ζ at z ζw u vt yx∂ ∂ ∂

= =+ +∂ ∂∂

(4.2)

b b bz z

h h at z -hw u vyx

∂ ∂= =− −

∂∂ (4.3)

where us, vs, ws are the velocity components at the free surface (z=ζ) and ub, vb, wb are the velocity components at the bottom (z=-h) assuming a slip condition is applied there.

Eq. (4.1) is discretized in horizontal space as:

, ,, j jjz z

u vwyz x

φ φφΩ Ω Ω

∂ ∂∂ = − −∂∂ ∂

(4.4)

The horizontal integration utilizes Rule 1 for the left side and Rule 2 for the right side (these rules are described in APPENDIX - BASIC CALCULATIONS ON LINEAR TRIANGLES). After multiplication by 3 NE jA , Eq. (4.4) becomes:

1

1 NE jj

nNE j n z zn n

u vwAAz yx

∂ ∂ ∂=

= − + ∂ ∂∂

∑ (4.5)

Eq. (4.5) is discretized over the vertical using a simple finite-difference for the left side and centering the right side:

Page 51: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

51

, , 1

11 1

12

NE jj k j k

nNE j nk k z zz zn nn nk k

u v u vw wAA y yx xz z

∂ ∂ ∂ ∂−

=−−

− = − + + + − ∂ ∂∂ ∂ ∑ (4.6)

Eq. (4.6) can be written in terms of the stretched coordinate system as:

, , 1

1

12

n n k

jk

jn nk

jk

jn nkj k j k

nNE jjk k

u vyx

ua H a bx a b x H

va H a by a b y Ha bw w

AAH

σ σ

∂ ∂

ζ σσ

ζ σ

σ σ−

− + ∂∂

∂ ∂ − ∂ − + + ∂∂ − ∂

∂ ∂ − ∂ − + + ∂∂ − ∂ − −=

1

1

1

1

1

n n k

jk

jn nk

jk

jn nk

u vyx

ua H a bx a b x H

va H a by a b y H

σ σ

σ

∂ ∂

ζ σσ

ζ σσ

− + ∂∂

∂ ∂ − ∂ − + + ∂∂ − ∂

∂ ∂ − ∂ − + + ∂∂ − ∂

1

NE j

n=

(4.7)

The subscript “σ” indicates that the horizontal derivatives in (4.7) are evaluated along stretched coordinate surfaces. Discretizing the vertical derivative of horizontal velocity as:

, , 1

11

j j j k j k

k kk k

u u u uσ σ σ σ

−−

∂ ∂ − = = ∂ ∂ −

and re-arranging yields:

Page 52: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

52

( )( )

( )

1

1

1

, , 1 , , 1

2

1 2

jk k

n nn nk k

k k

nj k j k j k j kNE j n n

k

n

u v u vHa b y yx x

a Hw w u uAA x a b x

y

σ σσ σ

∂ ∂ ∂ ∂σ σ

σ σζ

σζ

− −

− − + + + − ∂ ∂∂ ∂ + − ∂ ∂ = + + + − ∂ − ∂

+ ∂

+ + ∂ ( )

1

1

, , 12

NE j

n

k

j k j kn

a Hv v

a b y

σ

=

− ∂ − − ∂

∑ (4.8)

Eq. (4.3) is used to determine ,1jw ; Eq. (4.8) can then be solved recursively for k=2, 3, … up to the surface. (Notice that the vertical differences of horizontal velocity in Eq. (4.8) are evaluated at node j only.)

As discussed by Luettich et al. (2002) and Muccino et al. (1997), the result obtained for the vertical velocity at the free surface from Eq. (4.8), ,j k surfacew = , may not match the free surface boundary condition, ,j sw , as specified in Eq. (4.2). This discrepancy is due to error in local fluid mass conservation, (Luettich et al., 2002). ADCIRC attempts to optimally correct the vertical velocity obtained from Eq. (4.8) using an adjoint approach. This results in a correction to Eq. (4.8) that is linear over the depth:

( )2

, , ,,

22 1

f

ajoint correctedj k j s j k surfacej k

f

bWa bHw w w w W

H

σ

=

− + −= + − +

(4.9)

In Eq. (4.9), Wf weights the relative importance of satisfying continuity in the interior of the fluid vs satisfying the free surface boundary condition in the adjoint equation. Setting Wf =0 forces the corrected vertical velocity to exactly satisfy the free surface and bottom boundary conditions. Setting Wf to be large (e.g., Wf ~100) adds a uniform correction to the vertical velocity solution that is equal to half the surface boundary error. ADCIRC uses a default value of Wf =0.

Page 53: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

53

5.0 SPERHICAL COORDINATE FORMULATION

ADCIRC solves the spherical governing equations by transforming these equations into an equivalent set of equations in Cartesian coordinates using a standard cylindrical projection. Applying the hydrostatic and Bousinesque approximations and assuming the radius of the Earth is much greater than the thickness of the ocean, the 3D equations in spherical coordinates (λ,φ, z) are: (e.g., Haidvogel and Beckmann, 1999)

Continuity

( )cos1 1 2 0cos cos

vu w wuR R z R

φφ λ φ φ

∂∂ ∂∇ ⋅ = + + + =

∂ ∂ ∂r (5.1)

Horizontal Momentum

[ ] tancos

s o z

o

gdu g uvPfv b mdt R z R

λλ λ

ζ αηρ φτφ λ ρ∂ + − ∂

= − + − + + ∂ ∂ (5.2)

[ ] 2 tans zo

o

g udv g Pfu b mdt R z Rφ

φ φζ αηρ φτ

φ ρ∂ + − ∂

= − − + − + − ∂ ∂ (5.3)

where

( ) ( )2 22 2

, ,

cos

, ,

1 1 1 1, ,cos cos

6

zzz z

o o

R = 6.3782064x10 m, mean radius of the Earth= longitude latitude

d u v wdt t R R z

u vE Ez z

u u v vm m E E E E

R RR R

φλ

λ φ

λ φ

φ λ φττ

ρ ρ

λ λ φ φ λ λ φφ φ

∂ ∂ ∂ ∂= + + +∂ ∂ ∂ ∂

∂ ∂=

∂ ∂

∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ≡ + + ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ l l l l

( ) ( ), ,cos

o o

z zo o

g gdz dzb b R Rζ ζ

λ φ

φ

ρ ρρ ρφ λ φρ ρ

− −∂ ∂≡

∂ ∂∫ ∫

and other variables are as defined in Section 3.

Using a standard, orthogonal cylindrical projection centered at (λo, φo):

Page 54: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

54

( )coso ox=Ry R

λ φλφ

= (5.4)

Derivatives are evaluated using the chain rule:

cos ox y= + =R

x y xx y= + =R

x y y

φλ λ λ

φ φ φ

∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∂ ∂

Substituting for the derivatives in the spherical coordinate system with those in the Cartesian system gives a transformed set of spherical equations:

Continuity

tan 2 0pu v w v wu S x y z R R

φ∂ ∂ ∂∇ ⋅ = + + + + =

∂ ∂ ∂r (5.5)

Horizontal Momentum

[ ] tans o zxx xp

o

gdu uvPfv g S b mdt x z Rζ αηρ φτ

ρ∂ + − ∂

= − + − + + ∂ ∂ (5.6)

[ ] 2 tans zyoy y

o

g udv Pfu g b mdt y z R

ζ αηρ φτρ

∂ + − ∂= − − + − + − ∂ ∂

(5.7)

where

coscos

op spherical coordinate correction factorS

φφ

≡ = (5.8)

Page 55: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

55

( ) ( )

2 2

, ,

, ,

, ,

p

zyzxz z

o o

p px y

o ox y p z z

o o

d u v wSdt t x y z

u vE Ez z

u u v vS Sm m E E E Ex x y y x x y y

g dz g dzb b S x yζ ζ

ττρ ρ

ρ ρρ ρρ ρ

∂ ∂ ∂ ∂= + + +∂ ∂ ∂ ∂

∂ ∂=

∂ ∂

∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ ≡ + + ∂ ∂ ∂ ∂ ∂ ∂ ∂ ∂ − −∂ ∂

≡∂ ∂∫ ∫

l l l l

A simple scaling analysis suggests that it may be permissible to drop the final two terms in Eq. (5.5) and the final terms in Eqs. (5.6) and (5.7), provided we avoid the regions near the poles where tan φ approaches infinity. This limitation is consistent with the singularity at the poles inherent in the original equations, Eqs. (5.1) - (5.3), and in the cylindrical mapping. Thus it does not appear to impose significant additional restrictions on the applicability of the governing equations.

Dropping these terms simplifies the transformed spherical governing equations to:

Continuity

0pu v wu S x y z∂ ∂ ∂

∇ ⋅ = + + =∂ ∂ ∂

r (5.9)

Horizontal Momentum

[ ]s o zxp x xp

o

gu u u u Pu v w fv g SS b mt x y z x z

ζ αηρ τρ

∂ + − ∂ ∂ ∂ ∂ ∂+ + + − = − + − + ∂ ∂ ∂ ∂ ∂ ∂

(5.10)

[ ]s zyop y y

o

gv v v v Pu v w fu gS b mt x y z y zζ αηρ τ

ρ∂ + − ∂ ∂ ∂ ∂ ∂

+ + + + = − + − + ∂ ∂ ∂ ∂ ∂ ∂ (5.11)

These equations are identical to their Cartesian counterparts with the exception that spatial derivatives with respect to the x coordinate direction are multiplied by the spherical coordinate correction factor, Sp, defined in Eq. (5.8). Consequently, Eqs. (5.9) - (5.11) comprise a generalized set of equations that allows ADCIRC to function using either a Cartesian horizontal grid (by setting Sp = 1) or a longitude, latitude horizontal grid (by converting the longitude and latitude values into equivalent linear coordinate values, Eq. (5.4), and evaluating Sp, Eq. (5.8)).

Page 56: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

56

The velocity in Eqs. (5.9) - (5.11) is aligned with the original coordinate reference frame (e.g., for the spherical coordinates (u, v, w) are aligned with (λ,φ, z)) and therefore it is not necessary to transform the velocities to a different coordinate system.

Vertical integration of Eqs. (5.9) - (5.11) is identical to integration of the Cartesian equations. Thus, the two-dimensional, vertically-integrated equations are identical to their Cartesian counterparts, except that spatial derivatives with respect to the x coordinate direction are multiplied by Sp.

Page 57: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

57

6.0 LATERAL BOUNDARY CONDITIONS

Elevation specified boundary condition –ADCIRC 2DDI and 3D

An elevation specified boundary condition is implemented by zeroing out all off diagonal terms in the row corresponding to each elevation boundary node in the GWCE, Eq. (1.17), and setting the on diagonal term in that row equal to the root mean square value of all of the other diagonal terms in the GWCE matrix (to maintain matrix conditioning). The right side vector entry corresponding to each elevation specified boundary node is set equal to the specified elevation multiplied by the root mean square value mentioned previously. Symmetry is maintained in the left side matrix by zeroing out the off diagonal terms in the column corresponding to each elevation boundary node. To allow this, each off diagonal term in the column corresponding to an elevation boundary node is multiplied by the elevation boundary value and then subtracted from the right side vector of the corresponding equation.

Specified flux boundary condition –ADCIRC 2DDI

ADCIRC allows the specification of boundary conditions consisting of normal flux per unit width (e.g., zero flux across land boundary segments and nonzero flux across river boundary segments). These normal fluxes can be applied as either natural or essential boundary conditions and the user may specify whether the tangential velocity along these boundaries is set to zero or computed assuming free slip along the boundary. The specified normal flux per unit width is inserted into the boundary integral term that appears in the right side of the GWCE, Eq. (1.17), at each normal flux boundary node. (The convention used in ADCIRC for inputting normal flux per unit width is that flux into the domain is positive and flux out of the domain is negative. Therefore, the sign must be changed on the normal flux prior to using it in the GWCE since the derivation of this equation assumes that a positive flux is in the direction of the outward pointing normal.) If the normal flux is applied as a natural boundary condition, no modifications are made to the momentum equations. If the normal flux is applied as an essential boundary condition, the depth-average normal velocity, UN, is forced to be equal to the normal flux per unit width divided by the local depth and multipled by –1 (to maintain the convention that UN is positive in the direction of the outward pointing normal). Further details of the implementation of the essential normal flux boundary condition in ADCIRC are presented below.

At any node in the horizontal, the momentum equations solved in ADCIRC 2DDI have the structure:

1 2

2 1

x

y

U FAUV AUVV FAUV AUV

−=

(6.1)

where AUV1, AUV2 are the matrix entries computed from the finite element assembly process, and Fx, Fy comprise the right side forcing vector. At flux specified boundary nodes, the

Page 58: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

58

equations are rotated into a normal - tangential coordinate system. The normal and tangential velocities, UN and UT, are defined as the dot product of the velocity vector and the normal and tangential unit vectors, ( )ˆ ,x yN NN = and ( )ˆ ,x yT T T= :

x y T

x y N

UT VT UUN VN U

+ =

+ = (6.2)

( N and T are defined in the APPENDIX.) At specified normal flux boundary nodes the y-momentum equation in (6.1) is replaced by the expression for the normal velocity in (6.2) and the x-momentum equation is replaced by the tangential momentum equation formed by multiplying the x-momentum equation (6.1) by Tx and adding the y-momentum equation (6.1) multiplied by Ty. Since Tx = Ny and Ty = -Nx (see APPENDIX), the resulting system is:

1 2 2 1y x y x x yy x

x y N

UAUV N AUV N AUV N AUV N N NF FVN N U

− − − −=

(6.3)

The left side matrix in (6.3) does not have the symmetry of the original equations, (6.1). This can be recovered by adding the tangential momentum equation to the normal equation multiplied by AUV2 and dividing the result by AUV1:

2

1

Nx yy xy x

x yN

AUV UN NF FUN NAUVVN NU

+− − =

(6.4)

For the case that the tangential flux is also specified (e.g., equal to zero), the right side of the first equation in (6.4) is replaced by UT.

Zero normal velocity gradient boundary condition – ADCIRC 2DDI (version 42.05)

A zero normal velocity gradient boundary condition is implemented by replacing the momentum equations at specified boundary nodes with equations that enforce the no-normal velocity gradient condition. The computed velocity field is then used to determine a normal flux across the boundary and this normal flux is used in the boundary flux integral in the GWCE at the next time step.

The no normal velocity gradient is enforced in ADCIRC using two different approaches. The first approach (boundary condition type 40) defines a fictitious node inside the domain for each boundary node. Each fictitious node is located on the inward pointing normal to the boundary a distance away from the corresponding boundary node equal to the distance of the furthest neighbor from that boundary node (see Figure 6.1). At each time step the velocity is computed

Page 59: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

59

at each node in the domain other than the zero normal velocity gradient boundary nodes. Next, the velocity is interpolated in space to each fictitious node. Finally, the velocity at each zero normal gradient boundary node is set equal to the velocity at the corresponding fictitious node. The distance to the fictitious node (d in Figure 6.1) is selected so that the fictitious node lies outside of the layer of elements immediately adjacent to the boundary. This way the velocity at the fictitious node can be interpolated without knowing the velocity at any adjacent zero normal velocity gradient nodes.

The second approach (boundary condition type 41) for enforcing the no normal velocity gradient in ADCIRC is by imposing the conditions

0

0

UNVN

∂=

∂∂

=∂

(6.5)

at the boundary nodes. This can be expressed in terms of U, V, and N as:

Figure 6.1 Schematic of the configuration used to determine the velocity at a zero normal velocity gradient boundary node. The velocity at the boundary node is set equal to the interpolated velocity at a fictitious node that is a distance d away from the boundary node where d is the distance to the furthest neighbor from that boundary node.

Page 60: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

60

0

0

x y

x y

U U UN NN x y

V V VN NN x y

∂ ∂ ∂= + =

∂ ∂ ∂∂ ∂ ∂

= + =∂ ∂ ∂

(6.6)

Applying a Galerkin weighted residual formulation with linear basis functions to Eq. (6.6) yields:

1 1

3 3 3 3

1 1 1 1 1 1

, ,

1 03 6

,

j j

n n n

j j

x yj j

NE NE

x y x yj j jn n

NE NEn i i

x i y i x i i y i in i i n i i

x j

U UN Nx y

U U U Ud d dN N N Nx y x y

A N U N U N U b N U ax y

VN x

φ φ

φ φ φ

φ φ

φ

= =Ω Ω Ω

= = = = = =

∂ ∂+

∂ ∂

∂ ∂ ∂ ∂= Ω + Ω = + Ω ∂ ∂ ∂ ∂

∂ ∂ = + = + = ∂ ∂

∂∂

∑ ∑∫ ∫ ∫

∑ ∑ ∑ ∑ ∑ ∑

1 1

3 3 3 3

1 1 1 1 1 1

,

1 03 6

j j

n n n

j j

y j

NE NE

x y x yj j jn n

NE NEn i i

x i y i x i i y i in i i n i i

VN y

V V V Vd d dN N N Nx y x y

A N V N V N V b N V ax y

φ

φ φ φ

φ φ

= =Ω Ω Ω

= = = = = =

∂+

∂ ∂ ∂ ∂= Ω + Ω = + Ω ∂ ∂ ∂ ∂

∂ ∂ = + = + = ∂ ∂

∑ ∑∫ ∫ ∫

∑ ∑ ∑ ∑ ∑ ∑

(6.7)

Multiplying Eq. (6.7) by the constant 6 and rearranging, gives the final, spatially discretized version of Eq. (6.6)used in ADCIRC:

( )

( )

3

1 1

3

1 1

0

0

j

j

NE

x i y i in i

NE

x i y i in i

N b N a U

N b N a V

= =

= =

+ =

+ =

∑ ∑

∑ ∑ (6.8)

If Eq. (6.8) is solved at only time level s+1, it requires the construction and solution of matrix problems for the U and V velocity components. To avoid this Eq. (6.8) is split between time levels s+1 and s. Assuming that each element attached to a boundary node is numbered so that node 1 corresponds to the boundary node and nodes 2 and 3 correspond to the remaining nodes in the element, Eq. (6.8) can be written as:

Page 61: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

61

( )

( )

3

1 211

1 11

3

1 211

1 11

j

j

j

j

NEs

x i y i in is

NE

x yn

NEs

x i y i in is

NE

x yn

N b N a UU

N b N a

N b N a VV

N b N a

= =+

=

= =+

=

+ = −+

+ = −+

∑ ∑

∑ ∑

(6.9)

Eq. (6.9) allows the velocity at each boundary node to be determined independently of the velocity at the adjacent boundary nodes, although it introduces a potentially undesirable time lag into the solution.

Radiation boundary condition on velocity – ADCIRC 2DDI

A radiation boundary condition on velocity (boundary condition type 30) is implemented by specifying a relationship between the normal velocity and the elevation field along the boundary. The most common of this type of boundary condition is a Sommerfield radiation condition. Normal velocities computed at a radiation boundary and the corresponding normal fluxes are then inserted into the boundary integral term that appears in the right side of the GWCE, Eq. (1.17).

Specified flux boundary condition –ADCIRC 3D

ADCIRC allows the specification of boundary conditions consisting of normal flux per unit width (e.g., zero flux across land boundary segments and nonzero flux across river boundary segments). These normal fluxes can either be applied as natural or essential boundary conditions and the user may specify whether the tangential velocity along these boundaries is set to zero or computed assuming free slip along the boundary. The specified normal flux per unit width is inserted into the boundary integral term that appears in the right side of the GWCE, Eq. (1.17), at each normal flux boundary node. (The convention used in ADCIRC for inputting normal flux per unit width is that flux into the domain is positive and flux out of the domain is negative. Therefore, the sign must be changed on the normal flux prior to using it in the GWCE since the derivation of this equation assumes that a positive flux is in the direction of the outward pointing normal.) If the normal flux is applied as a natural boundary condition, no modifications are made to the momentum equations. In this case the momentum equations will try to generate an appropriate vertical distribution of velocity over the depth, although vertical integration of this velocity may not exactly match the specified normal boundary flux. If the normal flux is applied as an essential boundary condition, the depth-average normal velocity, UN, is forced to be equal to the normal flux per unit width divided by the local depth and multipled by –1 (to maintain the convention that UN is positive in the direction of the outward pointing normal). In this case

Page 62: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

62

ADCIRC assumes the normal velocity is distributed uniformly over the depth. This is probably not a good assumption if the normal velocity is nonzero! If a free slip tangential boundary condition is used, ADCIRC will attempt to compute a tangential velocity that is consistent with the specified normal velocity. Implementation of the essential normal flux boundary condition in ADCIRC is described below.

At any node in the horizontal, the momentum equations solved in the 3D version of ADCIRC have the structure:

rMq F= (6.10)

where, M is a complex tridiagonal matrix, q (= u + iv) is the complex solution vector for velocity, Fr is the complex forcing vector and recall that the real and imaginary parts of (6.10) correspond to the x and y momentum equations, respectively. Row k in matrix M consists of:

( )( )( )

1, 1 2, 1

1, 2,

1, 1 2, 1

, 1

,

, 1

k k

k k

k k

M k k Auv i Auv

M k k Auv i Auv

M k k Auv i Auv

− −

+ +

− = +

= +

+ = +

(6.11)

where:

( )2

,1 3 , ,111, 1

2, 1

1

0 1

sk j ks

k j

k

a bt for kInm KVnmAuv H for k

Auv

α+

− + ∆ ≠=

=

= 1 ,1 10 1

kt f for kInm for kα∆ ≠

=

( )( ) ( )

2

,2 3 , ,21

1, 22

,2 3 , ,2 11

1 ,22,

1

1

sk j ks

j

ksslip js

k j k ssjj

kk

a bt for kInm KVnmH

Auva b t Ka bt for kInm KVnm

HHt f Auv Inm

α

αα

α

+

++

− + ∆ ≠

= − ∆− + ∆ + =

= ∆ for all k

Page 63: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

63

( )2

,3 3 , ,311, 1

0

sk j ks

k j

a bt for k NVInm KVnmAuv H for k

α+

+

−+ ∆ ≠=

=

1 ,32, 1 0

kk

NV

t f for k NVInmAuv for kα

+

∆ ≠

=NV

=

At boundary nodes where normal flux is specified, the y-momentum equation is replaced by the equation for the normal velocity:

k x k y Nu N v N U+ = (6.12)

Because the vertical distribution of normal velocity is uniform, this applies locally at each node in the vertical. The x-momentum equation is replaced by the tangential momentum equation formed by multiplying the original x-momentum equation by Tx and adding the original y-momentum equation multiplied by Ty. Since Tx = Ny and Ty = -Nx (see APPENDIX), the resulting system is:

( ) ( )( ) ( )( ) ( )

1, 1 2, 1 1 2, 1 1, 1 1

1, 2, 2, 1,

1, 1 2, 1 1 2, 1 1, 1 1

Re Im

k y k x k k y k x k

k y k x k k y k x k

k y k x k k y k x k

r ry x

Auv N Auv N u Auv N Auv N v

Auv N Auv N u Auv N Auv N v

Auv N Auv N u Auv N Auv N v

N NF F

− − − − − −

+ + + + + +

− − +

+ − − +

+ − − +

= −

(6.13)

The left sides of (6.12) and (6.13) do not have the symmetry of the original momentum equations. This can be recovered by multiplying (6.12) by Auv2 at levels k-1, k, and k+1 and adding these to (6.13):

( )

1, 1 1 1, 1 1 1, 1,

1, 1 1 1, 1 1

2, 1 2, 2, 1Re Im

k y k k x k k y k k x k

k y k k x k

r ry x k k k N

Auv N u Auv N v Auv N u Auv N vAuv N u Auv N v

N N Auv Auv Auv UF F

− − − −

+ + + +

− +

− + −

+ −

= − + + +

(6.14)

Multiplying (6.12) by Auv1 at levels k-1, k, and k+1 and adding these together gives:

( )1, 1 1 1, 1 1 1, 1, 1

1, 1 1 1, 1 1 1, 1 1, 1, 1

k x k k y k k x k k y k

k x k k y k k k k N

Auv N u Auv N v Auv N u Auv N v

Auv N u Auv N v Auv Auv Auv U− − − − −

+ + + + − +

+ + +

+ + = + + (6.15)

Equations (6.14) and (6.15) can now be written in the form of (6.10):

Page 64: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

64

* *rM q F= (6.16)

where

( )( )( )

* **1, 1 2, 1

* **1, 2,

* **1, 1 2, 1

, 1

,

, 1

k k

k k

k k

M k k Auv i Auv

M k k Auv i Auv

M k k Auv i Auv

− −

+ +

− = +

= +

+ = +

*1, 1 1, 1

*2, 1 1, 1

*1, 1,

*2, 1,

*1, 1 1, 1

*2, 1 1, 1

yk k

xk k

yk k

xk k

yk k

xk k

Auv Auv N

Auv Auv N

Auv Auv N

Auv Auv N

Auv Auv N

Auv Auv N

− −

− −

+ +

+ +

=

=

=

=

=

=

( )( )

*2, 1 2, 2, 1

1, 1 1, 1, 1

Re Imr r ry x k k k N

k k k N

N N Auv Auv Auv UF F F

i Auv Auv Auv U

− +

− +

= − + + + + + +

For the case that the tangential flux is also specified (e.g., equal to zero), the x-momentum equation is replaced by.

k y k x Tu N v N U− = (6.17)

and the y-momentum equation is replaced by (6.12). This also generates a system of equations of the form of (6.16) where:

( )( )( )

*

* **1, 2,

*

, 1 0

,

, 1 0k k

M k k

M k k Auv i Auv

M k k

− =

= +

+ =

*1,

*2,

yk

xk

Auv N

Auv N

=

=

Page 65: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

65

*r T NiU UF = +

Zero normal elevation gradient boundary condition – ADCIRC 2DDI and 3D

A zero normal elevation gradient boundary condition could be implemented by replacing the GWCE equation corresponding to each zero normal elevation gradient boundary node with the equation:

0x yN Nn x yζ ζ ζ∂ ∂ ∂≡ + =

∂ ∂ ∂ (6.18)

where the normal unit vector, ( )ˆ ,x yN NN = is defined in the APPENDIX. Applying the Galerkin spatial discretization to Eq. (6.18) gives:

1

1

1

3 3

1 1

, , ,

3

16

j

n n

j

n n

j

x yj j j

NE

x yj jn

NE

x yj jn n n

NEn

x yn n n

x i y ii ii i

N Nn x y

d dN Nx y

d d N Nx y

A N Nx y

N b N a

ζ ζ ζφ φ φ

ζ ζφ φ

ζ ζφ φ

ζ ζ

ζ ζ

= Ω Ω

= Ω Ω

=

= =

∂ ∂ ∂≡ +

∂ ∂ ∂

∂ ∂= Ω + Ω

∂ ∂ ∂ ∂ = Ω + Ω ∂ ∂

∂ ∂ = + ∂ ∂

= +

∑ ∫ ∫

∑ ∫ ∫

∑ ∑1

0jNE

n=

=

(6.19)

Eq. (6.19) can be evaluated implicitly in time using Eq. (1.18). Multiplying through by the constant 6, yields a final set of discrete equations for the zero normal elevation gradient boundary condition.

3 3* 1 * 1

1 1 1

0jNE

s sx i y ii i

n i iN b N aζ ζ+ +

= = =

+ =

∑ ∑ ∑ (6.20)

One problem with applying this boundary condition is that it renders the GWCE left side matrix nonsymmetric. In contrast to the case of an elevation specified boundary condition where a straightforward manipulation restores matrix symmetry, there is no exact method for restoring the symmetry of this system. Consequently, this boundary condition has not been implemented in ADCIRC at the present.

Page 66: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

66

Radiation boundary condition on elevation – ADCIRC 2DDI/3D

A radiation boundary condition on elevation could be implemented by specifying a relationship between the normal flux and the elevation field along the boundary. The most common of this type of boundary condition is a Sommerfield radiation condition. A difficulty with applying any type of boundary condition imposed on the GWCE, is that it renders the left side matrix nonsymmetric and therefore is not supported in the present version of ADCIRC.

Page 67: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

67

7.0 BAROCLINIC PRESSURE GRADIENT CALCULATION NOTES

As presented previously, the baroclinic pressure gradient is defined by

( ) ( ),o o

x yz zo o

g dz g dzb bx yζ ζρ ρρ ρ

ρ ρ− −∂ ∂

≡ ≡∂ ∂∫ ∫

These terms are evaluated in ADCIRC in two steps. In the initial step, the 3D baroclinic pressure field is computed as:

( ) ( ) ( )( ) ( )

a aoT Tooz

o o o

g gH gHBPress(z) dz d da b a b

ζ

σ σ

ρ ρρ σ σρ σ σ

ρ ρ ρ−

≡ = − = −− −∫ ∫ ∫

where, density has been replace by the standard oceanographic “sigma t” variable

1000, 1000T To o ρ ρσ σ≡ − ≡ −

This should not be confused with the variable, σ, representing the dimensionless vertical coordinate system. In the second step, the horizontal baroclinic pressure gradients are computed as horizontal derivatives (in level or z coordinates) of the baroclinic pressure field.

,x yBPress BPressb bx y∂ ∂

≡ ≡∂ ∂

For any horizontal node j and vertical node k, ADCIRC computes these gradients at the vertical position of node k. This is accomplished for each element containing node j by vertically interpolating the baroclinic pressure field at the element vertices to the vertical position of node k and then computing the horizontal gradients directly.

Page 68: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

68

8.0 APPENDIX - BASIC CALCULATIONS ON LINEAR TRIANGLES

Consider the triangular finite element with vertices numbered 1-3, counter-clockwise around the element. Any variable, ϒ , can be expanded linearly within the element based on nodal values as:

3

1 2 31 2 31

i ii

φ φ φ φ=

= + + =ϒ ϒ ϒ ϒϒ ∑

where,

1 2 3

1 2 3

2 3 1 1 3 1 2 2 1 2 3 33 2 1 3 2 11 2 3

1 3 2 2 1 3 3 2 1

1

, ,, ,

; ;2 2 2

; ;

nodal values of at elemental verticies 1, 2, 3linear basis functions defined as:

x y x y x yy y y y y yx x b a x x b a x x b a A A A

a x x a x x a x xb

φ φ φ

φ φ φ

= ϒϒ ϒ ϒ=

− + + − + + − + += = =

= − = − = −

2 32 3 3 1 1 2

1 2 2 1

; ;

2

y y y y y yb bb a b aA elemental area

= − = − = −

−= =

Spatial derivatives are computed as:

3 3

1 1;i i

i ii i

x x y y

φ φ= =

∂ ∂∂ϒ ∂ϒ= =ϒ ϒ

∂ ∂ ∂ ∂∑ ∑

where,

;2 2

i ii ib a x A y Aφ φ∂ ∂

= =∂ ∂

Spatial integrations are computed using:

( ) ( )( )

! !2

2 !i j i je e

i ji jA

e edA Ae e

φ φ =+ +∫

If i j≠ and 1i je e= = , 12i j

A

AdAφ φ =∫ . If i j= and 1i je e= = , 2

6j j jA A

AdA dAφ φ φ= =∫ ∫ .

Page 69: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

69

Because linear basis and expansion functions are used, their derivatives are constant across an element and spatial integrations involving derivatives become:

, , 3 ,j j j

i iA A

AdA dAx y x y x yφ φ φ

φ φ∂ ∂ ∂

= =∂ ∂ ∂ ∂ ∂ ∂∫ ∫

ADCIRC uses both exact and lower order integrations (i.e., lumping). Horizontal spatial integrations used in the GWCE are presented in full in SECTION 1.0. Horizontal spatial integrations used in either the 2DDI (SECTION 2.0) or 3D (SECTION 3.0) momentum equations are summarized by the following integration rules:

Rule 1: (nodal lumping, applied to terms that do not contain spatial gradients)

1 1, 3

j j

n n

NE NENE j

j jj jjn n

Ad dφ φφΩ = =Ω Ω

≡ Ω = Ω =ϒ ϒ ϒϒ∑ ∑∫ ∫

Rule 2: (fully consistent, applied only to spatial gradient terms)

1 1 1,

, , 3, ,

j j j

n n

NE NE NEn

j jjn n nn n

Ad d

x y x yx y x yφ φφ

= = =Ω ΩΩ

∂ϒ ∂ϒ∂ϒ ∂ϒ≡ Ω = Ω = ∂ ∂ ∂ ∂∂ ∂ ∂ ∂ ∑ ∑ ∑∫ ∫

Rule 2a: (approximation to Rule 2, used in older versions of ADCIRC)

1 1,

3, 3 ,,

j jj

NE NEn NE

jn j n nn

A Ax y NE x yx y

φ= =Ω

∂ϒ ∂ϒ∂ϒ= ≈ ∂ ∂ ∂ ∂∂ ∂

∑ ∑

where,

1

j

n

NE

nNE jn

j

j

area of element nA

area of all elements containing node jAA

number of elements containing node jNEhorizontal weighting function, =1 at node j, =0 at all other nodes,

varies lin

φ

=

=

≡ =

=

=

early between adjacent nodes

Note, that the definition of the weighting function jφ reduces integration over the horizontal domain Ω to integration over only the NEj elements containing node j. Also, Rule 2 assumes a

Page 70: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

70

Galerkin finite element formulation in which the quantity being differentiated (ϒ in the integration rules described above) varies linearly within an element. Therefore, the spatial derivative is constant within an element and can be pulled out of the elemental integrations. Finally, Rule 2a is equal to Rule 2 for uniformly sized elements. It was implemented in early versions of ADCIRC-2DDI and is included in this document for posterity sake. It was removed from the code as of version XX.XX.

Page 71: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

71

The component of a vector quantity, ϒr

, ( ),x y≡ϒ ϒ ϒr

, in any direction can be computed as the dot product of the vector quantity and the unit vector in the specified direction. In ADCIRC this is done at boundary nodes, where the horizontal velocity field may be rotated into components that are normal and tangential to each boundary node or where the elevation gradient normal to the boundary may be specified.

If a node is on the interior of a boundary (i.e., it is not the end node where two different types of boundaries meet), unique normal and tangential directions are defined as shown in the figure below.

The normal and tangential components ( ),N Tϒ ϒ of vector ϒr

are:

ˆ

ˆN x yx y

T x x y y

N NN

T T T

= ≡ +ϒ ⋅ϒ ϒ ϒ

= ≡ +ϒ ⋅ϒ ϒ ϒ

r

r

Definition figure for normal and tangential directions at boundary node 2, provided that this node does not mark the end of one boundary type and the beginning of another. In this situation the normal direction is defined to be perpendicular to the line connecting nodes 1 and 3. The ADCIRC grid file requires boundary nodes to be specified with the domain interior on the left as one progresses along the boundary.

Page 72: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

72

and the normal and tangential spatial derivatives of a scalar function, ϒ , are:

x y

x y

N NN x y

T TT x y

∂ϒ ∂ϒ ∂ϒ= +

∂ ∂ ∂∂ϒ ∂ϒ ∂ϒ

= +∂ ∂ ∂

The unit vectors, N and T , are:

( ) ( )cos sin

cos 90 sin 90x y

x y

N N

T T

α α

α α

= =

= − = −

Since 90β α= + , the unit vectors can be written more conveniently as:

( ) ( )

( ) ( )

1 33 1

31 31cos 90 sin sin 90 cos

cos 180 cos sin 180 sin

x y

x yy x

y y x xN NL LN NT T

β β β β

β β β β

− −= − = = = − =− =

= − = − = = − = − = −

where ( )1 1, yx , ( )2 2, yx and ( )3 3, yx are the horizontal coordinates of nodes 1, 2 and 3 and

( ) ( )2231 3 1 3 1y yx xL ≡ +− − is the horizontal distance between nodes 1 and 3.

If a node is located where two different types of boundaries meet, two normal and tangential directions are defined for the node, one for each boundary, as shown in the figure below.

Definition figure for normal and tangential directions at boundary node 2, when this node marks the end of one boundary type and the beginning of another. In this situation two normal and two tangential directions are defined for node 2, one for computations pertaining to the boundary type to the right of node 2 (i.e., for

Page 73: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

73

In this case

1,2 1,21,21,2

1,2 1,21,21,2

2,3 2,32,32,3

2,3 2,32,32,3

ˆ

ˆ

ˆ

ˆ

x yx yN

x yx yT

x yx yN

x yx yT

N NN

T TT

N NN

T TT

= ≡ +ϒ ⋅ ϒ ϒϒ

= ≡ +ϒ ⋅ ϒ ϒϒ

= ≡ +ϒ ⋅ ϒ ϒϒ

= ≡ +ϒ ⋅ ϒ ϒϒ

r

r

r

r

and spatial derivatives are handled in an analogous way.

The unit vectors are:

1 22 11,2 1,21,2 1,2

21 21

1,2 1,21,2 1,2

2 33 22,3 2,32,3 2,3

32 32

2,3 2,32,3 2,3

sin cos

sin cos

x y

x yy x

x y

x yy x

y y x xN NL L

N NT Ty y x xN N

L LN NT T

β β

β β

− −= = =− =

= = −

− −= = =− =

= = −

where ( ) ( )2221 2 1 2 1y yx xL ≡ + −− and ( ) ( )22

32 3 2 3 2y yx xL ≡ +− − are the distances between nodes 1 and 2 and nodes 2 and 3, respectively.

Page 74: Formulation and Numerical Implementation of the 2D/3D ... · Formulation and Numerical Implementation of the 2D ... BASIC CALCULATIONS ON ... element formulation in which the basis

74

9.0 REFERENCES

Dresback, K.M., R.L. Kolar, J.C. Dietrich, in revision, On the form of the momentum equation for shallow water models based on the generalized wave continuity equation: conservative vs non-conservative,

Kolar, R.L., W.G. Gray, J.J. Westerink, R.A. Luettich, Jr., 1994. Shallow water modeling in spherical coordinates: equation formulation, numerical implementation and application. J. Hydraulic Res., 32(1):3-24.

Kolar, R.L. and W.G. Gray, 1990. Shallow water modeling in small water bodies. Proceedings of the 8th International Conference on Computational Methods in Water Resources, pp 39-44.

Haidvogel, D.B. and A. Beckmann, 1999. Numerical Ocean Circulation Modeling. Imperial College Press, London, 318p.

Muccino, J.C., W.G. Gray and M.G.G. Foreman, 1997. Calculation of vertical velocity in three-dimensional, shallow water equation, finite element models. Int. J. Numer. Methods Fluids, 25, 779-802.

Luettich, R.A., Jr., J.C. Muccino, M.G.G. Foreman, 2002. Considerations in the calculation of vertical velocity in three-dimensional circulation models, Journal of Atmospheric and Oceanic Technology, 19(12):2063-2076.