The TELEMAC-MASCARET system  trunk
suspension_miles_gaia.f
Go to the documentation of this file.
1 ! ********************************
2  SUBROUTINE suspension_miles_gaia
3 ! ********************************
4 !
5  &(hn,npoin,hmin,fdm,fd90,xwc,csratio)
6 !
7 !***********************************************************************
8 ! GAIA
9 !***********************************************************************
10 !
12 !found in HR Wallingford report: SR75.
13 !
14 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 ! average concentration
23 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 !
25  USE bief
26  USE declarations_gaia, ONLY: ks,u2d,v2d,dt
28  IMPLICIT NONE
29 !
30 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
31 !
32  TYPE(bief_obj), INTENT(IN) :: HN
33  INTEGER, INTENT(IN) :: NPOIN
34  DOUBLE PRECISION, INTENT(IN) :: FDM,FD90,XWC,HMIN
35  TYPE(bief_obj), INTENT(INOUT) :: CSRATIO
36 !
37 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
38 !
39  INTEGER :: I
40  DOUBLE PRECISION :: UB,USTARS,RB,BETAS
41  DOUBLE PRECISION :: SFBETA(npoin),AUX,RRTPI
42  DOUBLE PRECISION :: FVINV
43  DOUBLE PRECISION :: DZ,TAU,TAU_SQ,UCR
44 !
45  DOUBLE PRECISION BIEF_ERF
46  EXTERNAL bief_erf
47 !
48  INTRINSIC sqrt,exp
49 ! INTRINSIC ERF
50 !
51 !======================================================================!
52 !======================================================================!
53 ! PROGRAM !
54 !======================================================================!
55 !======================================================================!
56 !
57 ! COMPUTE CONSTANTS:
58 !
59  DOUBLE PRECISION PI
60  pi = 4.d0 * atan( 1.d0 )
61  rrtpi = 1.d0/sqrt(pi)
62  fvinv = 1.d0/xwc**2
63 !
64 ! DMK MOD 03/05/2011
65 !
66 ! MODIFYING SUSPENDED LOAD TO BE LIKE SANDFLOW AND ALSO TO TAKE
67 ! LAG INTO CONSIDERATION VIA A BETA COMPUTATION.
68 !
69  DO i=1,npoin
70 !
71  IF(fdm.LT.500.e-6) THEN
72 ! UCR = 0.19D0*(D50**0.1D0)*LOG10(4.D0*(HN%R(I)/FDM)) ! SANDFLOW
73  ucr = 0.19d0*(fdm**0.1d0)*log10(4.d0*hn%R(i)/fd90) ! CORRECT
74  ELSE
75 ! UCR = 8.5D0*(D50**0.6D0)*LOG10(4.D0*(HN%R(I)/D50)) ! SANDFLOW
76  ucr = 8.5d0*(fdm**0.6d0)*log10(4.d0*hn%R(i)/fd90) ! CORRECT
77  ENDIF
78 !
79  ub = sqrt(u2d%R(i)**2+v2d%R(i)**2)
80 !
81  IF(hn%R(i).GT.hmin.AND.ub.GT.ucr) THEN ! STOP PROBLEMS WITH LOW VELOCITIES
82  ustars = 1.3d0*ub*sqrt(ks%R(i)/8.d0)
83  rb = xwc*15.d0/ustars
84 ! THIS IS DIFFERENT BETWEEN MILES’ PAPERS DUE TO TYPO IN DEF OF R
85  betas = rb/(1.d0-exp(-rb))
86 ! ACTUAL EQUATION FROM MILES (1981) [1]
87  dz = (1.d0/6.d0)*0.4d0*hn%R(i)*ustars
88 ! USE WITH [1]
89  tau = xwc*sqrt(dt/(4.d0*dz))
90  tau_sq = tau**2
91 ! EQ. (27) NOTE THIS IS ALREADY INTEGRATED WITH RESPECT TO TIME (DTS)
92 !
93 ! IF COMPILER ALOWS...
94 ! AUX=ERF(TAU)
95 ! AND IF NOT...
96  aux=bief_erf(tau)
97 !
98  sfbeta(i)=
99  & dz*fvinv*betas*(4.d0*tau_sq*(1.d0+tau_sq)*(1.d0-aux)
100  & + aux - 2.d0*tau*(1.d0+2.d0*tau_sq)*exp(-tau_sq)*rrtpi)
101 !
102  IF(sfbeta(i)*xwc/hn%R(i).GT.1.d0) sfbeta(i)=1.d0/(xwc*hn%R(i))
103 ! DIVIDE BACK THROUGH BY DT AS WE WILL INTEGRATE UP WRTT LATER
104  csratio%R(i)=sfbeta(i)/dt ! FOR USE WITH EQ. (27)
105 ! NOTE WE RECORD BETA_S (PROFILE PARAMETER) I.E. THE RATIO OF REF LEVEL CONC
106 ! TO DEPTH AVERAGED CONC THIS WILL THEN BE USED IN SUSPENSION_SANDFLOW.F:
107 ! NB: STORED IN T14
108  ELSE
109  sfbeta(i) = 1.d0
110  csratio%R(i) = 1.d0
111  ENDIF
112 !
113  ENDDO
114 !
115 ! END BETA FACTOR COMPUTATION
116 !
117 !======================================================================!
118 !======================================================================!
119 !
120  RETURN
121  END
type(bief_obj), target u2d
Components of depth-averaged velocity.
type(bief_obj), target v2d
double precision, target dt
Time step It may be different from the one in TELEMAC because of the morphological factor...
type(bief_obj), target ks
Total bed roughness.
subroutine suspension_miles_gaia(HN, NPOIN, HMIN, FDM, FD90, XWC, CSRATIO)
Definition: bief.f:3