komcl3.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac3d\komcl3.f
00002 !
00067                      SUBROUTINE KOMCL3
00068 !                    *****************
00069 !
00070      & (KBORF,EBORF,LIKBOF,LIEBOF,LIUBOF,
00071      &  KBORL,EBORL,LIKBOL,LIEBOL,LIUBOL,RUGOL,
00072      &  KBORS,EBORS,LIKBOS,LIEBOS,LIUBOS,
00073      &  DISBOR,AK,EP,U,V,W,H,Z,NBOR,NPOIN2,NPLAN,NPTFR,
00074      &  DNUVIH,DNUVIV,KARMAN, ALPHA,BETA,BETAS,OMSTAR,SCHMIT,LISRUF,
00075      &  LISRUL,VIRT,GRAV,KMIN,KMAX,EMIN,EMAX,KENTU,KENT,KSORT,KADH,KLOG,
00076      &  UETCAR,UETCAL)
00077 !
00078 !***********************************************************************
00079 ! TELEMAC3D   V6P1                                   21/08/2010
00080 !***********************************************************************
00081 !
00082 !
00083 !
00084 !
00085 !
00086 !
00087 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00088 !| AK             |-->| TURBULENT ENERGY
00089 !| ALPHA          |-->| K-OMEGA CONSTANT NOT USED
00090 !| BETA           |-->| K-OMEGA CONSTANT NOT USED
00091 !| BETAS          |-->| K-OMEGA CONSTANT
00092 !| DISBOR         |-->| DISTANCE TO BOUNDARY OF POINTS CLOSE TO BOUNDARY
00093 !| DNUVIH         |-->| COEFFICIENT FOR HORIZONTAL DIFFUSION OF VELOCITIES
00094 !| DNUVIV         |-->| COEFFICIENT FOR VERTICAL DIFFUSION OF VELOCITIES
00095 !| EBORF          |<->| EPSILON ON BOTTOM
00096 !| EBORL          |<->| EPSILON ON LATERAL SOLID BOUNDARIES
00097 !| EBORS          |<->| EPSILON AT SURFACE
00098 !| EMAX           |-->| MAXIMUM VALUE FOR EPSILON WHEN CLIPPING
00099 !| EMIN           |-->| MINIMUM VALUE FOR EPSILON WHEN CLIPPING
00100 !| EP             |-->| TURBULENT DISSIPATION
00101 !| GRAV           |-->| ACCELERATION DE LA PESANTEUR
00102 !| H              |-->| WATER DEPTH AT TIME N
00103 !| KADH           |-->| CONVENTION FOR NO SLIP BOUNDARY CONDITION
00104 !| KARMAN         |-->| KARMAN CONSTANT
00105 !| KBORF          |<->| K ON BOTTOM
00106 !| KBORL          |<->| K ON LATERAL SOLID BOUNDARIES
00107 !| KBORS          |<->| K AT SURFACE
00108 !| KENT           |-->| CONVENTION FOR LIQUID INPUT WITH PRESCRIBED VALUE
00109 !| KENTU          |-->| CONVENTION FOR LIQUID INPUT WITH PRESCRIBED VELOCITY
00110 !| KLOG           |-->| CONVENTION FOR LOGARITHMIC SOLID BOUNDARY
00111 !| KMAX           |-->| MAXIMUM VALUE FOR K WHEN CLIPPING
00112 !| KMIN           |-->| MINIMUM VALUE FOR K WHEN CLIPPING
00113 !| KSORT          |-->| CONVENTION FOR FREE OUTPUT
00114 !| LIEBOF         |<->| TYPE OF BOUNDARY CONDITIONS ON EPSILON AT THE BOTTOM
00115 !| LIEBOL         |<->| TYPE OF BOUNDARY CONDITIONS ON EPSILON ON THE LATERAL WALLS
00116 !| LIEBOS         |<->| TYPE OF BOUNDARY CONDITIONS ON EPSILON AT THE SURFACE
00117 !| LIKBOF         |<->| TYPE OF BOUNDARY CONDITIONS ON K AT THE BOTTOM
00118 !| LIKBOL         |<->| TYPE OF BOUNDARY CONDITIONS ON K ON THE LATERAL WALLS
00119 !| LIKBOS         |<->| TYPE OF BOUNDARY CONDITIONS ON K AT THE SURFACE
00120 !| LISRUF         |-->| TURBULENCE MODEL FOR BOTTOM
00121 !|                |   | 1: SMOOTH  2: ROUGH  3: ROUGH (CHEZY)
00122 !| LISRUL         |-->| TURBULENCE MODEL FOR SOLID BOUNDARIES
00123 !|                |   | 1: SMOOTH  2: ROUGH  3: ROUGH (CHEZY)
00124 !| LIUBOF         |<->| TYPE OF BOUNDARY CONDITIONS ON U AT THE BOTTOM
00125 !| LIUBOL         |<->| TYPE OF BOUNDARY CONDITIONS ON U ON THE LATERAL WALLS
00126 !| LIUBOS         |<->| TYPE OF BOUNDARY CONDITIONS ON U AT THE SURFACE
00127 !| NBOR           |-->| GLOBAL NUMBER OF BOUNDARY POINTS
00128 !| NPLAN          |-->| NUMBER OF PLANES IN THE 3D MESH OF PRISMS
00129 !| NPOIN2         |-->| NUMBER OF POINTS IN 2D
00130 !| NPTFR          |-->| NUMBER OF BOUNDARY POINTS IN 2D
00131 !| OMSTAR         |-->| K-OMEGA CONSTANT
00132 !| RUGOL          |---| NOT USED
00133 !| SCHMIT         |-->| K-EPSILON MODEL CONSTANT
00134 !| U              |-->| X COMPONENT OF VELOCITY AT TIME N
00135 !| UETCAL         |-->| (UETUTA*UTANG(IPTFR))**2
00136 !| UETCAR         |-->| USTAR**2
00137 !| V              |-->| Y COMPONENT OF VELOCITY AT TIME N
00138 !| VIRT           |-->| VIRTUAL ORIGIN FOR EPSILON (TELEMAC 3D): NOT USED
00139 !| W              |-->| Z COMPONENT OF VELOCITY
00140 !| Z              |-->| ELEVATION OF REAL 3D MESH POINTS
00141 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00142 !
00143       USE DECLARATIONS_TELEMAC3D, ONLY : IPBOT
00144 !
00145       IMPLICIT NONE
00146       INTEGER LNG,LU
00147       COMMON/INFO/LNG,LU
00148 !
00149 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00150 !
00151       INTEGER, INTENT(IN) :: NPTFR, NPLAN, NPOIN2
00152       INTEGER, INTENT(IN) :: LISRUF, LISRUL,KENTU,KENT,KSORT,KADH,KLOG
00153 !
00154       INTEGER, INTENT(INOUT) :: LIKBOF(NPOIN2), LIKBOS(NPOIN2)
00155       INTEGER, INTENT(INOUT) :: LIKBOL(NPTFR,NPLAN)
00156       INTEGER, INTENT(INOUT) :: LIEBOF(NPOIN2), LIEBOS(NPOIN2)
00157       INTEGER, INTENT(INOUT) :: LIEBOL(NPTFR,NPLAN)
00158       INTEGER, INTENT(INOUT) :: LIUBOF(NPOIN2), LIUBOS(NPOIN2)
00159       INTEGER, INTENT(INOUT) :: LIUBOL(NPTFR,NPLAN)
00160 !
00161       INTEGER, INTENT(IN) :: NBOR(NPTFR)
00162 !
00163       DOUBLE PRECISION, INTENT(IN) :: U(NPOIN2,NPLAN), V(NPOIN2,NPLAN)
00164       DOUBLE PRECISION, INTENT(IN) :: W(NPOIN2,NPLAN)
00165       DOUBLE PRECISION, INTENT(IN) :: Z(NPOIN2,NPLAN)
00166       DOUBLE PRECISION, INTENT(IN) :: AK(NPOIN2,NPLAN),EP(NPOIN2,NPLAN)
00167       DOUBLE PRECISION, INTENT(IN) :: H(NPOIN2),UETCAR(NPOIN2)
00168 !
00169       DOUBLE PRECISION, INTENT(INOUT) :: KBORF(NPOIN2), KBORS(NPOIN2)
00170       DOUBLE PRECISION, INTENT(INOUT) :: KBORL(NPTFR,NPLAN)
00171       DOUBLE PRECISION, INTENT(INOUT) :: EBORF(NPOIN2), EBORS(NPOIN2)
00172       DOUBLE PRECISION, INTENT(INOUT) :: EBORL(NPTFR,NPLAN)
00173       DOUBLE PRECISION, INTENT(IN)    :: UETCAL(NPTFR,NPLAN)
00174 !
00175       DOUBLE PRECISION, INTENT(IN)    :: DISBOR(NPTFR)
00176       DOUBLE PRECISION, INTENT(IN)    :: RUGOL(NPTFR,NPLAN)
00177 !
00178       DOUBLE PRECISION, INTENT(IN) :: VIRT, DNUVIH, DNUVIV, KARMAN
00179       DOUBLE PRECISION, INTENT(IN) :: ALPHA,BETA,BETAS,OMSTAR
00180       DOUBLE PRECISION, INTENT(IN) :: SCHMIT,GRAV
00181       DOUBLE PRECISION, INTENT(IN) :: KMIN, KMAX, EMIN, EMAX
00182 !
00183 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00184 !
00185       DOUBLE PRECISION DISTFOND
00186       DOUBLE  PRECISION, PARAMETER :: FICTIFUET = 3.7D0
00187       DOUBLE  PRECISION, PARAMETER :: FICTIFOM  = 2.D0
00188       DOUBLE  PRECISION, PARAMETER :: NIVTURB = 0.02D0
00189       DOUBLE  PRECISION, PARAMETER :: TESTREICH = 1.D-4
00190       INTEGER, PARAMETER :: MAXITEREICH = 30
00191 !
00192 !-----------------------------------------------------------------------
00193 !
00194       INTEGER IPTFR, IPLAN, IPOIN2
00195 !
00196       DOUBLE PRECISION HAUT
00197       DOUBLE PRECISION SBETAS,UTANG, DIST, PROPNU
00198 !
00199       INTRINSIC SQRT,MAX,LOG
00200 !
00201 !-----------------------------------------------------------------------
00202 !
00203       SBETAS = 1.D0/SQRT(BETAS)
00204       PROPNU = (2.D0*DNUVIH + DNUVIV) /3.D0
00205 !
00206 !=======================================================================
00207 !
00208 !                        /* LOOP ON THE BOTTOM */
00209 !
00210 !=======================================================================
00211 !
00212       DO IPOIN2=1,NPOIN2
00213 !
00214 !       DIRICHLET ON K
00215 !       ---------------
00216 !
00217         IF(LIKBOF(IPOIN2).EQ.KENT) THEN
00218 !       -----------------------------
00219 !
00220           IF(LIUBOF(IPOIN2).EQ.KLOG) THEN
00221             KBORF(IPOIN2) = MAX(SBETAS*UETCAR(IPOIN2),KMIN)
00222           ELSE
00223             KBORF(IPOIN2) = KMIN
00224           ENDIF
00225 !
00226         ENDIF
00227 !
00228 !
00229 !       DIRICHLET ON EPSILON
00230 !       ---------------------
00231 !
00232         IF(LIEBOF(IPOIN2).EQ.KENT) THEN
00233 !       -------------------------------
00234 !
00235           IF(LIUBOF(IPOIN2).EQ.KLOG) THEN
00236             IF(IPBOT%I(IPOIN2).EQ.0) THEN
00237 !             NORMAL CASE
00238               DIST  = (Z(IPOIN2,2)-Z(IPOIN2,1)) / FICTIFUET
00239               EBORF(IPOIN2) = MAX(SBETAS*SQRT(UETCAR(IPOIN2))
00240      &                                 /(KARMAN*DIST),EMIN)
00241             ELSE
00242 !             RISK OF SMASHED PLANES OR TIDAL FLATS
00243               IPLAN=IPBOT%I(IPOIN2)+1
00244               IF(IPLAN.EQ.NPLAN) THEN
00245 !               CASE OF TIDAL FLATS
00246                 EBORF(IPOIN2)=EMIN
00247               ELSE
00248 !               CASE OF SMASHED PLANES : DIST COMPUTED ON FIRST FREE LAYER
00249                 DIST =(Z(IPOIN2,IPLAN+1)-Z(IPOIN2,IPLAN)) / FICTIFUET
00250                 EBORF(IPOIN2) = MAX(SBETAS*SQRT(UETCAR(IPOIN2))
00251      &                                             /(KARMAN*DIST),EMIN)
00252               ENDIF
00253             ENDIF
00254           ENDIF
00255 !
00256         ENDIF
00257 !
00258       ENDDO
00259 !
00260 !=======================================================================
00261 !
00262 !                        /* LOOP ON THE SURFACE */
00263 !
00264 !=======================================================================
00265 !
00266       DO IPOIN2=1,NPOIN2
00267 !
00268         HAUT = MAX(H(IPOIN2),1.D-7)
00269 !
00270 !       DIRICHLET ON EPSILON
00271 !       ---------------------
00272 !
00273         IF(LIEBOS(IPOIN2).EQ.KENT) THEN
00274 !       -------------------------------
00275 !
00276           EBORS(IPOIN2) = OMSTAR*SQRT(AK(IPOIN2,NPLAN))/HAUT
00277 !
00278         ENDIF
00279 !
00280       ENDDO
00281 !
00282 !=======================================================================
00283 !
00284 !                        /* LOOP ON THE LATERAL BOUNDARIES */
00285 !
00286 !
00287 !  COMPUTES KBOR,EBOR, AND AUBOR
00288 !
00289 !=======================================================================
00290 !
00291       DO IPTFR=1,NPTFR
00292 !
00293         IPOIN2 = NBOR(IPTFR)
00294         DIST   = DISBOR(IPTFR) / FICTIFUET
00295         HAUT   = MAX( H(IPOIN2), 1.D-7 )
00296 !
00297         DO IPLAN=1,NPLAN
00298 !
00299 !BOY COMPUTES THE DISTANCE TO THE BOTTOM
00300           IF(IPLAN .EQ. 1) THEN
00301             DISTFOND = (Z(IPOIN2,2)-Z(IPOIN2,1)) / FICTIFUET
00302           ELSE
00303             DISTFOND = (Z(IPOIN2,IPLAN)-Z(IPOIN2,1))
00304           ENDIF
00305 ! COMPUTES THE TANGENTIAL SPEED
00306           UTANG = SQRT(U(IPOIN2,IPLAN)**2+V(IPOIN2,IPLAN)**2)
00307 !
00308 !         DIRICHLET ON K
00309 !         ---------------
00310 !
00311           IF(LIKBOL(IPTFR,IPLAN).EQ.KENT) THEN
00312 !         ------------------------------------
00313 !         ************************************
00314             IF(LIUBOL(IPTFR,IPLAN).EQ.KENT.OR.
00315      &         LIUBOL(IPTFR,IPLAN).EQ.KENTU) THEN
00316 !           ************************************
00317 !
00318 !             COMING INTO THE DOMAIN
00319 !
00320               KBORL(IPTFR,IPLAN) = MAX(NIVTURB*U(IPOIN2,IPLAN),KMIN)
00321 !
00322 !           ****************************************
00323             ELSEIF(LIUBOL(IPTFR,IPLAN).EQ.KLOG) THEN
00324 !           ****************************************
00325 !
00326 !             WALL
00327 !
00328               KBORL(IPTFR,IPLAN)=MAX(SBETAS*UETCAL(IPTFR,IPLAN),KMIN)
00329 !
00330 !           ****************************************
00331             ELSEIF(LIUBOL(IPTFR,IPLAN).EQ.KADH) THEN
00332 !           ****************************************
00333 !
00334               KBORL(IPTFR,IPLAN) = KMIN
00335 !
00336 !           ****
00337             ELSE
00338 !           ****
00339 !
00340               IF (LNG.EQ.1) WRITE(LU,111) IPTFR,LIUBOL(IPTFR,IPLAN)
00341               IF (LNG.EQ.2) WRITE(LU,112) IPTFR,LIUBOL(IPTFR,IPLAN)
00342               CALL PLANTE(1)
00343               STOP
00344 !
00345 !           *****
00346             ENDIF
00347 !           *****
00348 !
00349           ENDIF
00350 !         -----
00351 !
00352 !         DIRICHLET ON EPSILON
00353 !         ---------------------
00354 !
00355           IF(LIEBOL(IPTFR,IPLAN).EQ.KENT) THEN
00356 !         ------------------------------------
00357 !
00358 !           ************************************
00359             IF(LIUBOL(IPTFR,IPLAN).EQ.KENT.OR.
00360      &         LIUBOL(IPTFR,IPLAN).EQ.KENTU) THEN
00361 !            ************************************
00362 !
00363 !             COMING INTO THE DOMAIN : TURBULENCE DUE TO BOTTOM
00364 !
00365 ! BOUNDARY CONDITIONS COMING RFOM THE K-EPSILON MODEL:
00366 !                  EBORL(IPTFR,IPLAN) = CMU**0.75*KBORL(IPTFR,1)**1.5
00367 !     &                      /KARMAN/DISTFOND
00368 ! AUXILIARY RELATION EPSILON=BETAS*K*OMEGA LEADS TO:
00369 !
00370               EBORL(IPTFR,IPLAN)=BETAS**(-0.25)*SQRT(KBORL(IPTFR,1))
00371      &                          /KARMAN/MAX(DISTFOND,1.D-4)
00372               EBORL(IPTFR,IPLAN)= MAX(EBORL(IPTFR,IPLAN),EMIN)
00373 !
00374 !           ****************************************
00375             ELSEIF(LIUBOL(IPTFR,IPLAN).EQ.KLOG) THEN
00376 !           ****************************************
00377 !
00378 !             WALL
00379 !
00380               EBORL(IPTFR,IPLAN) =
00381      &        MAX(SBETAS*SQRT(UETCAL(IPTFR,IPLAN))/(KARMAN*DIST),EMIN)
00382 !
00383 !           ****************************************
00384             ELSEIF(LIUBOL(IPTFR,IPLAN).EQ.KADH) THEN
00385 !           ****************************************
00386 !
00387 !HOL OMEGA = USTAR**2*SR/NUE ...
00388 !
00389               EBORL(IPTFR,IPLAN) = 2500.D0
00390 !HOL
00391 !           ****
00392             ELSE
00393 !           ****
00394 !
00395 !             OTHER
00396 !
00397               IF (LNG.EQ.1) WRITE(LU,121) IPTFR,LIUBOL(IPTFR,IPLAN)
00398               IF (LNG.EQ.2) WRITE(LU,122) IPTFR,LIUBOL(IPTFR,IPLAN)
00399               CALL PLANTE(1)
00400               STOP
00401 !
00402 !           *****
00403             ENDIF
00404 !           *****
00405 !
00406           ENDIF
00407 !         -----
00408 !
00409         ENDDO
00410       ENDDO
00411 !
00412 !-----------------------------------------------------------------------
00413 !
00414 !101   FORMAT(' KOMCL3 : REGIME DE TURBULENCE INCONNU : ',I6)
00415 !102   FORMAT(' KOMCL3 : UNKNOWN TURBULENCE MODEL : ',I6)
00416 111   FORMAT(' KOMCL3 : POINT DE BORD',I6,
00417      &       ' - CAS NON PREVU POUR KBOR : LIUBOR =',I6)
00418 112   FORMAT(' KOMCL3 : BOUNDARY NODE',I6,
00419      &       ' - UNEXPECTED CONDITION FOR KBOR : LIUBOR =',I6)
00420 121   FORMAT(' KOMCL3 : POINT DE BORD',I6,
00421      &       ' - CAS NON PREVU POUR EBOR : LIUBOR =',I6)
00422 122   FORMAT(' KOMCL3 : BOUNDARY NODE',I6,
00423      &       ' - UNEXPECTED CONDITION FOR EBOR : LIUBOR =',I6)
00424 !
00425 !-----------------------------------------------------------------------
00426 !
00427       RETURN
00428       END

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