Chapter 3 STWAVE final report [wp5]

advertisement
3. Comments to some mathematical expressions and program code
This
section
of
the
report
describes
mathematical
inconsistencies found in several equations and accompanying text
in Resio's report. Some possible "bugs" in the program code are
also described. Resio should consider to revise his STWAVE2 code
in light of these comments.
1.
Resio's equation 2.2 is not dimensionally correct. It should
read:
c=
dr
c
=|
|  (x, y) .
dt  (x, y)
(3.1)
dr
1, where s 2 is the distance along the wave ray, is a nondimends
sional vector and can not have the dimension of a celerity.
2.
Resio's equation 2.3 is not dimensionally correct and has a
wrong sign. It states that a scalar is equal to a vector! It
should read:

1  |c|
=s
|c| n
where
n3
is
the
distance
along
a
(3.2)
line
of
equal
wave
phase
positive towards increasing value of |c| 4.
3.
The signs of the two last terms in Resio's equation 2.6 and
that for the last term in equation 2.7 appear to be incorrect. In
addition, the implicit different interpretation of the symbol E 5
is confusing. In Resio's equation 2.7, E 6 is the spectral density
in
k 7-space,
while
in
equation
26
2.10
it
represents
spectral
density in (f, ) 8-space. In this report , F 9 denotes the spectral
density in
k 10-space
while
E 11 in the
(f, ) 12-space. Using a
right-hand coordinate system as shown in Resio's Figure 2.1, we
may assume that
F = F(x, y, k x , k y , t) 13 and that the rate of change of F 14 with respect
to time can be expressed:
dF F F dx F dy F d k x F d k y
=
+
+
+
+
dt
t x dt y dt  k x dt  k y dt
(3.3)
Wave energy propagates at the group velocity, thus dx/dt = c g x 15 and
dy/dt = c g y 16. In the absence of currents and when the bottom slope
gradient is sufficiently small, the two latter terms on the right
hand side of (3,3) can be neglected. (see Eq.:(4.25)). Therefore,
in a region with negligible sources and sinks dF/dt = 0 17, so (3.3)
becomes:
F F
F
+
cg x +
cg y = 0 ,
t x
y
(3.4)
showing that in a frame of reference following the path followed
F/t = 0 18. The integral form of
by the group velocity, we have
this expression can be written as:
F(x, y,t + t) = F(x - x, y - y,t)
(3.5)
where
x =
t+t
c
gx
t
and
27
d t
(3.6)
y =
t+t
c
gy
d t .
(3.7)
t
Now, consider a wave orthogonal propagating from point A to B
as sketched in Figure 3. For fixed time = t 19, Taylor expansion to
the first-order gives:
F(x, y, t)
x
x
F(x - x, y,t)
F(x - x, y - y, t) = F(x - x, y, t) y .
y
F(x - x, y,t) = F(x, y,t) -
(3.8)
(3.9)
Inserting the last expression into (3.5), we get the expression
comparable to Resio's equation 2.7:
F(x, y,t + t) = F(x - x, y,t) -
F(x - x, y,t)
y ,
y
(3.10)
but with a different sign for the last term. Inserting (3.8) in
(3.10) gives an expression comparable to Resio's equation 2.6:
F(x, y,t + t) = F(x, y,t) -
F(x, y, t)
F(x - x, y, t)
x y .
x
y
(3.11)
This expression has positive sign for the two last terms in
Resio's expression. Expressions similar to (3.10) and (3.11) valid
in (f, ) 20-space is obtained by substituting (see Eq.:4.27)
F = E cg /(2k)= E c cg /(2 ) 21 .
These sign-errors do not result in errors in STWAVE2, because
the equations in the code deviate extensively from the formal
expression derived by Resio in equation 2.7, which is elaborated
further and ending in Resio's equation 2.18. This inconsistency
28
was discussed in chapter 2.2 of this report.
4.
The first equation on page 8 in Resio's report makes no
sense. The correct expression for t 22 is given by an expression
like:
(3.12)
where cg and  23 both are functions of x 24.
5.
On page 13, in the explanation of equation 2.18, the dummy
indicies j 25 and i 26 are interchanged. The sentence following the
equation should read:
... from the
i 27'th angle and
k 28'th
frequency band ... ... into the j 29'th angle and k 30'th frequency
band ... .
6.
Resio's equations 2.20 through 2.22 are questionable. The
stated assumptions are that over a short distance s 31 along a
wave orthogonal ray, we have a small incremental change in the
wave angle and that | c | 32 is constant over a grid-step in the xdirection.
The
ray
angels
 33
are
defined
relative
to
the
direction of the local - c 34 which in Figure 3 is set equal to
zero degrees.
Abernathy and Gilbert (1975) show that assuming
c 35 constant in an area is equivalent to assuming the curvature
 = 1/ r c 36 is constant in the same area. Then, using Figure 3 we
can
readily
see
that
the
angle
 CBO = + 37 since the line
B B 38 is a normal to the line B C 39 and the line B O 40 is a
normal to the tangent of the ray at point
angle  DAO =  42 since the line
29
B 41. Similarly, the
A D 43 is a normal to the line
A A 44 and the line 45 is a normal to the tangent of the ray at
point A 46. Thus, the angle  AOB =  47 and the arc s = r c  48.
Now, consider ( sin  ) /r 49, by definition:
( sin  )
=
r
lim

OC
rc
= lim
r 0
=
1
rc
r 0
-
sin (  +  ) - sin (  )
r
OD
rc
r
= lim
r 0
cos  = -
1 x
r c r
(3.13)
|  c|
sin  cos 
c
in which  = - | c | sin /c 50 has been used. This yields:

