The TELEMAC-MASCARET system
trunk
sources
tomawac
wnscou.f
Go to the documentation of this file.
1
! *****************
2
SUBROUTINE
wnscou
3
! *****************
4
!
5
&( ck2 , freq , depth )
6
!
7
!***********************************************************************
8
! TOMAWAC V6P1 29/06/2011
9
!***********************************************************************
10
!
11
!brief COMPUTES THE WAVE NUMBER.
12
!+ SOLVES THE DISPERSION EQUATION WITHOUT CURRENT.
13
!code
14
!+ 3 METHODS ARE USED DEPENDING ON THE VALUE OF K0*D
15
!+ (K0: WAVE NUMBER IN INFINITE DEPTH)
16
!+
17
!+ 3.2 5.6
18
!+ -----------------!--------------------!-----------------> K0*D
19
!+ ! !
20
!+ EXPLICIT METHODE ! ITERATIVE METHODE ! K=K0
21
!+ (HUNT 9TH ORDER) ! ! (INFINITE DEPTH)
22
!
23
!history M. BENOIT (EDF/DER/LNH)
24
!+ 07/02/95
25
!+ V1P0
26
!+
27
!
28
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
29
!+ 13/07/2010
30
!+ V6P0
31
!+ Translation of French comments within the FORTRAN sources into
32
!+ English comments
33
!
34
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
35
!+ 21/08/2010
36
!+ V6P0
37
!+ Creation of DOXYGEN tags for automated documentation and
38
!+ cross-referencing of the FORTRAN sources
39
!
40
!history G.MATTAROLO (EDF - LNHE)
41
!+ 29/06/2011
42
!+ V6P1
43
!+ Translation of French names of the variables in argument
44
!
45
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
!| CK2 |<--| WAVE NUMBER
47
!| DEPTH |-->| WATER DEPTH
48
!| FREQ |-->| DISCRETIZED FREQUENCY
49
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50
!
51
USE
declarations_tomawac
, ONLY
:
deupi
,
gravit
52
!
53
USE
interface_tomawac
, ex_wnscou =>
wnscou
54
IMPLICIT NONE
55
!
56
!.....VARIABLES IN ARGUMENT
57
! """"""""""""""""""""
58
DOUBLE PRECISION
,
INTENT(IN)
:: FREQ , DEPTH
59
DOUBLE PRECISION
,
INTENT(INOUT)
:: CK2
60
!
61
!.....LOCAL VARIABLES
62
! """""""""""""""""
63
INTEGER
I
64
DOUBLE PRECISION
:: P(9) , XK0 , XK0D
65
DOUBLE PRECISION
:: AUX , A , Y , YI , OM
66
!
67
DOUBLE PRECISION
,
PARAMETER
:: EPS = 0.0001d0
68
parameter( p = (/
69
& 0.66667d0,0.35550d0,0.16084d0,0.06320d0,0.02174d0,
70
& 0.00654d0,0.00171d0,0.00039d0,0.00011d0 /) )
71
!
72
!.....COMPUTES THE ANGULAR FREQUENCY (OM), K0 AND K0D
73
om=freq*
deupi
74
xk0=om**2/
gravit
75
xk0d=xk0*depth
76
!
77
!.....DETERMINES THE METHOD OF RESOLUTION DEPENDING ON THE VALUE OF XK0D
78
! ================================================================
79
!
80
IF
(xk0d.LE.3.2d0)
THEN
81
!
82
!.......EXPLICIT METHOD (HUNT 9TH ORDER)
83
!
84
y=xk0*depth
85
aux=1.d0
86
yi=1.d0
87
DO
i=1,9
88
yi=yi*y
89
aux=aux+p(i)*yi
90
ENDDO
! I
91
aux=y+1.d0/aux
92
ck2=om/sqrt(
gravit
*depth/aux)
93
!
94
ELSEIF
(xk0d.LE.5.6d0)
THEN
95
!
96
!.......ITERATIVE METHOD (FROM HUNT 9TH ORDER)
97
!
98
y=xk0*depth
99
aux=1.d0
100
yi=1.d0
101
DO
i=1,9
102
yi=yi*y
103
aux=aux+p(i)*yi
104
ENDDO
! I
105
aux=y+1.d0/aux
106
ck2=om/sqrt(
gravit
*depth/aux)
107
DO
108
a=ck2
109
ck2=xk0/tanh(a*depth)
110
IF
(abs(ck2-a)/ck2.LT.eps)
EXIT
111
ENDDO
112
!
113
ELSE
114
!
115
!.......APPROXIMATION OF INFINITE DEPTH
116
!
117
ck2=xk0
118
!
119
ENDIF
120
!
121
RETURN
122
END
declarations_tomawac
Definition:
declarations_tomawac.f:3
declarations_tomawac::deupi
double precision deupi
Definition:
declarations_tomawac.f:1298
wnscou
subroutine wnscou(CK2, FREQ, DEPTH)
Definition:
wnscou.f:7
declarations_tomawac::gravit
double precision gravit
Definition:
declarations_tomawac.f:1298
interface_tomawac
Definition:
interface_tomawac.f:5