The TELEMAC-MASCARET system  trunk
cvsp_alt_gaia.f
Go to the documentation of this file.
1 ! ***************************************
2  DOUBLE PRECISION FUNCTION cvsp_alt_gaia
3 ! ***************************************
4 !
5  &(j, formula)
6 !
7 !***********************************************************************
8 ! GAIA V8P1 05/12/2017
9 !***********************************************************************
10 !
13 !
14 !
18 !
23 !
28 !
33 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37 !
38  USE bief
40 !
42  IMPLICIT NONE
43 !
44 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
45 !
46  INTEGER, INTENT(IN) :: J
47  INTEGER, INTENT(IN) :: FORMULA
48 !
49 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
50 !
51  INTEGER I
52  DOUBLE PRECISION RHO, RHO_S, G, D50,DMAX, FMAX, TAUC, TAUB
53  DOUBLE PRECISION PON, SUMME
54  DOUBLE PRECISION DSTAR, DENS
55 !
56 !-----------------------------------------------------------------------
57 !
58 ! ATTENTION !
59 !
60 !-----------------------------------------------------------------------
61 !
62 ! EXPECTS GRAIN CLASSES TO BE SORTED IN ASCENDING ORDER
63 ! UNLIKE SISYPHE!!!
64 ! IMPROVE IT!!!
65 !
66 !-----------------------------------------------------------------------
67 !
68 !
69 !-----------------------------------------------------------------------
70 ! CHECK ASCENDING ORDER OF CLASSES D50
71 !-----------------------------------------------------------------------
72  DO i=1,nsicla-1
73  IF(dcla(i).GE.dcla(i+1)) THEN
74  WRITE(lu,*) 'STOPPING!!!! GRAIN CLASSES HAVE TO BE',
75  & ' IN ASCENDING ORDER!!! FOR DYNAMIC ALT'
76  CALL plante(1)
77  stop
78  ENDIF
79  ENDDO
80 !-----------------------------------------------------------------------
81 ! BASICS
82 !-----------------------------------------------------------------------
83  g = grav
84  rho = xmve
85  rho_s = xmvs0(1)
86  pon = xkv0(1)
87  d50 = acladm%R(j)
88 !-----------------------------------------------------------------------
89 ! DMAX - NEW APPROXIMATION: DMAX = D99 / BEFORE DMAX = MAX(DCLA)
90 !-----------------------------------------------------------------------
91  fmax = 0.99d0
92  summe = avail(j,1,1)
93  dmax = 0.d0
94  IF (summe.GE.fmax) THEN
95  dmax = dcla(1)
96  ELSE
97  DO i=2,nsicla
98  IF(avail(j,1,i).GT.0.d0) THEN
99  summe = avail(j,1,i) + summe
100  IF(summe.GE.fmax.AND.dmax.EQ.0.d0) THEN
101  dmax = dcla(i-1) + ( (dcla(i)-dcla(i-1)) /
102  & avail(j,1,i)) * (fmax-(summe-avail(j,1,i)))
103  ENDIF
104  ENDIF
105  ENDDO
106  ENDIF
107 !DMAX = MAX(DCLA(1), DMAX)
108  IF (dmax.LE.0.d0.AND.summe.GT.zero) THEN
109  WRITE(lu,*)'UHM DMAXERROR'
110  DO i=1,nsicla
111  WRITE(lu,*)'DMAXERROR',j,i,dcla(i),avail(j,1,i),summe
112  WRITE(lu,*)zf%R(j)-zr%R(j)
113  ENDDO
114  stop
115  ENDIF
116 !-----------------------------------------------------------------------
117 ! D90 - ONLY FIRST APPROXIMATION!
118 !-----------------------------------------------------------------------
119  fmax = 0.90d0
120  summe = avail(j,1,1)
121  d90 = 0.d0
122  IF (summe.GE.fmax) THEN
123  d90 = dcla(1)
124  ELSE
125  DO i=2,nsicla
126  IF(avail(j,1,i).GT.0.d0) THEN
127  summe = avail(j,1,i) + summe
128  IF(summe.GE.fmax.AND.d90.EQ.0.d0) THEN
129  d90 = dcla(i-1) + ( (dcla(i)-dcla(i-1)) /
130  & avail(j,1,i)) * (fmax-(summe-avail(j,1,i)))
131  ENDIF
132  ENDIF
133  ENDDO
134  ENDIF
135 !D90 = MAX(DCLA(1), D90)
136  IF (d90.LE.0.d0.AND.summe.GT.zero) THEN
137  WRITE(lu,*)'UHM D90ERROR', d90, fmax, summe
138  DO i=1,nsicla
139  WRITE(lu,*)'D90ERROR',j,i,dcla(i),avail(j,1,i),summe
140  ENDDO
141  WRITE(lu,*)'D90ERROR'
142  ENDIF
143 !-----------------------------------------------------------------------
144 ! SHEAR PARAMETERS
145 !-----------------------------------------------------------------------
146 ! HERE ARE ENOUGH POSSIBILITIES FOR IMPROVEMENT
147 ! THE INITIATION OF MOTION STARTS WITH THE SMALLEST GRAIN
148 ! LEEDS TO BIGGER ACTIVE LAYER THICKNESSES
149  tauc = ac(1)*((xmvs0(1)-xmve)*g*d50)
150  taub = tob%R(j)
151 !
152 !-----------------------------------------------------------------------
153 ! NEW ACTIVE LAYER THICKNESS
154 !-----------------------------------------------------------------------
155 !
156  SELECT CASE (formula)
157 !-----------------------------------------------------------------------
158 ! HUNZIKER & GUENTHER
159 !-----------------------------------------------------------------------
160 !
161  CASE (1)
162  cvsp_alt_gaia = 5.d0 * dmax
163 !
164 !-----------------------------------------------------------------------
165 ! FREDSOE & DEIGAARD 1992
166 !-----------------------------------------------------------------------
167 !
168  CASE (2)
169  cvsp_alt_gaia = 2.d0 * taub / (g*(rho_s-rho))
170  & / tan(phised/180.0d0*pi) / (1.d0-pon)
171 !
172 !-----------------------------------------------------------------------
173 ! VAN RIJN 1993
174 !-----------------------------------------------------------------------
175 !
176  CASE (3)
177  cvsp_alt_gaia = 0.d0
178  IF(tauc.GT.0.d0) THEN
179  IF(taub.GT.tauc) THEN
180  dens = (rho_s - rho) / rho
181  dstar = d50*(g*dens/vce**2)**(1.d0/3.d0)
182  cvsp_alt_gaia = 0.3d0*(dstar**0.7d0)*
183  & ((taub-tauc)/tauc)**0.5*d50
184  ENDIF
185  ENDIF
186 !-----------------------------------------------------------------------
187 ! WONG 2006
188 !-----------------------------------------------------------------------
189  CASE (4)
190  IF((taub/(rho_s-rho)/g/d50).LT.0.0549d0) THEN
191  cvsp_alt_gaia = 0.d0
192  ELSE
193  cvsp_alt_gaia=5.0d0*d50*((taub/(rho_s-rho)/g/d50)
194  & -0.0549d0)**0.56d0
195  ENDIF
196 !-----------------------------------------------------------------------
197 ! MALCHEREK 2003
198 !-----------------------------------------------------------------------
199  CASE (5)
200  cvsp_alt_gaia = 0.d0
201  IF (tauc.GT.0) THEN
202  cvsp_alt_gaia = d90 / (1.d0-pon) * taub/tauc
203  ENDIF
204 !-----------------------------------------------------------------------
205 ! SISYPHE
206 !-----------------------------------------------------------------------
207  CASE (6)
208  cvsp_alt_gaia = 3.d0 * d50
209 !-----------------------------------------------------------------------
210 ! CONSTANT FROM CAS FILE
211 !-----------------------------------------------------------------------
212  CASE (0)
214 !-----------------------------------------------------------------------
215  CASE DEFAULT
216  WRITE(lu,*)'NO VALID CHOICE FOR "C-VSM DYNAMIC ALT MODEL"'
217  WRITE(lu,*)'MUST BE BETWEEN 0 AND 6'
218  CALL plante(1)
219 !
220  END SELECT
221 !-----------------------------------------------------------------------
222 ! MINIMUM ALT VALUE = SMALLEST GRAIN SIZE
223 !-----------------------------------------------------------------------
224  cvsp_alt_gaia = max(cvsp_alt_gaia, dcla(1))
225 !
226 !-----------------------------------------------------------------------
227 !
228  RETURN
229  END FUNCTION cvsp_alt_gaia
type(bief_obj), target acladm
Mean diameter of active-layer.
type(bief_obj), target tob
Bed shear stress [n/m2].
double precision pi
Pi.
double precision elay0
Wanted active layer thickness; ELAYO is a target value for ELAY, but ELAY may be lower than ELAY0 if ...
type(bief_obj), target zr
Non erodable (rigid) bottom elevation.
double precision xmve
Water density (from steering file of T2D or T3D)
double precision vce
Water viscosity: it is defined here because the viscosity set in TELEMAC2D or TELEMAC3D may not b the...
double precision, dimension(nsiclm) xmvs0
Sand density.
double precision zero
Parameter used for clipping variables or testing values against zero.
double precision, dimension(nsiclm), target dcla
Sediment diameter for each class It is only relevant for non-cohesive sediments. For the bedload...
double precision, target phised
Friction angle of the sediment.
integer, target nsicla
Number of sediment classes of bed material (less than NISCLM)
double precision grav
Gravity acceleration.
double precision, dimension(nlaymax), target xkv0
Initial porosity by layers.
double precision function cvsp_alt_gaia(J, FORMULA)
Definition: cvsp_alt_gaia.f:7
double precision, dimension(nsiclm), target ac
Critical shields parameter.
double precision, target d90
Sediment diameter D90, for sand when only.
type(bief_obj), target zf
Bottom elevation.
double precision, dimension(:,:,:), allocatable, target avail
Sediment fraction for each layer, class, point.
Definition: bief.f:3