| c |
=sin 
r
c
which
is
| c | /c 51
different
is
assumed
from
Resio's
constant
(3.14)
equation
(3.14)
has
2.21.
as
However,
solution
if
Resio's
expression 2.22:
 = 2 tan -1 [ tan(  0 /2) exp (-
1
| c | r)] .
c
(3.15)
This solution does not correspond to the stated assumption of
constant | c | 52, and Resio uses a variation of the curvature for
constant
c 53. The consequences of this inconsistency require
further investigation of the model and the code.
7.
On page 36, Resio discusses the diffractive effect of waves
30
with an artificial wave amplitude envelope similar to a bell
function. The shape given by the formula in his equation 2.43 is
incomplete. It would have helped the reader if this equation has
been in the similar format as equation 2.42:
= A0 (x - x, y) -  ; for y < - L y /2 , 









A(x - x, y) =  = (x - x, y) +  (1 + cos k y) ; for A0
L y /2 < y < L y /2 , 
y
2







= A0 (x - x, y) -  ; for y > L y /2 ,

(3.16)
where k y = 2/ L y
The diffraction due to such amplitude spreading functions are
shown in Fig 2.12 in Resio's report. However the chosen values of
 54 and
A0 55 are not presented and the graphs do not coincide
with the stated values of L y 56. The results determine when the
contribution of phase-dependent interference patterns is negligible and Resio should review this.
8.
There are several misprints in Resio's equations in chapter
4.2. The corrected expressions are:
Equation 4.5:
D
c
c
= [ sin (  ) a - cos(  ) a ]/ ca .
Ds
x
y
Equation 4.8:
31
(3.17)
D
D tan(  )
= cos2 (  )
Dr
Dr
where
tan(  ) =
(3.18)
c g r sin  + v
.
c g r cos  + u
Equation 4.9:
E( f a , )s = E( f a ,  )
f r s c ga s -s ca s -s
| J |-1
f r s -s c ga s ca s
where
(3.19)
ca = c + U cos  ; c ga = c g + U cos  ;
| J |=
 
; U =| u | .

It is of the utmost importance to recognize that the angle in
(3.19) above is for the wave orthogonal and not for the ray as
written in Resio's report. In order to be consistent with the
notations in Resio's chapter 2,  57 ought to be replaced by  58.
9.
The sequence of angle definition in STWAVE2 seems wrong, presumed
the spectral angle distribution is as sketched in the figure
32
below,
and
the
hatched
area
represents
the
total
angle
band
modeled (here: epsang=15 and na=5).
line
246
text
770 epsang=epsang*radc
247
ainc=(pi-2.*epsang)/(na-1)
253
aa=(l-1)*ainc - pi2 + epsang
256
ang(l)=aa
A correct line 247 is:
ainc = (pi-2.*epsang)/na
10.
In the code the following statements
are found:
line
text
308
read (8,*,end=99999) idd,u,udir,fm
370
read (8,*,end=99999) idate,fm
These variables are not included in the example file in Resio's
Table 6.1.
11.
In a test run with wave flume data (Hs=0.053m, Tp=1.5m and
depth between 1.05m and 0.1m), STWAVE2 found that the waves were
exceeding the breaking criteria when the waveheight was normalized
to wave height equal to 1. This did not occur when the analysis
were performed without normalization. This is an error that must
be corrected. Ref. the following code lines in STWAVE:
line text
404
c*
405
c*
normalize spectra
33
406
zzz=1/16.
407
do 57 j=1,nj
408
sum2=0.
409
do 58 k=1,nf
410
do 56 l=1,na
411
e(1,j,k,l)=e(1,j,k,l)*zzz/sum
412
sum2=sum2+e(1,j,k,l)*dfrq*ainc
and
763
c*
limit the spectrum to the FRF spectral shape
764
c*
for the S.Z. region.
765
c*
frequency band is checked for excedence of
766
c*
allowable limit.
767
c*
768
c*
769
c*
Each band in the 1-D
Excess is truncated.
compute breaking criteria parameters
770
dd = dep(i,j)
771
if (dd .lt. 0.001) go to 2300
772
Hoverh = hfld(j) / dd
773
wlo
774
hoverLo= dd / wlo
775
limit
776
= g / fma(1,j)**2
= 0.243*(hoverLo)**(-0.176)
c*
777
if (Hoverh .ge. limit) then
778
c*
779
c*
Hmo of spectrum exceeds breaking criteria
34
780
c*
781
12.
print *,'Limiting i = ',i,' j = ',j
The argument (xxx) for the exponential function in Resio's
equation 2.22 is multiplied with 0.5 in the code.
line
1088
text
c
thp2 is new angle defined as function of old
angle (thp1) and the
1089
c
1090
c
functional rate of change of the angle (xxx)
1091
22 xxx=0.5*gradc(j,k)*dxinc/(c(1,j,k)*cos(ang(l))+0.-
001)
1092
13.
thp2(l)=2.0*atan(tan(0.5*thp1)*exp(-xxx))
There may be a possible error in the following statements in
the subroutine STDCUR. As they are, it seems like nonsense.
program line
text
1463
cax=ca(1,j,k,l)
1464
if (cax.lt.0.7*ca(1,j,k,l)) cax=0.7*ca(1,j,k,l)
1465
c
note:
This check is for upstream land points and
stability.
1466
14.
z2=cax/ca(2,j,k,l)
Shouldn't i be replaced with i-1 for curd in the expression
1469
cga1=cgr(1,j,k,l)+curs(i-1,j)*cos(alp-curd(i,j))
stated in subroutine STDCUR?
15.
Table 6.3 in Resio's report should be revised. Input h and i
35
are
erroneously
declared.
Also
definition.
36
j
(epsang)
needs
an
improved
Download