The TELEMAC-MASCARET system
trunk
sources
artemis
spe.f
Go to the documentation of this file.
1
! *****************************
2
DOUBLE PRECISION
FUNCTION
spe
3
! *****************************
4
!
5
&(f)
6
!
7
!***********************************************************************
8
! ARTEMIS V8P0 Jan 2019
9
!***********************************************************************
10
!
11
!brief COMPUTES THE ENERGY DENSITY BASED ON GODA.
12
!
13
!reference "RANDOM SEA AND DESIGN OF MARITIME STRUCTURES",
14
!+ UNIVERSITY OF TOKYO PRESS - 1985
15
!
16
!history F. LEPEINTRE (LNH)
17
!+ 01/06/1993
18
!+ V2P0
19
!+
20
!
21
!history D. AELBRECHT (LNH)
22
!+ 04/06/1999
23
!+ V5P1
24
!+
25
!
26
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
27
!+ 13/07/2010
28
!+ V6P0
29
!+ Translation of French comments within the FORTRAN sources into
30
!+ English comments
31
!
32
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
33
!+ 21/08/2010
34
!+ V6P0
35
!+ Creation of DOXYGEN tags for automated documentation and
36
!+ cross-referencing of the FORTRAN sources
37
!
38
!history N.DURAND (HRW)
39
!+ Nov 2017
40
!+ V7P4
41
!+ Test on Fp/F changed to avoid computing exponential of too small
42
!+ negative a number (i.e. too small an exponential)
43
!+ Reverted back to original : Jan 2019
44
!
45
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
!| F |-->| FREQUENCY FOR WHICH ENERGY DENSITY IS CALCULATED
47
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
!
49
USE
interface_artemis
, ex_spe =>
spe
50
USE
declarations_special
51
USE
declarations_artemis
, ONLY
:
fp
,
gam
,
delta
52
IMPLICIT NONE
53
!
54
DOUBLE PRECISION
F,SIGMA
55
!
56
INTRINSIC
exp
57
!
58
!-----------------------------------------------------------------------
59
!
60
IF
(f.LE.
fp
)
THEN
61
sigma = 0.07d0
62
ELSE
63
sigma = 0.09d0
64
ENDIF
65
!
66
! DELTA IS COMPUTED IN PERALE TO AVOID ESTIMATING WITH EVERY CALL TO SPE
67
!
68
IF
( f.GE.1.d-4*
fp
)
THEN
69
spe
=
delta
/f**5 * exp(-1.25d0*(
fp
/f)**4) *
70
&
gam
** ( exp( -0.5d0*( ( (f-
fp
)/(sigma*
fp
) ) **2 ) ) )
71
ELSE
72
spe
= 0d0
73
ENDIF
74
!
75
!-----------------------------------------------------------------------
76
!
77
RETURN
78
END
interface_artemis
Definition:
interface_artemis.f:11
declarations_special
Definition:
declarations_special.F:3
declarations_artemis::gam
double precision gam
Definition:
declarations_artemis.f:817
declarations_artemis::fp
double precision fp
Definition:
declarations_artemis.f:817
declarations_artemis::delta
double precision delta
Definition:
declarations_artemis.f:817
spe
double precision function spe(F)
Definition:
spe.f:7
declarations_artemis
Definition:
declarations_artemis.f:3