qbbj78.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\tomawac\qbbj78.f
00002 !
00048                      FUNCTION QBBJ78
00049 !                    ***************
00050 !
00051      &( B     , IQBBJ )
00052 !
00053 !***********************************************************************
00054 ! TOMAWAC   V6P1                                   23/06/2011
00055 !***********************************************************************
00056 !
00057 !
00058 !reference  BATTJES AND JANSSEN (1978) :
00059 !+                     "ENERGY LOSS AND SET-UP DUE TO BREAKING
00060 !+                      OF RANDOM WAVES". ICCE'78.
00061 !reference DINGEMANS (1983) :
00062 !+                     "VERIFICATION OF NUMERICAL WAVE PROPAGATION
00063 !+                      MODELS WITH FIELD MEASUREMENTS. CREDIZ
00064 !+                      VERIFICATION HARINGVLIET".
00065 !
00066 !
00067 !
00068 !
00069 !
00070 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00071 !| B              |-->| (H_RMS/H_MAX)
00072 !| IQBBJ          |-->| INDEX OF THE SLECTED COMPUTATION METHOD
00073 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00074 !
00075       IMPLICIT NONE
00076 !
00077 !.....VARIABLES IN ARGUMENT
00078 !     """"""""""""""""""""
00079       DOUBLE PRECISION QBBJ78, B
00080       INTEGER  IQBBJ
00081 !
00082 !.....LOCAL VARIABLES
00083 !     """""""""""""""""
00084       DOUBLE PRECISION F     , CB    , EPS   , QMAX  , QMIN  , Q0
00085       DOUBLE PRECISION B2    , EXPO
00086 !
00087 !
00088       EPS = 1.D-7
00089 !
00090       IF (B.GE.1.D0) THEN
00091         QBBJ78 = 1.D0
00092         RETURN
00093       ENDIF
00094 !
00095       IF(IQBBJ.EQ.0) THEN
00096 !       =========================
00097 !       SOLVES BY DICHOTOMY
00098 !       =========================
00099         QMIN  = 0.D0
00100         QMAX  = B
00101    10   CONTINUE
00102         QBBJ78 = (QMIN+QMAX)/2.D0
00103         F      = 1.D0 - QBBJ78 + B*B*DLOG(QBBJ78)
00104         IF (ABS(F).LT.EPS) RETURN
00105         IF (F.GT.0.D0) THEN
00106            QMAX = QBBJ78
00107         ELSE
00108            QMIN = QBBJ78
00109         ENDIF
00110         GOTO 10
00111 !
00112       ELSEIF(IQBBJ.EQ.1) THEN
00113 !       ======================================================
00114 !       EXPLICIT FORMULATION 1 (INSPIRED FROM CREDIZ VERSION-1)
00115 !       ======================================================
00116       CB = 0.5D0
00117         IF (B.GE.CB) THEN
00118           QBBJ78 = ((B-CB)/(1.D0-CB))**2
00119         ELSE
00120           QBBJ78 = 0.D0
00121         ENDIF
00122 !
00123       ELSEIF(IQBBJ.EQ.2) THEN
00124 !       ======================================================
00125 !       EXPLICIT FORMULATION 2 (INSPIRED FROM CREDIZ VERSION-2)
00126 !       ======================================================
00127         CB = 0.3D0
00128         IF (B.LT.CB) THEN
00129           QBBJ78 = 0.D0
00130         ELSEIF (B.LT.0.5D0) THEN
00131           B2     = B**2
00132           EXPO   = DEXP(-1.D0/B2)
00133           QBBJ78 = B2*EXPO/(B2-EXPO)
00134         ELSEIF (B.LT.0.9D0) THEN
00135           Q0     = (2.D0*B-1.D0)**2
00136           B2     = B**2
00137           EXPO   = DEXP((Q0-1.D0)/B2)
00138           QBBJ78 = Q0 - B2*(Q0-EXPO)/(B2-EXPO)
00139         ELSE
00140           QBBJ78 = (2.D0*B-1.D0)**2
00141         ENDIF
00142 !
00143       ELSEIF(IQBBJ.EQ.3) THEN
00144 !       ======================================================
00145 !       EXPLICIT FORMULATION 3 (INSPIRED FROM CREDIZ VERSION-3)
00146 !       ======================================================
00147         QBBJ78 = 2.4D0*B**7
00148 !
00149       ENDIF
00150 !
00151       RETURN
00152       END

Generated on Fri Aug 31 2013 18:12:58 by S.E.Bourban (HRW) using doxygen 1.7.0