flu_zokagoa.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\flu_zokagoa.f
00002 !
00048                         SUBROUTINE FLU_ZOKAGOA
00049 !                       **********************
00050 
00051      &(H1,H2,ZF1,ZF2,ETA1,ETA2,U1,U2,
00052      & V1,V2,XNN,YNN,FLXI,FLXJ,G)
00053 !
00054 !***********************************************************************
00055 ! TELEMAC 2D VERSION 6.3                                     06/02/2013
00056 !***********************************************************************
00057 !
00058 !       REF.:"MODELING OF WETTING-DRYING TRANSITIONS IN FREE SURFACE FLOWS
00059 !             OVER COMPLEX TOPOGRAPHIES" CMAME 199(2010) PP 2281-2304
00060 !
00061 !
00062 !
00063 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00064 !|  EPS           |-->|  TOLERANCE FOR WATER DEPTH DIVISION
00065 !|  ETA1,ETA2     |-->|  LEFT AND RIGHT FREE SURFACES
00066 !|  FLXI,FLXJ     |<--|  RIGHT AND LEFT CONTRIBUTIONS TO THE FLUX
00067 !|  G             |-->|  GRAVITY CONSTANT
00068 !|  H1,H2         |-->|  LEFT AND RIGHT WATER DEPTHS
00069 !|  U1,U2         |-->|  LEFT AND RIGHT VELOCITY X-COMPONENTS
00070 !|  V1,V2         |-->|  LEFT AND RIGHT VELOCITY Y-COMPONENTS
00071 !|  XNN,YNN       |-->|  X AND Y COMPONENTS OF THE OUTWARD UNIT NORMAL
00072 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00073 !
00074       IMPLICIT NONE
00075       INTEGER LNG,LU
00076       COMMON/INFO/LNG,LU
00077 !
00078 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00079 !
00080       DOUBLE PRECISION, INTENT(IN)    :: G,H1,H2,ETA1,ETA2,U1,U2
00081       DOUBLE PRECISION, INTENT(IN)    :: V1,V2,XNN,YNN,ZF1,ZF2
00082       DOUBLE PRECISION, INTENT(INOUT) :: FLXI(3),FLXJ(3)
00083 !
00084 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00085 !
00086       INTEGER IVAR ,CHOICE_D
00087 !
00088       DOUBLE PRECISION GSUR2,ALPHA,FLUIJ_1,EPS,UI,UJ,VI,VJ
00089       DOUBLE PRECISION U_IJ,D_IJ,C_IJ,C_I,C_J,UI0,UJ0
00090       DOUBLE PRECISION FLUIJ_2I,FLUIJ_2J,FLUIJ_3,DIJS2,FLUIJ_20
00091       DOUBLE PRECISION FLUIJ_3I,FLUIJ_3J
00092 !
00093 !-----------------------------------------------------------------------
00094 !
00095       ALPHA=0.5D0
00096       CHOICE_D=1
00097       EPS=1.E-6
00098       GSUR2=G/2.D0
00099 !
00100 !-----------------------------------------------------------------------
00101 !
00102 !     INITIALIZATION OF FLXI AND FLXJ
00103 !
00104       DO IVAR=1,3
00105         FLXI(IVAR) = 0.D0
00106         FLXJ(IVAR) = 0.D0
00107       ENDDO
00108 !
00109 !-----------------------------------------------------------------------
00110 !
00111 ! VELOCITIES
00112 !
00113       UI=U1
00114       VI=V1
00115       UJ=U2
00116       VJ=V2
00117 !
00118 ! ROTATION
00119 !
00120       UI0 = UI
00121       UI  = XNN*UI0+YNN*VI
00122       VI  =-YNN*UI0+XNN*VI
00123 !
00124       UJ0 = UJ
00125       UJ  = XNN*UJ0+YNN*VJ
00126       VJ  =-YNN*UJ0+XNN*VJ
00127 !
00128 ! WET/DRY TREATMENT
00129 !
00130 !      CALL WETDRY(ETA1,ZF1,H1,UI,VI,ETA2,ZF2,H2,UJ,VJ,EPS)
00131 !
00132 !     LET'S COMPUTE D_IJ
00133 !
00134       IF(CHOICE_D.EQ.1) THEN
00135 !
00136 !       ZOKAGOA'S CHOICE
00137 !
00138         U_IJ=0.5D0*(UI+UJ)
00139         C_IJ=SQRT(GSUR2*(H1+H2))
00140         D_IJ=ALPHA*MAX(ABS(U_IJ-C_IJ),MAX(ABS(U_IJ),ABS(U_IJ+C_IJ)))
00141 !
00142       ELSEIF(CHOICE_D.EQ.2) THEN
00143 !
00144 !       TORO'S CHOICE
00145 !
00146         C_I=SQRT(G*H1)
00147         C_J=SQRT(G*H2)
00148         D_IJ=MAX(ABS(UI)+C_I,ABS(UJ)+C_J)
00149 !
00150       ELSE
00151 !
00152 !       ERROR MESSAGE
00153 !
00154         IF(LNG.EQ.1) WRITE(LU,4010) CHOICE_D
00155         IF(LNG.EQ.2) WRITE(LU,4020) CHOICE_D
00156 4010    FORMAT(1X,'FLU_AZZ : ERREUR DANS LE CHOIX DE L''UPWIND : ',1I6)
00157 4020    FORMAT(1X,'FLU_AZZ: ERROR IN THE UPWIND CHOICE: ',1I6)
00158         CALL PLANTE(1)
00159         STOP
00160 !
00161       ENDIF
00162 
00163 !
00164 ! CENTERED FLUX COMPUTATION
00165 !
00166 ! ZOKAGOA FLUX
00167 !
00168       FLUIJ_1 = 0.5D0*(H1*UI+H2*UJ)
00169       FLUIJ_2I= 0.5D0*(H1*(UI*UI)+H2*(UJ*UJ) +
00170      &          GSUR2*((ETA1*ETA1)+(ETA2*ETA2))-
00171      &          G*ZF1*(ETA1+ETA2) )
00172       FLUIJ_2J= FLUIJ_2I+GSUR2*(ETA1+ETA2)*(ZF1-ZF2)
00173       FLUIJ_3 = 0.5D0*(H1*UI*VI+H2*UJ*VJ)
00174 !
00175 ! UPWIND ADDING
00176 !
00177       DIJS2=0.5D0*D_IJ
00178       FLUIJ_1  = FLUIJ_1 - DIJS2*(ETA2-ETA1)
00179       FLUIJ_2I = FLUIJ_2I- DIJS2*(H2*UJ-H1*UI)
00180       FLUIJ_2J = FLUIJ_2J- DIJS2*(H2*UJ-H1*UI)
00181       FLUIJ_3  = FLUIJ_3 - DIJS2*(H2*VJ-H1*VI)
00182 !
00183 ! INVERSE ROTATION
00184 !
00185       FLUIJ_20  = FLUIJ_2I
00186       FLUIJ_3I  = FLUIJ_3
00187       FLUIJ_2I  = XNN*FLUIJ_20-YNN*FLUIJ_3I
00188       FLUIJ_3I  = YNN*FLUIJ_20+XNN*FLUIJ_3I
00189 !
00190       FLUIJ_20  = FLUIJ_2J
00191       FLUIJ_3J  = FLUIJ_3
00192       FLUIJ_2J  = XNN*FLUIJ_20-YNN*FLUIJ_3J
00193       FLUIJ_3J  = YNN*FLUIJ_20+XNN*FLUIJ_3J
00194 !
00195 ! FINAL FLUX
00196 !
00197       FLXI(1) =  FLUIJ_1
00198       FLXI(2) =  FLUIJ_2I
00199       FLXI(3) =  FLUIJ_3I
00200 !
00201       FLXJ(1) =  FLUIJ_1
00202       FLXJ(2) =  FLUIJ_2J
00203       FLXJ(3) =  FLUIJ_3J
00204 !
00205 !-----------------------------------------------------------------------
00206 !
00207       RETURN
00208       END

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