cdl_tch.f

Go to the documentation of this file.
00001 C:\opentelemac\v7p0\sources\telemac2d\cdl_tch.f
00002 !
00054                         SUBROUTINE CDL_TCH
00055 !                       ******************
00056 !
00057      &(NS,NPTFR,NBOR,LIMPRO,XNEBOR,YNEBOR,KDIR,KNEU,KDDL,G,
00058      & W,CE,FLUENT,FLUSORT,FLBOR,EPS,ZF,WINF)
00059 !
00060 !***********************************************************************
00061 ! TELEMAC 2D VERSION 6.2                                     01/07/2013
00062 !***********************************************************************
00063 !
00064 !
00065 !    UA(1,IS) = H,  UA(2,IS)=U  ,UA(3,IS)=V
00066 !
00067 !
00068 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00069 !|  NS            |-->|  TOTAL NUMBER OF NODES
00070 !|  NPTFR         |-->|  TOTAL NUMBER OF BOUNDARY NODES
00071 !|  NBOR          |-->|  GLOBAL NUMBERS OF BOUNDARY POINTS
00072 !|  LIMPRO        |-->|  TYPES OF BOUNDARY CONDITION
00073 !|  XNEBOR,YNEBOR |-->|  UNIT OUTWARD NORMAL COMPONENTS AT BOUNDARY POINTS
00074 !|  KDIR          |-->|  CONVENTION FOR DIRICHLET POINTS
00075 !|  KNEU          |-->|  CONVENTION FOR NEUMANN POINTS
00076 !|  G             |-->|  GRAVITY CONSTANT
00077 !|  HBOR          |-->|  IMPOSED VALUES FOR H
00078 !|  UBOR          |-->|  IMPOSED VALUES FOR U
00079 !|  VBOR          |-->|  IMPOSED VALUES FOR V
00080 !|  W             |-->|  UA(1,IS) = H,  UA(2,IS)=U  ,UA(3,IS)=V
00081 !|  CE            |<->|  FLUX
00082 !|  FLUENT,FLUSORT|<--|  IN AND OUT MASS FLUX
00083 !|  FLBOR         |<--|  IN AND OUT WATER MASS FLUX
00084 !|  DTHAUT        |-->|  CHARACTERISTIC LENGTH (DX) FOR CFL
00085 !|  DT            |<->|  TIME STEP
00086 !|  CFL           |-->|  CFL NUMBER
00087 !|  EPS           |-->|  TOLERANCE FOR WATER DEPTH DIVISION
00088 !|  ZF            |-->|  BATHYMETRY
00089 !|  WINF          |-->|  PRESCRIBED BOUNDARY CONDITIONS
00090 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00091 !
00092       USE BIEF
00093       USE INTERFACE_TELEMAC2D, EX_CDL_TCH => CDL_TCH
00094 !
00095       IMPLICIT NONE
00096       INTEGER LNG,LU
00097       COMMON/INFO/LNG,LU
00098 !
00099 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00100 !
00101       INTEGER, INTENT(IN)             :: NS,NPTFR,KDIR,KNEU,KDDL
00102       INTEGER, INTENT(IN)             :: NBOR(NPTFR),LIMPRO(NPTFR,6)
00103       DOUBLE PRECISION, INTENT(IN)    :: XNEBOR(2*NPTFR),YNEBOR(2*NPTFR)
00104       DOUBLE PRECISION, INTENT(IN)    :: W(3,NS)
00105       DOUBLE PRECISION, INTENT(IN)    :: G,EPS,ZF(NS)
00106       DOUBLE PRECISION, INTENT(IN)    :: WINF(3,NPTFR)
00107       DOUBLE PRECISION, INTENT(INOUT) :: CE(NS,3),FLUENT,FLUSORT
00108       TYPE(BIEF_OBJ) , INTENT(INOUT)  :: FLBOR
00109 !
00110 !+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
00111 !
00112       INTEGER IS,K,IDRY
00113 !
00114       DOUBLE PRECISION VNX,VNY,XNN,YNN,VNL
00115       DOUBLE PRECISION ::  FLXI(3),FLXJ(3),H1,U10,U1,V1,ETA1
00116       DOUBLE PRECISION :: H2,ETA2,U2,V2
00117       DOUBLE PRECISION :: INFLOW,OUTFLOW
00118 !
00119 ! LOOP OVER BOUNDARY NODES
00120       DO K=1,NPTFR
00121         IS=NBOR(K)
00122 !
00123 ! INITIALIZATION
00124         FLUENT  = 0.D0
00125         FLUSORT = 0.0D0
00126         INFLOW  = 0.0D0
00127         OUTFLOW = 0.0D0
00128         FLXI(1)  = 0.0D0
00129         FLXI(2)  = 0.0D0
00130         FLXI(3)  = 0.0D0
00131         FLXJ(1)  = 0.0D0
00132         FLXJ(2)  = 0.0D0
00133         FLXJ(3)  = 0.0D0
00134 ! INDICATOR FOR DRY CELLS
00135         IDRY=0
00136 !   NORMALIZED NORMAL
00137         XNN=XNEBOR(K)
00138         YNN=YNEBOR(K)
00139 !   NON NORMALIZED NORMAL
00140         VNX=XNEBOR(K+NPTFR)
00141         VNY=YNEBOR(K+NPTFR)
00142         VNL=SQRT(VNX**2+VNY**2)
00143 !
00144         H1   = W(1,IS)
00145         ETA1=H1+ZF(IS)
00146         IF(H1.GT.EPS)THEN
00147           U1   = W(2,IS)/H1
00148           V1   = W(3,IS)/H1
00149         ELSE
00150           U1   = 0.0D0
00151           V1   = 0.0D0
00152           IDRY=IDRY+1
00153         ENDIF
00154 !************************
00155 !    SOLID WALL
00156 !************************
00157 !
00158 !    PERFECT SLIPPING CONDITION
00159 !===============================
00160 !
00161         IF(LIMPRO(K,1).EQ.KNEU) THEN
00162 !
00163 ! DEFINITION OF THE GOST STATE Ue
00164           H2=H1
00165           ETA2=ETA1
00166 !         ROTATION
00167           U10 = U1
00168           U1  = XNN*U10+YNN*V1
00169           V1  =-YNN*U10+XNN*V1
00170 ! SET NORMAL COMPONENT = 0
00171           U1 =  0.0D0
00172           U2 =  U1
00173           V2 =  V1
00174 ! INVERSE ROTATION
00175           U10 = U1
00176           U1  = -YNN*V1
00177           V1  =  XNN*V1
00178 !
00179           U2  = -YNN*V2
00180           V2  =  XNN*V2
00181 ! not necesary
00182 !          CALL FLU_TCHAMEN(H2,H1,ETA2,ETA1,U2,U1,
00183 !      &                    V2,V1,XNN,YNN,FLXI,FLXJ,G)
00184 
00185 !**************************************************
00186 !        LIQUID BOUNDARY
00187 !**************************************************
00188         ELSEIF((LIMPRO(K,1).EQ.KDIR).OR.(LIMPRO(K,1).EQ.KDDL))THEN
00189 !
00190 !    IMPOSED H
00191 !===============================
00192 !
00193           IF(LIMPRO(K,1).EQ.KDIR) THEN
00194 !
00195             H2 = WINF(1,K)
00196             ETA2 = H2 + ZF(IS)
00197             IF(H2 .GT.EPS)THEN
00198               U2 = WINF(2,K) / H2
00199               V2 = WINF(3,K) / H2
00200             ELSE
00201               U2 = 0.0D0
00202               V2 = 0.0D0
00203               IDRY = IDRY + 1
00204             ENDIF
00205 !
00206             IF(IDRY.LT.2)THEN
00207 !           AT LEAST ONE WET CELL
00208               CALL FLU_TCHAMEN(H1,H2,ETA1,ETA2,U1,U2,
00209      &                         V1,V2,XNN,YNN,FLXI,FLXJ,G)
00210             ENDIF
00211             OUTFLOW    = FLXI(1)*VNL
00212             FLUSORT    = FLUSORT + OUTFLOW
00213             FLBOR%R(K) = OUTFLOW
00214 
00215 !         LIMPRO(K,1).NE.KDIR
00216           ELSE
00217 
00218             H2 = H1
00219             U2 = U1
00220             V2 = V1
00221             ETA2=ETA1
00222 !
00223             H1 = WINF(1,K)
00224             ETA1=H1+ZF(IS)
00225             IF(H1.GT.EPS)THEN
00226               U1 = WINF(2,K) / H1
00227               V1 = WINF(3,K) / H1
00228             ELSE
00229               U1 = 0.0D0
00230               V1 = 0.0D0
00231               IDRY = IDRY + 1
00232             ENDIF
00233 !
00234             IF(IDRY.LT.2)THEN
00235 !           AT LEAST ONE WET CELL
00236               CALL FLU_TCHAMEN(H2,H1,ETA2,ETA1,U2,U1,
00237      &                         V2,V1,XNN,YNN,FLXI,FLXJ,G)
00238             ENDIF
00239             INFLOW     = FLXI(1)*VNL
00240             FLUENT     = FLUENT + INFLOW
00241             FLBOR%R(K) = INFLOW
00242 
00243           ENDIF
00244         ENDIF
00245 !
00246         CE(IS,1)  = CE(IS,1) - VNL*FLXI(1)
00247         CE(IS,2)  = CE(IS,2) - VNL*FLXI(2)
00248         CE(IS,3)  = CE(IS,3) - VNL*FLXI(3)
00249 !
00250       ENDDO
00251 !
00252 !-----------------------------------------------------------------------
00253 !
00254       RETURN
00255       END

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