The TELEMAC-MASCARET system  trunk
bedload_interact.f
Go to the documentation of this file.
1 ! ***************************
2  SUBROUTINE bedload_interact
3 ! ***************************
4 !
5  &(ucmoy,tobw,tob,alphaw,fw,cf,uw,npoin,xmve,fcw)
6 !
7 !***********************************************************************
8 ! SISYPHE V6P1 21/07/2011
9 !***********************************************************************
10 !
11 !brief COMPUTES THE FRICTION COEFFICIENT UNDER
12 !+ WAVE AND CURRENT COMBINED ACTION.
13 !
14 !history C. VILLARET (LNHE)
15 !+ 01/10/2003
16 !+ V5P7
17 !+
18 !
19 !history C. VILLARET (LNHE)
20 !+ 23/09/2010
21 !+ V6P0
22 !+
23 !
24 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
25 !+ 13/07/2010
26 !+ V6P0
27 !+ Translation of French comments within the FORTRAN sources into
28 !+ English comments
29 !
30 !history N.DURAND (HRW), S.E.BOURBAN (HRW)
31 !+ 21/08/2010
32 !+ V6P0
33 !+ Creation of DOXYGEN tags for automated documentation and
34 !+ cross-referencing of the FORTRAN sources
35 !
36 !history C.VILLARET (EDF-LNHE), P.TASSI (EDF-LNHE)
37 !+ 19/07/2011
38 !+ V6P1
39 !+ Name of variables
40 !+
41 !
42 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43 !| ALPHAW |-->| ANGLE OF WAVES WITH OX
44 !| CF |-->| QUADRATIC FRICTION COEFFICIENT
45 !| FCW |<->| WAVE-CURRENT FRICTION FACTOR
46 !| FW |-->| WAVE FRICTION FACTOR
47 !| NPOIN |-->| NUMBER OF POINTS
48 !| TOB |<->| BED SHEAR STRESS (TOTAL FRICTION)
49 !| TOBW |-->| WAVE INDUCED SHEAR STRESS
50 !| UCMOY |-->| MEAN CURRENT
51 !| UW |-->| ORBITAL WAVE VELOCITY
52 !| XMVE |-->| FLUID DENSITY
53 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54 !
55  USE interface_sisyphe,ex_bedload_interact => bedload_interact
56  USE bief
58  IMPLICIT NONE
59  !
60  ! 2/ GLOBAL VARIABLES
61  ! -------------------
62  !
63  TYPE(bief_obj), INTENT(IN) :: UCMOY, TOBW, TOB, ALPHAW
64  TYPE(bief_obj), INTENT(IN) :: FW, CF, UW
65  INTEGER, INTENT(IN) :: NPOIN
66  DOUBLE PRECISION, INTENT(IN) :: XMVE
67  TYPE(bief_obj), INTENT(INOUT) :: FCW
68  !
69  ! 3/ LOCAL VARIABLES
70  ! ------------------
71  !
72  INTEGER :: I
73  DOUBLE PRECISION :: TX, LOGF
74  DOUBLE PRECISION :: CSAL,CSAL1, CSAL3
75  DOUBLE PRECISION :: AX, MX, NX, BX, PX, QX
76  DOUBLE PRECISION :: UCW2, TAUCW,ZERO
77 !
78  INTRINSIC max
79 !
80 !======================================================================!
81 !======================================================================!
82 ! PROGRAM !
83 !======================================================================!
84 !======================================================================!
85 !
86  zero = 1.d-6
87 !
88  DO i = 1, npoin
89 !
90  tx = tob%R(i) / max((tob%R(i) + tobw%R(i)),zero)
91 !
92  logf = log10(2.d0*max(fw%R(i),zero)/max(cf%R(i),zero))
93  csal = abs(cos(alphaw%R(i)))
94  csal1 = csal**0.82d0
95  csal3 = csal**2.70d0
96 !
97  ax = -0.07d0 + 1.87d0*csal1 + (-0.34d0 - 0.12d0*csal1)*logf
98  mx = 0.72d0 - 0.33d0*csal1 + ( 0.08d0 + 0.34d0*csal1)*logf
99  nx = 0.78d0 - 0.23d0*csal1 + ( 0.12d0 - 0.12d0*csal1)*logf
100 !
101  bx = 0.27d0 + 0.51d0*csal3 + (-0.10d0 - 0.24d0*csal3)*logf
102  px = -0.75d0 + 0.13d0*csal3 + ( 0.12d0 + 0.02d0*csal3)*logf
103  qx = 0.89d0 + 0.40d0*csal3 + ( 0.50d0 - 0.28d0*csal3)*logf
104 !
105  IF(tx.LE.zero) THEN
106  taucw = tobw%R(i)
107  ELSEIF(tx.LT.1.d0) THEN
108  taucw = (1.d0 + bx * tx**px * (1.d0 - tx)**qx)*tob%R(i)*tx
109  & + (1.d0 + ax * tx**mx * (1.d0 - tx)**nx)*tobw%R(i)
110  ELSE
111  taucw = tob%R(i)
112  ENDIF
113 !
114  ucw2 = (ucmoy%R(i)**2 + 0.5d0 * uw%R(i)**2) * xmve
115  fcw%R(i) = taucw / max(ucw2,1.d-10)
116 !
117  ENDDO
118 !
119 !======================================================================!
120 !======================================================================!
121 !
122  RETURN
123  END
subroutine bedload_interact(UCMOY, TOBW, TOB, ALPHAW, FW, CF, UW, NPOIN, XMVE, FCW)
Definition: bief.f:3