flu_tchamen.f

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

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