friction_calc.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\friction_calc.f
00002 !
00079                      SUBROUTINE FRICTION_CALC
00080 !                    ************************
00081 !
00082      &(N_START, N_END, KFROT, NDEF, VK, GRAV,
00083      & KARMAN, CHESTR, DW_MESH, HC, VRES, CF)
00084 !
00085 !***********************************************************************
00086 ! TELEMAC2D   V6P1                                   21/08/2010
00087 !***********************************************************************
00088 !
00089 !
00090 !
00091 !
00092 !
00093 !
00094 !
00095 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00096 !| CF             |<--| ADIMENSIONAL FRICTION COEFFICIENT
00097 !| CHESTR         |-->| FRICTION PARAMETER
00098 !| DW_MESH        |-->| DISTANCE TO THE BOUNDARY
00099 !| GRAV           |-->| GRAVITY ACCELERATION
00100 !| HC             |-->| WATER DEPTH : MAX(H,HMIN)
00101 !| KARMAN         |-->| VON KARMAN'S CONSTANT
00102 !| KFROT          |-->| LAW USED FOR THE CALCULATION
00103 !| NDEF           |-->| DEFAULT'S MANNING
00104 !| N_START,N_END  |-->| STARTING AND ENDING POINT
00105 !| VK             |-->| KINEMATIC VISCOSITY
00106 !| VRES           |-->| RESULTANT VELOCITY
00107 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00108 !
00109       USE BIEF
00110 !
00111       IMPLICIT NONE
00112       INTEGER LNG,LU
00113       COMMON/INFO/LNG,LU
00114 !
00115 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00116 !
00117       INTEGER,          INTENT(IN)    :: N_START, N_END, KFROT
00118       DOUBLE PRECISION, INTENT(IN)    :: NDEF, VK, GRAV, KARMAN
00119       TYPE(BIEF_OBJ),   INTENT(IN)    :: CHESTR,DW_MESH,HC,VRES
00120       TYPE(BIEF_OBJ),   INTENT(INOUT) :: CF
00121 !
00122 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00123 !
00124       INTEGER                       :: I, ITER
00125       DOUBLE PRECISION, PARAMETER   :: TIERS = 1.D0/3.D0
00126       DOUBLE PRECISION, PARAMETER   :: SUR30 = 1.D0/30.D0
00127       DOUBLE PRECISION              :: UNORM, INLOG, AUX
00128       DOUBLE PRECISION              :: OLDUST, OLDCF
00129       DOUBLE PRECISION              :: RE, UST, DW, DWPLUS
00130       DOUBLE PRECISION              :: TERM1,TERM2
00131 !
00132 !=======================================================================!
00133 !=======================================================================!
00134 !                               PROGRAMME                               !
00135 !=======================================================================!
00136 !=======================================================================!
00137 !
00138       SELECT CASE (KFROT)
00139 !
00140 ! NO FRICTION
00141 ! -----------
00142 !
00143       CASE(0)
00144 !
00145         DO I = N_START, N_END
00146           CF%R(I) = 0.D0
00147         ENDDO
00148 !
00149 ! LAW OF HAALAND
00150 ! --------------
00151 !
00152       CASE(1)
00153 !
00154         DO I = N_START, N_END
00155           UNORM = MAX(VRES%R(I),1.D-6)
00156 !                       1.D-6: LAMINAR VISCOSITY OF WATER
00157           INLOG = (6.9D0*1.D-6/4.D0  /HC%R(I)/UNORM)**3
00158      &          + (CHESTR%R(I)/14.8D0/HC%R(I))**3.33
00159           INLOG = MIN(1.D0-1.D-6,INLOG)
00160           AUX   = -0.6D0*LOG(INLOG)/LOG(10.D0)
00161           CF%R(I) = 0.25D0 / AUX**2
00162         ENDDO
00163 !
00164 ! LAW OF CHEZY
00165 ! ------------
00166 !
00167       CASE(2)
00168 !
00169         DO I = N_START, N_END
00170           CF%R(I) = 2.D0*GRAV/(CHESTR%R(I)**2)
00171         ENDDO
00172 !
00173 ! LAW OF STRICKLER
00174 ! ----------------
00175 !
00176       CASE(3)
00177 !
00178         DO I = N_START, N_END
00179           CF%R(I) = 2.D0*GRAV/CHESTR%R(I)**2/HC%R(I)**TIERS
00180         ENDDO
00181 !
00182 ! LAW OF MANNING
00183 ! --------------
00184 !
00185       CASE(4)
00186 !
00187         DO I = N_START, N_END
00188           CF%R(I) = 2.D0*GRAV*(CHESTR%R(I)**2)/HC%R(I)**TIERS
00189         ENDDO
00190 !
00191 ! LAW OF NIKURADSE
00192 ! ----------------
00193 !
00194       CASE(5)
00195 !
00196 !       NOTE: 11.036 IS 30.D0/EXP(1.D0)
00197         DO I = N_START, N_END
00198           AUX=MAX(1.001D0,HC%R(I)*11.036D0/CHESTR%R(I))
00199           CF%R(I) = 2.D0 / (LOG(AUX)/KARMAN)**2
00200         ENDDO
00201 !
00202 ! LOG LAW OF WALL FOR VISCOUS FRICTION
00203 ! ---------------
00204 !
00205       CASE(6)
00206 !
00207         DO I = N_START, N_END
00208 !
00209           IF(VRES%R(I) < 1.0D-9) THEN
00210             CF%R(I) = 20.D0 ! RISMO2D = 10.D0 AND TELEMAC2D = 2*10.D0
00211           ELSE
00212 !
00213             DW = 0.33D0*DW_MESH%R(I)
00214 !
00215             IF (CHESTR%R(I) < 1.0D-9) THEN
00216 !
00217 ! ITERATIVE COMPUTATION OF FRICTION VELOCITY UST
00218 ! ----------------------------------------------
00219 !
00220               UST    = 100.0*VK/DW
00221               OLDUST = 0.D0
00222 !
00223               DO ITER = 1, 50
00224 !
00225                 IF (ABS((UST-OLDUST)/UST)<=1.0D-6) EXIT
00226 !
00227                 DWPLUS = DW*UST/VK
00228 !
00229                 IF (DWPLUS < 11.D0) DWPLUS = 11.D0
00230 !
00231                 OLDUST = UST
00232                 UST    = KARMAN*VRES%R(I) / LOG(9.D0*DWPLUS)
00233 !
00234               ENDDO
00235 !
00236             ELSE
00237               UST = KARMAN*VRES%R(I) / (LOG(DW/CHESTR%R(I))+8.5D0)
00238               RE  = CHESTR%R(I)*UST  / VK
00239 !
00240               IF (RE < 70.D0) THEN
00241 !
00242 ! ITERATIVE COMPUTATION OF FRICTION VELOCITY UST
00243 ! ----------------------------------------------
00244 !
00245                 OLDUST = 0.D0
00246 !
00247                 DO ITER = 1, 50
00248 !
00249                   IF (ABS((UST-OLDUST)/UST)<=1.0D-6) EXIT
00250 !
00251                   DWPLUS = DW*UST/VK
00252 !
00253                   IF (DWPLUS < 11.D0) DWPLUS = 11.D0
00254 !
00255                   RE     = CHESTR%R(I)*UST/VK
00256                   OLDUST = UST
00257 !
00258                   IF (RE < 3.32D0) THEN
00259                     UST = KARMAN*VRES%R(I) / LOG(9.D0*DWPLUS)
00260                   ELSE
00261                     UST = KARMAN*VRES%R(I)
00262      &                  / (  LOG(DW/CHESTR%R(I))
00263      &                     + 3.32D0*LOG(RE)/RE
00264      &                     + KARMAN*(8.5D0-9.96D0/RE))
00265                   ENDIF
00266                 ENDDO
00267               ENDIF
00268             ENDIF
00269 !
00270             DWPLUS = DW*UST/VK
00271 !
00272             IF (DWPLUS < 11.D0 ) THEN
00273               UST = 11.0*VK / DW
00274               UST = SQRT(VRES%R(I)*VK/DW)
00275             ENDIF
00276 !
00277           CF%R(I) = 2.D0*(UST**2) / (VRES%R(I)**2)
00278           ENDIF
00279         ENDDO
00280 !
00281 ! LAW OF COLEBROOK-WHITE
00282 ! ----------------------
00283 !
00284       CASE(7)
00285 !
00286         DO I = N_START, N_END
00287 !
00288           RE = 4.D0*VRES%R(I)*HC%R(I)/VK
00289 !
00290 ! THE ORIGINAL CONDITION FOR LAMINAR/TURBULENT FLOW
00291 ! COULD NOT BE HOLD (PROBLEMS DURING NR ITERATION):
00292 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00293 !
00294           IF(RE.GT.500.D0) THEN
00295 !
00296 ! TEST CONDITION: ROUGHNESS LESS THAN FLOW DEPTH
00297 ! ----------------------------------------------
00298 !
00299             IF(CHESTR%R(I) < HC%R(I)) THEN
00300 !             NDEF : DEFAULT MANNING'S N
00301               CF%R(I) = 2.D0*(NDEF**2)*GRAV/HC%R(I)**TIERS
00302             ELSE
00303               TERM1   = 4.4D0 / RE
00304               TERM2   = CHESTR%R(I) / 14.84D0 / HC%R(I)
00305               CF%R(I) = 2.5D0 ! INITIALIZE CF=1/SQRT(CF) FOR ITERATION
00306               OLDCF   = 0.D0
00307 !
00308               DO ITER = 1, 50
00309                 IF (ABS((CF%R(I)-OLDCF)/CF%R(I))<=1.0D-6) EXIT
00310                 OLDCF = CF%R(I)
00311                 CF%R(I) = -2.03D0*LOG10(OLDCF*TERM1 + TERM2)
00312               ENDDO
00313 !
00314               IF (ITER.GE.50) THEN
00315                 CF%R(I) = -2.03D0*LOG10(TERM2)
00316               ENDIF
00317 !
00318               CF%R(I) = 2.D0 / (CF%R(I)**2) / 8.D0
00319             ENDIF
00320 !
00321           ELSEIF (RE.GT.100.D0 ) THEN
00322             CF%R(I) = 16.D0 / RE
00323           ELSE
00324             CF%R(I) = 0.16D0
00325           ENDIF
00326         ENDDO
00327 !
00328 ! OTHER CASES
00329 ! -----------
00330 !
00331       CASE DEFAULT
00332 !
00333         IF (LNG.EQ.1) WRITE(LU,1) KFROT
00334 1       FORMAT(I5,' : LOI DE FROTTEMENT INCONNUE')
00335         IF (LNG.EQ.2) WRITE(LU,2) KFROT
00336 2       FORMAT(I5,' : UNKNOWN FRICTION LAW')
00337         CALL PLANTE(1)
00338         STOP
00339 !
00340       END SELECT
00341 !
00342 !=======================================================================!
00343 !=======================================================================!
00344 !
00345       RETURN
00346       END

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